diff options
author | Lukáš Lalinský <lalinsky@gmail.com> | 2008-12-06 11:36:39 +0100 |
---|---|---|
committer | Lukáš Lalinský <lalinsky@gmail.com> | 2008-12-06 11:36:39 +0100 |
commit | 54bf61f97071a93619a4a03028f8b71e4fbd6225 (patch) | |
tree | 87d1b156b5fcb9be2e655f3a16ec3227f43cf7ee /column.cpp | |
parent | d3a08d8f3b6302133452a7434f4d05a899830dfa (diff) | |
download | dbmodel-54bf61f97071a93619a4a03028f8b71e4fbd6225.tar.xz |
Covert column operations to the undo/command framework
Diffstat (limited to 'column.cpp')
-rw-r--r-- | column.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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); } } |