summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-08-20 06:29:04 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-08-20 06:29:04 (GMT)
commitefe920cb2873facc7f9b21f77b678628e9c3dcb2 (patch)
treea346542f1eafa29d5746477e21f6698e869bb96e
parent3cfba122843d64bb6761808c020b27c231dad8be (diff)
downloadQt-efe920cb2873facc7f9b21f77b678628e9c3dcb2.zip
Qt-efe920cb2873facc7f9b21f77b678628e9c3dcb2.tar.gz
Qt-efe920cb2873facc7f9b21f77b678628e9c3dcb2.tar.bz2
Update documentation regarding font.pointSize
-rw-r--r--doc/src/snippets/declarative/comments.qml2
-rw-r--r--doc/src/snippets/declarative/pathview/pathattributes.qml2
-rw-r--r--doc/src/snippets/declarative/pathview/pathview.qml2
-rw-r--r--src/declarative/fx/qfxtext.cpp24
-rw-r--r--src/declarative/fx/qfxtextedit.cpp10
-rw-r--r--src/declarative/fx/qfxtextinput.cpp2
-rw-r--r--src/declarative/qml/qmlcompiler.cpp2
7 files changed, 22 insertions, 22 deletions
diff --git a/doc/src/snippets/declarative/comments.qml b/doc/src/snippets/declarative/comments.qml
index 4f8a442..806be29 100644
--- a/doc/src/snippets/declarative/comments.qml
+++ b/doc/src/snippets/declarative/comments.qml
@@ -7,5 +7,5 @@ Text {
we give it a large size and different font.
*/
font.family: "Helvetica"
- font.size: 24
+ font.pointSize: 24
}
diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml
index 3c2b204..92d6966 100644
--- a/doc/src/snippets/declarative/pathview/pathattributes.qml
+++ b/doc/src/snippets/declarative/pathview/pathattributes.qml
@@ -13,7 +13,7 @@ Rectangle {
opacity: PathView.opacity
VerticalLayout {
Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon }
- Text { id: Name; text: name; font.size: 16}
+ Text { id: Name; text: name; font.pointSize: 16}
}
}
}
diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml
index f5db242..004a1d2 100644
--- a/doc/src/snippets/declarative/pathview/pathview.qml
+++ b/doc/src/snippets/declarative/pathview/pathview.qml
@@ -11,7 +11,7 @@ Rectangle {
width: 80; height: 80
VerticalLayout {
Image { anchors.horizontalCenter: Name.horizontalCenter; width: 64; height: 64; source: icon }
- Text { id: Name; text: name; font.size: 16}
+ Text { id: Name; text: name; font.pointSize: 16}
}
}
}
diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp
index dcaaa54..e310200 100644
--- a/src/declarative/fx/qfxtext.cpp
+++ b/src/declarative/fx/qfxtext.cpp
@@ -62,7 +62,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QFxText)
It can display both plain and rich text. For example:
\qml
- Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" }
+ Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
Text { text: "<b>Hello</b> <i>World!</i>" }
\endqml
@@ -90,7 +90,7 @@ QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Text,QFxText)
It can display both plain and rich text. For example:
\qml
- Text { text: "Hello World!"; font.family: "Helvetica"; font.size: 24; color: "red" }
+ Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
Text { text: "<b>Hello</b> <i>World!</i>" }
\endqml
@@ -126,11 +126,11 @@ QFxText::~QFxText()
\qmlproperty string Text::font.family
\qmlproperty bool Text::font.bold
\qmlproperty bool Text::font.italic
- \qmlproperty real Text::font.size
+ \qmlproperty bool Text::font.underline
+ \qmlproperty real Text::font.pointSize
+ \qmlproperty real Text::font.pixelSize
Set the Text's font attributes.
-
- \note \c font.size sets the font's point size (not pixel size).
*/
QFont QFxText::font() const
{
@@ -230,10 +230,10 @@ QColor QFxText::color() const
\qml
HorizontalPositioner {
- Text { font.size: 24; text: "Normal" }
- Text { font.size: 24; text: "Raised"; style: "Raised"; styleColor: "#AAAAAA" }
- Text { font.size: 24; text: "Outline"; style: "Outline"; styleColor: "red" }
- Text { font.size: 24; text: "Sunken"; style: "Sunken"; styleColor: "#AAAAAA" }
+ Text { font.pointSize: 24; text: "Normal" }
+ Text { font.pointSize: 24; text: "Raised"; style: "Raised"; styleColor: "#AAAAAA" }
+ Text { font.pointSize: 24; text: "Outline"; style: "Outline"; styleColor: "red" }
+ Text { font.pointSize: 24; text: "Sunken"; style: "Sunken"; styleColor: "#AAAAAA" }
}
\endqml
@@ -365,16 +365,16 @@ void QFxText::setWrap(bool w)
\qml
VerticalPositioner {
TextEdit {
- font.size: 24
+ font.pointSize: 24
text: "<b>Hello</b> <i>World!</i>"
}
TextEdit {
- font.size: 24
+ font.pointSize: 24
textFormat: "RichText"
text: "<b>Hello</b> <i>World!</i>"
}
TextEdit {
- font.size: 24
+ font.pointSize: 24
textFormat: "PlainText"
text: "<b>Hello</b> <i>World!</i>"
}
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp
index f7f5f0a..3cab15d 100644
--- a/src/declarative/fx/qfxtextedit.cpp
+++ b/src/declarative/fx/qfxtextedit.cpp
@@ -67,7 +67,7 @@ TextEdit {
text: "<b>Hello</b> <i>World!</i>"
focus: true
font.family: "Helvetica"
- font.size: 20
+ font.pointSize: 20
color: "blue"
width: 240
}
@@ -126,7 +126,7 @@ QString QFxTextEdit::text() const
/*!
\qmlproperty font TextEdit::font
- Set the TextEdit's font attributes. \c font.size sets the font's point size.
+ Set the TextEdit's font attributes.
*/
/*!
@@ -169,16 +169,16 @@ void QFxTextEdit::setText(const QString &text)
\qml
VerticalPositioner {
TextEdit {
- font.size: 24
+ font.pointSize: 24
text: "<b>Hello</b> <i>World!</i>"
}
TextEdit {
- font.size: 24
+ font.pointSize: 24
textFormat: "RichText"
text: "<b>Hello</b> <i>World!</i>"
}
TextEdit {
- font.size: 24
+ font.pointSize: 24
textFormat: "PlainText"
text: "<b>Hello</b> <i>World!</i>"
}
diff --git a/src/declarative/fx/qfxtextinput.cpp b/src/declarative/fx/qfxtextinput.cpp
index 164739f..252d5c8 100644
--- a/src/declarative/fx/qfxtextinput.cpp
+++ b/src/declarative/fx/qfxtextinput.cpp
@@ -101,7 +101,7 @@ void QFxTextInput::setText(const QString &s)
/*!
\qmlproperty font TextInput::font
- Set the TextInput's font attributes. \c font.size sets the font's point size.
+ Set the TextInput's font attributes.
*/
QFont QFxTextInput::font() const
{
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index e04c876..afc8698 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -1449,7 +1449,7 @@ bool QmlCompiler::buildAttachedProperty(QmlParser::Property *prop,
// Build "grouped" properties. In this example:
// Text {
-// font.size: 12
+// font.pointSize: 12
// font.family: "Helvetica"
// }
// font is a nested property. size and family are not.