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
brushpropertymanager.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
BRUSHPROPERTYMANAGER_H
6
#
define
BRUSHPROPERTYMANAGER_H
7
8
#
include
<
QtCore
/
qhash
.
h
>
9
#
include
<
QtGui
/
qbrush
.
h
>
10
#
include
<
QtGui
/
qicon
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
class
QtProperty;
15
class
QtVariantPropertyManager
;
16
17
class
QString;
18
class
QVariant;
19
20
namespace
qdesigner_internal
{
21
22
// BrushPropertyManager: A mixin for DesignerPropertyManager that manages brush properties.
23
24
class
BrushPropertyManager
{
25
public
:
26
Q_DISABLE_COPY_MOVE
(
BrushPropertyManager
);
27
28
BrushPropertyManager
();
29
~
BrushPropertyManager
();
30
31
void
initializeProperty
(
QtVariantPropertyManager
*vm,
QtProperty
*property,
int
enumTypeId);
32
bool
uninitializeProperty
(
QtProperty
*property);
33
34
// Call from slotValueChanged().
35
int
valueChanged
(
QtVariantPropertyManager
*vm,
QtProperty
*property,
const
QVariant &value);
36
int
setValue
(
QtVariantPropertyManager
*vm,
QtProperty
*property,
const
QVariant &value);
37
38
bool
valueText
(
const
QtProperty
*property, QString *text)
const
;
39
bool
valueIcon
(
const
QtProperty
*property, QIcon *icon)
const
;
40
bool
value
(
const
QtProperty
*property, QVariant *v)
const
;
41
42
// Call from QtPropertyManager's propertyDestroyed signal
43
void
slotPropertyDestroyed
(
QtProperty
*property);
44
45
private
:
46
static
int
brushStyleToIndex(Qt::BrushStyle st);
47
static
Qt::BrushStyle brushStyleIndexToStyle(
int
brushStyleIndex);
48
static
QString brushStyleIndexToString(
int
brushStyleIndex);
49
50
static
const
QMap<
int
, QIcon> &brushStyleIcons();
51
52
using
PropertyToPropertyMap
=
QHash
<
const
QtProperty
*,
QtProperty
*>;
53
PropertyToPropertyMap m_brushPropertyToStyleSubProperty;
54
PropertyToPropertyMap m_brushPropertyToColorSubProperty;
55
PropertyToPropertyMap m_brushStyleSubPropertyToProperty;
56
PropertyToPropertyMap m_brushColorSubPropertyToProperty;
57
58
QHash<
const
QtProperty *, QBrush> m_brushValues;
59
};
60
61
}
62
63
QT_END_NAMESPACE
64
65
#
endif
// BRUSHPROPERTYMANAGER_H
brushStyles
static const char * brushStyles[]
Definition
brushpropertymanager.cpp:14
QtProperty
The QtProperty class encapsulates an instance of a property.
Definition
qtpropertybrowser_p.h:29
QtProperty::addSubProperty
void addSubProperty(QtProperty *property)
Appends the given property to this property's subproperties.
Definition
qtpropertybrowser.cpp:393
QtVariantPropertyManager
The QtVariantPropertyManager class provides and manages QVariant based properties.
Definition
qtvariantproperty_p.h:50
QtVariantPropertyManager::variantProperty
QtVariantProperty * variantProperty(const QtProperty *property) const
Returns the given property converted into a QtVariantProperty.
Definition
qtvariantproperty.cpp:1283
QtVariantProperty
The QtVariantProperty class is a convenience class handling QVariant based properties.
Definition
qtvariantproperty_p.h:32
qdesigner_internal::BrushPropertyManager
Definition
brushpropertymanager.h:24
qdesigner_internal::BrushPropertyManager::valueChanged
int valueChanged(QtVariantPropertyManager *vm, QtProperty *property, const QVariant &value)
Definition
brushpropertymanager.cpp:189
qdesigner_internal::BrushPropertyManager::valueIcon
bool valueIcon(const QtProperty *property, QIcon *icon) const
Definition
brushpropertymanager.cpp:253
qdesigner_internal::BrushPropertyManager::uninitializeProperty
bool uninitializeProperty(QtProperty *property)
Definition
brushpropertymanager.cpp:149
qdesigner_internal::BrushPropertyManager::valueText
bool valueText(const QtProperty *property, QString *text) const
Definition
brushpropertymanager.cpp:241
qdesigner_internal::BrushPropertyManager::slotPropertyDestroyed
void slotPropertyDestroyed(QtProperty *property)
Definition
brushpropertymanager.cpp:174
qdesigner_internal::BrushPropertyManager::BrushPropertyManager
BrushPropertyManager()
qdesigner_internal::BrushPropertyManager::initializeProperty
void initializeProperty(QtVariantPropertyManager *vm, QtProperty *property, int enumTypeId)
Definition
brushpropertymanager.cpp:128
qdesigner_internal::BrushPropertyManager::value
bool value(const QtProperty *property, QVariant *v) const
Definition
brushpropertymanager.cpp:262
qdesigner_internal::BrushPropertyManager::~BrushPropertyManager
~BrushPropertyManager()
qdesigner_internal::BrushPropertyManager::setValue
int setValue(QtVariantPropertyManager *vm, QtProperty *property, const QVariant &value)
Definition
brushpropertymanager.cpp:221
qdesigner_internal
Auxiliary methods to store/retrieve settings.
Definition
buddyeditor.cpp:67
qdesigner_internal::clearBrushIcons
static void clearBrushIcons()
Definition
brushpropertymanager.cpp:100
qttools
src
designer
src
components
propertyeditor
brushpropertymanager.h
Generated on
for Qt by
1.18.0