00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _STELGUI_HPP_
00021 #define _STELGUI_HPP_
00022
00023 #include "StelModule.hpp"
00024 #include "StelObject.hpp"
00025 #include "LocationDialog.hpp"
00026 #include "ViewDialog.hpp"
00027 #include "HelpDialog.hpp"
00028 #include "DateTimeDialog.hpp"
00029 #include "SearchDialog.hpp"
00030 #include "ConfigurationDialog.hpp"
00031 #ifdef ENABLE_SCRIPT_CONSOLE
00032 #include "ScriptConsole.hpp"
00033 #endif
00034 #include "StelGuiBase.hpp"
00035
00036 #include <QGraphicsTextItem>
00037
00038 class QGraphicsSceneMouseEvent;
00039 class QAction;
00040 class QTimeLine;
00041 class StelButton;
00042 class BottomStelBar;
00043 class InfoPanel;
00044
00048 class StelGui : public QObject, public StelGuiBase
00049 {
00050 Q_OBJECT
00051 public:
00052 friend class ViewDialog;
00053
00054 StelGui();
00055 virtual ~StelGui();
00056
00058
00060 virtual void init(QGraphicsWidget* topLevelGraphicsWidget, StelAppGraphicsWidget* stelAppGraphicsWidget);
00061 void update();
00062 virtual void updateI18n();
00063
00065 virtual void setStelStyle(const StelStyle& style);
00066
00068
00070 void loadStyle(const QString& fileName);
00071
00075 class QProgressBar* addProgressBar();
00076
00078 BottomStelBar* getButtonBar();
00079
00081 class LeftStelBar* getWindowsButtonBar();
00082
00084 bool getFlagShowFlipButtons() {return flagShowFlipButtons;}
00085
00087 bool getFlagShowNebulaBackgroundButton() {return flagShowNebulaBackgroundButton;}
00088
00090 bool initComplete(void) {return initDone;}
00091
00092 #ifdef ENABLE_SCRIPT_CONSOLE
00093 ScriptConsole* getScriptConsole() {return &scriptConsole;}
00094 #endif
00095
00097 virtual void forceRefreshGui();
00098
00099 virtual void setVisible(bool b);
00100
00101 virtual bool getVisible() const;
00102
00103 virtual bool isCurrentlyUsed() const;
00104
00105 virtual void setInfoTextFilters(const StelObject::InfoStringGroup& aflags);
00106 virtual const StelObject::InfoStringGroup& getInfoTextFilters() const;
00107
00108 virtual QAction* addGuiActions(const QString& actionName, const QString& text, const QString& shortCut, const QString& helpGroup, bool checkable=true, bool autoRepeat=false);
00109
00110 public slots:
00112 void setFlagShowFlipButtons(bool b);
00113
00115 void setFlagShowNebulaBackgroundButton(bool b);
00116
00118 bool getAutoHideHorizontalButtonBar() const;
00124 void setAutoHideHorizontalButtonBar(bool b);
00125
00127 bool getAutoHideVerticalButtonBar() const;
00133 void setAutoHideVerticalButtonBar(bool b);
00134
00136 void setScriptKeys(bool b);
00137 void increaseScriptSpeed();
00138 void decreaseScriptSpeed();
00139 void setRealScriptSpeed();
00140
00142 void setGuiVisible(bool);
00143
00144 private slots:
00145 void reloadStyle();
00146 void scriptStarted();
00147 void scriptStopped();
00148
00149 private:
00150 QGraphicsWidget* topLevelGraphicsWidget;
00151
00152 class SkyGui* skyGui;
00153
00154 StelButton* buttonTimeRewind;
00155 StelButton* buttonTimeRealTimeSpeed;
00156 StelButton* buttonTimeCurrent;
00157 StelButton* buttonTimeForward;
00158
00159 StelButton* buttonGotoSelectedObject;
00160
00161 LocationDialog locationDialog;
00162 HelpDialog helpDialog;
00163 DateTimeDialog dateTimeDialog;
00164 SearchDialog searchDialog;
00165 ViewDialog viewDialog;
00166 ConfigurationDialog* configurationDialog;
00167 #ifdef ENABLE_SCRIPT_CONSOLE
00168 ScriptConsole scriptConsole;
00169 #endif
00170
00171 bool flagShowFlipButtons;
00172 class StelButton* flipVert;
00173 class StelButton* flipHoriz;
00174
00175 bool flagShowNebulaBackgroundButton;
00176 class StelButton* btShowNebulaeBackground;
00177
00178 bool initDone;
00179 bool guiHidden;
00180
00181 QSizeF savedProgressBarSize;
00182 };
00183
00185 class StelStandardGuiPluginInterface : public QObject, public StelGuiPluginInterface
00186 {
00187 Q_OBJECT
00188 Q_INTERFACES(StelGuiPluginInterface)
00189 public:
00190 virtual class StelGuiBase* getStelGuiBase() const;
00191 };
00192
00193 #endif // _STELGUI_HPP_