Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
templateoptionspage.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef QDESIGNER_TEMPLATEOPTIONS_H
5#define QDESIGNER_TEMPLATEOPTIONS_H
6
7#include <QtDesigner/abstractoptionspage.h>
8
9#include <QtCore/qpointer.h>
10#include <QtCore/qstringlist.h>
11
12#include <QtWidgets/qwidget.h>
13
15
16class QDesignerFormEditorInterface;
17
18namespace qdesigner_internal {
19
20namespace Ui {
21 class TemplateOptionsWidget;
22}
23
24/* Present the user with a list of form template paths to save
25 * form templates. */
27{
28 Q_OBJECT
29 Q_DISABLE_COPY_MOVE(TemplateOptionsWidget)
30public:
32 QWidget *parent = nullptr);
34
35
37 void setTemplatePaths(const QStringList &l);
38
39 static QString chooseTemplatePath(QDesignerFormEditorInterface *core, QWidget *parent);
40
41private slots:
42 void addTemplatePath();
43 void removeTemplatePath();
44 void templatePathSelectionChanged();
45
46private:
47 QDesignerFormEditorInterface *m_core;
48 Ui::TemplateOptionsWidget *m_ui;
49};
50
52{
54public:
56
57 QString name() const override;
58 QWidget *createPage(QWidget *parent) override;
59 void apply() override;
60 void finish() override;
61
62private:
63 QDesignerFormEditorInterface *m_core;
64 QStringList m_initialTemplatePaths;
65 QPointer<TemplateOptionsWidget> m_widget;
66};
67
68}
69
70QT_END_NAMESPACE
71
72#endif // QDESIGNER_TEMPLATEOPTIONS_H
FormEditorOptionsPage(QDesignerFormEditorInterface *core)
QWidget * createPage(QWidget *parent) override
FormEditor(const QStringList &pluginPaths, QObject *parent=nullptr)
QWidget * createPage(QWidget *parent) override
static QString chooseTemplatePath(QDesignerFormEditorInterface *core, QWidget *parent)
#define QT_FORMEDITOR_EXPORT
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.