added EnergySaver intended to handle shutdown.
Moved timer from MouseEventSpy to EnergySaver. Connected MouseEventSpy and MusicController to EnergySaver.
This commit is contained in:
parent
ce8ea8f582
commit
8a8abd6c76
7 changed files with 132 additions and 53 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#include <QQmlApplicationEngine>
|
||||
#include "controllers/NavigationController.h"
|
||||
#include "MouseEventSpy.h"
|
||||
#include "EnergySaver.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
@ -29,8 +30,11 @@ int main(int argc, char *argv[])
|
|||
navController.setContext(engine.rootContext());
|
||||
navController.init("/home/ar/source/lenaMusic/");
|
||||
|
||||
// install MouseEventSpy used for auto shut down of RaspberryPi if not used for a predefined time.
|
||||
MouseEventSpy::instance();
|
||||
// install MouseEventSpy and energy saver used for auto
|
||||
// shut down of RaspberryPi if not used for a predefined time.
|
||||
MouseEventSpy::init();
|
||||
EnergySaver::init(10000);
|
||||
QObject::connect(MouseEventSpy::instance(), &MouseEventSpy::mouseEventDetected, EnergySaver::instance(), &EnergySaver::restartTimer);
|
||||
engine.load(QUrl("qrc:/main.qml"));
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue