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