kexi

kexidataawareview.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2005 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This program is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this program; see the file COPYING.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef KEXIDATAAWAREVIEW_H
00021 #define KEXIDATAAWAREVIEW_H
00022 
00023 #include <kexiviewbase.h>
00024 
00025 class KexiDataAwareObjectInterface;
00026 class KexiSharedActionClient;
00027 
00038 class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase
00039 {
00040     Q_OBJECT
00041 
00042     public:
00043         KexiDataAwareView(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
00044 
00045         QWidget* mainWidget();
00046 
00047         virtual QSize minimumSizeHint() const;
00048         virtual QSize sizeHint() const;
00049         KexiDataAwareObjectInterface* dataAwareObject() const { return m_dataAwareObject; }
00050 
00051     public slots:
00052         void deleteAllRows();
00053         void deleteCurrentRow();
00054         void deleteAndStartEditCurrentCell();
00055         void startEditOrToggleValue();
00056         bool acceptRowEdit();
00057         void cancelRowEdit();
00058         void sortAscending();
00059         void sortDescending();
00060 
00061     protected slots:
00062 //      void slotCellSelected(const QVariant& v); //!< @internal
00063         void slotCellSelected(int col, int row);
00064         void reloadActions();
00065         void slotUpdateRowActions(int row);
00066         void slotClosing(bool& cancel);
00067 
00068     protected:
00069         void init( QWidget* viewWidget, KexiSharedActionClient* actionClient,
00070             KexiDataAwareObjectInterface* dataAwareObject, 
00071         // temporary, for KexiFormView in design mode 
00072             bool noDataAware = false
00073         );
00074         void initActions();
00075         virtual void updateActions(bool activated);
00076 
00077         //KexiViewBase
00078         QWidget* m_internalView;
00079         KexiSharedActionClient* m_actionClient;
00080         KexiDataAwareObjectInterface* m_dataAwareObject;
00081 };
00082 
00083 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys