Moved gui example documentation to the proper location.
authorSamuel Rødal <samuel.rodal@nokia.com>
Fri, 31 Aug 2012 13:43:49 +0000 (15:43 +0200)
committerQt by Nokia <qt-info@nokia.com>
Sat, 1 Sep 2012 09:21:46 +0000 (11:21 +0200)
Gui example documentation should be in examples/gui/doc/

Change-Id: I3cd196a2bb5d76b6e275f336b29a2ad1811159dd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
examples/gui/doc/analogclockwindow.qdoc [moved from src/gui/doc/examples/analogclockwindow.qdoc with 89% similarity]
examples/gui/doc/openglwindow.qdoc [moved from doc/src/examples/openglwindow.qdoc with 93% similarity]
examples/gui/doc/rasterwindow.qdoc [moved from src/gui/doc/examples/rasterwindow.qdoc with 92% similarity]
examples/gui/gui.pro
src/gui/doc/qtgui.qdocconf

similarity index 89%
rename from src/gui/doc/examples/analogclockwindow.qdoc
rename to examples/gui/doc/analogclockwindow.qdoc
index 17db051..27c27fc 100644 (file)
     make use of the RasterWindow from the \l {Raster Window Example}
     and reimplement the \c render function to draw the clock face:
 
-    \snippet gui/analogclock/main.cpp 5
+    \snippet analogclock/main.cpp 5
 
     \section1 AnalogClock Class Implementation
 
-    \snippet gui/analogclock/main.cpp 6
+    \snippet analogclock/main.cpp 6
 
     We set a title on the window and resize to a reasonable size. Then
     we start a timer which we will use to redraw the clock every
     second.
 
-    \snippet gui/analogclock/main.cpp 7
+    \snippet analogclock/main.cpp 7
 
     The timerEvent function is called every second as a result of
     our startTimer call. Making use of the convenience in the base
     one active timer in this instance, but it is good practice to do
     so.
 
-    \snippet gui/analogclock/main.cpp 14
-    \snippet gui/analogclock/main.cpp 8
+    \snippet analogclock/main.cpp 14
+    \snippet analogclock/main.cpp 8
 
     Before we set up the painter and draw the clock, we first define
     two lists of \l {QPoint}s and two \l{QColor}s that will be used
     for the hour and minute hands. The minute hand's color has an
     alpha component of 191, meaning that it's 75% opaque.
 
-    \snippet gui/analogclock/main.cpp 9
+    \snippet analogclock/main.cpp 9
 
     We call QPainter::setRenderHint() with QPainter::Antialiasing to
     turn on antialiasing. This makes drawing of diagonal lines much
     smoother.
 
-    \snippet gui/analogclock/main.cpp 10
+    \snippet analogclock/main.cpp 10
 
     The translation moves the origin to the center of the window, and
     the scale operation ensures that the following drawing operations
     hour and minute. This means that the hand will be shown rotated clockwise
     by the required amount.
 
-    \snippet gui/analogclock/main.cpp 11
+    \snippet analogclock/main.cpp 11
 
     We set the pen to be Qt::NoPen because we don't want any outline,
     and we use a solid brush with the color appropriate for
     displaying hours. Brushes are used when filling in polygons and
     other geometric shapes.
 
-    \snippet gui/analogclock/main.cpp 2
+    \snippet analogclock/main.cpp 2
 
     We save and restore the transformation matrix before and after the
     rotation because we want to place the minute hand without having to
     take into account any previous rotations.
 
-    \snippet gui/analogclock/main.cpp 12
+    \snippet analogclock/main.cpp 12
 
     We draw markers around the edge of the clock for each hour. We
     draw each marker then rotate the coordinate system so that the
     painter is ready for the next one.
 
-    \snippet gui/analogclock/main.cpp 13
-    \snippet gui/analogclock/main.cpp 3
+    \snippet analogclock/main.cpp 13
+    \snippet analogclock/main.cpp 3
 
     The minute hand is rotated in a similar way to the hour hand.
 
-    \snippet gui/analogclock/main.cpp 4
+    \snippet analogclock/main.cpp 4
 
     Again, we draw markers around the edge of the clock, but this
     time to indicate minutes. We skip multiples of 5 to avoid drawing
similarity index 93%
rename from doc/src/examples/openglwindow.qdoc
rename to examples/gui/doc/openglwindow.qdoc
index 9d93af5..bb5a8d2 100644 (file)
     you will not have to worry about resolving those functions if you want your
     application to work with OpenGL as well as OpenGL ES 2.0.
 
-    \snippet gui/openglwindow/openglwindow.h 1
+    \snippet openglwindow/openglwindow.h 1
 
     The window's surface type must be set to QSurface::OpenGLSurface to
     indicate that the window is to be used for OpenGL rendering and not for
     rendering raster content with QPainter using a QBackingStore.
 
-    \snippet gui/openglwindow/openglwindow.cpp 1
+    \snippet openglwindow/openglwindow.cpp 1
 
     Any OpenGL initialization needed can be done by overriding the initialize()
     function, which is called once before the first call to render(), with a
@@ -68,7 +68,7 @@
     whereas the default render() implementation initializes a
     QOpenGLPaintDevice and then calls into render(QPainter *).
 
-    \snippet gui/openglwindow/openglwindow.cpp 2
+    \snippet openglwindow/openglwindow.cpp 2
 
     The renderLater() function simply puts an update request event on
     the event loop, which leads to renderNow() being called once the event
@@ -83,7 +83,7 @@
     size might be unknown, and in addition what is rendered might not even end
     up on the screen.
 
-    \snippet gui/openglwindow/openglwindow.cpp 3
+    \snippet openglwindow/openglwindow.cpp 3
 
     In renderNow() we return if we are not currently exposed, in which case
     rendering is delayed until we actually get an expose event. If we have not
     If animation has been enabled with OpenGLWindow::setAnimating(true), we
     call renderLater() to put another update request on the event loop.
 
-    \snippet gui/openglwindow/openglwindow.cpp 4
+    \snippet openglwindow/openglwindow.cpp 4
 
     Enabling animation also triggers an update request as shown in the
     following code snippet.
 
-    \snippet gui/openglwindow/openglwindow.cpp 5
+    \snippet openglwindow/openglwindow.cpp 5
 
     \section1 Example OpenGL rendering sub class
 
     rotating triangle. By indirectly sub classing QOpenGLFunctions we gain
     access to all OpenGL ES 2.0 level functionality.
 
-    \snippet gui/openglwindow/main.cpp 1
+    \snippet openglwindow/main.cpp 1
 
     In our main function we initialize QGuiApplication and instantiate our
     TriangleOpenGLWindow. We give it a QSurfaceFormat specifying that we want
     Since we want to have animation we call the above mentioned setAnimating()
     function with an argument of true.
 
-    \snippet gui/openglwindow/main.cpp 2
+    \snippet openglwindow/main.cpp 2
 
     The following code snippet shows the OpenGL shader program used in this
     example. The vertex and fragment shaders are relatively simple, doing
     vertex transformation and interpolated vertex coloring.
 
-    \snippet gui/openglwindow/main.cpp 3
+    \snippet openglwindow/main.cpp 3
 
     Here is the code that loads the shaders and initializes the shader program
     By using QOpenGLShaderProgram instead of raw OpenGL we get the convenience
     locations in member variables to avoid having to do the location lookup
     each frame.
 
-    \snippet gui/openglwindow/main.cpp 4
+    \snippet openglwindow/main.cpp 4
 
     Finally, here is our render() function, where we use OpenGL to set up the
     viewport, clear the background, and render a rotating triangle.
 
-    \snippet gui/openglwindow/main.cpp 5
+    \snippet openglwindow/main.cpp 5
 */
similarity index 92%
rename from src/gui/doc/examples/rasterwindow.qdoc
rename to examples/gui/doc/rasterwindow.qdoc
index d78f003..bb71ff4 100644 (file)
@@ -35,7 +35,7 @@
 
     \section1 Application Entry Point
 
-    \snippet gui/rasterwindow/main.cpp 1
+    \snippet rasterwindow/main.cpp 1
 
     The entry point for a QWindow based application is the \l
     QGuiApplication class. It manages the GUI application's control
@@ -52,7 +52,7 @@
 
     \section1 RasterWindow Declaration
 
-    \snippet gui/rasterwindow/rasterwindow.h 1
+    \snippet rasterwindow/rasterwindow.h 1
 
     We first start by including the the QtGui headers. This means we
     can use all classes in the Qt GUI module. Classes can also be
@@ -72,7 +72,7 @@
 
     \section1 RasterWindow Implementation
 
-    \snippet gui/rasterwindow/rasterwindow.cpp 1
+    \snippet rasterwindow/rasterwindow.cpp 1
 
     The constructor first of all calls \l QWindow::create(). This will
     create the window in the windowing system. Without calling create,
@@ -83,7 +83,7 @@
     Then we create the backingstore and pass it the window instance it
     is supposed to manage.
 
-    \snippet gui/rasterwindow/rasterwindow.cpp 2
+    \snippet rasterwindow/rasterwindow.cpp 2
 
     Shortly after calling \l QWindow::show() on a created window, the
     virtual function \l QWindow::exposeEvent() will be called to
     system with some visual content.
 
 
-    \snippet gui/rasterwindow/rasterwindow.cpp 5
+    \snippet rasterwindow/rasterwindow.cpp 5
 
     The resize event is guaranteed to be called prior to the window
     being shown on screen and will also be called whenever the window
     and call renderNow() if we are visible to immediately update the
     visual representation of the window on screen.
 
-    \snippet gui/rasterwindow/rasterwindow.cpp 3
+    \snippet rasterwindow/rasterwindow.cpp 3
 
     The renderNow function sets up what is needed for a \l QWindow to
     render its content using QPainter. As obscured windows have will
     using \l QBackingStore::flush().
 
 
-    \snippet gui/rasterwindow/rasterwindow.cpp 4
+    \snippet rasterwindow/rasterwindow.cpp 4
 
     The render function contains the drawing code for the window. In
     this minial example, we only draw the string "QWindow" in the
     \section1 Rendering Asynchronously
 
 
-    \snippet gui/rasterwindow/rasterwindow.cpp 6
+    \snippet rasterwindow/rasterwindow.cpp 6
 
     We went through a few places where the window needed to repainted
     immediately. There are some cases where this is not desierable,
     is already pending, we store this state in the \c m_update_pending
     variable.
 
-    \snippet gui/rasterwindow/rasterwindow.cpp 7
+    \snippet rasterwindow/rasterwindow.cpp 7
 
     We reimplement the virtual \l QObject::event() function to handle
     the update event we posted to ourselves. When the event comes in
index baf5d7f..1a4067e 100644 (file)
@@ -1,4 +1,5 @@
 TEMPLATE     = subdirs
+CONFIG += no_docs_target
 
 SUBDIRS += analogclock
 SUBDIRS += rasterwindow
index 5fdc9b7..85fcbab 100644 (file)
@@ -71,12 +71,16 @@ depends                 += qtcore
 
 headerdirs  += ..
 
-sourcedirs  += ..
+sourcedirs  += .. \
+               ../../../examples/gui/doc
 
-exampledirs += ../../../examples \
+exampledirs += ../../../examples/gui \
+               ../../../doc/src/snippets \
                ../ \
                snippets
 
-excludedirs += ../../../examples/widgets/doc
+excludedirs += snippets
 
-imagedirs   += images
+imagedirs   += images \
+               ../../../doc/src/images \
+               ../../../examples/gui/doc/images