summaryrefslogtreecommitdiffstats
path: root/mappingtreewidget.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2012-10-05 12:18:14 +0200
committerArno <am@disconnect.de>2012-10-05 12:18:14 +0200
commita682fc799b99653b67f5bbd8f1bed371bcbe48f1 (patch)
tree32d79631b279296f28f31fe1dc1c36b03962c79c /mappingtreewidget.h
parent4d2cc1f62de2e097600212f57ef17d222931bbe5 (diff)
downloadSheMov-a682fc799b99653b67f5bbd8f1bed371bcbe48f1.tar.gz
SheMov-a682fc799b99653b67f5bbd8f1bed371bcbe48f1.tar.bz2
SheMov-a682fc799b99653b67f5bbd8f1bed371bcbe48f1.zip
Fixed adding and deleting children from MappingTreeModel
Another fix to MappingTreeModel's new database layout. I think we're getting there... Insert the mappings into mapping_parents2 and add the MapParentId to the newly created index in the model. For now, the added date remains invalid. Make it possible (again?) to add root items to MappingTreeModel. For this I had to design a new QDialog with a checkbox. This one fixes another bug in SmTreeModel: Don't call parent() on a null pointer. Sometimes I'm getting random SIGBUS-Signals, but maybe that's because of the debug build of qt I'm using. Couldn't track it down yet...
Diffstat (limited to 'mappingtreewidget.h')
-rw-r--r--mappingtreewidget.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/mappingtreewidget.h b/mappingtreewidget.h
index 60bbecc..600c6d5 100644
--- a/mappingtreewidget.h
+++ b/mappingtreewidget.h
@@ -17,6 +17,7 @@ class MappingTreeModel;
class QComboBox;
class QPushButton;
class QLabel;
+class QCheckBox;
class QSortFilterProxyModel;
class QStringListModel;
class QAction;
@@ -98,6 +99,21 @@ class MappingEditWidget : public QWidget {
QPushButton *mRemoveMapping;
};
+class MappingInputDialog : public QDialog {
+ Q_OBJECT
+ public:
+ explicit MappingInputDialog(QWidget *parent, Qt::WindowFlags f = 0);
+ QString mappingName() const;
+ bool createRoot() const;
+
+ private:
+ QPushButton *mOk;
+ QPushButton *mCancel;
+ QLineEdit *mEditor;
+ QCheckBox *mIsRoot;
+
+};
+
class MappingEditDialog : public QDialog {
Q_OBJECT
public: