Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
widgetbox.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
WIDGETBOX_H
6
#
define
WIDGETBOX_H
7
8
#
include
"widgetbox_global.h"
9
#
include
<
qdesigner_widgetbox_p
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
class
QDesignerFormEditorInterface;
14
class
QDesignerFormWindowInterface;
15
16
namespace
qdesigner_internal
{
17
18
class
WidgetBoxTreeWidget
;
19
20
class
QT_WIDGETBOX_EXPORT
WidgetBox
:
public
QDesignerWidgetBox
21
{
22
Q_OBJECT
23
public
:
24
explicit
WidgetBox
(
QDesignerFormEditorInterface
*
core
,
QWidget
*
parent
=
nullptr
,
25
Qt
::
WindowFlags
flags
= {});
26
~
WidgetBox
()
override
;
27
28
QDesignerFormEditorInterface *
core
()
const
;
29
30
int
categoryCount
()
const
override
;
31
Category
category
(
int
cat_idx)
const
override
;
32
void
addCategory
(
const
Category &cat)
override
;
33
void
removeCategory
(
int
cat_idx)
override
;
34
35
int
widgetCount
(
int
cat_idx)
const
override
;
36
Widget
widget
(
int
cat_idx,
int
wgt_idx)
const
override
;
37
void
addWidget
(
int
cat_idx,
const
Widget &wgt)
override
;
38
void
removeWidget
(
int
cat_idx,
int
wgt_idx)
override
;
39
40
void
dropWidgets
(
const
QList<QDesignerDnDItemInterface*> &item_list,
const
QPoint &global_mouse_pos)
override
;
41
42
void
setFileName
(
const
QString &file_name)
override
;
43
QString
fileName
()
const
override
;
44
bool
load
()
override
;
45
bool
save
()
override
;
46
47
bool
loadContents
(
const
QString &contents)
override
;
48
QIcon
iconForWidget
(
const
QString &className,
const
QString &category = QString())
const
override
;
49
50
protected
:
51
void
dragEnterEvent
(QDragEnterEvent * event)
override
;
52
void
dragMoveEvent
(QDragMoveEvent * event)
override
;
53
void
dropEvent
(QDropEvent * event)
override
;
54
55
private
slots
:
56
void
handleMousePress
(
const
QString
&
name
,
const
QString
&
xml
,
const
QPoint
&
global_mouse_pos
);
57
58
private
:
59
QDesignerFormEditorInterface *m_core;
60
WidgetBoxTreeWidget
*m_view;
61
};
62
63
}
// namespace qdesigner_internal
64
65
QT_END_NAMESPACE
66
67
#
endif
// WIDGETBOX_H
qdesigner_internal::WidgetBoxTreeWidget
Definition
widgetboxtreewidget.h:30
qdesigner_internal::WidgetBox
Definition
widgetbox.h:21
qdesigner_internal::WidgetBox::loadContents
bool loadContents(const QString &contents) override
Definition
widgetbox.cpp:176
qdesigner_internal::WidgetBox::dropEvent
void dropEvent(QDropEvent *event) override
Definition
widgetbox.cpp:219
qdesigner_internal::WidgetBox::fileName
QString fileName() const override
Returns the name of the XML file \QD is currently using to populate its widget box.
Definition
widgetbox.cpp:166
qdesigner_internal::WidgetBox::widget
Widget widget(int cat_idx, int wgt_idx) const override
Definition
widgetbox.cpp:141
qdesigner_internal::WidgetBox::category
Category category(int cat_idx) const override
Definition
widgetbox.cpp:121
qdesigner_internal::WidgetBox::load
bool load() override
Populates \QD's widget box by loading (or reloading) the currently specified XML file.
Definition
widgetbox.cpp:171
qdesigner_internal::WidgetBox::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event) override
Definition
widgetbox.cpp:207
qdesigner_internal::WidgetBox::dropWidgets
void dropWidgets(const QList< QDesignerDnDItemInterface * > &item_list, const QPoint &global_mouse_pos) override
Definition
widgetbox.cpp:156
qdesigner_internal::WidgetBox::removeCategory
void removeCategory(int cat_idx) override
Definition
widgetbox.cpp:131
qdesigner_internal::WidgetBox::dragMoveEvent
void dragMoveEvent(QDragMoveEvent *event) override
Definition
widgetbox.cpp:214
qdesigner_internal::WidgetBox::addWidget
void addWidget(int cat_idx, const Widget &wgt) override
Definition
widgetbox.cpp:146
qdesigner_internal::WidgetBox::categoryCount
int categoryCount() const override
Definition
widgetbox.cpp:116
qdesigner_internal::WidgetBox::setFileName
void setFileName(const QString &file_name) override
Sets the XML file that \QD will use to populate its widget box, to fileName.
Definition
widgetbox.cpp:161
qdesigner_internal::WidgetBox::save
bool save() override
Saves the contents of \QD's widget box in the file specified by the fileName() function.
Definition
widgetbox.cpp:181
qdesigner_internal::WidgetBox::addCategory
void addCategory(const Category &cat) override
Definition
widgetbox.cpp:126
qdesigner_internal::WidgetBox::~WidgetBox
~WidgetBox() override
qdesigner_internal::WidgetBox::core
QDesignerFormEditorInterface * core() const
Definition
widgetbox.cpp:98
qdesigner_internal::WidgetBox::widgetCount
int widgetCount(int cat_idx) const override
Definition
widgetbox.cpp:136
qdesigner_internal::WidgetBox::removeWidget
void removeWidget(int cat_idx, int wgt_idx) override
Definition
widgetbox.cpp:151
qdesigner_internal::WidgetBox::iconForWidget
QIcon iconForWidget(const QString &className, const QString &category=QString()) const override
Definition
widgetbox.cpp:229
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qdesigner_internal
Auxiliary methods to store/retrieve settings.
Definition
buddyeditor.cpp:67
qtMajorVersion
static int qtMajorVersion(int qtVersion)
Definition
qdesigner_components.cpp:109
widgetBoxFileName
static QString widgetBoxFileName(int qtVersion, const QDesignerLanguageExtension *lang=nullptr)
Definition
qdesigner_components.cpp:118
setMinorVersion
static void setMinorVersion(int minorVersion, int *qtVersion)
Definition
qdesigner_components.cpp:111
qtMinorVersion
static int qtMinorVersion(int qtVersion)
Definition
qdesigner_components.cpp:110
QT_WIDGETBOX_EXPORT
#define QT_WIDGETBOX_EXPORT
Definition
widgetbox_global.h:17
qttools
src
designer
src
components
widgetbox
widgetbox.h
Generated on
for Qt by
1.18.0