diff options
Diffstat (limited to 'doc/src/examples/maemovibration.qdoc')
-rw-r--r-- | doc/src/examples/maemovibration.qdoc | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/doc/src/examples/maemovibration.qdoc b/doc/src/examples/maemovibration.qdoc index ace84e0..280dc30 100644 --- a/doc/src/examples/maemovibration.qdoc +++ b/doc/src/examples/maemovibration.qdoc @@ -58,7 +58,7 @@ \section1 MceVibrator Class Definition - \snippet examples/widgets/maemovibration/src/mcevibrator.h 0 + \snippet examples/widgets/maemovibration/mcevibrator.h 0 The \c MceVibrator class inherits from QObject and provides a specialized and Qt friendly interface to the MCE vibration facilty. The slot \c vibrate() @@ -88,18 +88,18 @@ The MCE expects us to first enable the vibrator before we can use it. This is done with the call to the \c MCE_ENABLE_VIBRATOR D-Bus method. - \snippet examples/widgets/maemovibration/src/mcevibrator.cpp 0 + \snippet examples/widgets/maemovibration/mcevibrator.cpp 0 From now on we can activate vibration patterns. Each time a vibration pattern is activated, the last pattern has to be deactivated first. In the vibrate slot we use the MCE interface to call the activation method. - \snippet examples/widgets/maemovibration/src/mcevibrator.cpp 1 + \snippet examples/widgets/maemovibration/mcevibrator.cpp 1 The calls to the private method deactivate simply makes sure to deactivate the last pattern used, if there was one. - \snippet examples/widgets/maemovibration/src/mcevibrator.cpp 2 + \snippet examples/widgets/maemovibration/mcevibrator.cpp 2 Calling either the activate or deactivate MCE D-Bus method with invalid pattern names are ignored. @@ -107,7 +107,7 @@ Finally, the destructor disables the vibrator. When the destructor of the MCE interface handle is called, the connection is also closed. - \snippet examples/widgets/maemovibration/src/mcevibrator.cpp 3 + \snippet examples/widgets/maemovibration/mcevibrator.cpp 3 The MCE configuration file contains options for many different things. We are only interested in one line that contains the vibration patterns. It @@ -121,18 +121,18 @@ The static method \c ParsePatternNames looks for this line and returns a QStringList containing the values, which are the pattern names we can use. - \snippet examples/widgets/maemovibration/src/mcevibrator.cpp 4 + \snippet examples/widgets/maemovibration/mcevibrator.cpp 4 The helper function \c checkError() saves us some code duplication. None of the called methods return anything of use to us, so we're only interested in getting error messages for debugging. - \snippet examples/widgets/maemovibration/src/mcevibrator.cpp 5 + \snippet examples/widgets/maemovibration/mcevibrator.cpp 5 \section1 ButtonWidget Class Definition - \snippet examples/widgets/maemovibration/src/buttonwidget.h 0 + \snippet examples/widgets/maemovibration/buttonwidget.h 0 The \c ButtonWidget class inherits from QWidget and provides the main user interface for the application. It creates a grid of buttons, one for each @@ -147,18 +147,18 @@ \section1 ButtonWidget Class Implementation - \snippet examples/widgets/maemovibration/src/buttonwidget.cpp 0 + \snippet examples/widgets/maemovibration/buttonwidget.cpp 0 \section1 \c main() Function The main function begins with looking up the patterns available to us. - \snippet examples/widgets/maemovibration/src/main.cpp 0 + \snippet examples/widgets/maemovibration/main.cpp 0 Then we create one instance of both classes, and connects the \c ButtonWidget's clicked signal to the \c MceVibrator's \c vibrate() slot. This works, since the button texts are the same as the pattern names. - \snippet examples/widgets/maemovibration/src/main.cpp 1 + \snippet examples/widgets/maemovibration/main.cpp 1 */ |