summaryrefslogtreecommitdiff
path: root/databasemodel.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 /databasemodel.h
parent38c64d01f173989e3bc2172f6989e587480bd83e (diff)
downloaddbmodel-3458318f785ba66b65e7a3c831368d58321e10e5.tar.xz
Convert column edits to undo-able commands
Diffstat (limited to 'databasemodel.h')
-rw-r--r--databasemodel.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/databasemodel.h b/databasemodel.h
index f516c67..10efed3 100644
--- a/databasemodel.h
+++ b/databasemodel.h
@@ -17,6 +17,7 @@
#ifndef DATABASEMODEL_H
#define DATABASEMODEL_H
+#include <QUndoStack>
#include <QGraphicsScene>
#include <QGraphicsSceneMouseEvent>
#include <QDomDocument>
@@ -51,6 +52,8 @@ public:
QString fileName() { return m_fileName; }
void setFileName(const QString &fileName) { m_fileName = fileName; }
+ QUndoStack *undoStack() const { return m_undoStack; }
+
signals:
void modeChanged(DatabaseModel::Mode mode);
void tableMoved(DatabaseTable *table);
@@ -66,6 +69,7 @@ protected:
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
private:
+ QUndoStack *m_undoStack;
Mode m_mode;
QString m_fileName;
QGraphicsLineItem *m_line;