2
* Stellarium TelescopeControl Plug-in
4
* Copyright (C) 2009 Bogdan Marinov (this file)
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
#ifndef _TELESCOPECONFIGURATIONDIALOG_HPP_
22
#define _TELESCOPECONFIGURATIONDIALOG_HPP_
26
#include <QIntValidator>
27
#include <QStringList>
28
//#include "StelDialog.hpp"
29
#include "StelDialogTelescopeControl.hpp"
30
#include "TelescopeControlGlobals.hpp"
32
using namespace TelescopeControlGlobals;
34
class Ui_telescopeConfigurationDialogForm;
35
class TelescopeControl;
38
class TelescopeConfigurationDialog : public StelDialogTelescopeControl
42
TelescopeConfigurationDialog();
43
virtual ~TelescopeConfigurationDialog();
44
void languageChanged();
45
virtual void setStelStyle(const StelStyle& style);
47
void initExistingTelescopeConfiguration(int slot);
48
void initNewTelescopeConfiguration(int slot);
51
//! Initialize the dialog widgets and connect the signals/slots
52
virtual void createDialogContent();
53
Ui_telescopeConfigurationDialogForm* ui;
56
void initConfigurationDialog();
59
void buttonSavePressed(void);
60
void buttonDiscardPressed(void);
62
void toggleTypeServer(bool);
63
void toggleTypeConnection(bool);
64
void toggleCircles(int);
66
void deviceModelSelected(const QString&);
68
void saveChanges(QString name, TelescopeConnection type);
69
void discardChanges(void);
72
QStringList deviceModelNames;
74
QIntValidator * tcpPortValidator;
75
QRegExpValidator * telescopeNameValidator;
76
QRegExpValidator * hostNameValidator;
77
QRegExpValidator * circleListValidator;
78
QRegExpValidator * serialPortValidator;
82
TelescopeControl * telescopeManager;
85
#endif // _TELESCOPECONFIGURATIONDIALOG_