diff --git a/kstars/data/icons/atikbase.svg b/kstars/data/icons/atikbase.svg
new file mode 100644
index 000000000..4e432e02e
--- /dev/null
+++ b/kstars/data/icons/atikbase.svg
@@ -0,0 +1,52 @@
+
+
diff --git a/kstars/data/kstars.qrc b/kstars/data/kstars.qrc
index 553672f24..26edb671c 100644
--- a/kstars/data/kstars.qrc
+++ b/kstars/data/kstars.qrc
@@ -1,75 +1,76 @@
icons/ekos_align.pngicons/ekos_ccd.pngicons/ekos_focus.pngicons/ekos_guide.pngicons/ekos_mount.pngicons/ekos_scheduler.pngicons/ekos_setup.pngicons/fov.pngicons/histogram.pngicons/glstarbase.pngicons/center_telescope.svgicons/center_telescope_red.svgicons/AlignFailure.svgicons/AlignSuccess.svgicons/AlignWarning.svgicons/astrometry.svgicons/stellarmate.svgicons/center_telescope_magenta.svgicons/dome-park.svgicons/dome-unpark.svgicons/star_profile.svgicons/astrometry-optional.svgicons/astrometry-recommended.svgicons/astrometry-required.svgindidrivers.xmlqml/whatisinteresting/CategoryTitle.qmlqml/whatisinteresting/DetailsItem.qmlqml/whatisinteresting/downloadIcon.pngqml/whatisinteresting/favoriteIcon.pngqml/whatisinteresting/helpIcon.pngqml/whatisinteresting/iconcredits.datqml/whatisinteresting/inspectIcon.pngqml/whatisinteresting/leftArrow.pngqml/whatisinteresting/next.pngqml/whatisinteresting/previous.pngqml/whatisinteresting/reloadIcon.pngqml/whatisinteresting/ScrollBar.qmlqml/whatisinteresting/settingsIcon.pngqml/whatisinteresting/visibleIcon.pngqml/whatisinteresting/wiview.qmlqml/mount/go-east.pngqml/mount/go-north.pngqml/mount/go-northeast.pngqml/mount/go-northwest.pngqml/mount/go-south.pngqml/mount/go-southeast.pngqml/mount/go-southwest.pngqml/mount/go-west.pngqml/mount/mountbox.qmlqml/mount/stop.pngicons/kstars_satellites_invisible.svgicons/kstars_satellites_visible.svgicons/cloud-online.svgicons/ekos_observatory.pngicons/cfa.svgicons/pi.svg
+ icons/atikbase.svgkstars.knsrckstarsui.rcfitsviewerui.rcnoimage.pngreticle12.pngreticle24.pngsm_animation.gif
diff --git a/kstars/ekos/profilewizard.cpp b/kstars/ekos/profilewizard.cpp
index 7141b0a79..9558b7b0d 100644
--- a/kstars/ekos/profilewizard.cpp
+++ b/kstars/ekos/profilewizard.cpp
@@ -1,324 +1,328 @@
/* Ekos Profile Wizard
Copyright (C) 2017 Jasem Mutlaq
This application 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 2 of the License, or (at your option) any later version.
*/
#include "profilewizard.h"
#include
#include
#include
#include
#include "kstars.h"
#include "auxiliary/kspaths.h"
#include "ksnotification.h"
#include "qMDNS.h"
ProfileWizard::ProfileWizard() : QDialog(KStars::Instance())
{
setupUi(this);
#ifdef Q_OS_OSX
setWindowFlags(Qt::Tool | Qt::WindowStaysOnTopHint);
#endif
QPixmap im;
if (im.load(KSPaths::locate(QStandardPaths::GenericDataLocation, "wzekos.png")))
wizardPix->setPixmap(im);
remoteEquipmentSVG->load(QString(":/icons/pi.svg"));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(close()));
connect(buttonBox, &QDialogButtonBox::helpRequested, this, []()
{
KStars::Instance()->appHelpActivated();
});
connect(buttonBox, &QDialogButtonBox::clicked, this, [this](QAbstractButton * button)
{
if (button == buttonBox->button(QDialogButtonBox::Reset))
reset();
});
connect(discoverEkosB, &QPushButton::clicked, this,
[]()
{
QDesktopServices::openUrl(QUrl("http://www.indilib.org/about/ekos.html"));
});
connect(videoTutorialsB, &QPushButton::clicked, this,
[]()
{
QDesktopServices::openUrl(QUrl("https://www.youtube.com/user/QAstronomy"));
});
connect(INDIInfoB, &QPushButton::clicked, this,
[]()
{
QDesktopServices::openUrl(QUrl("http://indilib.org/about/discover-indi.html"));
});
// Intro actions
connect(introNextB, &QPushButton::clicked, this,
[this]()
{
wizardContainer->setCurrentIndex(EQUIPMENT_LOCATION);
});
// Equipment Location actions
connect(localEquipmentB, SIGNAL(clicked()), this, SLOT(processLocalEquipment()));
connect(remoteEquipmentB, &QPushButton::clicked, this,
[this]()
{
wizardContainer->setCurrentIndex(REMOTE_EQUIPMENT_SELECTION);
});
+ equipmentStellarmateB->setIcon(QIcon(":/icons/stellarmate.svg"));
connect(equipmentStellarmateB, &QPushButton::clicked, this, &ProfileWizard::processRemoteEquipmentSelection);
+
+ equipmentAtikbaseB->setIcon(QIcon(":/icons/atikbase.svg"));
connect(equipmentAtikbaseB, &QPushButton::clicked, this, &ProfileWizard::processRemoteEquipmentSelection);
+
connect(equipmentOtherB, &QPushButton::clicked, this, &ProfileWizard::processRemoteEquipmentSelection);
// Remote Equipment Action
connect(remoteEquipmentNextB, SIGNAL(clicked()), this, SLOT(processRemoteEquipment()));
// StellarMate Equipment Action
connect(stellarMateEquipmentNextB, SIGNAL(clicked()), this, SLOT(processPiEquipment()));
#ifdef Q_OS_WIN
// Auto Detect does not work on Windows yet for some reason.
// Packet is sent correctly, but no replies are received from anything on the LAN outside of PC.
stellarMateAutoDetectB->setEnabled(false);
#else
connect(PiAutoDetectB, SIGNAL(clicked()), this, SLOT(detectStellarMate()));
#endif
// Local Mac
connect(useExternalINDIB, SIGNAL(clicked()), this, SLOT(processLocalMac()));
connect(useInternalINDIB, SIGNAL(clicked()), this, SLOT(processLocalMac()));
// Create Profile
connect(createProfileB, SIGNAL(clicked()), this, SLOT(createProfile()));
}
void ProfileWizard::reset()
{
useInternalServer = true;
useWebManager = false;
useJoystick = false;
useRemoteAstrometry = false;
useSkySafari = false;
useWatchDog = false;
useGuiderType = INTERNAL_GUIDER;
host.clear();
port = "7624";
wizardContainer->setCurrentIndex(INTRO);
}
void ProfileWizard::processLocalEquipment()
{
#if defined(Q_OS_OSX)
wizardContainer->setCurrentIndex(MAC_LOCAL);
#elif defined(Q_OS_WIN)
wizardContainer->setCurrentIndex(WINDOWS_LOCAL);
#else
useInternalServer = true;
useJoystickCheck->setEnabled(true);
useRemoteAstrometryCheck->setEnabled(false);
useWatchDogCheck->setEnabled(false);
useSkySafariCheck->setEnabled(true);
wizardContainer->setCurrentIndex(CREATE_PROFILE);
#endif
}
void ProfileWizard::processRemoteEquipment()
{
bool portOK = false;
remotePortEdit->text().toInt(&portOK);
if (portOK == false)
{
KSNotification::error(i18n("Invalid port."));
return;
}
if (remoteHostEdit->text().isEmpty())
{
KSNotification::error(i18n("Host name cannot be empty."));
return;
}
useInternalServer = false;
host = remoteHostEdit->text();
port = remotePortEdit->text();
if (webManagerNotSureB->isChecked())
{
QTcpSocket socket;
// Should probably make 8624 configurable too?
socket.connectToHost(host, 8624);
useWebManager = socket.waitForConnected();
}
else
useWebManager = webManagerYesR->isChecked();
useJoystickCheck->setEnabled(true);
useRemoteAstrometryCheck->setEnabled(true);
useWatchDogCheck->setEnabled(true);
useSkySafariCheck->setEnabled(true);
wizardContainer->setCurrentIndex(CREATE_PROFILE);
}
void ProfileWizard::processPiEquipment()
{
if (PiHost->text().isEmpty())
{
KSNotification::error(i18n("Host name cannot be empty."));
return;
}
host = PiHost->text();
port = PiPort->text();
useInternalServer = false;
useWebManager = true;
useJoystickCheck->setEnabled(true);
useRemoteAstrometryCheck->setEnabled(true);
useWatchDogCheck->setEnabled(true);
useSkySafariCheck->setEnabled(true);
wizardContainer->setCurrentIndex(CREATE_PROFILE);
}
void ProfileWizard::processLocalMac()
{
QPushButton *button = qobject_cast(sender());
if (button == nullptr)
return;
host = "localhost";
port = "7624";
useInternalServer = (button == useInternalINDIB);
useJoystickCheck->setEnabled(false);
useRemoteAstrometryCheck->setEnabled(false);
useWatchDogCheck->setEnabled(false);
useSkySafariCheck->setEnabled(true);
wizardContainer->setCurrentIndex(CREATE_PROFILE);
}
void ProfileWizard::createProfile()
{
if (profileNameEdit->text().isEmpty())
{
KSNotification::error(i18n("Profile name cannot be empty."));
return;
}
useJoystick = useJoystickCheck->isEnabled() && useJoystickCheck->isChecked();
useWatchDog = useWatchDogCheck->isEnabled() && useWatchDogCheck->isChecked();
useSkySafari = useSkySafariCheck->isEnabled() && useSkySafariCheck->isChecked();
useRemoteAstrometry = useRemoteAstrometryCheck->isEnabled() && useRemoteAstrometryCheck->isChecked();
if (useInternalGuiderR->isChecked())
useGuiderType = INTERNAL_GUIDER;
else if (usePHD2R->isChecked())
useGuiderType = PHD2_GUIDER;
else
useGuiderType = LIN_GUIDER;
profileName = profileNameEdit->text();
if (useInternalServer)
{
host.clear();
port.clear();
}
accept();
}
QStringList ProfileWizard::selectedAuxDrivers()
{
QStringList auxList;
if (useJoystick)
auxList << "Joystick";
if (useWatchDog)
auxList << "WatchDog";
if (useSkySafari)
auxList << "SkySafari";
if (useRemoteAstrometry)
auxList << "Astrometry";
return auxList;
}
int ProfileWizard::selectedExternalGuider()
{
return useGuiderType;
}
void ProfileWizard::detectStellarMate()
{
stellarMateDetectDialog = new QProgressDialog(this);
stellarMateDetectDialog->setMinimum(0);
stellarMateDetectDialog->setMaximum(0);
stellarMateDetectDialog->setWindowTitle(i18n("Detecting StellarMate..."));
stellarMateDetectDialog->setLabelText(i18n("Please wait while searching for StellarMate..."));
stellarMateDetectDialog->show();
connect(stellarMateDetectDialog.data(), &QProgressDialog::canceled, [&]()
{
qMDNS::getInstance()->disconnect();
});
connect(qMDNS::getInstance(), SIGNAL(hostFound(QHostInfo)), this, SLOT(processHostInfo(QHostInfo)));
QTimer::singleShot(120 * 1000, this, SLOT(detectStellarMateTimeout()));
qMDNS::getInstance()->lookup("stellarmate");
}
void ProfileWizard::processHostInfo(QHostInfo info)
{
PiHost->setText(info.hostName());
qMDNS::getInstance()->disconnect();
stellarMateDetectDialog->close();
}
void ProfileWizard::detectStellarMateTimeout()
{
if (stellarMateDetectDialog->isHidden() == false)
{
KSNotification::error(i18n("Failed to detect any StellarMate gadget. Make sure it is powered and on the same network."));
stellarMateDetectDialog->close();
}
}
void ProfileWizard::processRemoteEquipmentSelection()
{
- QPushButton *button = qobject_cast(sender());
+ QToolButton *button = qobject_cast(sender());
if (!button)
return;
if (button == equipmentStellarmateB)
{
PiHost->setText("stellarmate.local");
wizardContainer->setCurrentIndex(PI_EQUIPMENT);
}
else if (button == equipmentAtikbaseB)
{
PiHost->setText("atikbase.local");
wizardContainer->setCurrentIndex(PI_EQUIPMENT);
}
else
{
wizardContainer->setCurrentIndex(GENERIC_EQUIPMENT);
}
}
diff --git a/kstars/ekos/profilewizard.ui b/kstars/ekos/profilewizard.ui
index d870afdce..55d9079f8 100644
--- a/kstars/ekos/profilewizard.ui
+++ b/kstars/ekos/profilewizard.ui
@@ -1,1214 +1,1218 @@
ProfileWizard006513660016777215366Ekos Profile Wizardtrue3333300120360120360QFrame::Boxtrue3001616167772151677721500012<html><head/><body><p>Welcome to the <span style=" font-weight:600;">Ekos Profile Wizard</span></p><p>Ekos is the premier observatory control and automation platform. With Ekos, you can capture images and gather scientific data with ease. This Wizard will help you create your equipment profile. You will be asked to verify some basic information. </p><p>Please click <span style=" font-weight:600;">next</span> to continue. </p></body></html>trueQt::AlignJustify|Qt::AlignVCentertrueQt::Vertical2040Qt::Horizontal4020064NextfalseQt::Horizontal4020Qt::Vertical207210<html><head/><body><p><span style=" font-weight:600;">Online Resources:</span></p></body></html>Qt::Horizontal4020064What is
INDI?falsefalsefalse064Discover
Ekosfalsefalsefalse064Video
TutorialsfalsefalsefalseQt::Horizontal4020Arial Black12Where is your equipment connected?00Arial Black12Qt::ClickFocusEquipment is attached
to this device..6464falsefalsefalse00Arial Black12Qt::ClickFocusEquipment is attached to
a remote device..6464false00Arial Black12<html><head/><body><p>Which <span style=" color:#ff5500;">remote</span> device is the equipment connected to?</p></body></html>
-
-
+
+ 6464128128
- StellarMate
-
-
-
- :/icons/stellarmate.svg
-
+ AtikBase4848
+
+ Qt::ToolButtonTextUnderIcon
+
-
-
+
+ 6464128128
- AtikBase
+ Other
-
-
+
+ 6464128128
- Other
+ StellarMate
+
+
+
+ 48
+ 48
+
+
+
+ Qt::ToolButtonTextUnderIcon992509925000Arial Black12Enter the remote computer information:Host:Enter IP address or host namePort:7624Arial Black12<html><head/><body><p><a href="https://github.com/knro/indiwebmanager"><span style=" text-decoration: underline; color:#007af4;">INDI Web Manager</span></a> running on the Remote Computer?</p></body></html>trueYesNoNot SuretrueQt::Horizontal402010<html><head/><body><p><span style=" font-weight:600;">Tip</span>: <span style=" font-style:italic;">INDI Web Manager</span> is a service that runs on remote devices to help you start and stop INDI services remotely.</p></body></html>Qt::AlignJustify|Qt::AlignVCentertrueQt::Horizontal4020064NextfalseQt::Horizontal402000Arial Black12Enter host name and port. If you do not know, leave as is.trueHost:stellarmate.localEnter IP address or host namefalseAuto DetectPort:7624Qt::Horizontal4020064NextfalseQt::Horizontal402010<html><head/><body><p>Using Ekos locally on Windows is not supported. You must connect to a remote gadget to control devices.</p></body></html>trueArial Black14Which INDI Server do you want to use?00Arial Black12Qt::ClickFocusInternal INDI
Server..6464false00Arial Black12Qt::ClickFocusExternal INDI
Server..6464false10<html><head/><body><p><span style=" font-weight:600;">Tip</span>: External INDI Server can be <a href="http://www.cloudmakers.eu/indiserver/"><span style=" text-decoration: underline; color:#007af4;">INDI Server for OSX</span></a> or an INDI Server launched manually locally. If unsure, select Internal INDI Server.</p></body></html>Qt::AlignJustify|Qt::AlignVCentertrue14<html><head/><body><p>You're almost done...</p></body></html>Arial Black12<html><head/><body><p>What do you want to name your profile?</p></body></html>Profile:My Astro GearArial Black12<html><head/><body><p>Which guider application do you want to use?</p></body></html>Internal GuidertruePHD2Lin GuiderQt::Horizontal402010<html><head/><body><p><span style=" font-weight:600;">Tip</span>: Internal Guider is recommended. Using external guider applications requires additional setup instructions outside the scope of Ekos.</p></body></html>Qt::AlignJustify|Qt::AlignVCentertrueArial Black12<html><head/><body><p>Do you want to select additional services?</p></body></html>false<html><head/><body><p>Use INDI Joystick driver to enable control of mounts, domes, and focusers with any compatible game pad.</p></body></html>Joystickfalse<html><head/><body><p>If the remote computer has astrometry.net installed, you can run the remote astrometry driver and use it to solve images in Ekos Align module.</p></body></html>Remote Astrometryfalse<html><head/><body><p>Use the INDI WatchDog driver. It monitors connection between your remote equipment and Ekos. If the communication is lost between the two, the WatchDog driver goes into safe mode and executes a shutdown procedure to protect your equipment.</p></body></html>Watch Dog<html><head/><body><p>If you plan to use SkySafari to monitor and/or control your mount, check this box to start INDI SkySafari Server. You can connect SkySafari to this server and it shall enable you to connect and control your mount. For more details, please check the <a href="http://indilib.org/devices/telescopes/skysafari.html"><span style=" text-decoration: underline; color:#007af4;">INDI SkySafari Documentation.</span></a></p></body></html>SkySafariQt::Horizontal402006414Create Profile &&
Select Devices
-
+ :/icons/AlignSuccess.svg:/icons/AlignSuccess.svg6464falseQDialogButtonBox::Close|QDialogButtonBox::Help|QDialogButtonBox::ResetQSvgWidgetQWidgetqsvgwidget.h1
-
-
-
-
+