2015-12-27 12:57:37 +03:00
|
|
|
import QtQuick 2.0
|
|
|
|
import Sailfish.Silica 1.0
|
|
|
|
import harbour.sailtuner.tuner 1.0
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sailfish main page
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
ApplicationWindow {
|
|
|
|
id: app
|
|
|
|
allowedOrientations: Orientation.All
|
|
|
|
|
|
|
|
property bool userRunning: true
|
|
|
|
property int dbFontSize: 100
|
|
|
|
property QtObject tuner
|
|
|
|
|
|
|
|
initialPage: Component {
|
2015-12-27 17:59:32 +03:00
|
|
|
Page {
|
|
|
|
id: page
|
|
|
|
allowedOrientations: Orientation.All
|
|
|
|
|
|
|
|
SilicaFlickable {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
SimpleDisplay {
|
|
|
|
theme: Theme
|
|
|
|
tuner: app.tuner
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-12-27 12:57:37 +03:00
|
|
|
Tuner {
|
|
|
|
id: tunerObject
|
|
|
|
running: Qt.application.active && app.userRunning
|
|
|
|
}
|
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
app.tuner = tunerObject
|
|
|
|
//togglePause.connect(app.togglePause)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cover: Component {
|
|
|
|
CoverBackground {
|
2015-12-27 17:59:32 +03:00
|
|
|
SimpleDisplay {
|
|
|
|
theme: Theme
|
|
|
|
tuner: app.tuner
|
2015-12-27 12:57:37 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function togglePause() {
|
|
|
|
app.userRunning = app.userRunning ? false : true
|
|
|
|
}
|
|
|
|
}
|