00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _SKYGUI_HPP_
00021 #define _SKYGUI_HPP_
00022
00023 #include "StelStyle.hpp"
00024 #include "StelObject.hpp"
00025
00026 #include <QDebug>
00027 #include <QGraphicsWidget>
00028
00029 class QGraphicsSceneMouseEvent;
00030 class QAction;
00031 class QGraphicsTextItem;
00032 class QTimeLine;
00033 class StelButton;
00034 class BottomStelBar;
00035
00036
00038 class InfoPanel : public QGraphicsTextItem
00039 {
00040 public:
00041 InfoPanel(QGraphicsItem* parent);
00042 void setInfoTextFilters(const StelObject::InfoStringGroup& aflags) {infoTextFilters=aflags;}
00043 const StelObject::InfoStringGroup& getInfoTextFilters(void) const {return infoTextFilters;}
00044 void setTextFromObjects(const QList<StelObjectP>&);
00045 private:
00046 StelObject::InfoStringGroup infoTextFilters;
00047 };
00048
00050 class SkyGui: public QGraphicsWidget
00051 {
00052 Q_OBJECT
00053
00054 public:
00055 friend class StelGui;
00056
00057 SkyGui();
00061 class QProgressBar* addProgressBar();
00062
00063 void init(class StelGui* stelGui);
00064
00066 void setStelStyle(const StelStyle& style);
00067
00068 virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget* = 0);
00069
00070 protected:
00071 virtual void resizeEvent(QGraphicsSceneResizeEvent* event);
00072 virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event);
00073
00074 private slots:
00076 void updateBarsPos();
00077
00078 private:
00079 class StelBarsPath* buttonBarPath;
00080 QTimeLine* animLeftBarTimeLine;
00081 QTimeLine* animBottomBarTimeLine;
00082 int lastButtonbarWidth;
00083 class LeftStelBar* winBar;
00084 BottomStelBar* buttonBar;
00085 class InfoPanel* infoPanel;
00086 class StelProgressBarMgr* progressBarMgr;
00087
00088
00089 StelButton* btHorizAutoHide;
00090 StelButton* btVertAutoHide;
00091
00092 class CornerButtons* autoHidebts;
00093
00094 bool autoHideHorizontalButtonBar;
00095 bool autoHideVerticalButtonBar;
00096
00097 StelGui* stelGui;
00098 };
00099
00100 #endif // _SKYGUI_HPP_