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// Qt-Security score:significant reason:default
4
5#ifndef TEXTEDITOR_H
6#define TEXTEDITOR_H
7
8#include <shared_enums_p.h>
9#include <textpropertyeditor_p.h>
10
11#include <QtWidgets/qwidget.h>
12
13#include <QtGui/qfont.h>
14
15QT_FORWARD_DECLARE_CLASS(QAction)
16QT_FORWARD_DECLARE_CLASS(QHBoxLayout)
17QT_FORWARD_DECLARE_CLASS(QLabel)
18QT_FORWARD_DECLARE_CLASS(QMenu)
19QT_FORWARD_DECLARE_CLASS(QToolButton)
20
21QT_BEGIN_NAMESPACE
22
23class QDesignerFormEditorInterface;
24
25namespace qdesigner_internal
26{
27
28class IconThemeEditor;
29
30class TextEditor : public QWidget
31{
33public:
35
38
39 void setRichTextDefaultFont(const QFont &font) { m_richTextDefaultFont = font; }
40 QFont richTextDefaultFont() const { return m_richTextDefaultFont; }
41
42 void setSpacing(int spacing);
43
46
48
49public slots:
50 void setText(const QString &text);
51
53 void textChanged(const QString &text);
54
55private slots:
56 void buttonClicked();
57 void resourceActionActivated();
58 void fileActionActivated();
59
60private:
61 TextPropertyEditor *m_editor;
62 IconThemeEditor *m_themeEditor;
63 bool m_iconThemeModeEnabled;
64 QFont m_richTextDefaultFont;
65 QToolButton *m_button;
66 QMenu *m_menu;
67 QAction *m_resourceAction;
68 QAction *m_fileAction;
69 QHBoxLayout *m_layout;
70 QDesignerFormEditorInterface *m_core;
71};
72
73} // namespace qdesigner_internal
74
75QT_END_NAMESPACE
76
77#endif //TEXTEDITOR_H
The QDesignerFormEditorInterface class allows you to access Qt Widgets Designer's various components.
friend class QWidget
Definition qpainter.h:432
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:40
void setRichTextDefaultFont(const QFont &font)
Definition texteditor.h:39
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