/* 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 = nullptr); MappingTreeResultModel *model() const { return mResultModel; } MappingTreeWidget *treeWidget() const { return mMappingTree; } void blockResultChange(bool c) { mBlockResultChange = c; } 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); void copyActor(); private: MappingTreeWidget *mMappingTree; MappingTreeResultView *mMappingResult; MappingTreeResultModel *mResultModel; bool mBlockResultChange = false; }; #endif // MAPPINGEDITWIDGET_H