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 const QString getSelectedText(void);
00046
00047 private:
00048 StelObject::InfoStringGroup infoTextFilters;
00049 };
00050
00052 class SkyGui: public QGraphicsWidget
00053 {
00054 Q_OBJECT
00055
00056 public:
00057 friend class StelGui;
00058
00059 SkyGui(QGraphicsItem * parent=NULL);
00063 class QProgressBar* addProgressBar();
00064
00065 void init(class StelGui* stelGui);
00066
00067 virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget* = 0);
00068
00069 protected:
00070 virtual void resizeEvent(QGraphicsSceneResizeEvent* event);
00071 virtual void hoverMoveEvent(QGraphicsSceneHoverEvent* event);
00072
00073 private slots:
00075 void setStelStyle(const QString& style);
00076
00078 void updateBarsPos();
00079
00080 private:
00081 class StelBarsPath* buttonBarPath;
00082 QTimeLine* animLeftBarTimeLine;
00083 QTimeLine* animBottomBarTimeLine;
00084 int lastButtonbarWidth;
00085 class LeftStelBar* winBar;
00086 BottomStelBar* buttonBar;
00087 class InfoPanel* infoPanel;
00088 class StelProgressBarMgr* progressBarMgr;
00089
00090
00091 StelButton* btHorizAutoHide;
00092 StelButton* btVertAutoHide;
00093
00094 class CornerButtons* autoHidebts;
00095
00096 bool autoHideHorizontalButtonBar;
00097 bool autoHideVerticalButtonBar;
00098
00099 StelGui* stelGui;
00100 };
00101
00102 #endif // _SKYGUI_HPP_