202 lines
5.5 KiB
C++
Executable File
202 lines
5.5 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
*
|
|
* MainWindow for DDS View
|
|
*
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Common/ref_pointer.h>
|
|
#include <nglwidgets/nglmainwindow.h>
|
|
|
|
#include <Map/map.h>
|
|
#include <Map/grid.h>
|
|
#include <MapObjects/building_outline.h>
|
|
#include <MapObjects/danger_area.h>
|
|
#include <MapObjects/hit_line.h>
|
|
#include <MapObjects/area_fire.h>
|
|
#include <MapObjects/biological_agent.h>
|
|
|
|
#include <Rubberbands/rubberband_factory.h>
|
|
|
|
#include "nglsettings.h"
|
|
#include <LtsCoordTrans/lts_coord_trans.h>
|
|
|
|
namespace Ui {
|
|
class widgetMain;
|
|
}
|
|
|
|
class MainWindow : public NGLMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
~MainWindow();
|
|
void init();
|
|
|
|
private:
|
|
Ui::widgetMain* m_ui;
|
|
|
|
// map
|
|
SituationMap::Map* m_map = nullptr;
|
|
|
|
// map settings
|
|
float m_scale = 500000.0;
|
|
int m_wkid = 32632;
|
|
QPointF m_objectBasePoint = QPointF(0, 0);
|
|
// QPointF m_objectCenterPoint = QPointF(0, 0);
|
|
LtsCoordTrans::UtmCoordinate s_basePoint;
|
|
|
|
// map objects
|
|
|
|
// buildings
|
|
SituationMap::RefPointer<SituationMap::BuildingOutline> m_building;
|
|
QMap<int /*buildingId*/, SituationMap::RefPointer<SituationMap::BuildingOutline> > m_buildingMap;
|
|
|
|
//danger areas
|
|
SituationMap::RefPointer<SituationMap::DangerArea> m_dangerArea;
|
|
QMap<int /*dangerAreaId*/, SituationMap::RefPointer<SituationMap::DangerArea> > m_dangerAreaMap;
|
|
|
|
//fire areas
|
|
SituationMap::RefPointer<SituationMap::AreaFire> m_fireArea;
|
|
QMap<int /*fireAreaId*/, SituationMap::RefPointer<SituationMap::AreaFire> > m_fireAreaMap;
|
|
|
|
// B agents
|
|
SituationMap::RefPointer<SituationMap::BiologicalAgent> m_bAgent;
|
|
QMap<int /*bAgentId*/, SituationMap::RefPointer<SituationMap::BiologicalAgent> > m_bAgentMap;
|
|
|
|
// Fire line
|
|
SituationMap::RefPointer<SituationMap::HitLine> m_hitLine;
|
|
QMap<int /*hitLineId*/, SituationMap::RefPointer<SituationMap::HitLine> > m_hitLineMap;
|
|
|
|
//settings
|
|
bool m_visibility = true;
|
|
bool m_visibilityTechn = true;
|
|
bool m_visibilityTact = true;
|
|
|
|
void setVersionView();
|
|
|
|
//timer for update buildings
|
|
QTimer* m_timer;
|
|
|
|
SituationMap::LOGGER_T m_logger;
|
|
|
|
private slots:
|
|
void onClose();
|
|
|
|
// map
|
|
void createMap();
|
|
void destroyMap();
|
|
void onMapReady();
|
|
void onExtentChanged();
|
|
void onMapObjectClicked( const SituationMap::Map::RefPointerMapObjectList &mapObjList );
|
|
void updateMapObjects();
|
|
void clearMapObjects();
|
|
|
|
// buildings
|
|
void createBuildings();
|
|
void createBuilding(int objId);
|
|
void removeBuildings();
|
|
void removeBuilding(int objId);
|
|
void onBuildingUpdate(int objId);
|
|
void hideBuildings();
|
|
void hideBuilding(int objId);
|
|
|
|
//danger areas
|
|
void createDangerAreas();
|
|
void createDangerArea(int objId);
|
|
void removeDangerAreas();
|
|
void removeDangerArea(int objId);
|
|
void onDangerAreaUpdate(int objId);
|
|
void hideDangerAreas();
|
|
void hideDangerArea(int objId);
|
|
|
|
//fire areas
|
|
void createFireAreas();
|
|
void createFireArea(int objId);
|
|
void removeFireAreas();
|
|
void removeFireArea(int objId);
|
|
void onFireAreaUpdate(int objId);
|
|
void hideFireAreas();
|
|
void hideFireArea(int objId);
|
|
|
|
// b agents
|
|
void createBAgents();
|
|
void createBAgent(int objId);
|
|
void removeBAgents();
|
|
void removeBAgent(int objId);
|
|
void onBAgentUpdate(int objId);
|
|
void hideBAgents();
|
|
void hideBAgent(int objId);
|
|
|
|
// fire lines
|
|
void createHitLines();
|
|
void createHitLine(int objId);
|
|
void removeHitLines();
|
|
void removeHitLine(int objId);
|
|
void onHitLineUpdate(int objId);
|
|
void hideHitLines();
|
|
void hideHitLine(int objId);
|
|
|
|
// rubberbands
|
|
void rubberbandPointCluster();
|
|
void rubberbandMultiPoint();
|
|
void rubberbandRectangle();
|
|
void rubberbandSquare();
|
|
void rubberbandEllipse();
|
|
void rubberbandArrow();
|
|
void rubberbandCorridorBoundary();
|
|
void rubberbandCorridorCenterline();
|
|
void rubberbandFilledMultiPoint();
|
|
void rubberbandSmoothLine();
|
|
void rubberbandFilledSmoothLine();
|
|
|
|
void rubberbandCreateRectangle(int objId, int noPoints, bool isSquare);
|
|
void rubberbandCreateRectangles();
|
|
void rubberbandCreateSquares();
|
|
|
|
void rubberbandCreateEllipse(int objId, int noPoints);
|
|
void rubberbandCreateEllipses();
|
|
|
|
void rubberbandCreatePointClusters();
|
|
void rubberbandCreatePointCluster(int objId, int noPoints);
|
|
|
|
void rubberbandCreateMultiPoints();
|
|
void rubberbandCreateMultiPoint(int objId, int noPoints, bool filled = false);
|
|
|
|
void rubberbandCreateFilledMultiPoints();
|
|
|
|
void rubberbandCreateSmoothLines();
|
|
void rubberbandCreateSmoothLine(int objId, int noPoints, bool filled = false);
|
|
|
|
void rubberbandCreateFilledSmoothLines();
|
|
|
|
void rubberbandCreateCorridorBoundaries();
|
|
void rubberbandCreateCorridor(int objId, int noPoints, bool bound = false);
|
|
|
|
void rubberbandCreateCorridorCenterlines();
|
|
|
|
void rubberbandCreateArrows();
|
|
void rubberbandCreateArrow(int objId, int noPoints);
|
|
|
|
// void onRubberbandApply( SituationMap::RB::Rubberband * rubberband);
|
|
void onRubberbandAbort( SituationMap::RB::RubberbandBase * rubberband);
|
|
|
|
void onRubberbandPointClusterApply(SituationMap::RB::RubberbandBase *rubberband);
|
|
void onRubberbandMultiPointApply( SituationMap::RB::RubberbandBase *rubberband);
|
|
void onRubberbandRectangleApply( SituationMap::RB::RubberbandBase *rubberband);
|
|
void onRubberbandEllipseApply( SituationMap::RB::RubberbandBase *rubberband);
|
|
void onRubberbandSmoothLineApply( SituationMap::RB::RubberbandBase *rubberband);
|
|
void onRubberbandArrowApply( SituationMap::RB::RubberbandBase *rubberband);
|
|
void onRubberbandCorridorApply(SituationMap::RB::RubberbandBase *rubberband);
|
|
|
|
void endRubberband( SituationMap::RB::RubberbandBase *rubberband);
|
|
|
|
};
|
|
|