From 50123887ba0f33cf47520bee7c419d68742af2d1 Mon Sep 17 00:00:00 2001 From: Qt by Nokia Date: Wed, 27 Apr 2011 12:05:43 +0200 Subject: Initial import from the monolithic Qt. This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12 --- .../contextsensitivehelp/contextsensitivehelp.pro | 20 + examples/help/contextsensitivehelp/doc/amount.html | 11 + examples/help/contextsensitivehelp/doc/filter.html | 12 + examples/help/contextsensitivehelp/doc/plants.html | 44 ++ examples/help/contextsensitivehelp/doc/rain.html | 11 + examples/help/contextsensitivehelp/doc/source.html | 33 ++ .../help/contextsensitivehelp/doc/temperature.html | 13 + examples/help/contextsensitivehelp/doc/time.html | 11 + .../contextsensitivehelp/doc/wateringmachine.qch | Bin 0 -> 25600 bytes .../contextsensitivehelp/doc/wateringmachine.qhc | Bin 0 -> 8192 bytes .../contextsensitivehelp/doc/wateringmachine.qhcp | 14 + .../contextsensitivehelp/doc/wateringmachine.qhp | 25 ++ examples/help/contextsensitivehelp/helpbrowser.cpp | 80 ++++ examples/help/contextsensitivehelp/helpbrowser.h | 64 +++ examples/help/contextsensitivehelp/main.cpp | 50 +++ .../contextsensitivehelp/wateringconfigdialog.cpp | 68 ++++ .../contextsensitivehelp/wateringconfigdialog.h | 61 +++ .../contextsensitivehelp/wateringconfigdialog.ui | 446 +++++++++++++++++++++ 18 files changed, 963 insertions(+) create mode 100644 examples/help/contextsensitivehelp/contextsensitivehelp.pro create mode 100644 examples/help/contextsensitivehelp/doc/amount.html create mode 100644 examples/help/contextsensitivehelp/doc/filter.html create mode 100644 examples/help/contextsensitivehelp/doc/plants.html create mode 100644 examples/help/contextsensitivehelp/doc/rain.html create mode 100644 examples/help/contextsensitivehelp/doc/source.html create mode 100644 examples/help/contextsensitivehelp/doc/temperature.html create mode 100644 examples/help/contextsensitivehelp/doc/time.html create mode 100644 examples/help/contextsensitivehelp/doc/wateringmachine.qch create mode 100644 examples/help/contextsensitivehelp/doc/wateringmachine.qhc create mode 100644 examples/help/contextsensitivehelp/doc/wateringmachine.qhcp create mode 100644 examples/help/contextsensitivehelp/doc/wateringmachine.qhp create mode 100644 examples/help/contextsensitivehelp/helpbrowser.cpp create mode 100644 examples/help/contextsensitivehelp/helpbrowser.h create mode 100644 examples/help/contextsensitivehelp/main.cpp create mode 100644 examples/help/contextsensitivehelp/wateringconfigdialog.cpp create mode 100644 examples/help/contextsensitivehelp/wateringconfigdialog.h create mode 100644 examples/help/contextsensitivehelp/wateringconfigdialog.ui (limited to 'examples/help/contextsensitivehelp') diff --git a/examples/help/contextsensitivehelp/contextsensitivehelp.pro b/examples/help/contextsensitivehelp/contextsensitivehelp.pro new file mode 100644 index 000000000..ef85c840d --- /dev/null +++ b/examples/help/contextsensitivehelp/contextsensitivehelp.pro @@ -0,0 +1,20 @@ +TEMPLATE = app + +CONFIG += help + +SOURCES += main.cpp \ + wateringconfigdialog.cpp \ + helpbrowser.cpp + +HEADERS += wateringconfigdialog.h \ + helpbrowser.h + +FORMS += wateringconfigdialog.ui + +# install +target.path = $$[QT_INSTALL_EXAMPLES]/qttools/help/contextsensitivehelp +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.png *.doc doc +sources.path = $$[QT_INSTALL_EXAMPLES]/qttools/help/contextsensitivehelp +INSTALLS += target sources + +symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri) diff --git a/examples/help/contextsensitivehelp/doc/amount.html b/examples/help/contextsensitivehelp/doc/amount.html new file mode 100644 index 000000000..7a02a6fd5 --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/amount.html @@ -0,0 +1,11 @@ + + + + Water amount + + + Depending on the plant, temperature and rain fall the amount needs to be larger + or smaller. On a really hot day without rain, the suggested amount + can be increased by about 10%. + + diff --git a/examples/help/contextsensitivehelp/doc/filter.html b/examples/help/contextsensitivehelp/doc/filter.html new file mode 100644 index 000000000..64861126d --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/filter.html @@ -0,0 +1,12 @@ + + + +Filter + + +Depending on the source of water, it needs to be filtered or not. Filtering +is strongly recommened for the river and lake. + + + + diff --git a/examples/help/contextsensitivehelp/doc/plants.html b/examples/help/contextsensitivehelp/doc/plants.html new file mode 100644 index 000000000..2d2bb6788 --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/plants.html @@ -0,0 +1,44 @@ + + + + Plants + + + Different kind of plants need different amounts of water. Here's a short + overview over the most common grown plants and their avarage need of water: +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KindAmount
Squash2000
Bean1500
Carrot1200
Strawberry1300
Raspberry1000
Blueberry1100
+

+ Warning: Watering them too much or too little will + cause irreversible damage! + + diff --git a/examples/help/contextsensitivehelp/doc/rain.html b/examples/help/contextsensitivehelp/doc/rain.html new file mode 100644 index 000000000..1ffe45240 --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/rain.html @@ -0,0 +1,11 @@ + + + + Rain + + + Depending on the rain fall, the automated watering system should not be + switched on at all. Also, the temperature should be + considered. + + diff --git a/examples/help/contextsensitivehelp/doc/source.html b/examples/help/contextsensitivehelp/doc/source.html new file mode 100644 index 000000000..68b2f8c71 --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/source.html @@ -0,0 +1,33 @@ + + + + Water Source + + + The current pipe system connects to four different sources. Be aware + that only a limited amount of water can be taken from some sources. +
+ + + + + + + + + + + + + + + + + + + + + +
SourceAmount
Fountain4000
River6000
Lake10000
Public Water Systemunlimited
+ + diff --git a/examples/help/contextsensitivehelp/doc/temperature.html b/examples/help/contextsensitivehelp/doc/temperature.html new file mode 100644 index 000000000..4145ed725 --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/temperature.html @@ -0,0 +1,13 @@ + + + + Temperature + + + Depending on the temperature, the plants need more or less water. The higher + the temperature the higher the need for water. If the temperature does not + reach a certain level, maybe no automatic watering should be done at all.
+ Before setting this parameter for good, you should also take the amount of + rain into account. + + diff --git a/examples/help/contextsensitivehelp/doc/time.html b/examples/help/contextsensitivehelp/doc/time.html new file mode 100644 index 000000000..0cc81f4d0 --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/time.html @@ -0,0 +1,11 @@ + + + +Starting time + + +Starting the watering too early may be ineffective since most water +will evaporate. + + + diff --git a/examples/help/contextsensitivehelp/doc/wateringmachine.qch b/examples/help/contextsensitivehelp/doc/wateringmachine.qch new file mode 100644 index 000000000..35d29be22 Binary files /dev/null and b/examples/help/contextsensitivehelp/doc/wateringmachine.qch differ diff --git a/examples/help/contextsensitivehelp/doc/wateringmachine.qhc b/examples/help/contextsensitivehelp/doc/wateringmachine.qhc new file mode 100644 index 000000000..b5653c3ff Binary files /dev/null and b/examples/help/contextsensitivehelp/doc/wateringmachine.qhc differ diff --git a/examples/help/contextsensitivehelp/doc/wateringmachine.qhcp b/examples/help/contextsensitivehelp/doc/wateringmachine.qhcp new file mode 100644 index 000000000..eebf6520e --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/wateringmachine.qhcp @@ -0,0 +1,14 @@ + + + + + + wateringmachine.qhp + wateringmachine.qch + + + + wateringmachine.qch + + + \ No newline at end of file diff --git a/examples/help/contextsensitivehelp/doc/wateringmachine.qhp b/examples/help/contextsensitivehelp/doc/wateringmachine.qhp new file mode 100644 index 000000000..6dd08e7ae --- /dev/null +++ b/examples/help/contextsensitivehelp/doc/wateringmachine.qhp @@ -0,0 +1,25 @@ + + + wateringmachine + wateringcompany.com.1-0-0.premium + + + + + + + + + + + + plants.html + temperature.html + rain.html + time.html + amount.html + source.html + filter.html + + + diff --git a/examples/help/contextsensitivehelp/helpbrowser.cpp b/examples/help/contextsensitivehelp/helpbrowser.cpp new file mode 100644 index 000000000..d37a72f3b --- /dev/null +++ b/examples/help/contextsensitivehelp/helpbrowser.cpp @@ -0,0 +1,80 @@ +/**************************************************************************** +** +** 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 examples 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$ +** +****************************************************************************/ + +#include +#include +#include + +#include "helpbrowser.h" + +HelpBrowser::HelpBrowser(QWidget *parent) + : QTextBrowser(parent) +{ + QString collectionFile = QLibraryInfo::location(QLibraryInfo::ExamplesPath) + + QLatin1String("/help/contextsensitivehelp/doc/wateringmachine.qhc"); + + m_helpEngine = new QHelpEngineCore(collectionFile, this); + if (!m_helpEngine->setupData()) { + delete m_helpEngine; + m_helpEngine = 0; + } +} + +void HelpBrowser::showHelpForKeyword(const QString &id) +{ + if (m_helpEngine) { + QMap links = m_helpEngine->linksForIdentifier(id); + if (links.count()) + setSource(links.constBegin().value()); + } +} + +QVariant HelpBrowser::loadResource(int type, const QUrl &name) +{ + QByteArray ba; + if (type < 4 && m_helpEngine) { + QUrl url(name); + if (name.isRelative()) + url = source().resolved(url); + ba = m_helpEngine->fileData(url); + } + return ba; +} + diff --git a/examples/help/contextsensitivehelp/helpbrowser.h b/examples/help/contextsensitivehelp/helpbrowser.h new file mode 100644 index 000000000..684ed6827 --- /dev/null +++ b/examples/help/contextsensitivehelp/helpbrowser.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** 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 examples 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$ +** +****************************************************************************/ + +#ifndef HELPBROWSER_H +#define HELPBROWSER_H + +#include + +QT_BEGIN_NAMESPACE +class QHelpEngineCore; +QT_END_NAMESPACE; + +class HelpBrowser : public QTextBrowser +{ + Q_OBJECT + +public: + HelpBrowser(QWidget *parent); + void showHelpForKeyword(const QString &id); + +private: + QVariant loadResource(int type, const QUrl &name); + + QHelpEngineCore *m_helpEngine; +}; + +#endif diff --git a/examples/help/contextsensitivehelp/main.cpp b/examples/help/contextsensitivehelp/main.cpp new file mode 100644 index 000000000..ca15d9fb6 --- /dev/null +++ b/examples/help/contextsensitivehelp/main.cpp @@ -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 examples 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$ +** +****************************************************************************/ + +#include + +#include "wateringconfigdialog.h" + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + WateringConfigDialog dia; + return dia.exec(); +} diff --git a/examples/help/contextsensitivehelp/wateringconfigdialog.cpp b/examples/help/contextsensitivehelp/wateringconfigdialog.cpp new file mode 100644 index 000000000..0529bfcfc --- /dev/null +++ b/examples/help/contextsensitivehelp/wateringconfigdialog.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** 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 examples 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$ +** +****************************************************************************/ + +#include "wateringconfigdialog.h" + +WateringConfigDialog::WateringConfigDialog() +{ + m_ui.setupUi(this); + m_widgetInfo.insert(m_ui.plantComboBox, tr("plants")); + m_widgetInfo.insert(m_ui.temperatureCheckBox, tr("temperature")); + m_widgetInfo.insert(m_ui.temperatureSpinBox, tr("temperature")); + m_widgetInfo.insert(m_ui.rainCheckBox, tr("rain")); + m_widgetInfo.insert(m_ui.rainSpinBox, tr("rain")); + m_widgetInfo.insert(m_ui.startTimeEdit, tr("starting time")); + m_widgetInfo.insert(m_ui.amountSpinBox, tr("water amount")); + m_widgetInfo.insert(m_ui.sourceComboBox, tr("water source")); + m_widgetInfo.insert(m_ui.filterCheckBox, tr("water filtering")); + + connect(qApp, SIGNAL(focusChanged(QWidget*,QWidget*)), + this, SLOT(focusChanged(QWidget*,QWidget*))); +} + +void WateringConfigDialog::focusChanged(QWidget *, QWidget *now) +{ + if (m_widgetInfo.contains(now)) { + m_ui.helpLabel->setText(tr("Information about %1:").arg(m_widgetInfo.value(now))); + QStringList lst = m_widgetInfo.value(now).split(QLatin1Char(' ')); + m_ui.helpBrowser->showHelpForKeyword(lst.last()); + } +} + diff --git a/examples/help/contextsensitivehelp/wateringconfigdialog.h b/examples/help/contextsensitivehelp/wateringconfigdialog.h new file mode 100644 index 000000000..d1fd98643 --- /dev/null +++ b/examples/help/contextsensitivehelp/wateringconfigdialog.h @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** 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 examples 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$ +** +****************************************************************************/ + +#ifndef WATERINGCONFIGDIALOG_H +#define WATERINGCONFIGDIALOG_H + +#include +#include "ui_wateringconfigdialog.h" + +class WateringConfigDialog : public QDialog +{ + Q_OBJECT +public: + WateringConfigDialog(); + +private slots: + void focusChanged(QWidget *old, QWidget *now); + +private: + Ui::WateringConfigDialog m_ui; + QMap m_widgetInfo; +}; + +#endif diff --git a/examples/help/contextsensitivehelp/wateringconfigdialog.ui b/examples/help/contextsensitivehelp/wateringconfigdialog.ui new file mode 100644 index 000000000..d7a473a3c --- /dev/null +++ b/examples/help/contextsensitivehelp/wateringconfigdialog.ui @@ -0,0 +1,446 @@ + + WateringConfigDialog + + + + 0 + 0 + 334 + 550 + + + + Watering Configuration + + + + + + + + Plant: + + + + + + + + 0 + 0 + + + + + Squash + + + + + Bean + + + + + Carrot + + + + + Strawberry + + + + + Raspberry + + + + + Blueberry + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 67 + 16 + + + + + + + + Water when: + + + + + + + Temperature is higher than: + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 16 + 20 + + + + + + + + false + + + + + + C + + + 10 + + + 60 + + + 20 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Rain less than: + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 16 + 20 + + + + + + + + false + + + + + + mm + + + 1 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 20 + + + + + + + + Starting Time: + + + + + + + + + + Amount: + + + + + + + l + + + 100 + + + 10000 + + + 100 + + + 1000 + + + + + + + Source: + + + + + + + + Fountain + + + + + River + + + + + Lake + + + + + Public Water System + + + + + + + + Filter: + + + + + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 10 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + <a href="test">Show Details</a> + + + + + + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok + + + + + + + + HelpBrowser + QTextBrowser +
helpbrowser.h
+
+
+ + + + buttonBox + accepted() + WateringConfigDialog + accept() + + + 227 + 372 + + + 157 + 274 + + + + + buttonBox + rejected() + WateringConfigDialog + reject() + + + 286 + 378 + + + 286 + 274 + + + + + temperatureCheckBox + toggled(bool) + temperatureSpinBox + setEnabled(bool) + + + 132 + 101 + + + 132 + 125 + + + + + rainCheckBox + toggled(bool) + rainSpinBox + setEnabled(bool) + + + 110 + 154 + + + 113 + 169 + + + + +
-- cgit v1.2.3