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
texteditor.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef TEXTEDITOR_H
5#define TEXTEDITOR_H
6
7#include <shared_enums_p.h>
8#include <textpropertyeditor_p.h>
9
10#include <QtWidgets/qwidget.h>
11
12#include <QtGui/qfont.h>
13
14QT_FORWARD_DECLARE_CLASS(QAction)
15QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
16QT_FORWARD_DECLARE_CLASS(QLabel)
17QT_FORWARD_DECLARE_CLASS(QMenu)
18QT_FORWARD_DECLARE_CLASS(QToolButton)
19
20QT_BEGIN_NAMESPACE
21
22class QDesignerFormEditorInterface;
23
24namespace qdesigner_internal
25{
26
27class IconThemeEditor;
28
29class TextEditor : public QWidget
30{
32public:
34
37
38 void setRichTextDefaultFont(const QFont &font) { m_richTextDefaultFont = font; }
39 QFont richTextDefaultFont() const { return m_richTextDefaultFont; }
40
41 void setSpacing(int spacing);
42
45
47
48public slots:
49 void setText(const QString &text);
50
52 void textChanged(const QString &text);
53
54private slots:
55 void buttonClicked();
56 void resourceActionActivated();
57 void fileActionActivated();
58
59private:
60 TextPropertyEditor *m_editor;
61 IconThemeEditor *m_themeEditor;
62 bool m_iconThemeModeEnabled;
63 QFont m_richTextDefaultFont;
64 QToolButton *m_button;
65 QMenu *m_menu;
66 QAction *m_resourceAction;
67 QAction *m_fileAction;
68 QHBoxLayout *m_layout;
69 QDesignerFormEditorInterface *m_core;
70};
71
72} // namespace qdesigner_internal
73
74QT_END_NAMESPACE
75
76#endif //TEXTEDITOR_H
The QDesignerFormEditorInterface class allows you to access Qt Widgets Designer's various components.
friend class QWidget
Definition qpainter.h:431
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
Auxiliary methods to store/retrieve settings.
#define QT_PROPERTYEDITOR_EXPORT