forked from Sepanta/console-emulator
17 changed files with 258 additions and 239 deletions
@ -1,211 +0,0 @@ |
|||||
import QtQuick 2.0 |
|
||||
import de.skycoder42.QtMvvm.Core 1.0 |
|
||||
import de.skycoder42.QtMvvm.Quick 1.0 |
|
||||
import com.example.console 1.0 |
|
||||
import "qrc:/ui" |
|
||||
|
|
||||
Item { |
|
||||
width: 384 * UI.ratio |
|
||||
height: 384 * UI.ratio |
|
||||
x: 1036 * UI.ratio |
|
||||
y: 656 * UI.ratio |
|
||||
property bool tt: false |
|
||||
property bool tb: false |
|
||||
property bool tr: false |
|
||||
property bool tl: false |
|
||||
property bool ttr: false |
|
||||
property bool tbr: false |
|
||||
property bool ttl: false |
|
||||
property bool tbl: false |
|
||||
|
|
||||
|
|
||||
onTtChanged: { |
|
||||
if(tt) { |
|
||||
mainView.textLog = mainView.textLog + "Top trackball key pressed.\n" |
|
||||
} |
|
||||
|
|
||||
else { |
|
||||
mainView.textLog = mainView.textLog + "Top trackball key released.\n" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onTbChanged: { |
|
||||
if(tb) { |
|
||||
mainView.textLog = mainView.textLog + "Bottom trackball key pressed.\n" |
|
||||
} |
|
||||
|
|
||||
else { |
|
||||
mainView.textLog = mainView.textLog + "Bottom trackball key released.\n" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onTrChanged: { |
|
||||
if(tr) { |
|
||||
mainView.textLog = mainView.textLog + "Right trackball key pressed.\n" |
|
||||
} |
|
||||
|
|
||||
else { |
|
||||
mainView.textLog = mainView.textLog + "Right trackball key released.\n" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onTlChanged: { |
|
||||
if(tl) { |
|
||||
mainView.textLog = mainView.textLog + "Left trackball key pressed.\n" |
|
||||
} |
|
||||
|
|
||||
else { |
|
||||
mainView.textLog = mainView.textLog + "Left trackball key released.\n" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onTtrChanged: { |
|
||||
if(ttr) { |
|
||||
mainView.textLog = mainView.textLog + "Top Right trackball key pressed.\n" |
|
||||
} |
|
||||
|
|
||||
else { |
|
||||
mainView.textLog = mainView.textLog + "Top Right trackball key released.\n" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onTbrChanged: { |
|
||||
if(tbr) { |
|
||||
mainView.textLog = mainView.textLog + "Bottom Right trackball key pressed.\n" |
|
||||
} |
|
||||
|
|
||||
else { |
|
||||
mainView.textLog = mainView.textLog + "Bottom Right trackball key released.\n" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onTtlChanged: { |
|
||||
if(ttl) { |
|
||||
mainView.textLog = mainView.textLog + "Top Left trackball key pressed.\n" |
|
||||
} |
|
||||
|
|
||||
else { |
|
||||
mainView.textLog = mainView.textLog + "Top Left trackball key released.\n" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
onTblChanged: { |
|
||||
if(tbl) { |
|
||||
mainView.textLog = mainView.textLog + "Bottom Left trackball key pressed.\n" |
|
||||
} |
|
||||
|
|
||||
else { |
|
||||
mainView.textLog = mainView.textLog + "Bottom Left trackball key released.\n" |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
MvvmBinding { |
|
||||
viewModel: mainView.viewModel |
|
||||
viewModelProperty: "trackballTT" |
|
||||
viewProperty: "tt" |
|
||||
} |
|
||||
|
|
||||
MvvmBinding { |
|
||||
viewModel: mainView.viewModel |
|
||||
viewModelProperty: "trackballTB" |
|
||||
viewProperty: "tb" |
|
||||
} |
|
||||
|
|
||||
MvvmBinding { |
|
||||
viewModel: mainView.viewModel |
|
||||
viewModelProperty: "trackballTR" |
|
||||
viewProperty: "tr" |
|
||||
} |
|
||||
|
|
||||
MvvmBinding { |
|
||||
viewModel: mainView.viewModel |
|
||||
viewModelProperty: "trackballTL" |
|
||||
viewProperty: "tl" |
|
||||
} |
|
||||
|
|
||||
MvvmBinding { |
|
||||
viewModel: mainView.viewModel |
|
||||
viewModelProperty: "trackballTTR" |
|
||||
viewProperty: "ttr" |
|
||||
} |
|
||||
|
|
||||
MvvmBinding { |
|
||||
viewModel: mainView.viewModel |
|
||||
viewModelProperty: "trackballTBR" |
|
||||
viewProperty: "tbr" |
|
||||
} |
|
||||
|
|
||||
MvvmBinding { |
|
||||
viewModel: mainView.viewModel |
|
||||
viewModelProperty: "trackballTTL" |
|
||||
viewProperty: "ttl" |
|
||||
} |
|
||||
|
|
||||
MvvmBinding { |
|
||||
viewModel: mainView.viewModel |
|
||||
viewModelProperty: "trackballTBL" |
|
||||
viewProperty: "tbl" |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
visible: tt |
|
||||
source: "qrc:/ui/icons/trackball/TT.svg" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
visible: tb |
|
||||
source: "qrc:/ui/icons/trackball/TB.svg" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
visible: tr |
|
||||
source: "qrc:/ui/icons/trackball/TR.svg" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
visible: tl |
|
||||
source: "qrc:/ui/icons/trackball/TL.svg" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
visible: ttr |
|
||||
source: "qrc:/ui/icons/trackball/TTR.svg" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
visible: tbr |
|
||||
source: "qrc:/ui/icons/trackball/TBR.svg" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
visible: ttl |
|
||||
source: "qrc:/ui/icons/trackball/TTL.svg" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
visible: tbl |
|
||||
source: "qrc:/ui/icons/trackball/TBL.svg" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
|
|
||||
Image { |
|
||||
source: "qrc:/ui/icons/trackball/Trackball.png" |
|
||||
anchors.fill: parent |
|
||||
fillMode: Image.PreserveAspectFit |
|
||||
} |
|
||||
} |
|
Loading…
Reference in new issue