Stellarium 0.14.3
LogBookConfigDialog.hpp
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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, 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 
41  Q_OBJECT
42 
43 public:
44  LogBookConfigDialog(QMap<QString, QSqlTableModel *> theTableModels);
45  virtual ~LogBookConfigDialog();
46  void languageChanged();
48  void styleChanged();
49  void updateStyle();
50 
51 public slots:
52  void closeWindow();
53 
54 signals:
55  void currentBarlowChanged();
56  void currentFilterChanged();
57  void currentImagerChanged();
58  void currentObserverChanged();
59  void currentOcularChanged();
60  void currentOpticChanged();
61  void currentSiteChanged();
62 
63 protected:
64 
66  virtual void createDialogContent();
67  void setupListViews();
69  void setupWidgets();
70 
71  // Widgets
72  Ui_LogBookConfigDialogForm *ui;
73  Ui_BarlowsWidget *barlowsWidget;
74  Ui_FiltersWidget *filtersWidget;
75  Ui_ImagersWidget *imagersWidget;
76  Ui_ObserversWidget *observersWidget;
77  Ui_OcularsWidget *ocularsWidget;
78  Ui_OpticsWidget *opticsWidget;
79  Ui_SitesWidget *sitesWidget;
80 
81  QMap<QString, QSqlTableModel *> tableModels;
82  QMap<QString, QWidget *> widgets;
83 
84  // Selections
85  int selectedBarlowRow;
86  int selectedFilterRow;
87  int selectedImagerRow;
88  int selectedObserverRow;
89  int selectedOcularRow;
90  int selectedOpticRow;
91  int selectedSiteRow;
92 };
93 
94 #endif // _LOGBOOKCONFIGDIALOG_HPP_
void styleChanged()
Notify that the application style changed.
void setupWidgets()
helper for createDialogContent() that handles the referenced ui widgets.
void languageChanged()
Retranslate the content of the dialog.
virtual void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.