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
55
58
61
62 QString text() const;
63
64 QSize sizeHint () const override;
66
68
69 bool hasAcceptableInput() const;
70
71 // installs an event filter object on the private QLineEdit
73
74 // Replace newline characters by literal "\n" for inline editing
75 // in mode ValidationMultiLine
77
78 // Replace literal "\n" by actual new lines in mode ValidationMultiLine
80
81 // Returns whether newline characters are valid in validationMode.
83
84 signals:
85 void textChanged(const QString &text);
87
88 public slots:
89 void setText(const QString &text);
90 void selectAll();
91 void clear();
92
93 protected:
95
96 private slots:
97 void slotTextChanged(const QString &text);
98 void slotTextEdited();
100
101 private:
104
108
109 // Cached text containing real newline characters.
111 bool m_textEdited = false;
112 };
113}
114
115QT_END_NAMESPACE
116
117#endif // TEXTPROPERTYEDITOR_H
friend class QWidget
Definition qpainter.h:431
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.
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
QModelIndexList indexesOf(QObject *o) 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]