kexi
kexidataawareview.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KEXIDATAAWAREVIEW_H
00021 #define KEXIDATAAWAREVIEW_H
00022
00023 #include <kexiviewbase.h>
00024 #include <kexisearchandreplaceiface.h>
00025
00026 class KexiDataAwareObjectInterface;
00027 class KexiSharedActionClient;
00028
00041 class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase,
00042 public KexiSearchAndReplaceViewInterface
00043 {
00044 Q_OBJECT
00045
00046 public:
00047 KexiDataAwareView(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
00048
00049 QWidget* mainWidget();
00050
00051 virtual QSize minimumSizeHint() const;
00052
00053 virtual QSize sizeHint() const;
00054
00055 KexiDataAwareObjectInterface* dataAwareObject() const { return m_dataAwareObject; }
00056
00059 virtual bool setupFindAndReplace(QStringList& columnNames, QStringList& columnCaptions,
00060 QString& currentColumnName);
00061
00064 virtual tristate find(const QVariant& valueToFind,
00065 const KexiSearchAndReplaceViewInterface::Options& options, bool next);
00066
00069 virtual tristate findNextAndReplace(const QVariant& valueToFind,
00070 const QVariant& replacement,
00071 const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll);
00072
00073 public slots:
00074 void deleteAllRows();
00075 void deleteCurrentRow();
00076 void deleteAndStartEditCurrentCell();
00077 void startEditOrToggleValue();
00078 bool acceptRowEdit();
00079 void cancelRowEdit();
00080 void sortAscending();
00081 void sortDescending();
00082 void copySelection();
00083 void cutSelection();
00084 void paste();
00085 void slotGoToFirstRow();
00086 void slotGoToPreviusRow();
00087 void slotGoToNextRow();
00088 void slotGoToLastRow();
00089 void slotGoToNewRow();
00090
00091
00092
00093
00094
00095
00096 protected slots:
00097
00098 void slotCellSelected(int col, int row);
00099 void reloadActions();
00100 void slotUpdateRowActions(int row);
00101 void slotClosing(bool& cancel);
00102
00103 protected:
00104 void init( QWidget* viewWidget, KexiSharedActionClient* actionClient,
00105 KexiDataAwareObjectInterface* dataAwareObject,
00106
00107 bool noDataAware = false
00108 );
00109 void initActions();
00110 virtual void updateActions(bool activated);
00111
00112 QWidget* m_internalView;
00113 KexiSharedActionClient* m_actionClient;
00114 KexiDataAwareObjectInterface* m_dataAwareObject;
00115 };
00116
00117 #endif
|