Commit 0b318288 authored by Jasem Mutlaq's avatar Jasem Mutlaq

Make it work on Mac and add center mount

parent 57c95bfd
......@@ -121,7 +121,11 @@ Mount::Mount()
m_BaseView->setSource(QUrl::fromLocalFile(MountBox_Location));
m_BaseView->setTitle(i18n("Mount Control"));
m_BaseView->setFlags(Qt::WindowStaysOnTopHint);
#ifdef Q_OS_OSX
m_BaseView->setFlags(Qt::Tool|Qt::WindowStaysOnTopHint);
#else
m_BaseView->setFlags(Qt::WindowStaysOnTopHint|Qt::WindowCloseButtonHint);
#endif
// Theming?
m_BaseView->setColor(Qt::black);
......@@ -854,5 +858,10 @@ void Mount::findTarget()
delete fd;
}
void Mount::centerMount()
{
if (currentTelescope)
currentTelescope->runCommand(INDI_ENGAGE_TRACKING);
}
}
......@@ -172,6 +172,9 @@ class Mount : public QWidget, public Ui::Mount
Q_INVOKABLE void findTarget();
// Center mount in Sky Map
Q_INVOKABLE void centerMount();
public slots:
/**
......
......@@ -623,9 +623,30 @@ Rectangle {
objectName: "statusTextObject"
color: "#ffffff"
text: qsTr("Idle")
Layout.fillWidth: true
Layout.minimumWidth: 100
font.pointSize: 12
font.bold: true
}
Button {
id: centerMount
Layout.maximumHeight: 32
Layout.maximumWidth: 32
Layout.minimumHeight: 32
Layout.minimumWidth: 32
Image {
id: centerMountIcon
anchors.fill: parent
source: "qrc:/icons/breeze/default/crosshairs.svg"
}
onClicked:
{
mount.centerMount()
}
}
}
}
}
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