hivemind 1.0.0
Loading...
Searching...
No Matches
Gui::MapViewer Class Reference

#include <map_viewer.h>

Inheritance diagram for Gui::MapViewer:
Inheritance graph
Collaboration diagram for Gui::MapViewer:
Collaboration graph

Public Slots

void DataReceived ()
 
void WaitForData ()
 
void UpdateRoutes (std::pair< CompileScenario::Scenario::RouteMap::iterator, CompileScenario::Scenario::RouteMap::iterator > routes)
 
void UpdateAgents (std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator > agents)
 
void UpdateActiveAgent (int id)
 
void UpdateTimeStamp (float timeStamp)
 

Public Member Functions

 MapViewer (QWidget *parent=nullptr)
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 

Private Member Functions

void UpdateRenderingArea ()
 
void DrawKeyframes (QPainter &painter)
 
void DrawRoutes (QPainter &painter)
 
void DrawLoader (QPainter &painter) const
 

Private Attributes

int m_StartX
 
int m_StartY
 
int m_Size
 
bool m_WaitingForData
 
QTimer * m_WaitingForDataTimer
 
QElapsedTimer m_WaitingForDataElapsedTimer
 
float m_LoaderAngle
 
int m_LoaderSize
 
float m_LoaderSpeed
 
float m_LoaderSpan
 
int m_LoaderThickness
 
std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator > m_Agents
 
std::pair< CompileScenario::Scenario::RouteMap::iterator, CompileScenario::Scenario::RouteMap::iterator > m_Routes
 
int m_ActiveAgentId
 
float m_TimeStamp
 

Detailed Description

Definition at line 16 of file map_viewer.h.

Constructor & Destructor Documentation

◆ MapViewer()

Gui::MapViewer::MapViewer ( QWidget *  parent = nullptr)
explicit

Definition at line 12 of file map_viewer.cpp.

References m_LoaderAngle, m_LoaderSpeed, m_WaitingForDataElapsedTimer, m_WaitingForDataTimer, UpdateRenderingArea(), and WaitForData().

Here is the call graph for this function:

Member Function Documentation

◆ DataReceived

void Gui::MapViewer::DataReceived ( )
slot

Definition at line 132 of file map_viewer.cpp.

References m_WaitingForData, and m_WaitingForDataTimer.

Referenced by Gui::MainWindow::ConnectSlotsAndSignals().

Here is the caller graph for this function:

◆ DrawKeyframes()

void Gui::MapViewer::DrawKeyframes ( QPainter &  painter)
private

◆ DrawLoader()

void Gui::MapViewer::DrawLoader ( QPainter &  painter) const
private

Definition at line 227 of file map_viewer.cpp.

References m_LoaderAngle, m_LoaderSize, m_LoaderSpan, m_LoaderThickness, m_Size, m_StartX, and m_StartY.

Referenced by paintEvent().

Here is the caller graph for this function:

◆ DrawRoutes()

void Gui::MapViewer::DrawRoutes ( QPainter &  painter)
private

Definition at line 175 of file map_viewer.cpp.

References Core::Agent::Color, CoordinateConverter::CoordConv::GetSize(), m_Agents, m_Routes, m_Size, m_StartX, m_StartY, CoordinateConverter::CoordConv::SymmetricToAsymmetric(), Core::CartesianCoordinate::X, and Core::CartesianCoordinate::Y.

Referenced by paintEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mousePressEvent()

void Gui::MapViewer::mousePressEvent ( QMouseEvent *  event)
overrideprotected

◆ paintEvent()

void Gui::MapViewer::paintEvent ( QPaintEvent *  event)
overrideprotected

◆ resizeEvent()

void Gui::MapViewer::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 63 of file map_viewer.cpp.

References UpdateRenderingArea().

Here is the call graph for this function:

◆ UpdateActiveAgent

void Gui::MapViewer::UpdateActiveAgent ( int  id)
inlineslot

Definition at line 36 of file map_viewer.h.

References m_ActiveAgentId.

◆ UpdateAgents

void Gui::MapViewer::UpdateAgents ( std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator >  agents)
slot

Definition at line 258 of file map_viewer.cpp.

References m_Agents.

◆ UpdateRenderingArea()

void Gui::MapViewer::UpdateRenderingArea ( )
private

Definition at line 109 of file map_viewer.cpp.

References m_Size, m_StartX, and m_StartY.

Referenced by MapViewer(), and resizeEvent().

Here is the caller graph for this function:

◆ UpdateRoutes

void Gui::MapViewer::UpdateRoutes ( std::pair< CompileScenario::Scenario::RouteMap::iterator, CompileScenario::Scenario::RouteMap::iterator >  routes)
slot

Definition at line 248 of file map_viewer.cpp.

References m_Routes.

◆ UpdateTimeStamp

void Gui::MapViewer::UpdateTimeStamp ( float  timeStamp)
inlineslot

Definition at line 42 of file map_viewer.h.

References m_TimeStamp.

◆ WaitForData

void Gui::MapViewer::WaitForData ( )
slot

Definition at line 123 of file map_viewer.cpp.

References m_WaitingForData, and m_WaitingForDataTimer.

Referenced by Gui::MainWindow::ConnectSlotsAndSignals(), and MapViewer().

Here is the caller graph for this function:

Member Data Documentation

◆ m_ActiveAgentId

int Gui::MapViewer::m_ActiveAgentId
private

Definition at line 79 of file map_viewer.h.

Referenced by mousePressEvent(), and UpdateActiveAgent().

◆ m_Agents

std::pair<std::vector<Core::Agent>::iterator, std::vector<Core::Agent>::iterator> Gui::MapViewer::m_Agents
private

Definition at line 74 of file map_viewer.h.

Referenced by DrawKeyframes(), DrawRoutes(), and UpdateAgents().

◆ m_LoaderAngle

float Gui::MapViewer::m_LoaderAngle
private

Definition at line 66 of file map_viewer.h.

Referenced by DrawLoader(), and MapViewer().

◆ m_LoaderSize

int Gui::MapViewer::m_LoaderSize
private

Definition at line 67 of file map_viewer.h.

Referenced by DrawLoader().

◆ m_LoaderSpan

float Gui::MapViewer::m_LoaderSpan
private

Definition at line 69 of file map_viewer.h.

Referenced by DrawLoader().

◆ m_LoaderSpeed

float Gui::MapViewer::m_LoaderSpeed
private

Definition at line 68 of file map_viewer.h.

Referenced by MapViewer().

◆ m_LoaderThickness

int Gui::MapViewer::m_LoaderThickness
private

Definition at line 70 of file map_viewer.h.

Referenced by DrawLoader().

◆ m_Routes

std::pair<CompileScenario::Scenario::RouteMap::iterator, CompileScenario::Scenario::RouteMap::iterator> Gui::MapViewer::m_Routes
private

Definition at line 77 of file map_viewer.h.

Referenced by DrawRoutes(), and UpdateRoutes().

◆ m_Size

int Gui::MapViewer::m_Size
private

◆ m_StartX

int Gui::MapViewer::m_StartX
private

◆ m_StartY

int Gui::MapViewer::m_StartY
private

◆ m_TimeStamp

float Gui::MapViewer::m_TimeStamp
private

Definition at line 80 of file map_viewer.h.

Referenced by mousePressEvent(), and UpdateTimeStamp().

◆ m_WaitingForData

bool Gui::MapViewer::m_WaitingForData
private

Definition at line 63 of file map_viewer.h.

Referenced by DataReceived(), paintEvent(), and WaitForData().

◆ m_WaitingForDataElapsedTimer

QElapsedTimer Gui::MapViewer::m_WaitingForDataElapsedTimer
private

Definition at line 65 of file map_viewer.h.

Referenced by MapViewer().

◆ m_WaitingForDataTimer

QTimer* Gui::MapViewer::m_WaitingForDataTimer
private

Definition at line 64 of file map_viewer.h.

Referenced by DataReceived(), MapViewer(), and WaitForData().


The documentation for this class was generated from the following files: