Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings Pierogi
Summary Forums Tracker Lists Tasks Docs News SCM Files
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.
9 #include "mainwindow.h"
10 #include "pirapplication.h"
11 #include <QtGui/QApplication>
13 int main(int argc, char *argv[])
14 {
15 //  QApplication app(argc, argv);
16   PIRApplication app(argc, argv);
18   MainWindow mainWindow;
19   mainWindow.setOrientation(MainWindow::ScreenOrientationLockLandscape);
20 //  mainWindow.setOrientation(MainWindow::ScreenOrientationAuto);
22   // Take control over the volume rocker switch:
23   app.setupRockerSwitch(&mainWindow);
25   mainWindow.showExpanded();
27   app.connect(
28     &app,
29     SIGNAL(decreaseRockerPressed()),
30     &mainWindow,
31     SLOT(selectPrevFavKeyset()));
33   app.connect(
34     &app,
35     SIGNAL(increaseRockerPressed()),
36     &mainWindow,
37     SLOT(selectNextFavKeyset()));
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);
47   return app.exec();
48 }

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment