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
newform.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 NEWFORM_H
5#define NEWFORM_H
6
7#include <QtWidgets/qdialog.h>
8
9QT_BEGIN_NAMESPACE
10
11namespace qdesigner_internal {
12 class DeviceProfile;
13}
14
15class QDesignerFormEditorInterface;
16class QDesignerNewFormWidgetInterface;
18
19class QCheckBox;
20class QAbstractButton;
21class QPushButton;
22class QDialogButtonBox;
23class QImage;
24class QIODevice;
25
26class NewForm: public QDialog
27{
28 Q_OBJECT
29 Q_DISABLE_COPY_MOVE(NewForm)
30
31public:
34 // Use that file name instead of a temporary one
35 const QString &fileName = QString());
36
38
39 // Convenience for implementing file dialogs with preview
40 static QImage grabForm(QDesignerFormEditorInterface *core,
41 QIODevice &file,
42 const QString &workingDir,
43 const qdesigner_internal::DeviceProfile &dp);
44
45private slots:
47 void recentFileChosen();
48 void slotCurrentTemplateChanged(bool templateSelected);
49 void slotTemplateActivated();
50
51private:
52 QDialogButtonBox *createButtonBox();
53 bool openTemplate(QString *ptrToErrorMessage);
54
55 QString m_fileName;
56 QDesignerNewFormWidgetInterface *m_newFormWidget;
57 QDesignerWorkbench *m_workbench;
58 QCheckBox *m_chkShowOnStartup;
59 QPushButton *m_createButton;
60 QPushButton *m_recentButton;
61 QDialogButtonBox *m_buttonBox = nullptr;
62};
63
64QT_END_NAMESPACE
65
66#endif // NEWFORM_H
static QImage grabForm(QDesignerFormEditorInterface *core, QIODevice &file, const QString &workingDir, const qdesigner_internal::DeviceProfile &dp)
Definition newform.cpp:179
~NewForm() override
Definition newform.cpp:95
bool openForm(QWidget *parent)
QActionGroup * recentFilesActions() const
void setShowNewFormOnStartup(bool showIt)
QDesignerSettings(QDesignerFormEditorInterface *core)
bool showNewFormOnStartup() const
QDesignerActions * actionManager() const
QDesignerFormEditorInterface * core() const
friend class QWidget
Definition qpainter.h:421
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.