summaryrefslogtreecommitdiff
path: root/column.h
diff options
context:
space:
mode:
authorLukáš Lalinský <lalinsky@gmail.com>2008-11-29 23:26:18 +0100
committerLukáš Lalinský <lalinsky@gmail.com>2008-11-29 23:26:18 +0100
commit3458318f785ba66b65e7a3c831368d58321e10e5 (patch)
tree89ce2f16b379c5891fc583d88c8a44912e926fb4 /column.h
parent38c64d01f173989e3bc2172f6989e587480bd83e (diff)
downloaddbmodel-3458318f785ba66b65e7a3c831368d58321e10e5.tar.xz
Convert column edits to undo-able commands
Diffstat (limited to 'column.h')
-rw-r--r--column.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/column.h b/column.h
index 1a77bec..3b7a3fc 100644
--- a/column.h
+++ b/column.h
@@ -24,8 +24,19 @@ class DatabaseTable;
class Column
{
public:
+
+ enum Property {
+ NameProperty,
+ DataTypeProperty,
+ NotesProperty,
+ PrimaryKeyProperty,
+ RequiredProperty
+ };
+
Column(DatabaseTable *table);
+ DatabaseTable *table() const { return m_table; }
+
QString name() const { return m_name; }
void setName(const QString &name);
@@ -41,6 +52,9 @@ public:
bool isRequired() const { return m_required; }
void setRequired(bool required);
+ QVariant property(Property property) const;
+ void setProperty(Property property, const QVariant &value);
+
private:
DatabaseTable *m_table;
QString m_name;