Stellarium 0.14.3
ManualImportWindow.hpp
1 /*
2  * Solar System editor plug-in for Stellarium
3  *
4  * Copyright (C) 2010 Bogdan Marinov
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
19  */
20 
21 #ifndef _MANUAL_IMPORT_WINDOW_
22 #define _MANUAL_IMPORT_WINDOW_
23 
24 #include <QObject>
25 #include "StelDialog.hpp"
26 
27 #include "SolarSystemEditor.hpp"
28 
29 #include <QColor>
30 
31 class Ui_manualImportWindow;
32 class QLineEdit;
33 
38 {
39  Q_OBJECT
40 public:
42  virtual ~ManualImportWindow();
43 
44 public slots:
45  void retranslate();
46 
47 private slots:
48  //TODO: Object type
49 
50  void selectColor();
51  void parseColorString(QString);
52 
53  void toggleCometOrbit(bool);
54  void toggleEllipticOrbit(bool);
55  void toggleObjectSpecificOrbit(bool);
56 
57  void toggleMeanMotionOrPeriod(bool);
58 
59  void selectPlanetTextureFile();
60  void selectRingTextureFile();
61  //TODO: Parse input in the line edits? (Otherwise, leave them read-only.)
62 
63 private:
64  SolarSystemEditor * ssoManager;
65 
66  QColor objectColor;
67 
68  void setColorButtonColor(QColor newColor);
69 
70  void selectTextureFile(QLineEdit * filePathLineEdit);
73  bool verifyTextureFile(QString filePath);
74  bool verifyPowerOfTwo(int value);
75 
76 protected:
77  virtual void createDialogContent();
78  Ui_manualImportWindow * ui;
79 };
80 
81 #endif //_MANUAL_IMPORT_WINDOW_
Window for manual entry of Solar System object properties.
A local copy of StelDialog, the base class for all the GUI windows in Stellarium, included to allow t...
Main class of the Solar System Editor plug-in.