From a0ac1c836c253b91f25325c4fbc07b6fa7e10caf Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 15 Feb 2011 19:55:14 +0100 Subject: Doc: Fixed example project file for Symbian. Task-number: QTBUG-15716 --- examples/webkit/fancybrowser/fancybrowser.pro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/webkit/fancybrowser/fancybrowser.pro b/examples/webkit/fancybrowser/fancybrowser.pro index 3786d9c..df4dbe3 100644 --- a/examples/webkit/fancybrowser/fancybrowser.pro +++ b/examples/webkit/fancybrowser/fancybrowser.pro @@ -12,5 +12,7 @@ INSTALLS += target sources symbian { TARGET.UID3 = 0xA000CF6C + TARGET.EPOCHEAPSIZE = 0×020000 0×4000000 + TARGET.CAPABILITY += Location NetworkServices include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) } -- cgit v0.12 From a098d2025ec645ed902eb777a52778d665fbe845 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 15 Feb 2011 20:41:26 +0100 Subject: Ensured that variables are scanned when generating the help index. Style option classes with obsolete variables had no obsolete pages in the compiled help files because, without other obsolete members to represent them, those pages were not added to the help project. --- tools/qdoc3/helpprojectwriter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index f2e2f04..949507f 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -350,6 +350,14 @@ bool HelpProjectWriter::generateSection(HelpProject &project, } break; + case Node::Variable: + { + QString location = HtmlGenerator::fullDocumentLocation(node); + project.files.insert(location.left(location.lastIndexOf(QLatin1Char('#')))); + project.keywords.append(keywordDetails(node)); + } + break; + // Fake nodes (such as manual pages) contain subtypes, titles and other // attributes. case Node::Fake: { -- cgit v0.12 From 57cde172cd7a18aa1c7dea98c7f3ac7bd67c31f3 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 16 Feb 2011 14:18:23 +0100 Subject: Doc: Style - show navigation, fix list items, reduce contents size. Task-number: QTBUG-13594 Reviewed-by: Leena Miettinen --- doc/src/template/style/offline.css | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css index 3689ee8..aa7de59 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 { @@ -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; -- cgit v0.12 From 86da319e2518cb316b8ececeecc4e74df8809d19 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 16 Feb 2011 16:30:39 +0100 Subject: Doc: Attempted to fix table a header alignment problem. Task-number: QTBUG-13591 --- doc/src/template/style/offline.css | 4 ++-- doc/src/template/style/style.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css index aa7de59..c3f90c3 100644 --- a/doc/src/template/style/offline.css +++ b/doc/src/template/style/offline.css @@ -126,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 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 {} -- cgit v0.12 From ec6787933c15f2894a62b2e8510902a60b4fc792 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 17 Feb 2011 14:25:26 +0100 Subject: Doc: Fixed broken snippets. --- doc/src/development/assistant-manual.qdoc | 6 +- doc/src/snippets/code/doc_src_plugins-howto.cpp | 89 +++++++++++++++ doc/src/snippets/code/doc_src_plugins-howto.pro | 50 +++++++++ doc/src/snippets/code/doc_src_qtscripttools.pro | 43 ++++++++ doc/src/snippets/code/doc_src_stylesheet.cpp | 140 ++++++++++++++++++++++++ 5 files changed, 325 insertions(+), 3 deletions(-) create mode 100644 doc/src/snippets/code/doc_src_plugins-howto.cpp create mode 100644 doc/src/snippets/code/doc_src_plugins-howto.pro create mode 100644 doc/src/snippets/code/doc_src_qtscripttools.pro create mode 100644 doc/src/snippets/code/doc_src_stylesheet.cpp 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/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 +#include + +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] -- cgit v0.12 From 0c3a089cd50d3016e726c930b9dbecec5edfd4f1 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 17 Feb 2011 14:26:41 +0100 Subject: Doc: Fixed snippet. --- .../examples/activeqt/hierarchy-demo-snippet.qdoc | 29 ++++++++++++++++++++++ doc/src/examples/activeqt/hierarchy.qdoc | 4 +-- 2 files changed, 31 insertions(+), 2 deletions(-) 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]