summaryrefslogtreecommitdiff
path: root/column.cpp
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 /column.cpp
parentd3a08d8f3b6302133452a7434f4d05a899830dfa (diff)
downloaddbmodel-54bf61f97071a93619a4a03028f8b71e4fbd6225.tar.xz
Covert column operations to the undo/command framework
Diffstat (limited to 'column.cpp')
-rw-r--r--column.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/column.cpp b/column.cpp
index be09c29..3d40bc4 100644
--- a/column.cpp
+++ b/column.cpp
@@ -14,11 +14,11 @@
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#include "databasetable.h"
#include "column.h"
+#include "columnlist.h"
-Column::Column(DatabaseTable *table)
- : m_table(table), m_primaryKey(false), m_required(false)
+Column::Column(ColumnList *columnList)
+ : QObject(columnList), m_primaryKey(false), m_required(false)
{
}
@@ -27,7 +27,7 @@ Column::setName(const QString &name)
{
if (m_name != name) {
m_name = name;
- m_table->updateLayout();
+ emit propertyChanged("name", name);
}
}
@@ -36,7 +36,7 @@ Column::setNotes(const QString &notes)
{
if (m_notes != notes) {
m_notes = notes;
- m_table->updateLayout();
+ emit propertyChanged("notes", notes);
}
}
@@ -45,7 +45,7 @@ Column::setDataType(const QString &dataType)
{
if (m_dataType != dataType) {
m_dataType = dataType;
- m_table->updateLayout();
+ emit propertyChanged("dataType", dataType);
}
}
@@ -54,7 +54,7 @@ Column::setPrimaryKey(bool primaryKey)
{
if (m_primaryKey != primaryKey) {
m_primaryKey = primaryKey;
- m_table->updateLayout();
+ emit propertyChanged("primaryKey", primaryKey);
}
}
@@ -63,7 +63,7 @@ Column::setRequired(bool required)
{
if (m_required != required) {
m_required = required;
- m_table->updateLayout();
+ emit propertyChanged("required", required);
}
}