summaryrefslogtreecommitdiff
path: root/columnlistmodel.h
diff options
context:
space:
mode:
authorLukáš Lalinský <lalinsky@gmail.com>2008-12-06 11:36:39 +0100
committerLukáš Lalinský <lalinsky@gmail.com>2008-12-06 11:36:39 +0100
commit54bf61f97071a93619a4a03028f8b71e4fbd6225 (patch)
tree87d1b156b5fcb9be2e655f3a16ec3227f43cf7ee /columnlistmodel.h
parentd3a08d8f3b6302133452a7434f4d05a899830dfa (diff)
downloaddbmodel-54bf61f97071a93619a4a03028f8b71e4fbd6225.tar.xz
Covert column operations to the undo/command framework
Diffstat (limited to 'columnlistmodel.h')
-rw-r--r--columnlistmodel.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/columnlistmodel.h b/columnlistmodel.h
index 2fa61ea..2944223 100644
--- a/columnlistmodel.h
+++ b/columnlistmodel.h
@@ -18,9 +18,8 @@
#define COLUMNLISTMODEL_H
#include <QAbstractTableModel>
-
-class DatabaseTable;
class Column;
+class ColumnList;
class ColumnListModel : public QAbstractTableModel
{
@@ -29,8 +28,8 @@ class ColumnListModel : public QAbstractTableModel
public:
ColumnListModel(QObject *parent = 0);
- DatabaseTable *table() { return m_table; }
- void setTable(DatabaseTable *table);
+ ColumnList *columnList() { return m_columnList; }
+ void setColumnList(ColumnList *columnList);
// QAbstractItemModel methods
int rowCount(const QModelIndex &parent) const;
@@ -42,13 +41,15 @@ public:
QModelIndex indexFromRow(int i) const;
-public slots:
- QModelIndex addColumn();
- void removeColumn(const QModelIndex &index);
- void swapColumns(int i1, int i2);
+private slots:
+ void _columnAboutToBeInserted(int index);
+ void _columnInserted();
+ void _columnAboutToBeRemoved(int index);
+ void _columnRemoved();
+ void _columnChanged(int index);
private:
- DatabaseTable *m_table;
+ ColumnList *m_columnList;
};
#endif