/* 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 MAPPINGTREEWIDGET_H #define MAPPINGTREEWIDGET_H #include #include #include "smtreeview.h" class MappingTreeView; class MappingTreeModel; class QComboBox; class QCheckBox; class QStringListModel; class MappingTreeResultModel; class QLineEdit; class MappingTreeProxy; struct MappingData; class MappingTreeWidget : public QWidget { Q_OBJECT public: explicit MappingTreeWidget(QWidget *parent = 0); MappingData selectedItem() const; QList selectedTree() const; QList selectedTreeRecursive(const QModelIndex &start) const; MappingTreeView *mappingTreeView() const { return mTree; } MappingTreeModel *mappingTreeModel() const { return mModel; } MappingTreeProxy *mappingTreeProxy() const { return mProxy; } public slots: void addChild(); void addActor(); void addType(); void deleteChild(); void deleteType(); protected: virtual void hideEvent(QHideEvent *event); private slots: void typeChanged(QString type); void editChild(); void selectionChanged(); void filter(); void clearFilter(); signals: void mappingChanged(int); private: const QModelIndex selected() const; MappingTreeView *mTree; MappingTreeModel *mModel; MappingTreeProxy *mProxy; QStringListModel *mTypesModel; QComboBox *mTypeBox; QLineEdit *mFilter; QPushButton *mDoFilter; QPushButton *mClearFilter; QPushButton *mAddType; QPushButton *mDeleteType; QPushButton *mRefresh; QAction *mAddChildA; QAction *mAddActorA; QAction *mDeleteChildA; QAction *mEditChildA; }; #endif // MAPPINGTREEWIDGET_H