Advanced Settings Panel
[pierogi] / main.cpp
1 // main.cpp
2 //
3 // For the Pierogi IR remote control app.
4 //
5 // Copyright (C) 2012 by John Pietrzak  (john@pietrzak.org)
6 //
7 // Licensed under the GNU GPL version 2.0 or later.
8
9 #include "mainwindow.h"
10 #include "pirapplication.h"
11 #include <QtGui/QApplication>
12
13 int main(int argc, char *argv[])
14 {
15 //  QApplication app(argc, argv);
16   PIRApplication app(argc, argv);
17
18   MainWindow mainWindow;
19   mainWindow.setOrientation(MainWindow::ScreenOrientationLockLandscape);
20 //  mainWindow.setOrientation(MainWindow::ScreenOrientationAuto);
21
22   // Take control over the volume rocker switch:
23   app.setupRockerSwitch(&mainWindow);
24
25   mainWindow.showExpanded();
26
27   app.connect(
28     &app,
29     SIGNAL(decreaseRockerPressed()),
30     &mainWindow,
31     SLOT(selectPrevFavKeyset()));
32
33   app.connect(
34     &app,
35     SIGNAL(increaseRockerPressed()),
36     &mainWindow,
37     SLOT(selectNextFavKeyset()));
38
39   // A connection to perform any final cleanup work:
40   app.connect(
41     &app,
42     SIGNAL(aboutToQuit()),
43     &mainWindow,
44     SLOT(finalCleanup()),
45     Qt::DirectConnection);
46
47   return app.exec();
48 }