diff options
Diffstat (limited to 'tests/guidevtest/testsdialog.h')
-rw-r--r-- | tests/guidevtest/testsdialog.h | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/guidevtest/testsdialog.h b/tests/guidevtest/testsdialog.h index a728229..f6492d5 100644 --- a/tests/guidevtest/testsdialog.h +++ b/tests/guidevtest/testsdialog.h @@ -2,12 +2,35 @@ #define TESTSDIALOG_H #include <QtGui/QDialog> +#include <QtCore/QAbstractListModel> + + namespace Ui { - class TestsDialog; +class TestsDialog; } class UnitTestManager; +class UnitTestBase; + +class TestsViewModel : public QAbstractListModel +{ + Q_OBJECT +public: + explicit TestsViewModel(UnitTestManager *manager, QObject *parent = 0); + virtual int rowCount(const QModelIndex &parent = QModelIndex()) const; + virtual QVariant data(const QModelIndex &index, int role) const; + virtual QVariant headerData(int section, Qt::Orientation orientation, + int role = Qt::DisplayRole) const; + virtual Qt::ItemFlags flags(const QModelIndex &index) const; + virtual bool setData(const QModelIndex &index, const QVariant &value, + int role = Qt::EditRole); + +private: + QList<UnitTestBase *> m_unitList; +}; + + class TestsDialog : public QDialog { @@ -18,7 +41,7 @@ public: private: Ui::TestsDialog *ui; - UnitTestManager *m_utManager; + TestsViewModel *m_model; }; #endif // TESTSDIALOG_H |