aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextedit_p_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-02-04 18:00:53 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-03-05 22:45:19 +0000
commite157fcba9e515e63410d6b96b35c589182a4d5fa (patch)
treec78c668ed33afbf20829cb0132ca9e3df77b85f6 /src/quick/items/qquicktextedit_p_p.h
parentb419ca92bef624893fa46559186b207905bc45e0 (diff)
TextEdit: add support for padding
This makes it possible for TextArea to inherit TextEdit, reserve space for the decoration, and set the desired property defaults without having to create dozens of property aliases. [ChangeLog][QtQuick][TextEdit] Added padding, leftPadding, topPadding, rightPadding and bottomPadding properties. Task-number: QTBUG-41559 Change-Id: I4fa22f86e6151524a63b2b862f17bc9d6a713142 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Diffstat (limited to 'src/quick/items/qquicktextedit_p_p.h')
-rw-r--r--src/quick/items/qquicktextedit_p_p.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h
index 0cf0f46532..20c0d1ca9c 100644
--- a/src/quick/items/qquicktextedit_p_p.h
+++ b/src/quick/items/qquicktextedit_p_p.h
@@ -84,7 +84,9 @@ public:
QQuickTextEditPrivate()
: color(QRgb(0xFF000000)), selectionColor(QRgb(0xFF000080)), selectedTextColor(QRgb(0xFFFFFFFF))
- , textMargin(0.0), xoff(0), yoff(0), font(sourceFont), cursorComponent(0), cursorItem(0), document(0), control(0)
+ , textMargin(0.0), xoff(0), yoff(0), padding(0), topPadding(0), leftPadding(0), rightPadding(0), bottomPadding(0)
+ , explicitTopPadding(false), explicitLeftPadding(false), explicitRightPadding(false), explicitBottomPadding(false)
+ , font(sourceFont), cursorComponent(0), cursorItem(0), document(0), control(0)
, quickDocument(0), lastSelectionStart(0), lastSelectionEnd(0), lineCount(0)
, hAlign(QQuickTextEdit::AlignLeft), vAlign(QQuickTextEdit::AlignTop)
, format(QQuickTextEdit::PlainText), wrapMode(QQuickTextEdit::NoWrap)
@@ -131,6 +133,11 @@ public:
Qt::InputMethodHints effectiveInputMethodHints() const;
#endif
+ void setTopPadding(qreal value, bool reset = false);
+ void setLeftPadding(qreal value, bool reset = false);
+ void setRightPadding(qreal value, bool reset = false);
+ void setBottomPadding(qreal value, bool reset = false);
+
QColor color;
QColor selectionColor;
QColor selectedTextColor;
@@ -140,6 +147,15 @@ public:
qreal textMargin;
qreal xoff;
qreal yoff;
+ qreal padding;
+ qreal topPadding;
+ qreal leftPadding;
+ qreal rightPadding;
+ qreal bottomPadding;
+ bool explicitTopPadding;
+ bool explicitLeftPadding;
+ bool explicitRightPadding;
+ bool explicitBottomPadding;
QString text;
QUrl baseUrl;