File indexing completed on 2024-05-05 16:45:38
0001 /* 0002 SPDX-FileCopyrightText: 2012 Miha Čančula <miha@noughmad.eu> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDEVPLATFORM_PLUGIN_TESTCASESPAGE_H 0008 #define KDEVPLATFORM_PLUGIN_TESTCASESPAGE_H 0009 0010 #include <QWidget> 0011 0012 #include "ipagefocus.h" 0013 0014 namespace KDevelop 0015 { 0016 0017 /** 0018 * Assistant page for specifying the list of test cases 0019 * 0020 */ 0021 class TestCasesPage : public QWidget, public IPageFocus 0022 { 0023 Q_OBJECT 0024 Q_PROPERTY(QStringList testCases READ testCases WRITE setTestCases) 0025 0026 public: 0027 explicit TestCasesPage(QWidget* parent = nullptr); 0028 ~TestCasesPage() override; 0029 0030 /** 0031 * The name of the new test, as set by the user 0032 */ 0033 QString name() const; 0034 0035 /** 0036 * Returns the list of test case names 0037 */ 0038 QStringList testCases() const; 0039 /** 0040 * Sets the current list of test case names to @p testCases 0041 */ 0042 void setTestCases(const QStringList& testCases); 0043 0044 void setFocusToFirstEditWidget() override; 0045 0046 Q_SIGNALS: 0047 void isValid(bool valid); 0048 0049 private: 0050 class TestCasesPagePrivate* const d; 0051 0052 private Q_SLOTS: 0053 void identifierChanged(const QString& identifier); 0054 }; 0055 0056 } 0057 0058 #endif // KDEVPLATFORM_PLUGIN_TESTCASESPAGE_H