summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2011-02-21 13:17:14 (GMT)
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2011-02-21 13:17:14 (GMT)
commit47dffd3d21d515a68dfe454fe9474450c5c82115 (patch)
treeb14ad096d944e92e3ffb87e3d274e2822902d29b /doc
parentb53dfa91f3b131e39c8276f07e6ae5e701f0848e (diff)
parentcdefba000d1abc7c611c7f495e7a7409710038b5 (diff)
downloadQt-47dffd3d21d515a68dfe454fe9474450c5c82115.zip
Qt-47dffd3d21d515a68dfe454fe9474450c5c82115.tar.gz
Qt-47dffd3d21d515a68dfe454fe9474450c5c82115.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'doc')
-rw-r--r--doc/src/development/assistant-manual.qdoc6
-rw-r--r--doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc29
-rw-r--r--doc/src/examples/activeqt/hierarchy.qdoc4
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.cpp89
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.pro50
-rw-r--r--doc/src/snippets/code/doc_src_qtscripttools.pro43
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.cpp140
-rw-r--r--doc/src/template/style/offline.css30
-rwxr-xr-xdoc/src/template/style/style.css4
9 files changed, 374 insertions, 21 deletions
diff --git a/doc/src/development/assistant-manual.qdoc b/doc/src/development/assistant-manual.qdoc
index 1ed99db..8d3c667 100644
--- a/doc/src/development/assistant-manual.qdoc
+++ b/doc/src/development/assistant-manual.qdoc
@@ -676,13 +676,13 @@
The following example shows how this can be done:
- \snippet doc/src/snippets/code/doc_src_assistant-manual.cpp 2
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 2
Once \QA is running, you can send commands by using the stdin channel of
the process. The code snippet below shows how to tell \QA to show a certain
page in the documentation.
- \snippet doc/src/snippets/code/doc_src_assistant-manual.cpp 3
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 3
Note that the trailing newline character is required to mark the end
of the input.
@@ -745,7 +745,7 @@
instead of one line for every command. The commands have to be separated by
a semicolon, as shown in the following example:
- \snippet doc/src/snippets/code/doc_src_assistant-manual.cpp 4
+ \snippet doc/src/snippets/code/doc_src_assistant-manual.qdoc 4
\section1 Compatibility with Old Formats
diff --git a/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
index 5df3224..a36ebbb 100644
--- a/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
+++ b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
@@ -1,3 +1,31 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [script]
<script language="javascript">
function createSubWidget( form )
{
@@ -37,3 +65,4 @@ CODEBASE="http://qt.nokia.com/demos/hierarchy.cab">
<input type="edit" ID="fontEdit" value="MS Sans Serif" />
<input type="button" value = "Set Font" onClick="setFont(this.form)" />
</form>
+//! [script]
diff --git a/doc/src/examples/activeqt/hierarchy.qdoc b/doc/src/examples/activeqt/hierarchy.qdoc
index 8d14b68..791af1f 100644
--- a/doc/src/examples/activeqt/hierarchy.qdoc
+++ b/doc/src/examples/activeqt/hierarchy.qdoc
@@ -25,7 +25,7 @@
**
****************************************************************************/
-/*!
+/*!
\page qaxserver-demo-hierarchy.html
\title Qt Widget Hierarchy
@@ -84,5 +84,5 @@
your WebBrowser to support ActiveX controls, and scripting to be
enabled.
- \quotefile examples/activeqt/hierarchy-demo-snippet.qdoc
+ \snippet examples/activeqt/hierarchy-demo-snippet.qdoc script
*/
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.cpp b/doc/src/snippets/code/doc_src_plugins-howto.cpp
new file mode 100644
index 0000000..06bf903
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_plugins-howto.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+class MyStylePlugin : public QStylePlugin
+{
+public:
+ QStringList keys() const;
+ QStyle *create(const QString &key);
+};
+//! [0]
+
+
+//! [1]
+#include "mystyleplugin.h"
+
+QStringList MyStylePlugin::keys() const
+{
+ return QStringList() << "MyStyle";
+}
+
+QStyle *MyStylePlugin::create(const QString &key)
+{
+ if (key.toLower() == "mystyle")
+ return new MyStyle;
+ return 0;
+}
+
+Q_EXPORT_PLUGIN2(pnp_mystyleplugin, MyStylePlugin)
+//! [1]
+
+
+//! [2]
+QApplication::setStyle(QStyleFactory::create("MyStyle"));
+//! [2]
+
+
+//! [4]
+#include <QApplication>
+#include <QtPlugin>
+
+Q_IMPORT_PLUGIN(qjpeg)
+Q_IMPORT_PLUGIN(qgif)
+Q_IMPORT_PLUGIN(qkrcodecs)
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.pro b/doc/src/snippets/code/doc_src_plugins-howto.pro
new file mode 100644
index 0000000..eb0ec28
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_plugins-howto.pro
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [3]
+CONFIG += release
+#! [3]
+
+
+#! [5]
+QTPLUGIN += qjpeg \
+ qgif \
+ qkrcodecs
+#! [5]
diff --git a/doc/src/snippets/code/doc_src_qtscripttools.pro b/doc/src/snippets/code/doc_src_qtscripttools.pro
new file mode 100644
index 0000000..e87644d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscripttools.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += scripttools
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_stylesheet.cpp b/doc/src/snippets/code/doc_src_stylesheet.cpp
new file mode 100644
index 0000000..3faaf2d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_stylesheet.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [21]
+qApp->setStyleSheet("QPushButton { color: white }");
+//! [21]
+
+
+//! [22]
+myPushButton->setStyleSheet("* { color: blue }");
+//! [22]
+
+
+//! [23]
+myPushButton->setStyleSheet("color: blue");
+//! [23]
+
+
+//! [24]
+qApp->setStyleSheet("QGroupBox { color: red; } ");
+//! [24]
+
+//! [25]
+qApp->setStyleSheet("QGroupBox, QGroupBox * { color: red; }");
+//! [25]
+
+
+//! [26]
+class MyPushButton : public QPushButton {
+ // ...
+}
+
+// ...
+qApp->setStyleSheet("MyPushButton { background: yellow; }");
+//! [26]
+
+
+//! [27]
+namespace ns {
+ class MyPushButton : public QPushButton {
+ // ...
+ }
+}
+
+// ...
+qApp->setStyleSheet("ns--MyPushButton { background: yellow; }");
+//! [27]
+
+
+//! [32]
+void CustomWidget::paintEvent(QPaintEvent *)
+{
+ QStyleOption opt;
+ opt.init(this);
+ QPainter p(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
+}
+//! [32]
+
+
+//! [88]
+qApp->setStyleSheet("QLineEdit { background-color: yellow }");
+//! [88]
+
+
+//! [89]
+myDialog->setStyleSheet("QLineEdit { background-color: yellow }");
+//! [89]
+
+
+//! [90]
+myDialog->setStyleSheet("QLineEdit#nameEdit { background-color: yellow }");
+//! [90]
+
+
+//! [91]
+nameEdit->setStyleSheet("background-color: yellow");
+//! [91]
+
+
+//! [92]
+nameEdit->setStyleSheet("color: blue; background-color: yellow");
+//! [92]
+
+
+//! [93]
+nameEdit->setStyleSheet("color: blue;"
+ "background-color: yellow;"
+ "selection-color: yellow;"
+ "selection-background-color: blue;");
+//! [93]
+
+
+//! [95]
+QLineEdit *nameEdit = new QLineEdit(this);
+nameEdit->setProperty("mandatoryField", true);
+
+QLineEdit *emailEdit = new QLineEdit(this);
+emailEdit->setProperty("mandatoryField", true);
+
+QSpinBox *ageSpinBox = new QSpinBox(this);
+ageSpinBox->setProperty("mandatoryField", true);
+//! [95]
diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css
index 3689ee8..c3f90c3 100644
--- a/doc/src/template/style/offline.css
+++ b/doc/src/template/style/offline.css
@@ -26,14 +26,14 @@
{
text-decoration: none;
}
- li
- {
- list-style: none;
- }
ol li
{
list-style: decimal;
}
+ ul li
+ {
+ list-style: none;
+ }
caption, th
{
text-align: left;
@@ -76,6 +76,8 @@
{
margin-left: 0.5em;
margin-right: 0.5em;
+ font-family: sans-serif;
+ line-height: normal
}
a
{
@@ -124,13 +126,13 @@
}
th
{
- padding: 0.5em 1.5em 0.5em 1.5em;
+ padding: 0.5em 1.5em 0.5em 1em;
background-color: #E1E1E1;
border-left: 1px solid #E6E6E6;
}
td
{
- padding: 0.25em 1.5em 0.25em 2em;
+ padding: 0.25em 1.5em 0.25em 1em;
}
td.rightAlign
@@ -162,7 +164,6 @@
span.comment
{
color: #008B00;
- font-style: italic
}
span.string, span.char
{
@@ -240,10 +241,6 @@
margin-bottom: 0.5em
}
- .naviNextPrevious
- {
- display: none
- }
.header .breadcrumb
{
font-size: 90%;
@@ -310,19 +307,19 @@
.content h1
{
font-weight: bold;
- font-size: 150%
+ font-size: 130%
}
.content h2
{
font-weight: bold;
- font-size: 135%;
+ font-size: 120%;
width: 100%;
}
.content h3
{
font-weight: bold;
- font-size: 120%;
+ font-size: 110%;
width: 100%;
}
.content table p
@@ -472,6 +469,11 @@
padding: 0.25em 0.5em 0.25em 0.5em;
}
+ .toc
+ {
+ font-size: 80%
+ }
+
.header .content .toc ul
{
padding-left: 0px;
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index 6c63360..a1a9f42 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -146,13 +146,13 @@
}
th
{
- padding: 5px 15px 5px 15px;
+ padding: 5px 15px 5px 10px;
background-color: #E1E1E1;
border-left: 1px solid #E6E6E6;
}
td
{
- padding: 3px 15px 3px 20px;
+ padding: 3px 15px 3px 10px;
}
tr.odd td:hover, tr.even td:hover {}