Changeset View
Changeset View
Standalone View
Standalone View
plugins/filetemplates/testcasespage.h
Show All 17 Lines | |||||
18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef KDEVPLATFORM_PLUGIN_TESTCASESWIDGET_H | 21 | #ifndef KDEVPLATFORM_PLUGIN_TESTCASESWIDGET_H | ||
22 | #define KDEVPLATFORM_PLUGIN_TESTCASESWIDGET_H | 22 | #define KDEVPLATFORM_PLUGIN_TESTCASESWIDGET_H | ||
23 | 23 | | |||
24 | #include <QWidget> | 24 | #include <QWidget> | ||
25 | 25 | | |||
26 | 26 | #include "ipagefocus.h" | |||
27 | 27 | | |||
28 | class KEditListWidget; | 28 | class KEditListWidget; | ||
29 | 29 | | |||
30 | namespace KDevelop | 30 | namespace KDevelop | ||
31 | { | 31 | { | ||
32 | 32 | | |||
33 | /** | 33 | /** | ||
34 | * Assistant page for specifying the list of test cases | 34 | * Assistant page for specifying the list of test cases | ||
35 | * | 35 | * | ||
36 | */ | 36 | */ | ||
37 | class TestCasesPage : public QWidget | 37 | class TestCasesPage : public QWidget, public IPageFocus | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | Q_PROPERTY(QStringList testCases READ testCases WRITE setTestCases) | 40 | Q_PROPERTY(QStringList testCases READ testCases WRITE setTestCases) | ||
41 | 41 | | |||
42 | public: | 42 | public: | ||
43 | explicit TestCasesPage(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); | 43 | explicit TestCasesPage(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr); | ||
44 | ~TestCasesPage() override; | 44 | ~TestCasesPage() override; | ||
45 | 45 | | |||
46 | /** | 46 | /** | ||
47 | * The name of the new test, as set by the user | 47 | * The name of the new test, as set by the user | ||
48 | */ | 48 | */ | ||
49 | QString name() const; | 49 | QString name() const; | ||
50 | 50 | | |||
51 | /** | 51 | /** | ||
52 | * Returns the list of test case names | 52 | * Returns the list of test case names | ||
53 | */ | 53 | */ | ||
54 | QStringList testCases() const; | 54 | QStringList testCases() const; | ||
55 | /** | 55 | /** | ||
56 | * Sets the current list of test case names to @p testCases | 56 | * Sets the current list of test case names to @p testCases | ||
57 | */ | 57 | */ | ||
58 | void setTestCases(const QStringList& testCases); | 58 | void setTestCases(const QStringList& testCases); | ||
59 | 59 | | |||
60 | void setFocusToFirstEditWidget() override; | ||||
61 | | ||||
60 | Q_SIGNALS: | 62 | Q_SIGNALS: | ||
61 | void isValid(bool valid); | 63 | void isValid(bool valid); | ||
62 | 64 | | |||
63 | private: | 65 | private: | ||
64 | class TestCasesPagePrivate* const d; | 66 | class TestCasesPagePrivate* const d; | ||
65 | 67 | | |||
66 | private Q_SLOTS: | 68 | private Q_SLOTS: | ||
67 | void identifierChanged(const QString& identifier); | 69 | void identifierChanged(const QString& identifier); | ||
68 | }; | 70 | }; | ||
69 | 71 | | |||
70 | } | 72 | } | ||
71 | 73 | | |||
72 | #endif // KDEVPLATFORM_PLUGIN_TESTCASESWIDGET_H | 74 | #endif // KDEVPLATFORM_PLUGIN_TESTCASESWIDGET_H |