File indexing completed on 2024-03-24 15:16:43

0001 /*
0002     SPDX-FileCopyrightText: 2017 Jasem Mutlaq <mutlaqja@ikarustech.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef PROFILEWIZARD_H
0008 #define PROFILEWIZARD_H
0009 
0010 #include "ui_profilewizard.h"
0011 
0012 #include <QProgressDialog>
0013 #include <QHostInfo>
0014 #include <QPointer>
0015 
0016 namespace Ekos
0017 {
0018 class Manager;
0019 }
0020 
0021 class ProfileWizard : public QDialog, public Ui::ProfileWizard
0022 {
0023         Q_OBJECT
0024 
0025     public:
0026         enum
0027         {
0028             INTRO,
0029             EQUIPMENT_LOCATION,
0030             REMOTE_EQUIPMENT_SELECTION,
0031             GENERIC_EQUIPMENT,
0032             PI_EQUIPMENT,
0033             WINDOWS_LOCAL,
0034             MAC_LOCAL,
0035             CREATE_PROFILE
0036         };
0037         typedef enum { INTERNAL_GUIDER, PHD2_GUIDER, LIN_GUIDER } GuiderType;
0038 
0039         ProfileWizard();
0040 
0041         QStringList selectedAuxDrivers();
0042         int selectedExternalGuider();
0043 
0044     protected slots:
0045         void reset();
0046         void processLocalEquipment();
0047         void processRemoteEquipmentSelection();
0048         void processRemoteEquipment();
0049         void processPiEquipment();
0050         void processLocalMac();
0051         void createProfile();
0052         void detectStellarMate();
0053         void processHostInfo(QHostInfo info);
0054         void detectStellarMateTimeout();
0055 
0056     private:
0057         bool useInternalServer   = true;
0058         bool useWebManager       = false;
0059         bool useJoystick         = false;
0060         bool useRemoteAstrometry = false;
0061         bool useWatchDog         = false;
0062         bool useSkySafari        = false;
0063         GuiderType useGuiderType = INTERNAL_GUIDER;
0064 
0065         QString profileName, host, port;
0066         QPointer<QProgressDialog> stellarMateDetectDialog;
0067 
0068         friend class Ekos::Manager;
0069 };
0070 
0071 #endif