diff options
Diffstat (limited to 'examples/widgets/symbianvibration/mainwindow.cpp')
-rw-r--r-- | examples/widgets/symbianvibration/mainwindow.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/widgets/symbianvibration/mainwindow.cpp b/examples/widgets/symbianvibration/mainwindow.cpp new file mode 100644 index 0000000..67cf220 --- /dev/null +++ b/examples/widgets/symbianvibration/mainwindow.cpp @@ -0,0 +1,23 @@ +#include <QtGui/QMenuBar> +#include "mainwindow.h" +#include "vibrationsurface.h" +#include "XQVibra.h" + +//! [0] +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) +{ + vibra = new XQVibra(this); + setCentralWidget(new VibrationSurface(vibra, this)); + menuBar()->addAction(tr("Vibrate"), this, SLOT(vibrate())); +} +//! [0] + +//! [1] +void MainWindow::vibrate() +{ + vibra->setIntensity(75); + vibra->start(2500); +} +//! [1] + |