#include <SettingsDlgBar.h>
Inheritance diagram for CSettingsDlgBar:
Public Types | |
IDD = IDD_DIALOG_BAR_SETTINGS | |
enum | { IDD = IDD_DIALOG_BAR_SETTINGS } |
Public Member Functions | |
CSettingsDlgBar () | |
~CSettingsDlgBar () | |
SolutionRequest & | getSolutionRequestForLocalProcesses () |
virtual BOOL | PreTranslateMessage (MSG *pMsg) |
Public Attributes | |
CComboBox | m_settingsCombo |
CButton | m_toAllRobots |
CButton | m_toSelected |
CButton | m_buttonNew |
CButton | m_buttonDel |
CButton | m_buttonRen |
CButton | m_buttonSave |
CButton | m_buttonMakeDefault |
CStatic | m_SelectedRobotsText |
CGridCtrl | m_Grid |
Protected Member Functions | |
virtual void | DoDataExchange (CDataExchange *pDX) |
virtual BOOL | OnNotify (WPARAM wParam, LPARAM lParam, LRESULT *pResult) |
virtual BOOL | OnInitDialog () |
afx_msg void | OnSize (UINT nType, int cx, int cy) |
afx_msg void | OnSelchangeSettingsCombo () |
afx_msg void | OnSettingsNew () |
afx_msg void | OnSettingsDelete () |
afx_msg void | OnSettingsRename () |
afx_msg void | OnSettingsSave () |
afx_msg void | OnSettingsMakeDefault () |
afx_msg void | OnStaCheck () |
afx_msg void | OnGridClick (NMHDR *pNotifyStruct, LRESULT *pResult) |
DECLARE_MESSAGE_MAP () | |
Private Types | |
typedef enum CSettingsDlgBar::changeMode | changeMode |
maxNumberOfSettings = 20 | |
readOnly | |
isSaved | |
isChanged | |
isNew | |
enum | { maxNumberOfSettings = 20 } |
enum | changeMode { readOnly, isSaved, isChanged, isNew } |
Private Member Functions | |
void | sendLocal () |
void | sendToRobot () |
void | initGrid () |
void | loadSettings () |
void | updateComboBox () |
void | saveSetting (int index) |
void | newSetting () |
Private Attributes | |
int | m_columnWidth |
int | m_rowHeight |
int | numberOfSettings |
changeMode | modeOfSetting [maxNumberOfSettings] |
CString | nameOfSetting [maxNumberOfSettings] |
int | currentSetting |
SolutionRequest | solutionRequestRobotList [maxNumberOfSettings] |
SolutionRequest | solutionRequestLocalList [maxNumberOfSettings] |
Martin Lötzsch
Definition at line 29 of file SettingsDlgBar.h.
typedef enum CSettingsDlgBar::changeMode CSettingsDlgBar::changeMode [private] |
anonymous enum |
anonymous enum [private] |
enum CSettingsDlgBar::changeMode [private] |
CSettingsDlgBar::CSettingsDlgBar | ( | ) |
Default constructor.
Definition at line 24 of file SettingsDlgBar.cpp.
References currentSetting, and m_columnWidth.
CSettingsDlgBar::~CSettingsDlgBar | ( | ) |
Definition at line 35 of file SettingsDlgBar.cpp.
CSettingsDlgBar::DECLARE_MESSAGE_MAP | ( | ) | [protected] |
Reimplemented from CDynamicBarDlg.
void CSettingsDlgBar::DoDataExchange | ( | CDataExchange * | pDX | ) | [protected, virtual] |
Definition at line 42 of file SettingsDlgBar.cpp.
References IDC_SETTINGS_DELETE, IDC_SETTINGS_GRID, IDC_SETTINGS_MKDEFAULT, IDC_SETTINGS_NEW, IDC_SETTINGS_RENAME, IDC_SETTINGS_SAVE, IDC_SETTINGS_SETTINGS_COMBO, IDC_SETTINGS_STATIC1, IDC_SETTINGS_TOALL_COMBO, IDC_SETTINGS_TOSELECTED_COMBO, m_buttonDel, m_buttonMakeDefault, m_buttonNew, m_buttonRen, m_buttonSave, m_Grid, m_SelectedRobotsText, m_settingsCombo, m_toAllRobots, and m_toSelected.
SolutionRequest & CSettingsDlgBar::getSolutionRequestForLocalProcesses | ( | ) |
returns the currently selected solution request for the local processes
Definition at line 37 of file SettingsDlgBar.cpp.
References currentSetting, and solutionRequestLocalList.
void CSettingsDlgBar::initGrid | ( | ) | [private] |
Definition at line 222 of file SettingsDlgBar.cpp.
References _GV_ITEM::col, _GV_ITEM::crFgClr, currentSetting, SolutionRequest::disabled, FALSE, CGridCtrl::GetCell(), SolutionRequest::getDefaultSolution(), SolutionRequest::getModuleName(), SolutionRequest::getModuleSolutionName(), SolutionRequest::getNumOfSolutions(), CGridCtrl::GetRowCount(), GVIF_FGCLR, GVIF_TEXT, GVIS_READONLY, m_Grid, _GV_ITEM::mask, _GV_ITEM::nState, SolutionRequest::numOfModules, _GV_ITEM::row, CGridCtrl::SetCellType(), CGridCtrl::SetColumnCount(), CGridCtrl::SetFixedColumnCount(), CGridCtrl::SetFixedRowCount(), CGridCtrl::SetItem(), CGridCellCombo::SetOptions(), CGridCtrl::SetRowCount(), CGridCellBase::SetState(), solutionRequestLocalList, solutionRequestRobotList, and _GV_ITEM::strText.
Referenced by OnSelchangeSettingsCombo(), and OnSettingsRename().
void CSettingsDlgBar::loadSettings | ( | ) | [private] |
Definition at line 446 of file SettingsDlgBar.cpp.
References currentSetting, InFile::exists(), OutMessage::finishMessage(), File::getGTDir(), getQueues(), idText, isSaved, maxNumberOfSettings, modeOfSetting, nameOfSetting, numberOfSettings, MessageQueue::out, readOnly, saveSetting(), SolutionRequest::setDefaultSolutions(), solutionRequestLocalList, solutionRequestRobotList, OutMessage::text, and CRobotControlQueues::toGUI.
void CSettingsDlgBar::newSetting | ( | ) | [private] |
Definition at line 542 of file SettingsDlgBar.cpp.
References currentSetting, isNew, maxNumberOfSettings, modeOfSetting, nameOfSetting, numberOfSettings, solutionRequestLocalList, solutionRequestRobotList, and updateComboBox().
Referenced by OnNotify(), and OnSettingsNew().
void CSettingsDlgBar::OnGridClick | ( | NMHDR * | pNotifyStruct, | |
LRESULT * | pResult | |||
) | [protected] |
BOOL CSettingsDlgBar::OnInitDialog | ( | ) | [protected, virtual] |
Reimplemented from CDynamicDialog.
Definition at line 77 of file SettingsDlgBar.cpp.
References FALSE, IDB_CREATENEW, IDB_DELETE, IDB_FILESAVE, IDB_RENAME, CDynamicDialog::OnInitDialog(), and TRUE.
BOOL CSettingsDlgBar::OnNotify | ( | WPARAM | wParam, | |
LPARAM | lParam, | |||
LRESULT * | pResult | |||
) | [protected, virtual] |
Definition at line 347 of file SettingsDlgBar.cpp.
References _GV_ITEM::col, currentSetting, CGridCtrl::GetCell(), SolutionRequest::getDefaultSolution(), SolutionRequest::getModuleSolutionName(), SolutionRequest::getNumOfSolutions(), CGridCellBase::GetText(), GVN_COLUMNCLICK, GVN_ENDLABELEDIT, GVN_SELCHANGED, GVN_SELCHANGING, tagGV_DISPINFO::hdr, isChanged, isSaved, tagGV_DISPINFO::item, m_Grid, maxNumberOfSettings, modeOfSetting, newSetting(), numberOfSettings, readOnly, _GV_ITEM::row, sendLocal(), sendToRobot(), CGridCell::SetText(), CGridCell::SetTextClr(), solutionRequestLocalList, solutionRequestRobotList, SolutionRequest::solutions, and updateComboBox().
void CSettingsDlgBar::OnSelchangeSettingsCombo | ( | ) | [protected] |
Definition at line 527 of file SettingsDlgBar.cpp.
References currentSetting, initGrid(), m_Grid, m_settingsCombo, sendLocal(), and sendToRobot().
Referenced by OnSettingsDelete().
void CSettingsDlgBar::OnSettingsDelete | ( | ) | [protected] |
Definition at line 653 of file SettingsDlgBar.cpp.
References currentSetting, File::getGTDir(), isNew, m_settingsCombo, modeOfSetting, nameOfSetting, numberOfSettings, OnSelchangeSettingsCombo(), readOnly, solutionRequestLocalList, and solutionRequestRobotList.
void CSettingsDlgBar::OnSettingsMakeDefault | ( | ) | [protected] |
Definition at line 748 of file SettingsDlgBar.cpp.
References currentSetting, endl(), getLocation(), and solutionRequestRobotList.
void CSettingsDlgBar::OnSettingsNew | ( | ) | [protected] |
void CSettingsDlgBar::OnSettingsRename | ( | ) | [protected] |
Definition at line 609 of file SettingsDlgBar.cpp.
References currentSetting, File::getGTDir(), initGrid(), isChanged, isNew, m_Grid, CSettingNewDialog::m_nameEdit, modeOfSetting, nameOfSetting, numberOfSettings, readOnly, and updateComboBox().
Referenced by OnSettingsNew(), and OnSettingsSave().
void CSettingsDlgBar::OnSettingsSave | ( | ) | [protected] |
Definition at line 702 of file SettingsDlgBar.cpp.
References currentSetting, isChanged, isNew, modeOfSetting, OnSettingsRename(), readOnly, and saveSetting().
void CSettingsDlgBar::OnSize | ( | UINT | nType, | |
int | cx, | |||
int | cy | |||
) | [protected] |
Reimplemented from CDynamicDialog.
Definition at line 162 of file SettingsDlgBar.cpp.
References CGridCtrl::ExpandToFit(), CGridCtrl::GetRowCount(), CDynamicWnd::IsWindow(), m_columnWidth, m_Grid, m_rowHeight, CDynamicDialog::OnSize(), CGridCtrl::SetColumnWidth(), and CGridCtrl::SetRowHeight().
void CSettingsDlgBar::OnStaCheck | ( | ) | [protected] |
BOOL CSettingsDlgBar::PreTranslateMessage | ( | MSG * | pMsg | ) | [virtual] |
void CSettingsDlgBar::saveSetting | ( | int | index | ) | [private] |
Definition at line 722 of file SettingsDlgBar.cpp.
References endl(), OutFile::exists(), isSaved, modeOfSetting, nameOfSetting, solutionRequestLocalList, solutionRequestRobotList, and updateComboBox().
Referenced by loadSettings(), and OnSettingsSave().
void CSettingsDlgBar::sendLocal | ( | ) | [private] |
Definition at line 424 of file SettingsDlgBar.cpp.
References CRobotControlQueuesToRobots::allRobots, OutMessage::bin, currentSetting, OutMessage::finishMessage(), getQueues(), idSolutionRequest, m_toAllRobots, MessageQueue::out, CRobotControlQueuesToRobots::selectedRobot, solutionRequestLocalList, and CRobotControlQueues::toSimulated.
Referenced by OnNotify(), and OnSelchangeSettingsCombo().
void CSettingsDlgBar::sendToRobot | ( | ) | [private] |
Definition at line 435 of file SettingsDlgBar.cpp.
References CRobotControlQueuesToRobots::allRobots, OutMessage::bin, currentSetting, OutMessage::finishMessage(), getQueues(), idSolutionRequest, m_toAllRobots, MessageQueue::out, CRobotControlQueuesToRobots::selectedRobot, solutionRequestRobotList, and CRobotControlQueues::toPhysical.
Referenced by OnNotify(), and OnSelchangeSettingsCombo().
void CSettingsDlgBar::updateComboBox | ( | ) | [private] |
Definition at line 507 of file SettingsDlgBar.cpp.
References currentSetting, isChanged, isNew, isSaved, m_settingsCombo, modeOfSetting, nameOfSetting, numberOfSettings, and readOnly.
Referenced by newSetting(), OnNotify(), OnSettingsRename(), and saveSetting().
int CSettingsDlgBar::currentSetting [private] |
Definition at line 104 of file SettingsDlgBar.h.
Referenced by CSettingsDlgBar(), getSolutionRequestForLocalProcesses(), initGrid(), loadSettings(), newSetting(), OnNotify(), OnSelchangeSettingsCombo(), OnSettingsDelete(), OnSettingsMakeDefault(), OnSettingsRename(), OnSettingsSave(), sendLocal(), sendToRobot(), and updateComboBox().
CButton CSettingsDlgBar::m_buttonDel |
CButton CSettingsDlgBar::m_buttonNew |
CButton CSettingsDlgBar::m_buttonRen |
CButton CSettingsDlgBar::m_buttonSave |
int CSettingsDlgBar::m_columnWidth [private] |
Definition at line 56 of file SettingsDlgBar.h.
Referenced by DoDataExchange(), initGrid(), OnNotify(), OnSelchangeSettingsCombo(), OnSettingsRename(), and OnSize().
int CSettingsDlgBar::m_rowHeight [private] |
CComboBox CSettingsDlgBar::m_settingsCombo |
Definition at line 46 of file SettingsDlgBar.h.
Referenced by DoDataExchange(), OnSelchangeSettingsCombo(), OnSettingsDelete(), and updateComboBox().
CButton CSettingsDlgBar::m_toAllRobots |
Definition at line 47 of file SettingsDlgBar.h.
Referenced by DoDataExchange(), OnStaCheck(), sendLocal(), and sendToRobot().
CButton CSettingsDlgBar::m_toSelected |
changeMode CSettingsDlgBar::modeOfSetting[maxNumberOfSettings] [private] |
Definition at line 101 of file SettingsDlgBar.h.
Referenced by loadSettings(), newSetting(), OnNotify(), OnSettingsDelete(), OnSettingsRename(), OnSettingsSave(), saveSetting(), and updateComboBox().
CString CSettingsDlgBar::nameOfSetting[maxNumberOfSettings] [private] |
Definition at line 102 of file SettingsDlgBar.h.
Referenced by loadSettings(), newSetting(), OnSettingsDelete(), OnSettingsRename(), saveSetting(), and updateComboBox().
int CSettingsDlgBar::numberOfSettings [private] |
Definition at line 97 of file SettingsDlgBar.h.
Referenced by loadSettings(), newSetting(), OnNotify(), OnSettingsDelete(), OnSettingsRename(), and updateComboBox().
SolutionRequest CSettingsDlgBar::solutionRequestLocalList[maxNumberOfSettings] [private] |
Definition at line 106 of file SettingsDlgBar.h.
Referenced by getSolutionRequestForLocalProcesses(), initGrid(), loadSettings(), newSetting(), OnNotify(), OnSettingsDelete(), saveSetting(), and sendLocal().
SolutionRequest CSettingsDlgBar::solutionRequestRobotList[maxNumberOfSettings] [private] |
Definition at line 105 of file SettingsDlgBar.h.
Referenced by initGrid(), loadSettings(), newSetting(), OnNotify(), OnSettingsDelete(), OnSettingsMakeDefault(), saveSetting(), and sendToRobot().