File indexing completed on 2024-05-05 04:39:50

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_TEMPLATESELECTIONPAGE_H
0008 #define KDEVPLATFORM_PLUGIN_TEMPLATESELECTIONPAGE_H
0009 
0010 #include <QWidget>
0011 
0012 namespace KDevelop
0013 {
0014 
0015 class TemplateClassAssistant;
0016 
0017 /**
0018  * An assistant page for selecting a class template
0019  **/
0020 class TemplateSelectionPage : public QWidget
0021 {
0022     Q_OBJECT
0023     Q_PROPERTY(QString selectedTemplate READ selectedTemplate)
0024 
0025 public:
0026     explicit TemplateSelectionPage (TemplateClassAssistant* parent);
0027     ~TemplateSelectionPage() override;
0028 
0029     /**
0030      * @property selectedTemplate
0031      *
0032      * The class template, selected by the user.
0033      * This property stores the full path to the template description (.desktop) file
0034      **/
0035     QString selectedTemplate() const;
0036 
0037     QSize minimumSizeHint() const override;
0038 
0039 public Q_SLOTS:
0040     /**
0041      * Saves the selected template setting into the current project's configuration.
0042      *
0043      * If the assistant's base URL does not point to any project, this function does nothing.
0044      */
0045     void saveConfig();
0046 
0047 private:
0048     class TemplateSelectionPagePrivate* const d;
0049 };
0050 
0051 }
0052 
0053 #endif // KDEVPLATFORM_PLUGIN_TEMPLATESELECTIONPAGE_H