kexi
kexidataawarepropertyset.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KEXIDATAAWAREPROPERTYSET_H
00021 #define KEXIDATAAWAREPROPERTYSET_H
00022
00023 #include <qguardedptr.h>
00024 #include <qptrvector.h>
00025 #include <koproperty/set.h>
00026
00027 typedef QPtrVector<KoProperty::Set> SetVector;
00028
00029 class KexiViewBase;
00030 class KexiTableItem;
00031 class KexiTableViewData;
00032 class KexiDataAwareObjectInterface;
00033
00053 class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public QObject
00054 {
00055 Q_OBJECT
00056
00057 public:
00063 KexiDataAwarePropertySet(KexiViewBase *view, KexiDataAwareObjectInterface* dataObject);
00064
00065 virtual ~KexiDataAwarePropertySet();
00066
00067 uint size() const;
00068
00069 KoProperty::Set* currentPropertySet() const;
00070
00071 uint currentRow() const;
00072
00073 inline KoProperty::Set* at(uint row) const { return m_sets[row]; }
00074
00078 KoProperty::Set* findPropertySetForItem(KexiTableItem& item);
00079
00083 int findRowForPropertyValue(const QCString& propertyName, const QVariant& value);
00084
00085 signals:
00090 void rowDeleted();
00091
00094 void rowInserted();
00095
00096 public slots:
00097 void removeCurrentPropertySet();
00098
00099 void clear(uint minimumSize = 0);
00100
00113 void insert(uint row, KoProperty::Set* set, bool newOne = false);
00114
00116 void remove(uint row);
00117
00118 protected slots:
00120 void slotDataSet( KexiTableViewData *data );
00121
00123 void slotRowDeleted();
00124
00126 void slotRowsDeleted( const QValueList<int> &rows );
00127
00129 void slotRowInserted(KexiTableItem* item, uint row, bool repaint);
00130
00132 void slotCellSelected(int, int row);
00133
00135 void slotReloadRequested();
00136
00137 protected:
00138 SetVector m_sets;
00139
00140 QGuardedPtr<KexiViewBase> m_view;
00141 KexiDataAwareObjectInterface* m_dataObject;
00142
00143 QGuardedPtr<KexiTableViewData> m_currentTVData;
00144
00145 int m_row;
00146 };
00147
00148 #endif
00149
|