Skip to content

Commit

Permalink
Make it clear in GUI whether abortSlew is supported.
Browse files Browse the repository at this point in the history
  • Loading branch information
gzotti committed Sep 5, 2024
1 parent f3885e1 commit 6a9809b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class TelescopeClientASCOM : public TelescopeClient
void telescopeSync(const Vec3d& j2000Pos, StelObjectP selectObject) override;
bool isTelescopeSyncSupported() const override {return true;}
void telescopeAbortSlew() override;
bool isAbortSlewSupported() const override {return true;}
bool isConnected() const override;
bool hasKnownPosition() const override;
static bool useJNow(ASCOMDevice::ASCOMEquatorialCoordinateType coordinateType, bool ascomUseDeviceEqCoordType, TelescopeControl::Equinox equinox);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class TelescopeClientDirectLx200 : public TelescopeClient, public Server
void telescopeSync(const Vec3d &j2000Pos, StelObjectP selectObject) override;
bool isTelescopeSyncSupported() const override {return true;}
void telescopeAbortSlew() override;
bool isAbortSlewSupported() const override {return true;}
bool isInitialized(void) const override;

//======================================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class TelescopeClientDirectNexStar : public TelescopeClient, public Server
void telescopeSync(const Vec3d &j2000Pos, StelObjectP selectObject) override;
bool isTelescopeSyncSupported() const override {return true;}
void telescopeAbortSlew() override;
bool isAbortSlewSupported() const override {return true;}
bool isInitialized(void) const override;

//======================================================================
Expand Down
3 changes: 3 additions & 0 deletions plugins/TelescopeControl/src/TelescopeClient.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class TelescopeClient : public QObject, public StelObject
//! Send command to abort slew. Not all telescopes support this, base implementation only gives a warning.
//! After abort, the current position should be retrieved and displayed.
virtual void telescopeAbortSlew();
//! report whether this client can abort a running slew.
//! Can be used for GUI tweaks
virtual bool isAbortSlewSupported() const {return false;}

//!
//! \brief move
Expand Down
1 change: 1 addition & 0 deletions plugins/TelescopeControl/src/gui/SlewDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ void SlewDialog::onCurrentTelescopeChanged()
return;

ui->pushButtonSync->setEnabled(telescope->isTelescopeSyncSupported());
ui->pushButtonAbort->setEnabled(telescope->isAbortSlewSupported());
auto controlWidget = telescope->createControlWidget(telescope);
if (!controlWidget)
return;
Expand Down

0 comments on commit 6a9809b

Please sign in to comment.