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// Qt-Security score:significant reason:default
4
5#ifndef QDESIGNER_TEMPLATEOPTIONS_H
6#define QDESIGNER_TEMPLATEOPTIONS_H
7
8#include <QtDesigner/abstractoptionspage.h>
9
10#include <QtCore/qpointer.h>
11#include <QtCore/qstringlist.h>
12
13#include <QtWidgets/qwidget.h>
14
16
17class QDesignerFormEditorInterface;
18
19namespace qdesigner_internal {
20
21namespace Ui {
22 class TemplateOptionsWidget;
23}
24
25/* Present the user with a list of form template paths to save
26 * form templates. */
28{
29 Q_OBJECT
30 Q_DISABLE_COPY_MOVE(TemplateOptionsWidget)
31public:
33 QWidget *parent = nullptr);
35
36
38 void setTemplatePaths(const QStringList &l);
39
40 static QString chooseTemplatePath(QDesignerFormEditorInterface *core, QWidget *parent);
41
42private slots:
43 void addTemplatePath();
44 void removeTemplatePath();
45 void templatePathSelectionChanged();
46
47private:
48 QDesignerFormEditorInterface *m_core;
49 Ui::TemplateOptionsWidget *m_ui;
50};
51
53{
55public:
57
58 QString name() const override;
59 QWidget *createPage(QWidget *parent) override;
60 void apply() override;
61 void finish() override;
62
63private:
64 QDesignerFormEditorInterface *m_core;
65 QStringList m_initialTemplatePaths;
66 QPointer<TemplateOptionsWidget> m_widget;
67};
68
69}
70
71QT_END_NAMESPACE
72
73#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.