summaryrefslogtreecommitdiff
path: root/databasetable.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 /databasetable.h
parentd3a08d8f3b6302133452a7434f4d05a899830dfa (diff)
downloaddbmodel-54bf61f97071a93619a4a03028f8b71e4fbd6225.tar.xz
Covert column operations to the undo/command framework
Diffstat (limited to 'databasetable.h')
-rw-r--r--databasetable.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/databasetable.h b/databasetable.h
index 7b54cf7..e11b152 100644
--- a/databasetable.h
+++ b/databasetable.h
@@ -22,6 +22,7 @@
#include "databasemodelitem.h"
class Column;
+class ColumnList;
class DatabaseModel;
class DatabaseTable : public QObject, public DatabaseModelItem
@@ -40,14 +41,12 @@ public:
QString name() const { return m_name; }
void setName(const QString &name);
- QList<Column *> columns() const { return m_columns; }
- Column *column(int index) const { return m_columns[index]; }
- int columnCount() const { return m_columns.size(); }
+ ColumnList *columnList() { return m_columnList; }
- void setColumn(int index, const QString &name);
- void removeColumn(int index);
- Column *addColumn(const QString &name = QString());
- void swapColumns(int index1, int index2);
+// void setColumn(int index, const QString &name);
+// void removeColumn(int index);
+// Column *addColumn(const QString &name = QString());
+// void swapColumns(int index1, int index2);
enum { Type = DatabaseModelItem::Table };
virtual int type() const { return Type; }
@@ -58,14 +57,12 @@ signals:
protected slots:
void updateLayout();
- friend class Column;
-
protected:
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
private:
QString m_name;
- QList<Column *> m_columns;
+ ColumnList *m_columnList;
QRectF m_outerRect, m_nameBgRect;
QPointF m_namePos, m_firstColPos, m_colPosIncrement;