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