kexidataawarepropertyset.h
1/* This file is part of the KDE project
2 Copyright (C) 2004-2005 Jaroslaw Staniek <js@iidea.pl>
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef KEXIDATAAWAREPROPERTYSET_H
21#define KEXIDATAAWAREPROPERTYSET_H
22
23#include <tqguardedptr.h>
24#include <tqptrvector.h>
25#include <koproperty/set.h>
26
27typedef TQPtrVector<KoProperty::Set> SetVector;
28
29class KexiViewBase;
30class KexiTableItem;
33
53class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public TQObject
54{
55 TQ_OBJECT
56
57
58 public:
65
67
68 uint size() const;
69
70 KoProperty::Set* currentPropertySet() const;
71
72 uint currentRow() const;
73
74 inline KoProperty::Set* at(uint row) const { return m_sets[row]; }
75
79 KoProperty::Set* findPropertySetForItem(KexiTableItem& item);
80
84 int findRowForPropertyValue(const TQCString& propertyName, const TQVariant& value);
85
86 signals:
91 void rowDeleted();
92
96
97 public slots:
98 void removeCurrentPropertySet();
99
100 void clear(uint minimumSize = 0);
101
114 void insert(uint row, KoProperty::Set* set, bool newOne = false);
115
117 void remove(uint row);
118
119 protected slots:
121 void slotDataSet( KexiTableViewData *data );
122
124 void slotRowDeleted();
125
127 void slotRowsDeleted( const TQValueList<int> &rows );
128
130 void slotRowInserted(KexiTableItem* item, uint row, bool repaint);
131
133 void slotCellSelected(int, int row);
134
136 void slotReloadRequested();
137
138 protected:
139 SetVector m_sets;
140
141 TQGuardedPtr<KexiViewBase> m_view;
142 KexiDataAwareObjectInterface* m_dataObject;
143// TQGuardedPtr<KexiTableView> m_tableView;
144 TQGuardedPtr<KexiTableViewData> m_currentTVData;
145
146 int m_row;
147};
148
149#endif
150
The KexiDataAwareObjectInterface is an interface for record-based data object.
SetVector m_sets
prop. sets vector
int m_row
used to know if a new row is selected in slotCellSelected()
Base class for single view embeddable of in KexiDialogBase.