summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-09-10 02:02:11 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-09-10 02:02:11 (GMT)
commit8151beb4854341d4819d6d31cee4b9a0666ea36e (patch)
tree883fabe745a8965d94d168f62d33d66866e3072c /src
parent7fa2ba45442adb7042ddac0e92f8ea5df4eb5619 (diff)
downloadQt-8151beb4854341d4819d6d31cee4b9a0666ea36e.zip
Qt-8151beb4854341d4819d6d31cee4b9a0666ea36e.tar.gz
Qt-8151beb4854341d4819d6d31cee4b9a0666ea36e.tar.bz2
Cursory QFxTextInput documentation.
Diffstat (limited to 'src')
-rw-r--r--src/declarative/fx/qfxtextinput.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxtextinput.cpp b/src/declarative/fx/qfxtextinput.cpp
index b6ec109..d9da308 100644
--- a/src/declarative/fx/qfxtextinput.cpp
+++ b/src/declarative/fx/qfxtextinput.cpp
@@ -195,6 +195,21 @@ void QFxTextInput::setSelectedTextColor(const QColor &color)
//TODO: implement
}
+/*!
+ \qmlproperty enumeration TextInput::horizontalAlignment
+
+ Sets the horizontal alignment of the text within the TextInput item's
+ width and height. By default, the text is left aligned.
+
+ TextInput does not have vertical alignment, as the natural height is
+ exactly the height of the single line of text. If you set the height
+ manually to something larger, TextInput will always be top aligned
+ vertically. You can use anchors to align it however you want within
+ another item.
+
+ The valid values for \c horizontalAlignment are \c AlignLeft, \c AlignRight and
+ \c AlignHCenter.
+*/
QFxTextInput::HAlignment QFxTextInput::hAlign() const
{
Q_D(const QFxTextInput);
@@ -346,6 +361,12 @@ QString QFxTextInput::selectedText() const
return d->control->selectedText();
}
+/*!
+ \qmlproperty bool TextInput::focusOnPress
+
+ Whether the TextInput should gain focus on a mouse press. By default this is
+ set to true.
+*/
bool QFxTextInput::focusOnPress() const
{
Q_D(const QFxTextInput);
@@ -358,6 +379,16 @@ void QFxTextInput::setFocusOnPress(bool b)
d->focusOnPress = b;
}
+/*!
+ \qmlproperty QValidator* TextInput::validator
+
+ Allows you to set a QValidator on the TextInput. When a validator is set
+ the TextInput will only accept input which leaves the text property in
+ an acceptable or intermediate state. The accepted signal will only be sent
+ if the text is in an acceptable state when enter is pressed.
+
+ \sa acceptableInput, inputMask
+*/
QValidator* QFxTextInput::validator() const
{
Q_D(const QFxTextInput);
@@ -375,6 +406,15 @@ void QFxTextInput::setValidator(QValidator* v)
}
}
+/*!
+ \qmlproperty string TextInput::inputMask
+
+ Allows you to set an input mask on the TextInput, restricting the allowable
+ text inputs. See QLineEdit::inputMask for further details, as the exact
+ same mask strings are used by TextInput.
+
+ \sa acceptableInput, validator
+*/
QString QFxTextInput::inputMask() const
{
Q_D(const QFxTextInput);
@@ -387,12 +427,30 @@ void QFxTextInput::setInputMask(const QString &im)
d->control->setInputMask(im);
}
+/*!
+ \qmlproperty bool TextInput::acceptableInput
+
+ This property is always true unless a validator or input mask has been set.
+ If a validator or input mask has been set, this property will only be true
+ if the current text is acceptable to the validator or input mask as a final
+ string (not as an intermediate string).
+*/
bool QFxTextInput::hasAcceptableInput() const
{
Q_D(const QFxTextInput);
return d->control->hasAcceptableInput();
}
+/*!
+ \qmlproperty TextInput.EchoMode TextInput::echoMode
+
+ Specifies how the text should be displayed in the TextInput.
+ The default is Normal, which displays the text as it is. Other values
+ are Password, which displays asterixes instead of characters, NoEcho,
+ which displays nothing, and PasswordEchoOnEdit, which displays all but the
+ current character as asterixes.
+
+*/
QFxTextInput::EchoMode QFxTextInput::echoMode() const
{
Q_D(const QFxTextInput);