blob: 67cf2204b2717371ae04b269ae1ec468bdbfa01a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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]
|