From d54f8bc5effe3c008ff39f0e55bf1b71e08c19af Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 19 Jul 2018 18:21:11 +0200 Subject: Just code shuffle, no functional change Split up all the classes in mappingtreewidget into separate files to make editing easier. --- mappingeditwidget.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 mappingeditwidget.h (limited to 'mappingeditwidget.h') 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 + +#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 &mappings); + void expandAllResults(); + void shiftFocusResult(); + void shiftFocusMappings(); + void saveMappings(QString where); + void loadMappings(QString from); + void resultSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous); + + private: + MappingTreeWidget *mMappingTree; + MappingTreeResultView *mMappingResult; + MappingTreeResultModel *mResultModel; + QPushButton *mAddMapping; + QPushButton *mRemoveMapping; + QPushButton *mClearMapping; + QPushButton *mAddTree; +}; + +#endif // MAPPINGEDITWIDGET_H -- cgit v1.2.3-70-g09d2