Version 1.0 of Pierogi, "A Fistful of Pierogies"
[pierogi] / main.cpp
1 #include "mainwindow.h"
2 #include "pirapplication.h"
3 #include <QtGui/QApplication>
4
5 int main(int argc, char *argv[])
6 {
7 //  QApplication app(argc, argv);
8   PIRApplication app(argc, argv);
9
10   MainWindow mainWindow;
11   mainWindow.setOrientation(MainWindow::ScreenOrientationLockLandscape);
12 //  mainWindow.setOrientation(MainWindow::ScreenOrientationAuto);
13
14   // Take control over the volume rocker switch:
15   app.setupRockerSwitch(&mainWindow);
16
17   mainWindow.showExpanded();
18   app.setupRockerSwitch(mainWindow.getSecondaryWindow());
19
20   app.connect(
21     &app,
22     SIGNAL(decreaseRockerPressed()),
23     &mainWindow,
24     SLOT(selectPrevFavKeyset()));
25
26   app.connect(
27     &app,
28     SIGNAL(increaseRockerPressed()),
29     &mainWindow,
30     SLOT(selectNextFavKeyset()));
31
32   // A connection to perform any final cleanup work:
33   app.connect(
34     &app,
35     SIGNAL(aboutToQuit()),
36     &mainWindow,
37     SLOT(finalCleanup()),
38     Qt::DirectConnection);
39
40   return app.exec();
41 }