From 54bf61f97071a93619a4a03028f8b71e4fbd6225 Mon Sep 17 00:00:00 2001 From: Lukáš Lalinský Date: Sat, 6 Dec 2008 11:36:39 +0100 Subject: Covert column operations to the undo/command framework --- column.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'column.cpp') 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 ¬es) { 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); } } -- cgit v1.2.3-70-g09d2