2016-01-03 19:32:36 +03:00
|
|
|
/* Copyright 2016 (C) Louis-Joseph Fournier
|
|
|
|
* louisjoseph.fournier@gmail.com
|
|
|
|
*
|
|
|
|
* This file is part of SailTuner.
|
|
|
|
*
|
|
|
|
* SailTuner is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* SailTuner is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-12-26 22:46:02 +03:00
|
|
|
import QtQuick 2.0
|
2016-01-13 13:08:01 +03:00
|
|
|
import QtQuick.Controls 1.0
|
|
|
|
import QtQuick.Layouts 1.0
|
2015-12-27 11:51:42 +03:00
|
|
|
import LJTuner 1.0
|
2016-01-08 00:29:27 +03:00
|
|
|
import LJUtils 1.0
|
|
|
|
|
|
|
|
import "."
|
2015-12-26 22:46:02 +03:00
|
|
|
|
|
|
|
Item {
|
2016-01-13 13:08:01 +03:00
|
|
|
id: root
|
2016-01-01 21:20:29 +03:00
|
|
|
width: 600
|
|
|
|
height: 500
|
2015-12-27 17:59:32 +03:00
|
|
|
|
2015-12-27 11:51:42 +03:00
|
|
|
Tuner {
|
|
|
|
id: tuner
|
2016-01-05 12:53:36 +03:00
|
|
|
running: false
|
2016-01-08 00:29:27 +03:00
|
|
|
temperament_idx: Config.temperament_idx
|
|
|
|
la: Config.la
|
|
|
|
}
|
|
|
|
|
|
|
|
ObjectSaver {
|
2016-01-10 14:06:03 +03:00
|
|
|
id: saver
|
2016-01-08 00:29:27 +03:00
|
|
|
filename: "config.dat"
|
|
|
|
object: Config
|
2015-12-27 11:51:42 +03:00
|
|
|
}
|
2015-12-27 17:59:32 +03:00
|
|
|
|
|
|
|
DesktopTheme {
|
|
|
|
id: theme
|
|
|
|
}
|
|
|
|
|
2016-01-09 12:12:16 +03:00
|
|
|
Image {
|
2016-01-01 21:20:29 +03:00
|
|
|
anchors.fill: parent
|
2016-01-09 12:12:16 +03:00
|
|
|
source: "../images/bg_portrait.png"
|
|
|
|
|
|
|
|
TunerScreen {
|
|
|
|
anchors.fill: parent
|
|
|
|
theme: theme
|
|
|
|
tuner: tuner
|
2016-01-13 13:08:01 +03:00
|
|
|
onToggleRun: tuner.running ^= true
|
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
height: parent.height / 8
|
|
|
|
|
|
|
|
onDoubleClicked: {
|
|
|
|
var win = player.createObject(player, {theme: theme, tuner: tuner})
|
|
|
|
win.show()
|
|
|
|
}
|
2016-01-09 12:12:16 +03:00
|
|
|
}
|
2015-12-27 11:51:42 +03:00
|
|
|
}
|
2016-01-05 18:02:03 +03:00
|
|
|
|
2016-01-13 13:08:01 +03:00
|
|
|
// player
|
|
|
|
Component {
|
|
|
|
id: player
|
|
|
|
|
|
|
|
ApplicationWindow {
|
|
|
|
id: player_app
|
|
|
|
|
|
|
|
width: 600
|
|
|
|
height: 500
|
|
|
|
property QtObject tuner
|
|
|
|
property QtObject theme
|
|
|
|
|
|
|
|
Image {
|
|
|
|
source: "../images/bg_portrait.png"
|
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
PlayerScreen {
|
|
|
|
tuner: player_app.tuner
|
|
|
|
theme: player_app.theme
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
onTogglePlay: tuner.playing ^= true
|
|
|
|
}
|
|
|
|
}
|
2016-01-05 18:02:03 +03:00
|
|
|
}
|
2015-12-26 22:46:02 +03:00
|
|
|
}
|