Commit 45b0809a authored by Jasem Mutlaq's avatar Jasem Mutlaq

QtQuick controls 2.0+ do not exist on Ubuntu 16.04 so again failing back to...

QtQuick controls 2.0+ do not exist on Ubuntu 16.04 so again failing back to Quick 1.4 until next Ubuntu LTS release comes along
parent b1bf1b14
...@@ -227,7 +227,7 @@ void Mount::syncTelescopeInfo() ...@@ -227,7 +227,7 @@ void Mount::syncTelescopeInfo()
// QtQuick // QtQuick
m_SpeedSlider->setEnabled(true); m_SpeedSlider->setEnabled(true);
m_SpeedSlider->setProperty("to", svp->nsp-1); m_SpeedSlider->setProperty("maximumValue", svp->nsp-1);
m_SpeedSlider->setProperty("value", index); m_SpeedSlider->setProperty("value", index);
m_SpeedLabel->setProperty("text", slewSpeedCombo->currentText()); m_SpeedLabel->setProperty("text", slewSpeedCombo->currentText());
......
import QtQuick 2.5 import QtQuick 2.5
import QtQuick.Controls 2.0 import QtQuick.Controls 1.4
import QtQuick.Layouts 1.1 import QtQuick.Layouts 1.1
import QtQuick.Controls.Styles 1.4
Rectangle { Rectangle {
id: rectangle id: rectangle
...@@ -8,7 +9,7 @@ Rectangle { ...@@ -8,7 +9,7 @@ Rectangle {
height: 480 height: 480
color: "#000000" color: "#000000"
property color buttonColor: "gainsboro" property color buttonColor: "silver"
property color coordsColor: "gold" property color coordsColor: "gold"
ColumnLayout { ColumnLayout {
...@@ -20,6 +21,8 @@ Rectangle { ...@@ -20,6 +21,8 @@ Rectangle {
id: mountMotionLayout id: mountMotionLayout
width: 200 width: 200
height: 150 height: 150
rowSpacing: 1
columnSpacing: 1
Layout.minimumHeight: 150 Layout.minimumHeight: 150
Layout.minimumWidth: 200 Layout.minimumWidth: 200
Layout.maximumHeight: 150 Layout.maximumHeight: 150
...@@ -38,19 +41,15 @@ Rectangle { ...@@ -38,19 +41,15 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: northWest.pressed ? "red" : rectangle.buttonColor color: northWest.pressed ? "red" : rectangle.buttonColor
} }
onPressAndHold: onPressedChanged:
{ {
mount.motionCommand(0, 0, 0); northWest.pressed ? mount.motionCommand(0, 0, 0) : mount.motionCommand(1, 0, 0);
}
onReleased:
{
mount.motionCommand(1, 0, 0);
} }
Image { Image {
...@@ -67,19 +66,15 @@ Rectangle { ...@@ -67,19 +66,15 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: north.pressed ? "red" : rectangle.buttonColor color: north.pressed ? "red" : rectangle.buttonColor
} }
onPressAndHold: onPressedChanged:
{ {
mount.motionCommand(0, 0, -1); north.pressed ? mount.motionCommand(0, 0, -1) : mount.motionCommand(1, 0, -1);
}
onReleased:
{
mount.motionCommand(1, 0, -1);
} }
Image { Image {
...@@ -96,20 +91,15 @@ Rectangle { ...@@ -96,20 +91,15 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
Rectangle
background: Rectangle
{ {
anchors.fill: parent
color: northEast.pressed ? "red" : rectangle.buttonColor color: northEast.pressed ? "red" : rectangle.buttonColor
} }
onPressAndHold: onPressedChanged:
{ {
mount.motionCommand(0, 0, 1); northEast.pressed ? mount.motionCommand(0, 0, 1) : mount.motionCommand(1, 0, 1);
}
onReleased:
{
mount.motionCommand(1, 0, 1);
} }
...@@ -131,19 +121,15 @@ Rectangle { ...@@ -131,19 +121,15 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: west.pressed ? "red" : rectangle.buttonColor color: west.pressed ? "red" : rectangle.buttonColor
} }
onPressAndHold: onPressedChanged:
{
mount.motionCommand(0, -1, 0);
}
onReleased:
{ {
mount.motionCommand(1, -1, 0); west.pressed ? mount.motionCommand(0, -1, 0) : mount.motionCommand(1, -1, 0);
} }
...@@ -161,8 +147,9 @@ Rectangle { ...@@ -161,8 +147,9 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: stop.pressed ? "red" : rectangle.buttonColor color: stop.pressed ? "red" : rectangle.buttonColor
} }
...@@ -187,22 +174,17 @@ Rectangle { ...@@ -187,22 +174,17 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: east.pressed ? "red" : rectangle.buttonColor color: east.pressed ? "red" : rectangle.buttonColor
} }
onPressAndHold: onPressedChanged:
{
mount.motionCommand(0, -1, 1);
}
onReleased:
{ {
mount.motionCommand(1, -1, 1); east.pressed ? mount.motionCommand(0, -1, 1) : mount.motionCommand(1, -1, 1);
} }
Image { Image {
width: 50 width: 50
anchors.fill: parent anchors.fill: parent
...@@ -217,22 +199,17 @@ Rectangle { ...@@ -217,22 +199,17 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: southWest.pressed ? "red" : rectangle.buttonColor color: southWest.pressed ? "red" : rectangle.buttonColor
} }
onPressAndHold: onPressedChanged:
{
mount.motionCommand(0, 1, 0);
}
onReleased:
{ {
mount.motionCommand(1, 1, 0); southWest.pressed ? mount.motionCommand(0, 1, 0) : mount.motionCommand(1, 1, 0);
} }
Image { Image {
width: 50 width: 50
anchors.fill: parent anchors.fill: parent
...@@ -247,22 +224,17 @@ Rectangle { ...@@ -247,22 +224,17 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: south.pressed ? "red" : rectangle.buttonColor color: south.pressed ? "red" : rectangle.buttonColor
} }
onPressAndHold: onPressedChanged:
{
mount.motionCommand(0, 1, -1);
}
onReleased:
{ {
mount.motionCommand(1, 1, -1); south.pressed ? mount.motionCommand(0, 1, -1) : mount.motionCommand(1, 1, -1);
} }
Image { Image {
width: 50 width: 50
anchors.fill: parent anchors.fill: parent
...@@ -277,19 +249,15 @@ Rectangle { ...@@ -277,19 +249,15 @@ Rectangle {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: southEast.pressed ? "red" : rectangle.buttonColor color: southEast.pressed ? "red" : rectangle.buttonColor
} }
onPressAndHold: onPressedChanged:
{
mount.motionCommand(0, 1, 1);
}
onReleased:
{ {
mount.motionCommand(1, 1, 1); southEast.pressed ? mount.motionCommand(0, 1, 1) : mount.motionCommand(1, 1, 1);
} }
Image { Image {
...@@ -298,8 +266,6 @@ Rectangle { ...@@ -298,8 +266,6 @@ Rectangle {
source: "go-southeast.png" source: "go-southeast.png"
} }
} }
} }
...@@ -317,8 +283,8 @@ Rectangle { ...@@ -317,8 +283,8 @@ Rectangle {
objectName: "speedSliderObject" objectName: "speedSliderObject"
Layout.fillWidth: true Layout.fillWidth: true
stepSize: 1 stepSize: 1
from: 0 minimumValue: 0
to: 4 maximumValue: 4
value: 0 value: 0
onValueChanged: onValueChanged:
...@@ -497,10 +463,12 @@ Rectangle { ...@@ -497,10 +463,12 @@ Rectangle {
id: targetText id: targetText
objectName: "targetTextObject" objectName: "targetTextObject"
color: "#ffffff" color: "#ffffff"
background: Rectangle Rectangle
{ {
anchors.fill: parent
color: "black" color: "black"
border.color : "yellow" opacity: 0.5
border.color : "#D4AF37"
border.width : 1 border.width : 1
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment