Garmin Fleet Management Controller
2.19.0
|
Dialog allowing the user to change speed limit alerts settings. More...
#include <CSpeedLimitAlertsDlg.h>
Public Member Functions | |
CSpeedLimitAlertsDlg (CWnd *aParent, FmiApplicationLayer &aCom) | |
Constructor. More... | |
virtual | ~CSpeedLimitAlertsDlg () |
Destructor. More... | |
void | onEvent (EventId aEventId, uint32 aEventData, void *aEventDataPtr, BOOL handleNow) |
Handles event callbacks by translating an EventId into a windows message. More... | |
Private Member Functions | |
virtual void | DoDataExchange (CDataExchange *aDataExchange) |
Perform dialog data exchange and validation. More... | |
void | EnableFields (bool aValue) |
Enable/Disable dialog fields. More... | |
afx_msg void | OnBnClickedSend () |
Click handler for the Send button. More... | |
afx_msg void | OnCbnSelchangeSpeedLimitCboMode () |
Selection changed handler for the Mode combo box. More... | |
afx_msg LRESULT | OnEventSpeedLimitSetResultFromClient (WPARAM aResultCode, LPARAM) |
Handler for the receipt event from Com. More... | |
BOOL | OnInitDialog () |
Initialize the dialog. More... | |
void | SetResult (uint8 aResultCode) |
Set REsult text on the dialog. More... | |
Private Attributes | |
boolean | mAlertUser |
Selection value of the alert user combo box. More... | |
FmiApplicationLayer & | mCom |
Reference to the FMI communication controller that this dialog uses. More... | |
uint8 | mMode |
Selection of the mode combo box. More... | |
float | mThreshold |
Value of the threshold edit box. More... | |
uint8 | mTimeOver |
Value of the time over edit box. More... | |
uint8 | mTimeUnder |
Value of the time under edit box. More... | |
Dialog allowing the user to change speed limit alerts settings.
Definition at line 21 of file CSpeedLimitAlertsDlg.h.
CSpeedLimitAlertsDlg::CSpeedLimitAlertsDlg | ( | CWnd * | aParent, |
FmiApplicationLayer & | aCom | ||
) |
Constructor.
aParent | The parent of this dialog |
aCom | Reference to the FMI communication controller |
Definition at line 27 of file CSpeedLimitAlertsDlg.cpp.
|
virtual |
|
privatevirtual |
Perform dialog data exchange and validation.
pDX | The DDX context |
Definition at line 53 of file CSpeedLimitAlertsDlg.cpp.
References EnableFields(), IDC_SPEED_LIMIT_CBO_ALERT_USER, IDC_SPEED_LIMIT_CBO_MODE, IDC_SPEED_LIMIT_EDIT_THRESHOLD, IDC_SPEED_LIMIT_EDIT_TIME_OVER, IDC_SPEED_LIMIT_EDIT_TIME_UNDER, mAlertUser, mMode, mThreshold, mTimeOver, and mTimeUnder.
Referenced by ~CSpeedLimitAlertsDlg().
|
private |
Enable/Disable dialog fields.
aValue | Enable state |
Definition at line 94 of file CSpeedLimitAlertsDlg.cpp.
References IDC_SPEED_LIMIT_CBO_ALERT_USER, IDC_SPEED_LIMIT_EDIT_THRESHOLD, IDC_SPEED_LIMIT_EDIT_TIME_OVER, and IDC_SPEED_LIMIT_EDIT_TIME_UNDER.
Referenced by DoDataExchange(), and OnCbnSelchangeSpeedLimitCboMode().
|
private |
Click handler for the Send button.
Send speed limit alerts setup packet
Definition at line 108 of file CSpeedLimitAlertsDlg.cpp.
References mAlertUser, mCom, mMode, mThreshold, mTimeOver, mTimeUnder, and FmiApplicationLayer::sendSetSpeedLimitAlerts().
|
private |
Selection changed handler for the Mode combo box.
Enables/Disables appropriate fields
Definition at line 120 of file CSpeedLimitAlertsDlg.cpp.
References EnableFields(), FALSE, mMode, OnEventSpeedLimitSetResultFromClient(), SPEED_LIMIT_MODE_CAR, SPEED_LIMIT_MODE_OFF, SPEED_LIMIT_MODE_TRUCK, and TRUE.
|
virtualinherited |
Handles event callbacks by translating an EventId into a windows message.
Casts this to a CWnd then posts a Windows message to it. The use of dynamic_cast is used as an alternative to the "dreaded diamond" caused by C++ multiple inheritance.
aEventId | The event ID |
aEventData | The event data |
aEventDataPtr | Pointer to more event data |
Implements EventListener.
Definition at line 29 of file CWndEventListener.cpp.
References EVENT_ID_CNT, and WM_EVENT.
|
private |
Handler for the receipt event from Com.
Display result code
aResultCode | The result code from the client. |
Definition at line 146 of file CSpeedLimitAlertsDlg.cpp.
References SetResult().
Referenced by OnCbnSelchangeSpeedLimitCboMode().
|
private |
Initialize the dialog.
This function is called when the window is created.
Definition at line 161 of file CSpeedLimitAlertsDlg.cpp.
References IDC_SPEED_LIMIT_CBO_ALERT_USER, IDC_SPEED_LIMIT_CBO_MODE, SetResult(), and TRUE.
|
private |
Set REsult text on the dialog.
Display result code
aResultCode | The result code from the client. |
Definition at line 177 of file CSpeedLimitAlertsDlg.cpp.
References IDC_SPEED_LIMIT_EDIT_RESULT, SPEED_LIMIT_RESULT_ERROR, SPEED_LIMIT_RESULT_MODE_UNSUPPORTED, and SPEED_LIMIT_RESULT_SUCCESS.
Referenced by OnEventSpeedLimitSetResultFromClient(), and OnInitDialog().
|
private |
Selection value of the alert user combo box.
Definition at line 76 of file CSpeedLimitAlertsDlg.h.
Referenced by DoDataExchange(), and OnBnClickedSend().
|
private |
Reference to the FMI communication controller that this dialog uses.
Definition at line 64 of file CSpeedLimitAlertsDlg.h.
Referenced by OnBnClickedSend().
|
private |
Selection of the mode combo box.
Definition at line 67 of file CSpeedLimitAlertsDlg.h.
Referenced by DoDataExchange(), OnBnClickedSend(), and OnCbnSelchangeSpeedLimitCboMode().
|
private |
Value of the threshold edit box.
Definition at line 79 of file CSpeedLimitAlertsDlg.h.
Referenced by DoDataExchange(), and OnBnClickedSend().
|
private |
Value of the time over edit box.
Definition at line 70 of file CSpeedLimitAlertsDlg.h.
Referenced by DoDataExchange(), and OnBnClickedSend().
|
private |
Value of the time under edit box.
Definition at line 73 of file CSpeedLimitAlertsDlg.h.
Referenced by DoDataExchange(), and OnBnClickedSend().