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
textpropertyeditor_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#ifndef TEXTPROPERTYEDITOR_H
16#define TEXTPROPERTYEDITOR_H
17
19#include "shared_enums_p.h"
20
21#include <QtWidgets/qwidget.h>
22
24
25namespace qdesigner_internal {
26
27 class PropertyLineEdit;
28
29 // Inline-Editor for text properties. Does escaping of newline characters
30 // to '\n' and back and provides validation modes. The interface
31 // corresponds to that of QLineEdit.
33 {
36 public:
38 // Stand-alone widget
40 // Disable frame
42 // For editing in forms
44 };
45
47 // Emit textChanged() as the user types
49 // Emit textChanged() only when the user finishes (for QUrl, etc.)
51 };
52
54
57
60
61 QString text() const;
62
63 QSize sizeHint () const override;
65
67
68 bool hasAcceptableInput() const;
69
70 // installs an event filter object on the private QLineEdit
72
73 // Replace newline characters by literal "\n" for inline editing
74 // in mode ValidationMultiLine
76
77 // Replace literal "\n" by actual new lines in mode ValidationMultiLine
79
80 // Returns whether newline characters are valid in validationMode.
82
83 signals:
84 void textChanged(const QString &text);
86
87 public slots:
88 void setText(const QString &text);
89 void selectAll();
90 void clear();
91
92 protected:
94
95 private slots:
96 void slotTextChanged(const QString &text);
97 void slotTextEdited();
99
100 private:
103
107
108 // Cached text containing real newline characters.
110 bool m_textEdited = false;
111 };
112}
113
114QT_END_NAMESPACE
115
116#endif // TEXTPROPERTYEDITOR_H
friend class QWidget
Definition qpainter.h:421
ObjectData(QObject *parent, QObject *object, const ModelRecursionContext &ctx)
bool equals(const ObjectData &me) const
void setItemsDisplayData(const StandardItemList &row, const ObjectInspectorIcons &icons, unsigned mask) const
void setItems(const StandardItemList &row, const ObjectInspectorIcons &icons) const
unsigned compare(const ObjectData &me) const
friend bool comparesEqual(const ObjectData &lhs, const ObjectData &rhs) noexcept
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Returns the editor to be used for editing the data item with the given index.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns the data stored under the given role for the item referred to by the index.
const QModelIndexList indexesOf(QObject *o) const
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Sets the role data for the item at index to value.
UpdateResult update(QDesignerFormWindowInterface *fw)
QObject * objectAt(const QModelIndex &index) const
void mouseMoveEvent(QMouseEvent *event) override
void keyPressEvent(QKeyEvent *event) override
QObjectList indexesToObjects(const QModelIndexList &indexes) const
QWidget * managedWidgetAt(const QPoint &global_mouse_pos)
void slotPopupContextMenu(QWidget *parent, const QPoint &pos)
const QPointer< FormWindowBase > & formWindow() const
void handleDragEnterMoveEvent(const QWidget *objectInspectorWidget, QDragMoveEvent *event, bool isDragEnter)
void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
static SelectionType selectionType(const QDesignerFormWindowInterface *fw, QObject *o)
static QPoint dropPointOffset(const qdesigner_internal::FormWindowBase *fw, const QWidget *dropTarget)
#define QDESIGNER_SHARED_EXPORT
QIcon layoutIcons[LayoutInfo::UnknownLayout+1]