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
iconselector_p.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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15
16#ifndef ICONSELECTOR_H
17#define ICONSELECTOR_H
18
20
21#include <QtWidgets/qwidget.h>
22#include <QtWidgets/qdialog.h>
23
24#include <QtCore/qscopedpointer.h>
25
27
28class QComboBox;
29
30class QtResourceModel;
31class QDesignerFormEditorInterface;
32class QDesignerDialogGuiInterface;
33class QDesignerResourceBrowserInterface;
34
35namespace qdesigner_internal {
36
37class DesignerIconCache;
38class DesignerPixmapCache;
39class PropertySheetIconValue;
41
42// Resource Dialog that embeds the language-dependent resource widget as returned by the language extension
63
65{
67public:
68 IconSelector(QWidget *parent = nullptr);
70
71 void setFormEditor(QDesignerFormEditorInterface *core); // required for dialog gui.
74
77
78 // Check whether a pixmap may be read
80 static bool checkPixmap(const QString &fileName, CheckMode cm = CheckFully, QString *errorMessage = nullptr);
81 // Choose a pixmap from file
83 // Choose a pixmap from resource; use language-dependent resource browser if present
85
88private:
92};
93
94// IconThemeEditor: Let's the user input theme icon names and shows a preview label.
96{
99public:
100 explicit IconThemeEditor(QWidget *parent = nullptr, bool wantResetButton = true);
102
103 QString theme() const;
104 void setTheme(const QString &theme);
105
106signals:
107 void edited(const QString &);
108
109public slots:
110 void reset();
111
112private:
114};
115
116// IconThemeEnumEditor: Let's the user input theme icon enum values
117// (QIcon::ThemeIcon) and shows a preview label. -1 means nothing selected.
119{
121public:
122 explicit IconThemeEnumEditor(QWidget *parent = nullptr, bool wantResetButton = true);
124
125 int themeEnum() const;
126 void setThemeEnum(int);
127
128 static QString iconName(int e);
129 static QComboBox *createComboBox(QWidget *parent = nullptr);
130
131signals:
132 void edited(int);
133
134public slots:
135 void reset();
136
137private:
139};
140
141} // namespace qdesigner_internal
142
143QT_END_NAMESPACE
144
145#endif // ICONSELECTOR_H
The QDesignerFormEditorInterface class allows you to access Qt Widgets Designer's various components.
virtual QVariant property(int index) const =0
virtual ~QDesignerPropertySheetExtension()=default
virtual bool isEnabled(int index) const =0
virtual bool isVisible(int index) const =0
virtual void setProperty(int index, const QVariant &value)=0
virtual bool isAttribute(int index) const =0
virtual bool reset(int index)=0
virtual void setVisible(int index, bool b)=0
virtual bool hasReset(int index) const =0
virtual void setAttribute(int index, bool b)=0
virtual void setChanged(int index, bool changed)=0
virtual QString propertyGroup(int index) const =0
virtual int count() const =0
virtual int indexOf(const QString &name) const =0
virtual void setPropertyGroup(int index, const QString &group)=0
virtual QString propertyName(int index) const =0
virtual bool isChanged(int index) const =0
The QExtensionManager class provides extension management facilities for \QD.
friend class QWidget
Definition qpainter.h:421
A search bar that is commonly added below the searchable text.
void setSuperPalette(const QPalette &palette)
static QString msgMissingThemeIcon(const QString &t)
void setTheme(const QString &theme)
void setDefaultPixmap(const QPixmap &pixmap)
static QString displayText(const PropertySheetIconValue &icon)
void setPixmapCache(DesignerPixmapCache *cache)
static QString msgThemeIcon(const QString &t)
void setDefaultPixmapIcon(const QIcon &icon)
void setIconThemeModeEnabled(bool enabled)
void contextMenuEvent(QContextMenuEvent *event) override
This event handler, for event event, can be reimplemented in a subclass to receive widget context men...
void themeEnumChanged(int themeEnum)
void themeChanged(const QString &theme)
void setRange(qlonglong bottom, qlonglong top)
QLongLongValidator(qlonglong bottom, qlonglong top, QObject *parent)
QULongLongValidator(qulonglong bottom, qulonglong top, QObject *parent)
void setRange(qulonglong bottom, qulonglong top)
static constexpr auto defaultResourceAttributeC
static constexpr auto themeEnumAttributeC
static constexpr auto flagsAttributeC
static constexpr auto validationModesAttributeC
static constexpr auto resettableAttributeC
static constexpr auto themeAttributeC
static constexpr auto superPaletteAttributeC
static constexpr auto fontAttributeC
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
#define QT_PROPERTYEDITOR_EXPORT
#define QDESIGNER_SHARED_EXPORT