summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael BrĂ¼ning <michael.bruning@digia.com>2012-12-09 23:41:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-10 08:01:31 +0100
commit539c47c9c93335196dbde56f7ba98de0e6600a38 (patch)
treeb3fbead250a2a89c82e587ea3c62ba88385d0270
parent9f1fea542e53ee8f5855f0e35f9755fd822e744f (diff)
downloadqtwebkit-examples-539c47c9c93335196dbde56f7ba98de0e6600a38.tar.gz
Correct paths for QtWebKit examples.
Some of the examples do not show any source code in the documentation anymore. This is corrected by dropping the "webkit/" prefix in the paths used in the qdoc files of the examples: - Dom Traversal - Fancy Browser - Form Extractor - Previewer Task-number: QTBUG-28494 Change-Id: Ieedd4dcf210ec3f5551f918c1b1f5ad0b20fe704 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
-rw-r--r--examples/webkit/domtraversal/doc/src/domtraversal.qdoc14
-rw-r--r--examples/webkit/fancybrowser/doc/src/fancybrowser.qdoc22
-rw-r--r--examples/webkit/formextractor/doc/src/formextractor.qdoc2
-rw-r--r--examples/webkit/previewer/doc/src/previewer.qdoc32
4 files changed, 35 insertions, 35 deletions
diff --git a/examples/webkit/domtraversal/doc/src/domtraversal.qdoc b/examples/webkit/domtraversal/doc/src/domtraversal.qdoc
index bd7a6f3..52764f3 100644
--- a/examples/webkit/domtraversal/doc/src/domtraversal.qdoc
+++ b/examples/webkit/domtraversal/doc/src/domtraversal.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example webkit/domtraversal
+ \example domtraversal
\title DOM Traversal Example
\brief The DOM Traversal example shows how to use the QWebElement class to access
@@ -49,7 +49,7 @@
using \l{Qt Designer}. As a result, the class is also derived from the user
interface class created by \l uic:
- \snippet webkit/domtraversal/window.h Window class definition
+ \snippet domtraversal/window.h Window class definition
Two important functions to note are the \c on_webView_loadFinished() slot and
the \c examineChildElements() function. The former is automatically called
@@ -65,13 +65,13 @@
In the \c Window class constructor, we call the \l{QWidget::}{setupUi()} function
to set up the user interface described in the \c{window.ui} file:
- \snippet webkit/domtraversal/window.cpp Window constructor
+ \snippet domtraversal/window.cpp Window constructor
When the Web page is loaded, the \c on_webView_loadFinished() slot is called. Here,
we clear the tree widget and begin inspection of the document by obtaining the
document element from the page's main frame:
- \snippet webkit/domtraversal/window.cpp begin document inspection
+ \snippet domtraversal/window.cpp begin document inspection
At this point, we call the \c examineChildElements() function to traverse the
document, starting with the child elements of the document element for which we
@@ -84,7 +84,7 @@
\l{QWebElement::}{isNull()} function, we create a new QTreeWidgetItem instance with
the element name and add it to the parent item.
- \snippet webkit/domtraversal/window.cpp traverse document
+ \snippet domtraversal/window.cpp traverse document
We recursively examine the child elements for each element by calling
\c examineChildElements() with the current child element and the newly-created item.
@@ -97,14 +97,14 @@
For completeness, we show the \c setUrl() function, which is provided to allow the
document URL to be set from the example's \c main() function.
- \snippet webkit/domtraversal/window.cpp set URL
+ \snippet domtraversal/window.cpp set URL
\section1 Starting the Example
We set up the application, create
a \c Window instance, set its URL, and show it:
- \snippet webkit/domtraversal/main.cpp main program
+ \snippet domtraversal/main.cpp main program
When the application's event loop is run, the Qt home page will load, and the
tree widget will be updated to show the document structure. Navigating to another
diff --git a/examples/webkit/fancybrowser/doc/src/fancybrowser.qdoc b/examples/webkit/fancybrowser/doc/src/fancybrowser.qdoc
index 5ed0658..7734478 100644
--- a/examples/webkit/fancybrowser/doc/src/fancybrowser.qdoc
+++ b/examples/webkit/fancybrowser/doc/src/fancybrowser.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example webkit/fancybrowser
+ \example fancybrowser
\title Fancy Browser Example
\brief The Fancy Browser example shows how to use JQuery with QtWebKit to
@@ -44,7 +44,7 @@
The \c MainWindow class inherits QMainWindow. It implements a number of
slots to perform actions on both the application and on the web content.
- \snippet webkit/fancybrowser/mainwindow.h 1
+ \snippet fancybrowser/mainwindow.h 1
We also declare a QString that contains the jQuery, a QWebView
that displays the web content, and a QLineEdit that acts as the
@@ -54,7 +54,7 @@
We start by implementing the constructor.
- \snippet webkit/fancybrowser/mainwindow.cpp 1
+ \snippet fancybrowser/mainwindow.cpp 1
The first part of the constructor sets the value of \c progress to
0. This value will be used later in the code to visualize the
@@ -64,7 +64,7 @@
content. The jQuery library is a JavaScript library that provides different
functions for manipulating HTML.
- \snippet webkit/fancybrowser/mainwindow.cpp 2
+ \snippet fancybrowser/mainwindow.cpp 2
The second part of the constructor creates a QWebView and connects
slots to the views signals. Furthermore, we create a QLineEdit as
@@ -73,13 +73,13 @@
QLineEdit to a QToolbar together with a set of navigation actions
from QWebView::pageAction.
- \snippet webkit/fancybrowser/mainwindow.cpp 3
+ \snippet fancybrowser/mainwindow.cpp 3
The third and last part of the constructor implements two QMenus and assigns
a set of actions to them. The last line sets the QWebView as the central
widget in the QMainWindow.
- \snippet webkit/fancybrowser/mainwindow.cpp 4
+ \snippet fancybrowser/mainwindow.cpp 4
When the page is loaded, \c adjustLocation() updates the address
bar; \c adjustLocation() is triggered by the \c loadFinished()
@@ -88,13 +88,13 @@
the new web page has finished loading, \c adjustLocation() will be
run once more to update the address bar.
- \snippet webkit/fancybrowser/mainwindow.cpp 5
+ \snippet fancybrowser/mainwindow.cpp 5
\c adjustTitle() sets the window title and displays the loading
progress. This slot is triggered by the \c titleChanged() signal
in QWebView.
- \snippet webkit/fancybrowser/mainwindow.cpp 6
+ \snippet fancybrowser/mainwindow.cpp 6
When a web page has loaded, \c finishLoading() is triggered by the
\c loadFinished() signal in QWebView. \c finishLoading() then updates the
@@ -109,7 +109,7 @@
that the images of the newly loaded page respect the state of the toggle
action.
- \snippet webkit/fancybrowser/mainwindow.cpp 7
+ \snippet fancybrowser/mainwindow.cpp 7
The first jQuery-based function, \c highlightAllLinks(), is designed to
highlight all links in the current webpage. The JavaScript code looks
@@ -117,14 +117,14 @@
For each such element, the background color is set to be yellow by
using CSS.
- \snippet webkit/fancybrowser/mainwindow.cpp 8
+ \snippet fancybrowser/mainwindow.cpp 8
The \c rotateImages() function rotates the images on the current
web page. Webkit supports CSS transforms and this JavaScript code
looks up all \e {img} elements and rotates the images 180 degrees
and then back again.
- \snippet webkit/fancybrowser/mainwindow.cpp 9
+ \snippet fancybrowser/mainwindow.cpp 9
The remaining four methods remove different elements from the current web
page. \c removeGifImages() removes all GIF images on the page by looking up
diff --git a/examples/webkit/formextractor/doc/src/formextractor.qdoc b/examples/webkit/formextractor/doc/src/formextractor.qdoc
index b7121f3..5b27054 100644
--- a/examples/webkit/formextractor/doc/src/formextractor.qdoc
+++ b/examples/webkit/formextractor/doc/src/formextractor.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example webkit/formextractor
+ \example formextractor
\title Form Extractor Example
\brief The Form Extractor example shows how to use QWebFrame with JavaScript to
diff --git a/examples/webkit/previewer/doc/src/previewer.qdoc b/examples/webkit/previewer/doc/src/previewer.qdoc
index fda62fd..5a3bdc3 100644
--- a/examples/webkit/previewer/doc/src/previewer.qdoc
+++ b/examples/webkit/previewer/doc/src/previewer.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \example webkit/previewer
+ \example previewer
\title Previewer Example
\brief The Previewer example shows how to use QtWebKit's QWebView to preview
@@ -54,14 +54,14 @@
In our \c previewer.h file, we have a constructor and a slot,
\c on_previewButton_clicked().
- \snippet webkit/previewer/previewer.h 0
+ \snippet previewer/previewer.h 0
\section1 Previewer Class Implementation
The \c{Previewer}'s constructor is only responsible for setting up the
user interface.
- \snippet webkit/previewer/previewer.cpp 0
+ \snippet previewer/previewer.cpp 0
The \c on_previewButton_clicked() is a slot corresponding to the
\c{previewButton}'s \l{QPushButton::}{clicked()} signal. When the
@@ -69,7 +69,7 @@
and then invoke the \l{QWebView::}{setHtml()} function to display our
contents as HTML.
- \snippet webkit/previewer/previewer.cpp 1
+ \snippet previewer/previewer.cpp 1
\section1 MainWindow Class Definition
@@ -77,14 +77,14 @@
QMainWindow with a constructor and five private slots: \c open(),
\c openUrl(), \c save(), \c about() and \c updateTextEdit().
- \snippet webkit/previewer/mainwindow.h 0
+ \snippet previewer/mainwindow.h 0
The private objects in \c MainWindow are \c centralWidget, which is
a \c Previewer object, \c fileMenu, \c helpMenu and the QAction objects
\c openAct, \c openUrlAct, \c saveAct, \c exitAct, \c aboutAct and
\c aboutQtAct.
- \snippet webkit/previewer/mainwindow.h 1
+ \snippet previewer/mainwindow.h 1
There are three private functions: \c createActions(), \c createMenus()
and \c setStartupText(). The \c createActions() and \c createMenus()
@@ -103,25 +103,25 @@
Finally, we call the \c setStartupText() function to display the
description of the example.
- \snippet webkit/previewer/mainwindow.cpp 0
+ \snippet previewer/mainwindow.cpp 0
Within the \c createActions() function, we instantiate all our private
QAction objects which we declared in \c{mainwindow.h}. We set the
short cut and status tip for these actions and connect their
\l{QAction::}{triggered()} signal to appropriate slots.
- \snippet webkit/previewer/mainwindow.cpp 1
+ \snippet previewer/mainwindow.cpp 1
\dots
The \c createMenus() function instantiates the QMenu items, \c fileMenu
and \c helpMenu and adds them to the main window's
\l{QMainWindow::menuBar()}{menu bar}.
- \snippet webkit/previewer/mainwindow.cpp 2
+ \snippet previewer/mainwindow.cpp 2
The example also provides an \c about() slot to describe its purpose.
- \snippet webkit/previewer/mainwindow.cpp 3
+ \snippet previewer/mainwindow.cpp 3
The \c MainWindow class provides two types of \gui Open functions:
\c open() and \c openUrl(). The \c open() function opens an HTML file
@@ -129,19 +129,19 @@
displays the output on \c plainTextEdit. The file's name is obtained
using QFileDialog's \l{QFileDialog::}{getOpenFileName()} function.
- \snippet webkit/previewer/mainwindow.cpp 4
+ \snippet previewer/mainwindow.cpp 4
The \c openUrl() function, on the other hand, displays a QInputDialog
to obtain a URL, and displays it on \c webView.
- \snippet webkit/previewer/mainwindow.cpp 5
+ \snippet previewer/mainwindow.cpp 5
In order to save a HTML file, the \c save() function first extracts the
contents of \c plainTextEdit and displays a QFileDialog to obtain
\c fileName. Then, we use a QTextStream object, \c in, to write to
\c file.
- \snippet webkit/previewer/mainwindow.cpp 6
+ \snippet previewer/mainwindow.cpp 6
Earlier, in \c{MainWindow}'s constructor, we connected \c{webView}'s
\l{QWebView::}{loadFinished()} signal to our private \c updateTextEdit()
@@ -149,12 +149,12 @@
source of the web page's main frame, obtained using \l{QWebFrame}'s
\l{QWebFrame::}{toHtml()} function.
- \snippet webkit/previewer/mainwindow.cpp 7
+ \snippet previewer/mainwindow.cpp 7
To provide a description about the Previewer example, when it starts up,
we use the \c setStartupText() function, as shown below:
- \snippet webkit/previewer/mainwindow.cpp 8
+ \snippet previewer/mainwindow.cpp 8
\section1 The \c{main()} Function
@@ -162,6 +162,6 @@
The \c main() function instantiates a \c MainWindow object, \c mainWindow,
and displays it with the \l{QWidget::}{show()} function.
- \snippet webkit/previewer/main.cpp 0
+ \snippet previewer/main.cpp 0
*/