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

#include <agent_controls.h>

Inheritance diagram for Gui::AgentControls:
Inheritance graph
Collaboration diagram for Gui::AgentControls:
Collaboration graph

Public Slots

void UpdateAgents (std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator >)
 
void SetActiveAgentIndex (int index)
 
void SyncColor ()
 

Signals

void AddAgent ()
 
void AgentChanged (std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator >)
 
void ActiveAgentChanged (int)
 

Public Member Functions

 AgentControls (QWidget *parent=nullptr)
 

Private Slots

void SetAgentColor (QColor color)
 

Private Attributes

QGridLayout * m_Layout
 
QComboBox * m_ActiveAgentComboBox
 
ColorBoxm_ActiveAgentColorBox
 
QPushButton * m_NewAgentButton
 
int m_ActiveAgentIndex
 
std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator > m_Agents
 

Detailed Description

Definition at line 14 of file agent_controls.h.

Constructor & Destructor Documentation

◆ AgentControls()

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

Definition at line 8 of file agent_controls.cpp.

References AddAgent(), m_ActiveAgentColorBox, m_ActiveAgentComboBox, m_Layout, m_NewAgentButton, SetActiveAgentIndex(), and SetAgentColor().

Here is the call graph for this function:

Member Function Documentation

◆ ActiveAgentChanged

void Gui::AgentControls::ActiveAgentChanged ( int  )
signal

Referenced by SetActiveAgentIndex(), and UpdateAgents().

Here is the caller graph for this function:

◆ AddAgent

void Gui::AgentControls::AddAgent ( )
signal

Referenced by AgentControls().

Here is the caller graph for this function:

◆ AgentChanged

void Gui::AgentControls::AgentChanged ( std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator >  )
signal

Referenced by SetAgentColor(), and UpdateAgents().

Here is the caller graph for this function:

◆ SetActiveAgentIndex

void Gui::AgentControls::SetActiveAgentIndex ( int  index)
slot

Definition at line 88 of file agent_controls.cpp.

References ActiveAgentChanged(), Core::Agent::Color, m_ActiveAgentColorBox, m_ActiveAgentIndex, m_Agents, and Gui::ColorBox::UpdateColor().

Referenced by AgentControls().

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

◆ SetAgentColor

void Gui::AgentControls::SetAgentColor ( QColor  color)
privateslot

Definition at line 54 of file agent_controls.cpp.

References AgentChanged(), Core::Agent::Color, and m_Agents.

Referenced by AgentControls().

Here is the caller graph for this function:

◆ SyncColor

void Gui::AgentControls::SyncColor ( )
slot

Definition at line 108 of file agent_controls.cpp.

References Core::Agent::Color, m_ActiveAgentColorBox, m_Agents, and Gui::ColorBox::UpdateColor().

Here is the call graph for this function:

◆ UpdateAgents

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

Member Data Documentation

◆ m_ActiveAgentColorBox

ColorBox* Gui::AgentControls::m_ActiveAgentColorBox
private

Definition at line 39 of file agent_controls.h.

Referenced by AgentControls(), SetActiveAgentIndex(), SyncColor(), and UpdateAgents().

◆ m_ActiveAgentComboBox

QComboBox* Gui::AgentControls::m_ActiveAgentComboBox
private

Definition at line 38 of file agent_controls.h.

Referenced by AgentControls(), and UpdateAgents().

◆ m_ActiveAgentIndex

int Gui::AgentControls::m_ActiveAgentIndex
private

Definition at line 42 of file agent_controls.h.

Referenced by SetActiveAgentIndex(), and UpdateAgents().

◆ m_Agents

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

Definition at line 46 of file agent_controls.h.

Referenced by SetActiveAgentIndex(), SetAgentColor(), SyncColor(), and UpdateAgents().

◆ m_Layout

QGridLayout* Gui::AgentControls::m_Layout
private

Definition at line 36 of file agent_controls.h.

Referenced by AgentControls().

◆ m_NewAgentButton

QPushButton* Gui::AgentControls::m_NewAgentButton
private

Definition at line 40 of file agent_controls.h.

Referenced by AgentControls().


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