diff options
author | Venugopal Shivashankar <venugopal.shivashankar@digia.com> | 2012-12-17 16:36:06 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-12-17 17:39:00 +0100 |
commit | 3e5b10ab5a4b6be7e71dd03c601067908048eedd (patch) | |
tree | 662b76c5ac907bf258efa9198fecdc21e83b7a35 /examples/webkitwidgets/previewer | |
parent | 544fa3c1c405b951dff132ed0f4bd168d3c8b67f (diff) | |
download | qtwebkit-examples-3e5b10ab5a4b6be7e71dd03c601067908048eedd.tar.gz |
Doc: Fixed the \snippet paths in the example documentationv5.0.0
The \snippet paths in the WebKit widget example documents
now reflect the new directory structure of the examples.
Task-number: QTBUG-27515
Change-Id: I6153f7728cc6217a38a62bb04a7bfe3794823e2a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'examples/webkitwidgets/previewer')
-rw-r--r-- | examples/webkitwidgets/previewer/doc/src/previewer.qdoc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/examples/webkitwidgets/previewer/doc/src/previewer.qdoc b/examples/webkitwidgets/previewer/doc/src/previewer.qdoc index 3dcd75a..2d57e43 100644 --- a/examples/webkitwidgets/previewer/doc/src/previewer.qdoc +++ b/examples/webkitwidgets/previewer/doc/src/previewer.qdoc @@ -56,14 +56,14 @@ In our \c previewer.h file, we have a constructor and a slot, \c on_previewButton_clicked(). - \snippet previewer/previewer.h 0 + \snippet webkitwidgets/previewer/previewer.h 0 \section1 Previewer Class Implementation The \c{Previewer}'s constructor is only responsible for setting up the user interface. - \snippet previewer/previewer.cpp 0 + \snippet webkitwidgets/previewer/previewer.cpp 0 The \c on_previewButton_clicked() is a slot corresponding to the \c{previewButton}'s \l{QPushButton::}{clicked()} signal. When the @@ -71,7 +71,7 @@ and then invoke the \l{QWebView::}{setHtml()} function to display our contents as HTML. - \snippet previewer/previewer.cpp 1 + \snippet webkitwidgets/previewer/previewer.cpp 1 \section1 MainWindow Class Definition @@ -79,14 +79,14 @@ QMainWindow with a constructor and five private slots: \c open(), \c openUrl(), \c save(), \c about() and \c updateTextEdit(). - \snippet previewer/mainwindow.h 0 + \snippet webkitwidgets/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 previewer/mainwindow.h 1 + \snippet webkitwidgets/previewer/mainwindow.h 1 There are three private functions: \c createActions(), \c createMenus() and \c setStartupText(). The \c createActions() and \c createMenus() @@ -105,25 +105,25 @@ Finally, we call the \c setStartupText() function to display the description of the example. - \snippet previewer/mainwindow.cpp 0 + \snippet webkitwidgets/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 previewer/mainwindow.cpp 1 + \snippet webkitwidgets/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 previewer/mainwindow.cpp 2 + \snippet webkitwidgets/previewer/mainwindow.cpp 2 The example also provides an \c about() slot to describe its purpose. - \snippet previewer/mainwindow.cpp 3 + \snippet webkitwidgets/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 @@ -131,19 +131,19 @@ displays the output on \c plainTextEdit. The file's name is obtained using QFileDialog's \l{QFileDialog::}{getOpenFileName()} function. - \snippet previewer/mainwindow.cpp 4 + \snippet webkitwidgets/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 previewer/mainwindow.cpp 5 + \snippet webkitwidgets/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 previewer/mainwindow.cpp 6 + \snippet webkitwidgets/previewer/mainwindow.cpp 6 Earlier, in \c{MainWindow}'s constructor, we connected \c{webView}'s \l{QWebView::}{loadFinished()} signal to our private \c updateTextEdit() @@ -151,12 +151,12 @@ source of the web page's main frame, obtained using \l{QWebFrame}'s \l{QWebFrame::}{toHtml()} function. - \snippet previewer/mainwindow.cpp 7 + \snippet webkitwidgets/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 previewer/mainwindow.cpp 8 + \snippet webkitwidgets/previewer/mainwindow.cpp 8 \section1 The \c{main()} Function @@ -164,6 +164,6 @@ The \c main() function instantiates a \c MainWindow object, \c mainWindow, and displays it with the \l{QWidget::}{show()} function. - \snippet previewer/main.cpp 0 + \snippet webkitwidgets/previewer/main.cpp 0 */ |