Changeset View
Changeset View
Standalone View
Standalone View
plugins/filetemplates/templateoptionspage.h
Show All 17 Lines | |||||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KDEVPLATFORM_PLUGIN_TEMPLATEOPTIONSPAGE_H | 20 | #ifndef KDEVPLATFORM_PLUGIN_TEMPLATEOPTIONSPAGE_H | ||
21 | #define KDEVPLATFORM_PLUGIN_TEMPLATEOPTIONSPAGE_H | 21 | #define KDEVPLATFORM_PLUGIN_TEMPLATEOPTIONSPAGE_H | ||
22 | 22 | | |||
23 | #include <QWidget> | 23 | #include <QWidget> | ||
24 | #include <QVariantHash> | 24 | #include <QVariantHash> | ||
25 | 25 | | |||
26 | #include "ipagefocus.h" | ||||
26 | 27 | | |||
27 | 28 | | |||
28 | namespace KDevelop | 29 | namespace KDevelop | ||
29 | { | 30 | { | ||
30 | 31 | | |||
31 | class TemplateRenderer; | 32 | class TemplateRenderer; | ||
32 | 33 | | |||
33 | class SourceFileTemplate; | 34 | class SourceFileTemplate; | ||
34 | 35 | | |||
35 | class TemplateClassAssistant; | 36 | class TemplateClassAssistant; | ||
36 | 37 | | |||
37 | /** | 38 | /** | ||
38 | * @brief Shows a page for configuring options specified by a class template | 39 | * @brief Shows a page for configuring options specified by a class template | ||
39 | * | 40 | * | ||
40 | * Templates can include a file that specify configuration options. | 41 | * Templates can include a file that specify configuration options. | ||
41 | * These can be set by the user before creating the class and are passed to the template. | 42 | * These can be set by the user before creating the class and are passed to the template. | ||
42 | * | 43 | * | ||
43 | * @sa SourceFileTemplate::customOptions() | 44 | * @sa SourceFileTemplate::customOptions() | ||
44 | **/ | 45 | **/ | ||
45 | class TemplateOptionsPage : public QWidget | 46 | class TemplateOptionsPage : public QWidget, public IPageFocus | ||
46 | { | 47 | { | ||
47 | Q_OBJECT | 48 | Q_OBJECT | ||
48 | Q_PROPERTY(QVariantHash templateOptions READ templateOptions) | 49 | Q_PROPERTY(QVariantHash templateOptions READ templateOptions) | ||
49 | 50 | | |||
50 | public: | 51 | public: | ||
51 | /** | 52 | /** | ||
52 | * @brief Create a new template options page | 53 | * @brief Create a new template options page | ||
53 | * | 54 | * | ||
Show All 16 Lines | |||||
70 | /** | 71 | /** | ||
71 | * @property templateOptions | 72 | * @property templateOptions | ||
72 | * | 73 | * | ||
73 | * The user-set options. Keys are the options' names, and values are their values. | 74 | * The user-set options. Keys are the options' names, and values are their values. | ||
74 | * | 75 | * | ||
75 | **/ | 76 | **/ | ||
76 | QVariantHash templateOptions() const; | 77 | QVariantHash templateOptions() const; | ||
77 | 78 | | |||
79 | void setFocusToFirstEditWidget() override; | ||||
80 | | ||||
78 | private: | 81 | private: | ||
79 | class TemplateOptionsPagePrivate* const d; | 82 | class TemplateOptionsPagePrivate* const d; | ||
80 | }; | 83 | }; | ||
81 | 84 | | |||
82 | } | 85 | } | ||
83 | 86 | | |||
84 | #endif // KDEVPLATFORM_PLUGIN_TEMPLATEOPTIONSPAGE_H | 87 | #endif // KDEVPLATFORM_PLUGIN_TEMPLATEOPTIONSPAGE_H |