kexi

kexidataawareview.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2005-2006 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         void copySelection();
00061         void cutSelection();
00062         void paste();
00063         void slotGoToFirstRow();
00064         void slotGoToPreviusRow();
00065         void slotGoToNextRow();
00066         void slotGoToLastRow();
00067         void slotGoToNewRow();
00068 
00069     protected slots:
00070 //      void slotCellSelected(const QVariant& v); //!< @internal
00071         void slotCellSelected(int col, int row);
00072         void reloadActions();
00073         void slotUpdateRowActions(int row);
00074         void slotClosing(bool& cancel);
00075 
00076     protected:
00077         void init( QWidget* viewWidget, KexiSharedActionClient* actionClient,
00078             KexiDataAwareObjectInterface* dataAwareObject, 
00079         // temporary, for KexiFormView in design mode 
00080             bool noDataAware = false
00081         );
00082         void initActions();
00083         virtual void updateActions(bool activated);
00084 
00085         //KexiViewBase
00086         QWidget* m_internalView;
00087         KexiSharedActionClient* m_actionClient;
00088         KexiDataAwareObjectInterface* m_dataAwareObject;
00089 };
00090 
00091 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys