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

« back to all changes in this revision

Viewing changes to plugins/LogBook/src/gui/LogBookConfigDialog.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 _LOGBOOKCONFIGDIALOG_HPP_
 
20
#define _LOGBOOKCONFIGDIALOG_HPP_
 
21
 
 
22
#include <QObject>
 
23
#include "StelDialogLogBook.hpp"
 
24
#include "StelStyle.hpp"
 
25
 
 
26
#include "ui_LogBookConfigDialog.h"
 
27
#include "ui_BarlowsWidget.h"
 
28
#include "ui_FiltersWidget.h"
 
29
#include "ui_ImagersWidget.h"
 
30
#include "ui_ObserversWidget.h"
 
31
#include "ui_OcularsWidget.h"
 
32
#include "ui_OpticsWidget.h"
 
33
#include "ui_SitesWidget.h"
 
34
 
 
35
#include <QMap>
 
36
 
 
37
class Ui_LogBookConfigDialogForm;
 
38
class QSqlTableModel; 
 
39
 
 
40
class LogBookConfigDialog : public StelDialogLogBook {
 
41
        Q_OBJECT
 
42
        
 
43
public:
 
44
        LogBookConfigDialog(QMap<QString, QSqlTableModel *> theTableModels);
 
45
        virtual ~LogBookConfigDialog();
 
46
        void languageChanged();
 
47
        virtual void setStelStyle(const StelStyle& style);
 
48
        
 
49
        //! Notify that the application style changed
 
50
        void styleChanged();
 
51
        
 
52
public slots:
 
53
        void closeWindow();
 
54
 
 
55
signals:
 
56
        void currentBarlowChanged();
 
57
        void currentFilterChanged();
 
58
        void currentImagerChanged();
 
59
        void currentObserverChanged();
 
60
        void currentOcularChanged();
 
61
        void currentOpticChanged();
 
62
        void currentSiteChanged();
 
63
 
 
64
protected:
 
65
 
 
66
        //! Initialize the dialog widgets and connect the signals/slots
 
67
        virtual void createDialogContent();
 
68
        void setupListViews();
 
69
        //! helper for createDialogContent() that handles the referenced ui widgets. 
 
70
        void setupWidgets();
 
71
 
 
72
        // Widgets
 
73
        Ui_LogBookConfigDialogForm *ui;
 
74
        Ui_BarlowsWidget *barlowsWidget;
 
75
        Ui_FiltersWidget *filtersWidget;
 
76
        Ui_ImagersWidget *imagersWidget;
 
77
        Ui_ObserversWidget *observersWidget;
 
78
        Ui_OcularsWidget *ocularsWidget;
 
79
        Ui_OpticsWidget *opticsWidget;
 
80
        Ui_SitesWidget *sitesWidget;
 
81
        
 
82
        QMap<QString, QSqlTableModel *> tableModels;
 
83
        QMap<QString, QWidget *> widgets;
 
84
        
 
85
        // Selections
 
86
        int selectedBarlowRow;
 
87
        int selectedFilterRow;
 
88
        int selectedImagerRow;
 
89
        int selectedObserverRow;
 
90
        int selectedOcularRow;
 
91
        int selectedOpticRow;
 
92
        int selectedSiteRow;
 
93
};
 
94
 
 
95
#endif // _LOGBOOKCONFIGDIALOG_HPP_