summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetextedit_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextedit_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
index 0e91e73..605b620 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
@@ -64,6 +64,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem
Q_ENUMS(VAlignment)
Q_ENUMS(HAlignment)
Q_ENUMS(TextFormat)
+ Q_ENUMS(WrapMode)
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
@@ -72,7 +73,8 @@ class Q_DECLARATIVE_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem
Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged)
Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged)
- Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged) //### other wrap modes
+ Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged) //### deprecated
+ Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged)
Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged)
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged)
Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged)
@@ -107,6 +109,12 @@ public:
AutoText = Qt::AutoText
};
+ enum WrapMode { NoWrap = QTextOption::NoWrap,
+ WordWrap = QTextOption::WordWrap,
+ WrapAnywhere = QTextOption::WrapAnywhere,
+ WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere
+ };
+
QString text() const;
void setText(const QString &);
@@ -133,6 +141,8 @@ public:
bool wrap() const;
void setWrap(bool w);
+ WrapMode wrapMode() const;
+ void setWrapMode(WrapMode w);
bool isCursorVisible() const;
void setCursorVisible(bool on);
@@ -185,7 +195,7 @@ Q_SIGNALS:
void fontChanged(const QFont &font);
void horizontalAlignmentChanged(HAlignment alignment);
void verticalAlignmentChanged(VAlignment alignment);
- void wrapChanged(bool isWrapped);
+ void wrapModeChanged();
void textFormatChanged(TextFormat textFormat);
void readOnlyChanged(bool isReadOnly);
void cursorVisibleChanged(bool isCursorVisible);