Changeset View
Changeset View
Standalone View
Standalone View
plugins/filetemplates/classidentifierpage.h
Show All 15 Lines | 1 | /* This file is part of KDevelop | |||
---|---|---|---|---|---|
16 | Boston, MA 02110-1301, USA. | 16 | Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | #ifndef KDEVPLATFORM_PLUGIN_CLASSIDENTIFIERPAGE_H | 19 | #ifndef KDEVPLATFORM_PLUGIN_CLASSIDENTIFIERPAGE_H | ||
20 | #define KDEVPLATFORM_PLUGIN_CLASSIDENTIFIERPAGE_H | 20 | #define KDEVPLATFORM_PLUGIN_CLASSIDENTIFIERPAGE_H | ||
21 | 21 | | |||
22 | #include <QWidget> | 22 | #include <QWidget> | ||
23 | 23 | | |||
24 | #include "ipagefocus.h" | ||||
25 | | ||||
26 | namespace KDevelop | ||||
27 | { | ||||
28 | | ||||
24 | /** | 29 | /** | ||
25 | * Assistant dialog page for setting the identifier and inheritances of a new class | 30 | * Assistant dialog page for setting the identifier and inheritances of a new class | ||
26 | */ | 31 | */ | ||
27 | class ClassIdentifierPage : public QWidget | 32 | class ClassIdentifierPage : public QWidget, public IPageFocus | ||
28 | { | 33 | { | ||
29 | Q_OBJECT | 34 | Q_OBJECT | ||
30 | Q_PROPERTY(QStringList inheritance READ inheritanceList) | 35 | Q_PROPERTY(QStringList inheritance READ inheritanceList) | ||
31 | 36 | | |||
32 | public: | 37 | public: | ||
33 | explicit ClassIdentifierPage(QWidget* parent); | 38 | explicit ClassIdentifierPage(QWidget* parent); | ||
34 | ~ClassIdentifierPage() override; | 39 | ~ClassIdentifierPage() override; | ||
35 | 40 | | |||
Show All 13 Lines | |||||
49 | 54 | | |||
50 | /** | 55 | /** | ||
51 | * Sets the contents of the inheritance list to @p list | 56 | * Sets the contents of the inheritance list to @p list | ||
52 | * | 57 | * | ||
53 | * @param list list of inheritance descriptions. | 58 | * @param list list of inheritance descriptions. | ||
54 | */ | 59 | */ | ||
55 | void setInheritanceList(const QStringList& list); | 60 | void setInheritanceList(const QStringList& list); | ||
56 | 61 | | |||
62 | void setFocusToFirstEditWidget() override; | ||||
63 | | ||||
57 | Q_SIGNALS: | 64 | Q_SIGNALS: | ||
58 | void inheritanceChanged(); | 65 | void inheritanceChanged(); | ||
59 | /** | 66 | /** | ||
60 | * Emitted whenever the content of the page changes. | 67 | * Emitted whenever the content of the page changes. | ||
61 | * | 68 | * | ||
62 | * @param valid @c true if the content is valid and the user can procede to | 69 | * @param valid @c true if the content is valid and the user can procede to | ||
63 | * the next page, @c false otherwise. | 70 | * the next page, @c false otherwise. | ||
64 | */ | 71 | */ | ||
65 | void isValid(bool valid); | 72 | void isValid(bool valid); | ||
66 | 73 | | |||
67 | private Q_SLOTS: | 74 | private Q_SLOTS: | ||
68 | void checkIdentifier(); | 75 | void checkIdentifier(); | ||
69 | 76 | | |||
70 | private: | 77 | private: | ||
71 | struct ClassIdentifierPagePrivate* const d; | 78 | struct ClassIdentifierPagePrivate* const d; | ||
72 | }; | 79 | }; | ||
73 | 80 | | |||
81 | } | ||||
82 | | ||||
74 | #endif // KDEVPLATFORM_PLUGIN_CLASSIDENTIFIERPAGE_H | 83 | #endif // KDEVPLATFORM_PLUGIN_CLASSIDENTIFIERPAGE_H |