summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetextedit_p.h
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-09 05:18:08 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-09 05:18:08 (GMT)
commit95ad31adca64f639712fa378d25aa3e552b3dc72 (patch)
treed03e2ed9999a17572be62f54fc4173608221eb9e /src/declarative/graphicsitems/qdeclarativetextedit_p.h
parent60e0a0b0fb6a2cf7b9fffd4ff2d30838ffa4ac84 (diff)
downloadQt-95ad31adca64f639712fa378d25aa3e552b3dc72.zip
Qt-95ad31adca64f639712fa378d25aa3e552b3dc72.tar.gz
Qt-95ad31adca64f639712fa378d25aa3e552b3dc72.tar.bz2
TextEdit::wrap changed to TextEdit::wrapMode enumeration
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..3ac2b42 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);