00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _SKYLABELMGR_HPP_
00021 #define _SKYLABELMGR_HPP_
00022
00023
00024 #include "StelFader.hpp"
00025 #include "StelModule.hpp"
00026 #include "StelObject.hpp"
00027 #include "StelObjectType.hpp"
00028 #include "VecMath.hpp"
00029
00030 #include <QVector>
00031 #include <QString>
00032
00033 class StelCore;
00034 class StelPainter;
00035
00044 class LabelMgr : public StelModule
00045 {
00046 Q_OBJECT
00047
00048 public:
00050 LabelMgr();
00051 virtual ~LabelMgr();
00052
00054
00056 virtual void init();
00057
00059 virtual void draw(StelCore* core);
00060
00062 virtual void update(double deltaTime);
00063
00065 virtual double getCallOrder(StelModuleActionName actionName) const;
00066
00067 public slots:
00082 int labelObject(const QString& text,
00083 const QString& objectName,
00084 bool visible=true,
00085 float fontSize=14,
00086 const QString& fontColor="#999999",
00087 const QString& side="E",
00088 double labelDistance=-1.0,
00089 const QString& style="TextOnly");
00090
00098 int labelScreen(const QString& text,
00099 int x,
00100 int y,
00101 bool visible=true,
00102 float fontSize=14,
00103 const QString& fontColor="#999999");
00104
00106 bool getLabelShow(int id);
00108 void setLabelShow(int id, bool show);
00110 void setLabelText(int id, const QString& newText);
00113 bool deleteLabel(int id);
00116 int deleteAllLabels(void);
00117
00118 private:
00119 QVector<class StelLabel*> allLabels;
00120 };
00121
00122 #endif // _SKYLABELMGR_HPP_