2
* Copyright (C) 2009 Timothy Reaves
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
#ifndef _OCULARDIALOG_HPP_
20
#define _OCULARDIALOG_HPP_
23
#include "StelDialogOculars.hpp"
25
#include "StelStyle.hpp"
29
class Ui_ocularDialogForm;
32
class QDataWidgetMapper;
33
class QDoubleValidator;
35
class QRegExpValidator;
42
class OcularDialog : public StelDialogOculars
47
OcularDialog(QSqlTableModel *ocularsTableModel, QSqlTableModel *telescopesTableModel);
48
virtual ~OcularDialog();
49
void languageChanged();
50
virtual void setStelStyle(const StelStyle& style);
52
//! Notify that the application style changed
54
void setOculars(QList<Ocular*> theOculars);
58
void deleteSelectedOcular();
59
void deleteSelectedTelescope();
60
void insertNewOcular();
61
void insertNewTelescope();
62
void ocularSelected(const QModelIndex &index);
63
void telescopeSelected(const QModelIndex &index);
65
void updateTelescope();
68
void scaleImageCircleChanged(bool state);
71
//! Initialize the dialog widgets and connect the signals/slots
72
virtual void createDialogContent();
73
Ui_ocularDialogForm* ui;
76
void scaleImageCircleStateChanged(int state);
79
QDataWidgetMapper *ocularMapper;
80
QSqlTableModel *ocularsTableModel;
81
QDataWidgetMapper *telescopeMapper;
82
QSqlTableModel *telescopesTableModel;
83
QIntValidator *validatorOcularAFOV;
84
QDoubleValidator *validatorOcularEFL;
85
QDoubleValidator *validatorTelescopeDiameter;
86
QDoubleValidator *validatorTelescopeFL;
87
QRegExpValidator *validatorName;
91
#endif // _OCULARDIALOG_HPP_