#ifndef GEOINDICATORGENERATOR_H #define GEOINDICATORGENERATOR_H #include #include #include class GeoIndicatorGenerator { public: explicit GeoIndicatorGenerator(); ~GeoIndicatorGenerator(); /*Give scene items attr: Geo name scene */ /* 符号库名称 符号名称 *QPainter 绘制区域qrectf 是否绘制单行 是否横向拉伸 是否平躺 一厘米对应的像素个数 背景色 */ float seleGeo(QString, QString, QPainter*, QRectF rect, bool, bool, bool, float, QColor); private: bool initGeoInf(QString, int); float * getWH(QXmlStreamReader*); void calcLNum(float*, QRectF, int* p, bool); bool FindGeoName(QString, QXmlStreamReader*); std::map libMap; //符号库映射 std::map nameMap; //符号名称映射 std::map lineType; //分隔线映射 std::map SymbolType; //纵向拉伸映射 std::map reverseType; //反向绘制映射 std::map fillType; //填充绘制映射 std::map ifGeoHeight; //是否使用标准符号高度 void PolylinePainter( QXmlStreamReader*, QPainter*, int*, float*, bool, bool, bool); void LinePainter( QXmlStreamReader*, QPainter*, int*, float*, bool, bool, bool); void CirclePainter( QXmlStreamReader*, QPainter*, int*, float*, bool, bool, bool); void TextPainter( QXmlStreamReader*, QPainter*, int*, float*, bool, bool, bool); void ArcPainter( QXmlStreamReader*, QPainter*, int*, float*, bool, bool, bool); void PolygonPainter( QXmlStreamReader*, QPainter*, int*, float*, bool, bool, bool); private: QString lines[3]; //xml文本信息 QString tempLine; //缓存近期xml信息 QRectF m_Rect; float mm; //毫米对应像素量 QStringList libStr; float h_strechRate; //纵向拉伸比例 //QXmlStreamReader *reader; }; #endif