#include <WLANToolBar.h>
Inheritance diagram for CWLANToolBar:
Public Member Functions | |
CWLANToolBar () | |
~CWLANToolBar () | |
virtual void | Init () |
void | changeConfiguration () |
void | OnSelect (bool red, int number) |
void | OnConnectAll (bool connect) |
void | OnAdd () |
void | OnEdit () |
void | OnDelete () |
void | OnDeploy () |
virtual void | updateUI (CCmdUI *pCmdUI) |
virtual bool | handleCommand (UINT command) |
virtual bool | handleSelChange (UINT nID) |
Protected Member Functions | |
void | WriteConfigs (int index=-1) |
void | ReadConfigs () |
void | setImages () |
virtual bool | HasButtonText (UINT nID) |
Protected Attributes | |
int | numOfConfigs |
CRobotControlWLANConfiguration | wlanConfig [wlanToolBarMaxNumOfConfigs] |
CComboBox | m_wndWLANCombo |
Private Member Functions | |
DECLARE_DYNAMIC (CWLANToolBar) |
Definition at line 27 of file WLANToolBar.h.
CWLANToolBar::CWLANToolBar | ( | ) |
the constructor.
Definition at line 29 of file WLANToolBar.cpp.
CWLANToolBar::~CWLANToolBar | ( | ) |
the destructor.
Definition at line 33 of file WLANToolBar.cpp.
void CWLANToolBar::changeConfiguration | ( | ) |
change the current wlan configuration
Definition at line 250 of file WLANToolBar.cpp.
References m_wndWLANCombo, and setImages().
Referenced by handleSelChange(), Init(), OnAdd(), OnDelete(), and OnEdit().
CWLANToolBar::DECLARE_DYNAMIC | ( | CWLANToolBar | ) | [private] |
bool CWLANToolBar::handleCommand | ( | UINT | command | ) | [virtual] |
Handles control notifications which arrived in the main frame
command | The id of the control, menu, accelerator etc. |
Reimplemented from CRobotControlToolBar.
Definition at line 83 of file WLANToolBar.cpp.
References IDC_WLAN_ADD, IDC_WLAN_BLUE1, IDC_WLAN_BLUE2, IDC_WLAN_BLUE3, IDC_WLAN_BLUE4, IDC_WLAN_CONNECT, IDC_WLAN_DELETE, IDC_WLAN_DEPLOY, IDC_WLAN_DISCONNECT, IDC_WLAN_EDIT, IDC_WLAN_RED1, IDC_WLAN_RED2, IDC_WLAN_RED3, IDC_WLAN_RED4, OnAdd(), OnConnectAll(), OnDelete(), OnDeploy(), OnEdit(), and OnSelect().
bool CWLANToolBar::handleSelChange | ( | UINT | nID | ) | [virtual] |
Handles selection change events for combo boxes. That function must be called from the main frame window for all combo boxes of the toolbar.
nID | the command id of the combo box |
Reimplemented from CRobotControlToolBar.
Definition at line 134 of file WLANToolBar.cpp.
References changeConfiguration(), and IDC_WLAN_COMBO.
bool CWLANToolBar::HasButtonText | ( | UINT | nID | ) | [protected, virtual] |
Determines if the buttons have a text
Reimplemented from CRobotControlToolBar.
Definition at line 69 of file WLANToolBar.cpp.
References IDC_WLAN_CONNECT, IDC_WLAN_DEPLOY, IDC_WLAN_DISCONNECT, and IDC_WLAN_EDIT.
void CWLANToolBar::Init | ( | ) | [virtual] |
the initialisation.
Implements CRobotControlToolBar.
Definition at line 37 of file WLANToolBar.cpp.
References CToolBarEx::AddCombo(), changeConfiguration(), IDB_WLAN, IDB_WLAN_COLD, IDC_WLAN_ADD, IDC_WLAN_BLUE1, IDC_WLAN_BLUE2, IDC_WLAN_BLUE3, IDC_WLAN_BLUE4, IDC_WLAN_COMBO, IDC_WLAN_CONNECT, IDC_WLAN_DELETE, IDC_WLAN_DEPLOY, IDC_WLAN_DISCONNECT, IDC_WLAN_EDIT, IDC_WLAN_RED1, IDC_WLAN_RED2, IDC_WLAN_RED3, IDC_WLAN_RED4, m_wndWLANCombo, ReadConfigs(), CToolBarEx::SetBitmaps(), and CToolBarEx::SetButtons().
void CWLANToolBar::OnAdd | ( | ) |
add a new wlan configuration
Definition at line 233 of file WLANToolBar.cpp.
References changeConfiguration(), m_wndWLANCombo, numOfConfigs, CWLANConfigurationDialog::setWLANConfiguration(), wlanConfig, wlanToolBarMaxNumOfConfigs, and WriteConfigs().
Referenced by handleCommand().
void CWLANToolBar::OnConnectAll | ( | bool | connect | ) |
Connect or disconnect to all robots
connect | if true connect, if false disconnect |
Definition at line 219 of file WLANToolBar.cpp.
References CRobotControlPhysicalRobots::connect(), CRobotControlPhysicalRobots::disconnect(), getPhysicalRobots(), m_wndWLANCombo, and wlanConfig.
Referenced by handleCommand().
void CWLANToolBar::OnDelete | ( | ) |
delete the current wlan configuration
Definition at line 276 of file WLANToolBar.cpp.
References changeConfiguration(), m_wndWLANCombo, numOfConfigs, wlanConfig, and WriteConfigs().
Referenced by handleCommand().
void CWLANToolBar::OnDeploy | ( | ) |
start the software deployment tool
Definition at line 300 of file WLANToolBar.cpp.
References getQueues(), m_wndWLANCombo, MessageQueue::out, CWLANDeployDialog::setWLANConfiguration(), OutMessage::text, CRobotControlQueues::toGUI, and wlanConfig.
Referenced by handleCommand().
void CWLANToolBar::OnEdit | ( | ) |
edit the current wlan configuration
Definition at line 257 of file WLANToolBar.cpp.
References changeConfiguration(), m_wndWLANCombo, numOfConfigs, CWLANConfigurationDialog::setWLANConfiguration(), wlanConfig, and WriteConfigs().
Referenced by handleCommand().
void CWLANToolBar::OnSelect | ( | bool | red, | |
int | number | |||
) |
Select a connected robot fro communication
red | specifies whether to select to a red or blue robot | |
number | specifies the number of the player number (1..4) to select |
Definition at line 205 of file WLANToolBar.cpp.
References getPhysicalRobots(), CRobotControlPhysicalRobots::getSelectedRobot(), and CRobotControlPhysicalRobots::setSelectedRobot().
Referenced by handleCommand().
void CWLANToolBar::ReadConfigs | ( | ) | [protected] |
read all wlan configurations from the registry
Definition at line 314 of file WLANToolBar.cpp.
References m_wndWLANCombo, numOfConfigs, and wlanConfig.
Referenced by Init().
void CWLANToolBar::setImages | ( | ) | [protected] |
sets the toolbar images according to configuration
Definition at line 181 of file WLANToolBar.cpp.
References IDC_WLAN_BLUE1, IDC_WLAN_RED1, m_wndWLANCombo, CToolBarEx::SetImage(), and wlanConfig.
Referenced by changeConfiguration().
void CWLANToolBar::updateUI | ( | CCmdUI * | pCmdUI | ) | [virtual] |
Enables the controls in the toolbar. This function is called from the main window for all controls.
pCmdUI | An interface to the control that allows enabling/disabling, checking etc. |
Reimplemented from CRobotControlToolBar.
Definition at line 146 of file WLANToolBar.cpp.
References getPhysicalRobots(), IDC_WLAN_ADD, IDC_WLAN_BLUE1, IDC_WLAN_BLUE2, IDC_WLAN_BLUE3, IDC_WLAN_BLUE4, IDC_WLAN_COMBO, IDC_WLAN_CONNECT, IDC_WLAN_DELETE, IDC_WLAN_DISCONNECT, IDC_WLAN_EDIT, IDC_WLAN_RED1, IDC_WLAN_RED2, IDC_WLAN_RED3, IDC_WLAN_RED4, and CRobotControlPhysicalRobots::isConnected().
void CWLANToolBar::WriteConfigs | ( | int | index = -1 |
) | [protected] |
write all or single wlan configuration to the registry
Definition at line 325 of file WLANToolBar.cpp.
References CRobotControlWLANConfiguration::deleteProfile(), numOfConfigs, wlanConfig, and CRobotControlWLANConfiguration::writeToProfile().
Referenced by OnAdd(), OnDelete(), and OnEdit().
CComboBox CWLANToolBar::m_wndWLANCombo [protected] |
this combo box contains the configuration names to choose from
Definition at line 105 of file WLANToolBar.h.
Referenced by changeConfiguration(), Init(), OnAdd(), OnConnectAll(), OnDelete(), OnDeploy(), OnEdit(), ReadConfigs(), and setImages().
int CWLANToolBar::numOfConfigs [protected] |
Definition at line 99 of file WLANToolBar.h.
Referenced by OnAdd(), OnDelete(), OnEdit(), ReadConfigs(), and WriteConfigs().
the different wlan configurations to choose from
Definition at line 102 of file WLANToolBar.h.
Referenced by OnAdd(), OnConnectAll(), OnDelete(), OnDeploy(), OnEdit(), ReadConfigs(), setImages(), and WriteConfigs().