summaryrefslogtreecommitdiff
path: root/src/scripttools/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripttools/doc')
-rw-r--r--src/scripttools/doc/qtscripttools.qdocconf47
-rw-r--r--src/scripttools/doc/snippets/doc_src_qtscripttools.cpp43
-rw-r--r--src/scripttools/doc/snippets/doc_src_qtscripttools.pro43
-rw-r--r--src/scripttools/doc/snippets/scriptdebugger.cpp103
-rw-r--r--src/scripttools/doc/snippets/src.scripttools.qscriptenginedebugger.cpp49
-rw-r--r--src/scripttools/doc/src/qtscripttools-index.qdoc60
-rw-r--r--src/scripttools/doc/src/qtscripttools-module.qdoc49
7 files changed, 394 insertions, 0 deletions
diff --git a/src/scripttools/doc/qtscripttools.qdocconf b/src/scripttools/doc/qtscripttools.qdocconf
new file mode 100644
index 0000000..362fc61
--- /dev/null
+++ b/src/scripttools/doc/qtscripttools.qdocconf
@@ -0,0 +1,47 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+
+# Name of the project which must match the outputdir. Determines the .index file
+project = qtscripttools
+
+# Directories in which to search for files to document and images.
+# By default set to the root directory of the project for sources
+# and headers and qdoc will therefore generate output for each file.
+# Images should be placed in <rootdir>/dic/images and examples in
+# <rootdir>/examples.
+# Paths are relative to the location of this file.
+exampledirs += ../../../examples \
+ snippets
+
+headerdirs += ..
+imagedirs += images
+sourcedirs += ..
+
+depends += qtcore qtlinguist qtscript
+
+# The following parameters are for creating a qhp file, the qhelpgenerator
+# program can convert the qhp file into a qch file which can be opened in
+# Qt Assistant and/or Qt Creator.
+
+# Defines the name of the project. You cannot use operators (+, =, -) in
+# the name. Properties for this project are set using a qhp.<projectname>.property
+# format.
+qhp.projects = qtscripttools
+
+# Sets the name of the output qhp file.
+qhp.qtscripttools.file = qtscripttools.qhp
+
+# Namespace for the output file. This namespace is used to distinguish between
+# different documentation files in Creator/Assistant.
+qhp.qtscripttools.namespace = org.qt-project.qtscripttools.501
+
+# Title for the package, will be the main title for the package in
+# Assistant/Creator.
+qhp.qtscripttools.indexTitle = Qt Script
+
+# Only update the name of the project for the next variables.
+qhp.qtscripttools.virtualFolder = qtscripttools
+qhp.qtscripttools.subprojects = classes
+qhp.qtscripttools.subprojects.classes.title = C++ Classes
+qhp.qtscripttools.subprojects.classes.indexTitle = Qt Script Tools C++ Classes
+qhp.qtscripttools.subprojects.classes.selectors = class fake:headerfile
+qhp.qtscripttools.subprojects.classes.sortPages = true
diff --git a/src/scripttools/doc/snippets/doc_src_qtscripttools.cpp b/src/scripttools/doc/snippets/doc_src_qtscripttools.cpp
new file mode 100644
index 0000000..d385f69
--- /dev/null
+++ b/src/scripttools/doc/snippets/doc_src_qtscripttools.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia Plc 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]
+#include <QtScriptTools>
+//! [0]
diff --git a/src/scripttools/doc/snippets/doc_src_qtscripttools.pro b/src/scripttools/doc/snippets/doc_src_qtscripttools.pro
new file mode 100644
index 0000000..6680f5f
--- /dev/null
+++ b/src/scripttools/doc/snippets/doc_src_qtscripttools.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia Plc 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/src/scripttools/doc/snippets/scriptdebugger.cpp b/src/scripttools/doc/snippets/scriptdebugger.cpp
new file mode 100644
index 0000000..12a536d
--- /dev/null
+++ b/src/scripttools/doc/snippets/scriptdebugger.cpp
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia Plc 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 <QtWidgets>
+#include <QtScript>
+#include <QtScriptTools>
+
+// Perhaps shpw entire example for getting debugger up with script
+int main(int argv, char **args)
+{
+ QApplication app(argv, args);
+
+ QString fileName("helloscript.qs");
+ QFile scriptFile(fileName);
+ scriptFile.open(QIODevice::ReadOnly);
+ QTextStream stream(&scriptFile);
+ QString contents = stream.readAll();
+ scriptFile.close();
+
+ QScriptEngine *engine = new QScriptEngine();
+
+ QScriptEngineDebugger *debugger = new QScriptEngineDebugger();
+ debugger->attachTo(engine);
+
+ // Set up configuration with only stack and code
+ QWidget *widget = new QWidget;
+//![0]
+ QWidget *codeWindow = debugger->widget(QScriptEngineDebugger::CodeWidget);
+ QWidget *stackWidget = debugger->widget(QScriptEngineDebugger::StackWidget);
+
+ QLayout *layout = new QHBoxLayout;
+ layout->addWidget(codeWindow);
+ layout->addWidget(stackWidget);
+//![0]
+
+//![1]
+ QAction *continueAction = debugger->action(QScriptEngineDebugger::ContinueAction);
+ QAction *stepOverAction = debugger->action(QScriptEngineDebugger::StepOverAction);
+ QAction *stepIntoAction = debugger->action(QScriptEngineDebugger::StepIntoAction);
+
+ QToolBar *toolBar = new QToolBar;
+ toolBar->addAction(continueAction);
+//![1]
+ toolBar->addAction(stepOverAction);
+ toolBar->addAction(stepIntoAction);
+
+ layout->addWidget(toolBar);
+ continueAction->setIcon(QIcon("copy.png"));
+
+ debugger->setAutoShowStandardWindow(false);
+
+ widget->setLayout(layout);
+ widget->show();
+
+ QPushButton button;
+ QScriptValue scriptButton = engine->newQObject(&button);
+ engine->globalObject().setProperty("button", scriptButton);
+
+//![2]
+ debugger->action(QScriptEngineDebugger::InterruptAction)->trigger();
+ engine->evaluate(contents, fileName);
+//![2]
+
+ return app.exec();
+}
+
diff --git a/src/scripttools/doc/snippets/src.scripttools.qscriptenginedebugger.cpp b/src/scripttools/doc/snippets/src.scripttools.qscriptenginedebugger.cpp
new file mode 100644
index 0000000..741f427
--- /dev/null
+++ b/src/scripttools/doc/snippets/src.scripttools.qscriptenginedebugger.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** 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 Digia Plc 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]
+ QScriptEngine engine;
+ QScriptEngineDebugger debugger;
+ debugger.attachTo(&engine);
+//! [0]
+
+//! [1]
+ engine.evaluate("debugger");
+//! [1]
diff --git a/src/scripttools/doc/src/qtscripttools-index.qdoc b/src/scripttools/doc/src/qtscripttools-index.qdoc
new file mode 100644
index 0000000..1817753
--- /dev/null
+++ b/src/scripttools/doc/src/qtscripttools-index.qdoc
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtscripttools-index.html
+ \title Qt Script Tools
+ \brief Provides a debugger for applications that use Qt Script
+
+ The Qt Script Tools module provides a debugger that can be embedded into Qt
+ applications that use \l{Qt Script}. The debugger enables the application
+ user to inspect the state of the script environment and control script
+ execution.
+
+ \section1 Configuring the Build Process
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc_src_qtscripttools.cpp 0
+
+ To link against the module, add this line to your \l qmake \c .pro file:
+
+ \snippet doc_src_qtscripttools.pro 1
+
+ \section1 Related Information
+
+ \section2 Guides
+ \list
+ \li \l {Qt Script Debugger Manual}
+ \endlist
+ \section2 Reference
+ \list
+ \li \l{Qt Script Tools C++ Classes}{C++ Classes}
+ \endlist
+
+*/
diff --git a/src/scripttools/doc/src/qtscripttools-module.qdoc b/src/scripttools/doc/src/qtscripttools-module.qdoc
new file mode 100644
index 0000000..bc89994
--- /dev/null
+++ b/src/scripttools/doc/src/qtscripttools-module.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Free Documentation License Usage
+** 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. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \module QtScriptTools
+ \title Qt Script Tools C++ Classes
+ \since 4.5
+ \ingroup modules
+
+ \brief Provides additional components for applications that use Qt Script.
+
+ The \l{Qt Script Tools} module provides a debugger for applications that
+ use Qt Script.
+
+ \section1 Configuring the Build Process
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc_src_qtscripttools.cpp 0
+
+ To link against the module, add this line to your \l qmake \c .pro file:
+
+ \snippet doc_src_qtscripttools.pro 1
+*/