Stellarium  0.16.1
RemoteSyncDialog.hpp
1 /*
2  * Stellarium Remote Sync plugin
3  * Copyright (C) 2015 Florian Schaukowitsch
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18  */
19 
20 #ifndef REMOTESYNCDIALOG_HPP_
21 #define REMOTESYNCDIALOG_HPP_
22 
23 #include <QString>
24 #include <QListWidgetItem>
25 
26 #include "StelDialog.hpp"
27 #include "StelGui.hpp"
28 #include "StelTranslator.hpp"
29 
30 class Ui_remoteSyncDialog;
31 class RemoteSync;
32 
34 {
35  Q_OBJECT
36 
37 public:
40 
41 public slots:
42  void retranslate();
43 
44 protected:
45  void createDialogContent();
46 
47 private slots:
48  void printErrorMessage(const QString error);
49  void updateState();
50  void updateIPlabel(bool running);
51 
52  void updateCheckboxesFromSyncOptions();
53  void checkboxToggled(int id, bool state);
54 
55  void addPropertiesForExclusion();
56  void removePropertiesForExclusion();
57  void populateExclusionLists();
58 
59  void setConnectionLostBehavior(int idx);
60  void setQuitBehavior(int idx);
61 private:
62  Ui_remoteSyncDialog* ui;
63  RemoteSync* rs;
64 
65  void setAboutHtml();
66  static QStringList listFromItemList(QList<QListWidgetItem*> list);
67 };
68 
69 
70 #endif /* REMOTESYNCDIALOG_HPP_ */
Main class of the RemoteSync plug-in.
Definition: RemoteSync.hpp:39
Base class for all the GUI windows in Stellarium.
Definition: StelDialog.hpp:72
Define some translation macros.
void createDialogContent()
Initialize the dialog widgets and connect the signals/slots.