summaryrefslogtreecommitdiffstats
path: root/mappingeditwidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'mappingeditwidget.h')
-rw-r--r--mappingeditwidget.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/mappingeditwidget.h b/mappingeditwidget.h
new file mode 100644
index 0000000..ce5ee86
--- /dev/null
+++ b/mappingeditwidget.h
@@ -0,0 +1,50 @@
+/*
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version
+ 2 of the License, or (at your option) any later version.
+*/
+
+#ifndef MAPPINGEDITWIDGET_H
+#define MAPPINGEDITWIDGET_H
+
+#include <QWidget>
+
+#include "mappingtreemodel.h"
+
+class QPushButton;
+class MappingTreeResultModel;
+class MappingTreeResultView;
+class MappingTreeWidget;
+
+class MappingEditWidget : public QWidget {
+ Q_OBJECT
+ public:
+ explicit MappingEditWidget(QWidget *parent = 0);
+ MappingTreeResultModel *model() const { return mResultModel; }
+ MappingTreeWidget *treeWidget() const { return mMappingTree; }
+
+ public slots:
+ void addMapping();
+ void addTree();
+ void removeMapping();
+ void clearMapping();
+ void setMappings(const QList<MappingData> &mappings);
+ void expandAllResults();
+ void shiftFocusResult();
+ void shiftFocusMappings();
+ void saveMappings(QString where);
+ void loadMappings(QString from);
+ void resultSelectionChanged(const QModelIndex &current, const QModelIndex &previous);
+
+ private:
+ MappingTreeWidget *mMappingTree;
+ MappingTreeResultView *mMappingResult;
+ MappingTreeResultModel *mResultModel;
+ QPushButton *mAddMapping;
+ QPushButton *mRemoveMapping;
+ QPushButton *mClearMapping;
+ QPushButton *mAddTree;
+};
+
+#endif // MAPPINGEDITWIDGET_H