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
abstractnewformwidget.cpp
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
6#include <newformwidget_p.h>
7
9
10/*!
11 \class QDesignerNewFormWidgetInterface
12 \since 4.5
13 \internal
14
15 \brief QDesignerNewFormWidgetInterface provides an interface for chooser
16 widgets that can be used within "New Form" dialogs and wizards.
17 It presents the user with a list of choices taken from built-in
18 templates, pre-defined template paths and suitable custom widgets.
19 It provides a static creation function that returns \QD's
20 implementation.
21
22 \inmodule QtDesigner
23*/
24
25/*!
26 Constructs a QDesignerNewFormWidgetInterface object.
27*/
28
29QDesignerNewFormWidgetInterface::QDesignerNewFormWidgetInterface(QWidget *parent) :
30 QWidget(parent)
31{
32}
33
34/*!
35 Destroys the QDesignerNewFormWidgetInterface object.
36*/
37
38QDesignerNewFormWidgetInterface::~QDesignerNewFormWidgetInterface() = default;
39
40/*!
41 Creates an instance of the QDesignerNewFormWidgetInterface as a child
42 of \a parent using \a core.
43*/
44
45QDesignerNewFormWidgetInterface *QDesignerNewFormWidgetInterface::createNewFormWidget(QDesignerFormEditorInterface *core, QWidget *parent)
46{
47 return new qdesigner_internal::NewFormWidget(core, parent);
48}
49
50/*!
51 \fn bool QDesignerNewFormWidgetInterface::hasCurrentTemplate() const
52
53 Returns whether a form template is currently selected.
54*/
55
56/*!
57 \fn QString QDesignerNewFormWidgetInterface::currentTemplate(QString *errorMessage = 0)
58
59 Returns the contents of the currently selected template. If the method fails,
60 an empty string is returned and \a errorMessage receives an error message.
61*/
62
63// Signals
64
65/*!
66 \fn void QDesignerNewFormWidgetInterface::templateActivated()
67
68 This signal is emitted whenever the user activates a template by double-clicking.
69*/
70
71/*!
72 \fn void QDesignerNewFormWidgetInterface::currentTemplateChanged(bool templateSelected)
73
74 This signal is emitted whenever the user changes the current template.
75 \a templateSelected indicates whether a template is currently selected.
76*/
77
78QT_END_NAMESPACE
Combined button and popup list for selecting options.