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 <memory>
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
44{
46
48
49public:
51 // Factory: Returns 0 if the language extension does not provide a resource browser.
53
54 void setCurrentPath(const QString &filePath);
55 QString currentPath() const;
56
57private:
61
62};
63
65{
67public:
68 IconSelector(QWidget *parent = nullptr);
70
71 void setFormEditor(QDesignerFormEditorInterface *core); // required for dialog gui.
73
76
77 // Check whether a pixmap may be read
79 static bool checkPixmap(const QString &fileName, CheckMode cm = CheckFully, QString *errorMessage = nullptr);
80 // Choose a pixmap from file
82 // Choose a pixmap from resource; use language-dependent resource browser if present
84
87private:
91};
92
93// IconThemeEditor: Let's the user input theme icon names and shows a preview label.
95{
98public:
99 explicit IconThemeEditor(QWidget *parent = nullptr, bool wantResetButton = true);
101
102 QString theme() const;
103 void setTheme(const QString &theme);
104
105signals:
106 void edited(const QString &);
107
108public slots:
109 void reset();
110
111private:
113};
114
115// IconThemeEnumEditor: Let's the user input theme icon enum values
116// (QIcon::ThemeIcon) and shows a preview label. -1 means nothing selected.
118{
120public:
121 explicit IconThemeEnumEditor(QWidget *parent = nullptr, bool wantResetButton = true);
123
124 int themeEnum() const;
125 void setThemeEnum(int);
126
127 static QString iconName(int e);
128 static QComboBox *createComboBox(QWidget *parent = nullptr);
129
130signals:
131 void edited(int);
132
133public slots:
134 void reset();
135
136private:
138};
139
140} // namespace qdesigner_internal
141
142QT_END_NAMESPACE
143
144#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:432
The QtAbstractPropertyManager provides an interface for property managers.
The QtProperty class encapsulates an instance of a property.
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)
TextPropertyValidationMode textPropertyValidationMode() const
QFont richTextDefaultFont() const
Definition texteditor.h:39
void setRichTextDefaultFont(const QFont &font)
Definition texteditor.h:38
void setTextPropertyValidationMode(TextPropertyValidationMode vm)
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