~ubuntu-branches/ubuntu/precise/stellarium/precise

« back to all changes in this revision

Viewing changes to plugins/Oculars/src/gui/OcularDialog.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Howard
  • Date: 2010-02-15 20:48:39 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100215204839-u3qgbv60rho997yk
Tags: 0.10.3-0ubuntu1
* New upstream release.
  - fixes intel rendering bug (LP: #480553)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2009 Timothy Reaves
 
3
 *
 
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.
 
8
 *
 
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.
 
13
 *
 
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.
 
17
 */
 
18
 
 
19
#ifndef _OCULARDIALOG_HPP_
 
20
#define _OCULARDIALOG_HPP_
 
21
 
 
22
#include <QObject>
 
23
#include "StelDialogOculars.hpp"
 
24
#include "Ocular.hpp"
 
25
#include "StelStyle.hpp"
 
26
 
 
27
#include <QSqlRecord>
 
28
 
 
29
class Ui_ocularDialogForm;
 
30
 
 
31
QT_BEGIN_NAMESPACE
 
32
class QDataWidgetMapper;
 
33
class QDoubleValidator;
 
34
class QIntValidator;
 
35
class QRegExpValidator;
 
36
class QModelIndex;
 
37
class QSqlRecord;
 
38
class QSqlTableModel;
 
39
QT_END_NAMESPACE
 
40
 
 
41
 
 
42
class OcularDialog : public StelDialogOculars
 
43
{
 
44
        Q_OBJECT
 
45
 
 
46
public:
 
47
        OcularDialog(QSqlTableModel *ocularsTableModel, QSqlTableModel *telescopesTableModel);
 
48
        virtual ~OcularDialog();
 
49
        void languageChanged();
 
50
        virtual void setStelStyle(const StelStyle& style);
 
51
 
 
52
        //! Notify that the application style changed
 
53
        void styleChanged();
 
54
        void setOculars(QList<Ocular*> theOculars);
 
55
 
 
56
public slots:
 
57
        void closeWindow();
 
58
        void deleteSelectedOcular();
 
59
        void deleteSelectedTelescope();
 
60
        void insertNewOcular();
 
61
        void insertNewTelescope();
 
62
        void ocularSelected(const QModelIndex &index);
 
63
        void telescopeSelected(const QModelIndex &index);
 
64
        void updateOcular();
 
65
        void updateTelescope();
 
66
 
 
67
signals:
 
68
        void scaleImageCircleChanged(bool state);
 
69
        
 
70
protected:
 
71
        //! Initialize the dialog widgets and connect the signals/slots
 
72
        virtual void createDialogContent();
 
73
        Ui_ocularDialogForm* ui;
 
74
 
 
75
private slots:
 
76
        void scaleImageCircleStateChanged(int state);
 
77
 
 
78
private:
 
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;
 
88
 
 
89
};
 
90
 
 
91
#endif // _OCULARDIALOG_HPP_