File indexing completed on 2024-09-15 03:39:22
0001 /* 0002 SPDX-FileCopyrightText: 2010 Stephen Kelly <steveire@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef MODELCOMMANDERWIDGET_H 0008 #define MODELCOMMANDERWIDGET_H 0009 0010 #include <QWidget> 0011 0012 class QTreeWidget; 0013 class QTreeWidgetItem; 0014 class QPushButton; 0015 0016 class DynamicTreeModel; 0017 class ModelCommander; 0018 0019 class ModelCommanderWidget : public QWidget 0020 { 0021 Q_OBJECT 0022 public: 0023 ModelCommanderWidget(DynamicTreeModel *dynamicTreeModel, QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); 0024 0025 private Q_SLOTS: 0026 void initTest(QTreeWidgetItem *item); 0027 void executeTest(QTreeWidgetItem *item); 0028 void currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous); 0029 void executeCurrentTest(); 0030 void resetCurrentTest(); 0031 0032 private: 0033 void init(); 0034 0035 private: 0036 DynamicTreeModel *m_dynamicTreeModel; 0037 ModelCommander *m_modelCommander; 0038 QTreeWidget *m_treeWidget; 0039 QPushButton *m_executeButton; 0040 }; 0041 0042 #endif