Operator Console
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
COperatorConsoleDlg Class Reference

The class underlying the main dialog. More...

#include <OperatorConsoleDlg.h>

Inheritance diagram for COperatorConsoleDlg:
[legend]

Public Types

enum  { IDD = IDD_OPERATORCONSOLE_DIALOG }
 
enum  { IDD = IDD_OPERATORCONSOLE_DIALOG }
 

Public Member Functions

 COperatorConsoleDlg (CWnd *pParent=NULL)
 
afx_msg void OnBnClickedRadioBlemish ()
 
afx_msg void OnBnClickedRadioSfr ()
 
afx_msg void OnBnClickedShowjson ()
 
afx_msg void OnBnClickedStart ()
 
afx_msg void OnBnClickedStop ()
 
afx_msg void OnDrawItem (int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
 
afx_msg void OnClose ()
 
afx_msg BOOL OnEraseBkgnd (CDC *pDC)
 
afx_msg void OnBnClickedSetupButton ()
 
void DrawImage (LPDRAWITEMSTRUCT info)
 
void DrawLogo (LPDRAWITEMSTRUCT info)
 
void GetLog (CString &dst)
 
void LogMessage (LPCTSTR msg, bool timestamp=true)
 
void ReInitDialog (void)
 Allows the display to be resized after the user changes the image size. More...
 
void UpdateFPS (long long ms)
 
void UpdateImage (void *buf)
 
void UpdateStatus (bool passed, LPCTSTR reason)
 
void UpdateSummary (LPCTSTR summary)
 
void UpdateQuadrants (const bool *data)
 
afx_msg void OnClickedPassFail ()
 
 COperatorConsoleDlg (CWnd *pParent=NULL)
 
afx_msg void OnBnClickedRadioBlemish ()
 
afx_msg void OnBnClickedRadioSfr ()
 
afx_msg void OnBnClickedShowjson ()
 
afx_msg void OnBnClickedStart ()
 
afx_msg void OnBnClickedStop ()
 
afx_msg void OnDrawItem (int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
 
afx_msg void OnClose ()
 
afx_msg BOOL OnEraseBkgnd (CDC *pDC)
 
afx_msg void OnBnClickedSetupButton ()
 
afx_msg void OnClickedPassFail ()
 
void DrawImage (LPDRAWITEMSTRUCT info)
 
void DrawLogo (LPDRAWITEMSTRUCT info)
 
void GetLog (CString &dst)
 
void LogMessage (LPCTSTR msg, bool timestamp=true)
 
void ReInitDialog (void)
 Allows the display to be resized after the user changes the image size. More...
 
void UpdateFPS (long long ms)
 
void UpdateImage (void *buf)
 
void UpdateStatus (bool passed, LPCTSTR reason)
 
void UpdateSummary (LPCTSTR summary)
 
void UpdateQuadrants (const bool *data)
 

Public Attributes

CButton c_startButton
 
CButton c_stopButton
 
CEdit c_summary
 The summary display. More...
 
CStatic c_status
 The status display. More...
 
CEdit c_reason
 The reason display. More...
 
CEdit c_log
 The log display. More...
 
CButton c_sfrPlus
 The sfrPlus radial button. More...
 
CButton c_blemish
 The Blemish radial button. More...
 
CStaticBmp c_image
 owner-drawn control that displays an image from the acquisition source More...
 
CStatic c_logo
 
CStatic c_qsoUL
 The static text for the upper left QSO. More...
 
CStatic c_qsoUR
 The static text for the upper right QSO. More...
 
CStatic c_qsoLL
 The static text for the lower left QSO. More...
 
CStatic c_qsoLR
 The static text for the lower right QSO. More...
 
CStatic c_qsoCENTER
 The static text for the center QSO. More...
 
CStatic c_fps
 The frames-per-second display. More...
 
CButton c_showjson
 The 'show JSON' button. More...
 
CButton c_setup
 The setup button. More...
 
CButton c_pass_fail
 

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
 
void ShowStartStop (bool start, bool stop)
 
BOOL OnInitDialog ()
 
void OnOK ()
 
void OnCancel ()
 
void Quit ()
 
afx_msg HBRUSH OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor)
 
afx_msg void OnSysCommand (UINT nID, LPARAM lParam)
 
afx_msg void OnPaint ()
 
afx_msg HCURSOR OnQueryDragIcon ()
 
void CenterWindow (CWnd *wnd, int centerX, int centerY)
 move 'wnd' so its center is at the screen coordinate (centerX, centerY) More...
 
void CreateFont (CWnd *wnd, int points, CFont *newFont)
 
void MoveFPS ()
 
void PostParentMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void QsoMove ()
 
HBRUSH QsoSet (CDC *cdc, EQuadrant quadrant)
 
void QsoShow (bool show)
 
HBRUSH SetBGColor (CDC *dc, CBrush brush, COLORREF color)
 
void UpdateQuadrant (const bool *passed, EQuadrant quadrant, CWnd *control)
 
virtual void DoDataExchange (CDataExchange *pDX)
 
void ShowStartStop (bool start, bool stop)
 
BOOL OnInitDialog ()
 
void OnOK ()
 
void OnCancel ()
 
void Quit ()
 
afx_msg HBRUSH OnCtlColor (CDC *pDC, CWnd *pWnd, UINT nCtlColor)
 
afx_msg void OnSysCommand (UINT nID, LPARAM lParam)
 
afx_msg void OnPaint ()
 
afx_msg HCURSOR OnQueryDragIcon ()
 
void CenterWindow (CWnd *wnd, int centerX, int centerY)
 move 'wnd' so its center is at the screen coordinate (centerX, centerY) More...
 
void CreateFont (CWnd *wnd, int points, CFont *newFont)
 
void MoveFPS ()
 
void PostParentMessage (UINT message, WPARAM wParam=0, LPARAM lParam=0)
 
void QsoMove ()
 
HBRUSH QsoSet (CDC *cdc, EQuadrant quadrant)
 
void QsoShow (bool show)
 
HBRUSH SetBGColor (CDC *dc, CBrush brush, COLORREF color)
 
void UpdateQuadrant (const bool *passed, EQuadrant quadrant, CWnd *control)
 

Protected Attributes

HICON m_hIcon
 
CBrush m_whiteBrush
 
CBrush m_passBrush
 the brush (i.e. background color) to be used for Status item when the test has passed More...
 
CBrush m_failBrush
 the brush (i.e. background color) to be used for Status item when the test has failed More...
 
HBRUSH m_statusBrush
 handle to the brush to be used when drawing the Status item More...
 
COLORREF m_statusColor
 unused if m_statusBrush == NULL More...
 
COLORREF m_qsoColor [eNumQuadrants]
 color to use for each QSO item More...
 
CFont m_statusFont
 font to use for Status item (used to change font size for the item) More...
 
CFont m_qsoFont
 font to use for QSO (Quadrant Status Overlay) items More...
 
CImage m_logo
 Imatest logo (goes at top of info display) More...
 
CSize m_delta
 number of pixels to increase image item and dialog size More...
 
Timestamp m_timestamp
 

Detailed Description

The class underlying the main dialog.

Member Enumeration Documentation

anonymous enum
Enumerator
IDD 
Definition: OperatorConsoleDlg.h:39
#define IDD_OPERATORCONSOLE_DIALOG
Definition: resource.h:28
anonymous enum
Enumerator
IDD 
Definition: OperatorConsoleDlg.h:39
#define IDD_OPERATORCONSOLE_DIALOG
Definition: resource.h:28

Constructor & Destructor Documentation

COperatorConsoleDlg::COperatorConsoleDlg ( CWnd *  pParent = NULL)

References IDR_MAINFRAME.

91  : CDialogEx(COperatorConsoleDlg::IDD, pParent)
92 {
93  m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
94  memset(m_qsoColor, 0, sizeof(m_qsoColor));
95 }
COLORREF m_qsoColor[eNumQuadrants]
color to use for each QSO item
Definition: OperatorConsoleDlg.h:108
Definition: OperatorConsoleDlg.h:39
HICON m_hIcon
Definition: OperatorConsoleDlg.h:47
#define IDR_MAINFRAME
Definition: resource.h:30
COperatorConsoleDlg::COperatorConsoleDlg ( CWnd *  pParent = NULL)

Member Function Documentation

void COperatorConsoleDlg::CenterWindow ( CWnd *  wnd,
int  centerX,
int  centerY 
)
protected

move 'wnd' so its center is at the screen coordinate (centerX, centerY)

Referenced by QsoMove().

655 {
656  if (wnd != NULL)
657  {
658  CRect rect;
659  CPoint pos;
660 
661  wnd->GetWindowRect(&rect); // current window location in screen coordinates
662  pos = rect.CenterPoint(); // center of rect in screen coordinates
663  rect.OffsetRect(centerX - pos.x, centerY - pos.y); // move the rect so that its center is at (centerX, centerY) in screen coordinates
664  ScreenToClient(&rect); // convert to client coordinates (relative to client rect of dialog)
665  wnd->MoveWindow(&rect, TRUE); // move the window
666  }
667 }

Here is the caller graph for this function:

void COperatorConsoleDlg::CenterWindow ( CWnd *  wnd,
int  centerX,
int  centerY 
)
protected

move 'wnd' so its center is at the screen coordinate (centerX, centerY)

void COperatorConsoleDlg::CreateFont ( CWnd *  wnd,
int  points,
CFont *  newFont 
)
protected
538 {
539  CFont *font;
540  LOGFONT logFont;
541 
542  font = wnd->GetFont();
543  font->GetLogFont(&logFont);
544  logFont.lfHeight = points * 10; // lfHeight will be interpreted as 10ths of a point
545  newFont->CreatePointFontIndirect(&logFont);
546 }
void COperatorConsoleDlg::CreateFont ( CWnd *  wnd,
int  points,
CFont *  newFont 
)
protected
virtual void COperatorConsoleDlg::DoDataExchange ( CDataExchange *  pDX)
protectedvirtual
void COperatorConsoleDlg::DoDataExchange ( CDataExchange *  pDX)
protectedvirtual

References c_blemish, c_fps, c_image, c_log, c_logo, c_pass_fail, c_qsoCENTER, c_qsoLL, c_qsoLR, c_qsoUL, c_qsoUR, c_reason, c_setup, c_sfrPlus, c_showjson, c_startButton, c_status, c_stopButton, c_summary, IDC_FPS, IDC_IMAGE, IDC_LOG, IDC_LOGO, IDC_PASS_FAIL, IDC_QSO_CENTER, IDC_QSO_LL, IDC_QSO_LR, IDC_QSO_UL, IDC_QSO_UR, IDC_RADIO_BLEMISH, IDC_RADIO_SFR, IDC_REASON, IDC_SETUP_BUTTON, IDC_SHOWJSON, IDC_START, IDC_STATUS, IDC_STOP, and IDC_SUMMARY.

98 {
99  CDialogEx::DoDataExchange(pDX);
100  DDX_Control(pDX, IDC_STOP, c_stopButton);
101  DDX_Control(pDX, IDC_START, c_startButton);
102  DDX_Control(pDX, IDC_LOG, c_log);
103  DDX_Control(pDX, IDC_SUMMARY, c_summary);
104  DDX_Control(pDX, IDC_STATUS, c_status);
105  DDX_Control(pDX, IDC_REASON, c_reason);
106  DDX_Control(pDX, IDC_RADIO_SFR, c_sfrPlus);
107  DDX_Control(pDX, IDC_RADIO_BLEMISH, c_blemish);
108  DDX_Control(pDX, IDC_IMAGE, c_image);
109  DDX_Control(pDX, IDC_LOGO, c_logo);
110  DDX_Control(pDX, IDC_QSO_UL, c_qsoUL);
111  DDX_Control(pDX, IDC_QSO_UR, c_qsoUR);
112  DDX_Control(pDX, IDC_QSO_LL, c_qsoLL);
113  DDX_Control(pDX, IDC_QSO_LR, c_qsoLR);
114  DDX_Control(pDX, IDC_QSO_CENTER, c_qsoCENTER);
115  DDX_Control(pDX, IDC_FPS, c_fps);
116  DDX_Control(pDX, IDC_SHOWJSON, c_showjson);
117  DDX_Control(pDX, IDC_SETUP_BUTTON, c_setup);
118  DDX_Control(pDX, IDC_PASS_FAIL, c_pass_fail);
119 }
CButton c_setup
The setup button.
Definition: OperatorConsoleDlg.h:136
CStatic c_logo
Definition: OperatorConsoleDlg.h:128
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127
#define IDC_RADIO_BLEMISH
Definition: resource.h:44
#define IDC_STATUS
Definition: resource.h:52
CButton c_showjson
The 'show JSON' button.
Definition: OperatorConsoleDlg.h:135
CStatic c_fps
The frames-per-second display.
Definition: OperatorConsoleDlg.h:134
#define IDC_IMAGE
Definition: resource.h:42
#define IDC_REASON
Definition: resource.h:53
#define IDC_QSO_LR
Definition: resource.h:60
#define IDC_LOGO
Definition: resource.h:66
CStatic c_qsoLR
The static text for the lower right QSO.
Definition: OperatorConsoleDlg.h:132
#define IDC_SETUP_BUTTON
Definition: resource.h:49
#define IDC_PASS_FAIL
Definition: resource.h:87
#define IDC_QSO_UL
Definition: resource.h:58
CEdit c_summary
The summary display.
Definition: OperatorConsoleDlg.h:121
#define IDC_START
Definition: resource.h:50
#define IDC_FPS
Definition: resource.h:67
#define IDC_SHOWJSON
Definition: resource.h:57
#define IDC_QSO_LL
Definition: resource.h:61
CStatic c_qsoUR
The static text for the upper right QSO.
Definition: OperatorConsoleDlg.h:130
CEdit c_reason
The reason display.
Definition: OperatorConsoleDlg.h:123
CStatic c_qsoCENTER
The static text for the center QSO.
Definition: OperatorConsoleDlg.h:133
CButton c_stopButton
Definition: OperatorConsoleDlg.h:120
#define IDC_QSO_UR
Definition: resource.h:59
CButton c_pass_fail
Definition: OperatorConsoleDlg.h:140
CButton c_sfrPlus
The sfrPlus radial button.
Definition: OperatorConsoleDlg.h:125
#define IDC_SUMMARY
Definition: resource.h:47
#define IDC_STOP
Definition: resource.h:51
CEdit c_log
The log display.
Definition: OperatorConsoleDlg.h:124
#define IDC_QSO_CENTER
Definition: resource.h:63
CButton c_blemish
The Blemish radial button.
Definition: OperatorConsoleDlg.h:126
#define IDC_RADIO_SFR
Definition: resource.h:43
CStatic c_qsoLL
The static text for the lower left QSO.
Definition: OperatorConsoleDlg.h:131
CStatic c_qsoUL
The static text for the upper left QSO.
Definition: OperatorConsoleDlg.h:129
CButton c_startButton
Definition: OperatorConsoleDlg.h:119
#define IDC_LOG
Definition: resource.h:46
CStatic c_status
The status display.
Definition: OperatorConsoleDlg.h:122
void COperatorConsoleDlg::DrawImage ( LPDRAWITEMSTRUCT  info)

References c_image, and CStaticBmp::Draw().

Referenced by OnDrawItem().

569 {
570 #if 0
571  m_image.Draw(info->hDC, info->rcItem);
572 #else
573  c_image.Draw(this);
574 #endif
575 }
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127
void Draw(const CWnd *parent)
Definition: StaticBmp.cpp:66

Here is the call graph for this function:

Here is the caller graph for this function:

void COperatorConsoleDlg::DrawImage ( LPDRAWITEMSTRUCT  info)
void COperatorConsoleDlg::DrawLogo ( LPDRAWITEMSTRUCT  info)

References m_logo.

Referenced by OnDrawItem().

580 {
581  int srcWidth, srcHeight;
582  int dstWidth, dstHeight;
583 
584  srcWidth = m_logo.GetWidth();
585  srcHeight = m_logo.GetHeight();
586  dstWidth = info->rcItem.right - info->rcItem.left;
587  dstHeight = info->rcItem.bottom - info->rcItem.top;
588 
589  m_logo.SetHasAlphaChannel(false);
590  m_logo.Draw(info->hDC, info->rcItem);
591 }
CImage m_logo
Imatest logo (goes at top of info display)
Definition: OperatorConsoleDlg.h:114

Here is the caller graph for this function:

void COperatorConsoleDlg::DrawLogo ( LPDRAWITEMSTRUCT  info)
void COperatorConsoleDlg::GetLog ( CString &  dst)

References c_log.

411 {
412  if (c_log)
413  c_log.GetWindowTextA(dst);
414 }
CEdit c_log
The log display.
Definition: OperatorConsoleDlg.h:124
void COperatorConsoleDlg::GetLog ( CString &  dst)
void COperatorConsoleDlg::LogMessage ( LPCTSTR  msg,
bool  timestamp = true 
)

References c_log, Timestamp::Get(), and m_timestamp.

Referenced by COperatorConsoleApp::GetStdoutMsg(), and COperatorConsoleApp::UpdateResults().

417 {
418  if (msg && *msg)
419  {
420  int end = c_log.GetWindowTextLength();
421 
422  if (timestamp)
423  {
424  c_log.SetSel(end, end);
425  c_log.ReplaceSel(m_timestamp.Get());
426  end = c_log.GetWindowTextLength();
427  }
428 
429  c_log.SetSel(end, end);
430  c_log.ReplaceSel(msg);
431  }
432 }
Timestamp m_timestamp
Definition: OperatorConsoleDlg.h:116
const CString & Get()
Definition: Timestamp.cpp:32
CEdit c_log
The log display.
Definition: OperatorConsoleDlg.h:124

Here is the call graph for this function:

Here is the caller graph for this function:

void COperatorConsoleDlg::LogMessage ( LPCTSTR  msg,
bool  timestamp = true 
)
void COperatorConsoleDlg::MoveFPS ( )
protected

References c_fps, c_image, and MARGIN_Y.

Referenced by ReInitDialog().

625 {
626  CRect rect;
627  CPoint imageCenter, fpsCenter;
628  int dx, dy, bottom;
629 
630  // center the FPS item horizontally in the image, and inset it MARGIN_Y pixels from the bottom of the image
631 
632  //
633  // Get the center point of the image in screen coordinates
634  //
635  c_image.GetWindowRect(&rect);
636  imageCenter = rect.CenterPoint();
637 
638  bottom = rect.bottom - MARGIN_Y; // we want the bottom of the fps item to be inset MARGINY pixels from the bottom of the image
639 
640  //
641  // Get the fps item's rectangle and center point in screen coordinates
642  //
643  c_fps.GetWindowRect(&rect);
644  fpsCenter = rect.CenterPoint();
645 
646  dx = imageCenter.x - fpsCenter.x; // number of pixels in X to move fps so that it is centered at imageCenter.x
647  dy = bottom - rect.bottom; // number of pixels in Y to move fps so that its bottom is MARGIN_Y pixels from bottom of image
648  rect.OffsetRect(dx, dy); // move the rect
649 
650  ScreenToClient(&rect); // convert to client coordinates (relative to client rect of dialog)
651  c_fps.MoveWindow(&rect, TRUE); // move the window
652 }
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127
CStatic c_fps
The frames-per-second display.
Definition: OperatorConsoleDlg.h:134
#define MARGIN_Y
Definition: OperatorConsoleDlg.cpp:45

Here is the caller graph for this function:

void COperatorConsoleDlg::MoveFPS ( )
protected
void COperatorConsoleDlg::OnBnClickedRadioBlemish ( )

References MSG_SET_BLEMISH, PostParentMessage(), and QsoShow().

447 {
448  QsoShow(false); // hide the quadrant overlays (they're not used in Blemish)
449 
450  //
451  // Tell the application to start running Blemish tests
452  //
454 }
void PostParentMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: OperatorConsoleDlg.cpp:731
void QsoShow(bool show)
Definition: OperatorConsoleDlg.cpp:466
#define MSG_SET_BLEMISH
Definition: OperatorConsole.h:121

Here is the call graph for this function:

afx_msg void COperatorConsoleDlg::OnBnClickedRadioBlemish ( )
afx_msg void COperatorConsoleDlg::OnBnClickedRadioSfr ( )
void COperatorConsoleDlg::OnBnClickedRadioSfr ( )

References MSG_SET_SFRPLUS, PostParentMessage(), and QsoShow().

436 {
437  QsoShow(true); // hide the quadrant overlays (they're not used in Blemish)
438 
439  //
440  // Tell the application to start running SFRplus tests
441  //
443 }
#define MSG_SET_SFRPLUS
Definition: OperatorConsole.h:122
void PostParentMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: OperatorConsoleDlg.cpp:731
void QsoShow(bool show)
Definition: OperatorConsoleDlg.cpp:466

Here is the call graph for this function:

void COperatorConsoleDlg::OnBnClickedSetupButton ( )

References MSG_SETUP, and PostParentMessage().

903 {
904  //
905  // Tell the application to launch the setup dialog
906  //
908 }
void PostParentMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: OperatorConsoleDlg.cpp:731
#define MSG_SETUP
Definition: OperatorConsole.h:127

Here is the call graph for this function:

afx_msg void COperatorConsoleDlg::OnBnClickedSetupButton ( )
void COperatorConsoleDlg::OnBnClickedShowjson ( )

References MSG_JSON, and PostParentMessage().

727 {
729 }
#define MSG_JSON
Definition: OperatorConsole.h:123
void PostParentMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: OperatorConsoleDlg.cpp:731

Here is the call graph for this function:

afx_msg void COperatorConsoleDlg::OnBnClickedShowjson ( )
afx_msg void COperatorConsoleDlg::OnBnClickedStart ( )
void COperatorConsoleDlg::OnBnClickedStart ( )

References c_setup, eNumQuadrants, MSG_START, PostParentMessage(), ShowStartStop(), UpdateQuadrants(), and UpdateStatus().

287 {
288 #if 1
289  ShowStartStop(false, true); // hide the start button, show the stop button
291  c_setup.ShowWindow(SW_HIDE); // hide the setup button while running
292 
293 #else
294  //
295  // This is test code that checks the color and font of
296  // the Status item without running an actual test.
297  //
298  static bool pass = true;
299  UpdateStatus(pass, "");
300  pass = !pass;
301 
302  //
303  // This is test code that toggles the values of the QSO display
304  // without running an actual test
305  //
306  static bool quad[eNumQuadrants] = {true, true, true, true, true};
307  UpdateQuadrants(quad);
308  for (int i = 0; i < eNumQuadrants; i++)
309  quad[i] = !quad[i];
310 #endif
311 
312 }
CButton c_setup
The setup button.
Definition: OperatorConsoleDlg.h:136
#define MSG_START
Definition: OperatorConsole.h:116
void UpdateQuadrants(const bool *data)
Definition: OperatorConsoleDlg.cpp:364
void UpdateStatus(bool passed, LPCTSTR reason)
Definition: OperatorConsoleDlg.cpp:337
void PostParentMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: OperatorConsoleDlg.cpp:731
void ShowStartStop(bool start, bool stop)
Definition: OperatorConsoleDlg.cpp:323
Definition: qso.h:41

Here is the call graph for this function:

afx_msg void COperatorConsoleDlg::OnBnClickedStop ( )
void COperatorConsoleDlg::OnBnClickedStop ( )

References c_setup, MSG_STOP, PostParentMessage(), and ShowStartStop().

316 {
317  ShowStartStop(true, false); // hide the stop button, show the start button
319  c_setup.ShowWindow(SW_SHOW); // show the setup button once the stop button is pressed
320 }
CButton c_setup
The setup button.
Definition: OperatorConsoleDlg.h:136
void PostParentMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: OperatorConsoleDlg.cpp:731
#define MSG_STOP
Definition: OperatorConsole.h:117
void ShowStartStop(bool start, bool stop)
Definition: OperatorConsoleDlg.cpp:323

Here is the call graph for this function:

void COperatorConsoleDlg::OnCancel ( )
protected

References Quit().

677 {
678  Quit();
679  CDialogEx::OnCancel();
680 }
void Quit()
Definition: OperatorConsoleDlg.cpp:690

Here is the call graph for this function:

void COperatorConsoleDlg::OnCancel ( )
protected
afx_msg void COperatorConsoleDlg::OnClickedPassFail ( )
void COperatorConsoleDlg::OnClickedPassFail ( )

References MSG_PASS_FAIL, and PostParentMessage().

927 {
928  //
929  // Tell the application to launch the pass/fail dialog
930  //
932 }
#define MSG_PASS_FAIL
Definition: OperatorConsole.h:128
void PostParentMessage(UINT message, WPARAM wParam=0, LPARAM lParam=0)
Definition: OperatorConsoleDlg.cpp:731

Here is the call graph for this function:

void COperatorConsoleDlg::OnClose ( )

References Quit().

684 {
685  Quit();
686  CDialogEx::OnClose();
687 }
void Quit()
Definition: OperatorConsoleDlg.cpp:690

Here is the call graph for this function:

afx_msg void COperatorConsoleDlg::OnClose ( )
afx_msg HBRUSH COperatorConsoleDlg::OnCtlColor ( CDC *  pDC,
CWnd *  pWnd,
UINT  nCtlColor 
)
protected
HBRUSH COperatorConsoleDlg::OnCtlColor ( CDC *  pDC,
CWnd *  pWnd,
UINT  nCtlColor 
)
protected

References eCenter, eLowerLeft, eLowerRight, eUpperLeft, eUpperRight, IDC_FPS, IDC_LOG, IDC_QSO_CENTER, IDC_QSO_LL, IDC_QSO_LR, IDC_QSO_UL, IDC_QSO_UR, IDC_STATUS, m_statusBrush, m_statusColor, m_whiteBrush, QsoSet(), and WHITE.

479 {
480  int dialogItem;
481  HBRUSH hbr;
482 
483  //
484  // Call the base class implementation first! Otherwise, it may
485  // undo what we're trying to accomplish here.
486  //
487  hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
488 
489  dialogItem = pWnd->GetDlgCtrlID();
490 
491  switch (dialogItem)
492  {
493  case IDC_STATUS:
494  if (m_statusBrush != NULL)
495  {
496  pDC->SetBkColor(m_statusColor);
497  hbr = m_statusBrush;
498  }
499  break;
500 
501  case IDC_LOG:
502  pDC->SetBkColor(WHITE);
503  hbr = m_whiteBrush;
504  break;
505  case IDC_QSO_UL:
506  hbr = QsoSet(pDC, eUpperLeft);
507  break;
508  case IDC_QSO_UR:
509  hbr = QsoSet(pDC, eUpperRight);
510  break;
511  case IDC_QSO_LL:
512  hbr = QsoSet(pDC, eLowerLeft);
513  break;
514  case IDC_QSO_LR:
515  hbr = QsoSet(pDC, eLowerRight);
516  break;
517  case IDC_QSO_CENTER:
518  hbr = QsoSet(pDC, eCenter);
519  break;
520 
521  case IDC_FPS:
522  hbr = (HBRUSH)::GetStockObject(NULL_BRUSH); // this necessary to get transparent background
523  // pDC->SetTextColor(WHITE);
524  pDC->SetBkMode(TRANSPARENT);
525  }
526 
527 
528  return hbr;
529 }
#define WHITE
Definition: OperatorConsoleDlg.cpp:38
#define IDC_STATUS
Definition: resource.h:52
Definition: qso.h:40
#define IDC_QSO_LR
Definition: resource.h:60
CBrush m_whiteBrush
Definition: OperatorConsoleDlg.h:103
HBRUSH m_statusBrush
handle to the brush to be used when drawing the Status item
Definition: OperatorConsoleDlg.h:106
Definition: qso.h:37
#define IDC_QSO_UL
Definition: resource.h:58
#define IDC_FPS
Definition: resource.h:67
#define IDC_QSO_LL
Definition: resource.h:61
Definition: qso.h:36
#define IDC_QSO_UR
Definition: resource.h:59
HBRUSH QsoSet(CDC *cdc, EQuadrant quadrant)
Definition: OperatorConsoleDlg.cpp:456
Definition: qso.h:38
Definition: qso.h:39
#define IDC_QSO_CENTER
Definition: resource.h:63
#define IDC_LOG
Definition: resource.h:46
COLORREF m_statusColor
unused if m_statusBrush == NULL
Definition: OperatorConsoleDlg.h:107

Here is the call graph for this function:

void COperatorConsoleDlg::OnDrawItem ( int  nIDCtl,
LPDRAWITEMSTRUCT  lpDrawItemStruct 
)

References DrawImage(), DrawLogo(), IDC_IMAGE, and IDC_LOGO.

549 {
550  // TODO: Add your message handler code here and/or call default
551 
552  switch (nIDCtl)
553  {
554  case IDC_IMAGE:
555  DrawImage(lpDrawItemStruct);
556  break;
557 
558  case IDC_LOGO:
559  DrawLogo(lpDrawItemStruct);
560  break;
561 
562  default:
563  CDialogEx::OnDrawItem(nIDCtl, lpDrawItemStruct);
564  break;
565  }
566 }
void DrawLogo(LPDRAWITEMSTRUCT info)
Definition: OperatorConsoleDlg.cpp:579
void DrawImage(LPDRAWITEMSTRUCT info)
Definition: OperatorConsoleDlg.cpp:568
#define IDC_IMAGE
Definition: resource.h:42
#define IDC_LOGO
Definition: resource.h:66

Here is the call graph for this function:

afx_msg void COperatorConsoleDlg::OnDrawItem ( int  nIDCtl,
LPDRAWITEMSTRUCT  lpDrawItemStruct 
)
BOOL COperatorConsoleDlg::OnEraseBkgnd ( CDC *  pDC)

References BLACK, c_qsoCENTER, c_qsoLL, c_qsoLR, c_qsoUL, and c_qsoUR.

704 {
705  BOOL result;
706 #if 0
707  CRect rect;
708  CWnd *wnd = pDC->GetWindow();
709 
710  if ((wnd == &c_qsoUL) || (wnd == &c_qsoUR) || (wnd == &c_qsoLL) || (wnd == &c_qsoLR) || (wnd == &c_qsoCENTER))
711  {
712  wnd->GetWindowRect(&rect);
713  pDC->FillSolidRect(rect, BLACK);
714  result = 1;
715  }
716  else
717 #endif
718  {
719  result = CDialogEx::OnEraseBkgnd(pDC);
720  }
721 
722  return result;
723 }
CStatic c_qsoLR
The static text for the lower right QSO.
Definition: OperatorConsoleDlg.h:132
CStatic c_qsoUR
The static text for the upper right QSO.
Definition: OperatorConsoleDlg.h:130
CStatic c_qsoCENTER
The static text for the center QSO.
Definition: OperatorConsoleDlg.h:133
#define BLACK
Definition: OperatorConsoleDlg.cpp:39
CStatic c_qsoLL
The static text for the lower left QSO.
Definition: OperatorConsoleDlg.h:131
CStatic c_qsoUL
The static text for the upper left QSO.
Definition: OperatorConsoleDlg.h:129
afx_msg BOOL COperatorConsoleDlg::OnEraseBkgnd ( CDC *  pDC)
BOOL COperatorConsoleDlg::OnInitDialog ( )
protected
BOOL COperatorConsoleDlg::OnInitDialog ( )
protected

References FAIL_COLOR, IDM_ABOUTBOX, IDS_ABOUTBOX, IMAGE_NAME, LOGO_NAME, PASS_COLOR, QSO_SIZE, ResizeDlg::Resize(), STATUS_SIZE, theApp, and WHITE.

143 {
144  CDialogEx::OnInitDialog();
145 
146  // Add "About..." menu item to system menu.
147 
148  // IDM_ABOUTBOX must be in the system command range.
149  ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
150  ASSERT(IDM_ABOUTBOX < 0xF000);
151 
152  CMenu* pSysMenu = GetSystemMenu(FALSE);
153  if (pSysMenu != NULL)
154  {
155  BOOL bNameValid;
156  CString strAboutMenu;
157  bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
158  ASSERT(bNameValid);
159  if (!strAboutMenu.IsEmpty())
160  {
161  pSysMenu->AppendMenu(MF_SEPARATOR);
162  pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
163  }
164  }
165 
166  // Set the icon for this dialog. The framework does this automatically
167  // when the application's main window is not a dialog
168  SetIcon(m_hIcon, TRUE); // Set big icon
169  SetIcon(m_hIcon, FALSE); // Set small icon
170 
171  ShowWindow(SW_NORMAL);//SW_MAXIMIZE);
172 
173  // TODO: Add extra initialization here
174 
175  c_log.SetLimitText(0x7ffffffe);
176  c_sfrPlus.SetCheck(BST_CHECKED); // select the SFRplus radio button
177  OnBnClickedRadioSfr(); // tell the app that the button is selected (so that it knows which test to run)
178  ShowStartStop(true, false); // show the Start button and hide the Stop button
179 #if 0
180  m_image.Load(IMAGE_NAME);
181 #endif
182  m_logo.Load(LOGO_NAME);
183 
184 #if 1
185  //m_logo.SetTransparentColor(WHITE);
186  m_logo.SetHasAlphaChannel(false);
187 #endif
188 
189  // Resize(); // resize dialog to make it big enough for image item (also resizes c_image if needed)
190  ResizeDlg resize;
191  // HDK COMMENTED THESE FOR TEST
192  resize.Resize(this, &c_image, theApp.GetImageWidth(), theApp.GetImageHeight());
193  CWnd::CenterWindow(); // center the dialog on the screen
194  QsoMove();
195  MoveFPS();
196 
197  c_image.Init(); // create bitmap and drawing context-- do this after the control has been resized [i.e. after calling Resize()]
198 
199  //
200  // Create brushes to use to draw the background of the Status item.
201  // We use different colors for passed and failed tests.
202  //
203  m_passBrush.CreateSolidBrush(PASS_COLOR);
204  m_failBrush.CreateSolidBrush(FAIL_COLOR);
205 
206  //
207  // Create a brush with a sold white background. This can be used
208  // by any item that wants a white background.
209  //
210  m_whiteBrush.CreateSolidBrush(WHITE);
211 
212 
213  //
214  // Set the brush handle to NULL to indicate that we don't want to change the background color
215  // of the Status item (the color doesn't get changed until a test has been run).
216  //
217  m_statusBrush = NULL;
218  m_statusColor = 0;
219 
220  //
221  // Create fonts to use for the status and qso items. The fonts are the
222  // same as the current font except that the point size is changed.
223  //
226 
227  c_status.SetFont(&m_statusFont);
228  c_qsoUL.SetFont(&m_qsoFont);
229  c_qsoUR.SetFont(&m_qsoFont);
230  c_qsoLL.SetFont(&m_qsoFont);
231  c_qsoLR.SetFont(&m_qsoFont);
232  c_qsoCENTER.SetFont(&m_qsoFont);
233 
234  return TRUE; // return TRUE unless you set the focus to a control
235 }
void Resize(CWnd *dialog, CWnd *window, int width, int height)
Resizes an object within a parent window but does not allow the object to shrink vertically.
Definition: ResizeDlg.cpp:48
void QsoMove()
Definition: OperatorConsoleDlg.cpp:594
CFont m_qsoFont
font to use for QSO (Quadrant Status Overlay) items
Definition: OperatorConsoleDlg.h:110
#define WHITE
Definition: OperatorConsoleDlg.cpp:38
void CreateFont(CWnd *wnd, int points, CFont *newFont)
Definition: OperatorConsoleDlg.cpp:537
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127
#define IDM_ABOUTBOX
Definition: resource.h:25
CFont m_statusFont
font to use for Status item (used to change font size for the item)
Definition: OperatorConsoleDlg.h:109
#define PASS_COLOR
Definition: OperatorConsoleDlg.cpp:36
void MoveFPS()
Definition: OperatorConsoleDlg.cpp:624
afx_msg void OnBnClickedRadioSfr()
Definition: OperatorConsoleDlg.cpp:435
#define IMAGE_NAME
Definition: OperatorConsole.h:65
AppThread theApp
Definition: AppThread.cpp:36
CBrush m_whiteBrush
Definition: OperatorConsoleDlg.h:103
CStatic c_qsoLR
The static text for the lower right QSO.
Definition: OperatorConsoleDlg.h:132
HBRUSH m_statusBrush
handle to the brush to be used when drawing the Status item
Definition: OperatorConsoleDlg.h:106
CBrush m_passBrush
the brush (i.e. background color) to be used for Status item when the test has passed ...
Definition: OperatorConsoleDlg.h:104
CStatic c_qsoUR
The static text for the upper right QSO.
Definition: OperatorConsoleDlg.h:130
CBrush m_failBrush
the brush (i.e. background color) to be used for Status item when the test has failed ...
Definition: OperatorConsoleDlg.h:105
CStatic c_qsoCENTER
The static text for the center QSO.
Definition: OperatorConsoleDlg.h:133
HICON m_hIcon
Definition: OperatorConsoleDlg.h:47
#define LOGO_NAME
Definition: OperatorConsole.h:64
bool Init()
Definition: StaticBmp.cpp:34
CButton c_sfrPlus
The sfrPlus radial button.
Definition: OperatorConsoleDlg.h:125
CImage m_logo
Imatest logo (goes at top of info display)
Definition: OperatorConsoleDlg.h:114
#define IDS_ABOUTBOX
Definition: resource.h:27
CEdit c_log
The log display.
Definition: OperatorConsoleDlg.h:124
#define QSO_SIZE
Definition: OperatorConsoleDlg.cpp:51
void ShowStartStop(bool start, bool stop)
Definition: OperatorConsoleDlg.cpp:323
A class that resizes and centers dialog objects within a parent window.
Definition: ResizeDlg.h:24
#define STATUS_SIZE
Definition: OperatorConsoleDlg.cpp:50
#define FAIL_COLOR
Definition: OperatorConsoleDlg.cpp:37
CStatic c_qsoLL
The static text for the lower left QSO.
Definition: OperatorConsoleDlg.h:131
CStatic c_qsoUL
The static text for the upper left QSO.
Definition: OperatorConsoleDlg.h:129
COLORREF m_statusColor
unused if m_statusBrush == NULL
Definition: OperatorConsoleDlg.h:107
CStatic c_status
The status display.
Definition: OperatorConsoleDlg.h:122

Here is the call graph for this function:

void COperatorConsoleDlg::OnOK ( )
protected
void COperatorConsoleDlg::OnOK ( )
protected

References Quit().

671 {
672  Quit();
673  CDialogEx::OnOK();
674 }
void Quit()
Definition: OperatorConsoleDlg.cpp:690

Here is the call graph for this function:

void COperatorConsoleDlg::OnPaint ( )
protected

References m_hIcon, x, and y.

255 {
256  if (IsIconic())
257  {
258  CPaintDC dc(this); // device context for painting
259 
260  SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
261 
262  // Center icon in client rectangle
263  int cxIcon = GetSystemMetrics(SM_CXICON);
264  int cyIcon = GetSystemMetrics(SM_CYICON);
265  CRect rect;
266  GetClientRect(&rect);
267  int x = (rect.Width() - cxIcon + 1) / 2;
268  int y = (rect.Height() - cyIcon + 1) / 2;
269 
270  // Draw the icon
271  dc.DrawIcon(x, y, m_hIcon);
272  }
273  else
274  {
275  CDialogEx::OnPaint();
276  }
277 }
y
Definition: calculation_checks.m:8
HICON m_hIcon
Definition: OperatorConsoleDlg.h:47
x
Definition: calculation_checks.m:9
afx_msg void COperatorConsoleDlg::OnPaint ( )
protected
HCURSOR COperatorConsoleDlg::OnQueryDragIcon ( )
protected

References m_hIcon.

282 {
283  return static_cast<HCURSOR>(m_hIcon);
284 }
HICON m_hIcon
Definition: OperatorConsoleDlg.h:47
afx_msg HCURSOR COperatorConsoleDlg::OnQueryDragIcon ( )
protected
void COperatorConsoleDlg::OnSysCommand ( UINT  nID,
LPARAM  lParam 
)
protected

References IDM_ABOUTBOX.

238 {
239  if ((nID & 0xFFF0) == IDM_ABOUTBOX)
240  {
241  CAboutDlg dlgAbout;
242  dlgAbout.DoModal();
243  }
244  else
245  {
246  CDialogEx::OnSysCommand(nID, lParam);
247  }
248 }
CAboutDlg dialog used for App About.
Definition: OperatorConsoleDlg.cpp:57
#define IDM_ABOUTBOX
Definition: resource.h:25
afx_msg void COperatorConsoleDlg::OnSysCommand ( UINT  nID,
LPARAM  lParam 
)
protected
void COperatorConsoleDlg::PostParentMessage ( UINT  message,
WPARAM  wParam = 0,
LPARAM  lParam = 0 
)
protected

References theApp.

Referenced by OnBnClickedRadioBlemish(), OnBnClickedRadioSfr(), OnBnClickedSetupButton(), OnBnClickedShowjson(), OnBnClickedStart(), OnBnClickedStop(), and OnClickedPassFail().

732 {
733  ::PostThreadMessage(theApp.m_nThreadID, message, 0, 0);
734 }
AppThread theApp
Definition: AppThread.cpp:36

Here is the caller graph for this function:

void COperatorConsoleDlg::PostParentMessage ( UINT  message,
WPARAM  wParam = 0,
LPARAM  lParam = 0 
)
protected
void COperatorConsoleDlg::QsoMove ( )
protected

References c_image, c_qsoCENTER, c_qsoLL, c_qsoLR, c_qsoUL, c_qsoUR, CenterWindow(), ResizeDlg::GetWindowSize(), height, and width.

Referenced by ReInitDialog().

595 {
596  CRect rect;
597  CPoint center;
598  int width, height, dx, dy;
599 
600  //
601  // Get the location, size, and center point of the image
602  //
603  ResizeDlg::GetWindowSize(&c_image, &width, &height, &rect);
604  center = rect.CenterPoint();
605 
606  //
607  // Calculate the distance in x and y from the center
608  // of the image rect to the center of a quadrant
609  //
610  dx = (width / 4);
611  dy = (height / 4);
612 
613  //
614  // Now move each window so that it's centered at the center of its quadrant
615  //
616  CenterWindow(&c_qsoUL, center.x - dx, center.y - dy); // upper left
617  CenterWindow(&c_qsoUR, center.x + dx, center.y - dy); // upper right
618  CenterWindow(&c_qsoLL, center.x - dx, center.y + dy); // lower left
619  CenterWindow(&c_qsoLR, center.x + dx, center.y + dy); // lower right
620  CenterWindow(&c_qsoCENTER, center.x, center.y); // center
621 }
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127
void CenterWindow(CWnd *wnd, int centerX, int centerY)
move 'wnd' so its center is at the screen coordinate (centerX, centerY)
Definition: OperatorConsoleDlg.cpp:654
CStatic c_qsoLR
The static text for the lower right QSO.
Definition: OperatorConsoleDlg.h:132
static void GetWindowSize(CWnd *wnd, int *width, int *height, CRect *bnds=NULL, bool client=false)
A function that acquires either the window or client size.
Definition: ResizeDlg.cpp:199
CStatic c_qsoUR
The static text for the upper right QSO.
Definition: OperatorConsoleDlg.h:130
CStatic c_qsoCENTER
The static text for the center QSO.
Definition: OperatorConsoleDlg.h:133
width
Definition: calculation_checks.m:1
height
Definition: calculation_checks.m:2
CStatic c_qsoLL
The static text for the lower left QSO.
Definition: OperatorConsoleDlg.h:131
CStatic c_qsoUL
The static text for the upper left QSO.
Definition: OperatorConsoleDlg.h:129

Here is the call graph for this function:

Here is the caller graph for this function:

void COperatorConsoleDlg::QsoMove ( )
protected
HBRUSH COperatorConsoleDlg::QsoSet ( CDC *  cdc,
EQuadrant  quadrant 
)
protected

References m_qsoColor.

Referenced by OnCtlColor().

457 {
458  HBRUSH hbr = (HBRUSH)::GetStockObject(NULL_BRUSH); // this necessary to get transparent background
459 
460  cdc->SetTextColor(m_qsoColor[quadrant]);
461  cdc->SetBkMode(TRANSPARENT);
462 
463  return hbr;
464 }
COLORREF m_qsoColor[eNumQuadrants]
color to use for each QSO item
Definition: OperatorConsoleDlg.h:108

Here is the caller graph for this function:

HBRUSH COperatorConsoleDlg::QsoSet ( CDC *  cdc,
EQuadrant  quadrant 
)
protected
void COperatorConsoleDlg::QsoShow ( bool  show)
protected

References c_qsoCENTER, c_qsoLL, c_qsoLR, c_qsoUL, and c_qsoUR.

Referenced by OnBnClickedRadioBlemish(), and OnBnClickedRadioSfr().

467 {
468  int value = show ? SW_SHOW : SW_HIDE;
469 
470  c_qsoUL.ShowWindow(value);
471  c_qsoUR.ShowWindow(value);
472  c_qsoLL.ShowWindow(value);
473  c_qsoLR.ShowWindow(value);
474  c_qsoCENTER.ShowWindow(value);
475 }
CStatic c_qsoLR
The static text for the lower right QSO.
Definition: OperatorConsoleDlg.h:132
CStatic c_qsoUR
The static text for the upper right QSO.
Definition: OperatorConsoleDlg.h:130
CStatic c_qsoCENTER
The static text for the center QSO.
Definition: OperatorConsoleDlg.h:133
CStatic c_qsoLL
The static text for the lower left QSO.
Definition: OperatorConsoleDlg.h:131
CStatic c_qsoUL
The static text for the upper left QSO.
Definition: OperatorConsoleDlg.h:129

Here is the caller graph for this function:

void COperatorConsoleDlg::QsoShow ( bool  show)
protected
void COperatorConsoleDlg::Quit ( )
protected
void COperatorConsoleDlg::Quit ( )
protected

References AppThread::Quit(), and theApp.

Referenced by OnCancel(), OnClose(), and OnOK().

691 {
692  //
693  // We need to tell the application that we're ready to close the dialog window so that it
694  // can do any cleanup (e.g. waiting for threads to finish) before the dialog closes.
695  // This allows a message to be posted to the log window while the app finishes.
696  //
697  // Once the app is done, we can go ahead and close the dialog.
698  //
699  theApp.Quit();
700 }
void Quit()
AppThread theApp
Definition: AppThread.cpp:36

Here is the call graph for this function:

Here is the caller graph for this function:

void COperatorConsoleDlg::ReInitDialog ( void  )

Allows the display to be resized after the user changes the image size.

References ResizeDlg::BidirectionalResize(), c_image, CStaticBmp::Init(), MoveFPS(), QsoMove(), theApp, and CStaticBmp::Update().

912 {
913  ShowWindow(SW_HIDE);
914  c_image.Update(NULL);
915  // Resize(); // resize dialog to make it big enough for image item (also resizes c_image if needed)
916  ResizeDlg resize;
917  resize.BidirectionalResize(this, &c_image, theApp.GetImageWidth(), theApp.GetImageHeight());
918  CWnd::CenterWindow(); // center the dialog on the screen
919  QsoMove();
920  MoveFPS();
921  c_image.Init(); // create bitmap and drawing context-- do this after the control has been resized [i.e. after calling Resize()]
922  ShowWindow(SW_NORMAL);
923 }
void QsoMove()
Definition: OperatorConsoleDlg.cpp:594
void Update(void *buf)
Definition: StaticBmp.cpp:60
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127
void MoveFPS()
Definition: OperatorConsoleDlg.cpp:624
AppThread theApp
Definition: AppThread.cpp:36
bool Init()
Definition: StaticBmp.cpp:34
void BidirectionalResize(CWnd *dialog, CWnd *window, int width, int height)
Resizes an object within a parent window that allows the object to shrink vertically, but not below a minimum size.
Definition: ResizeDlg.cpp:315
A class that resizes and centers dialog objects within a parent window.
Definition: ResizeDlg.h:24

Here is the call graph for this function:

void COperatorConsoleDlg::ReInitDialog ( void  )

Allows the display to be resized after the user changes the image size.

HBRUSH COperatorConsoleDlg::SetBGColor ( CDC *  dc,
CBrush  brush,
COLORREF  color 
)
protected
532 {
533  dc->SetBkColor(color);
534  return (HBRUSH)brush;
535 }
HBRUSH COperatorConsoleDlg::SetBGColor ( CDC *  dc,
CBrush  brush,
COLORREF  color 
)
protected
void COperatorConsoleDlg::ShowStartStop ( bool  start,
bool  stop 
)
protected

References c_startButton, and c_stopButton.

Referenced by OnBnClickedStart(), and OnBnClickedStop().

324 {
325  //
326  // Show or hide the start and stop buttons
327  //
328  c_startButton.ShowWindow(start ? SW_SHOW : SW_HIDE);
329  c_stopButton.ShowWindow(stop ? SW_SHOW : SW_HIDE);
330 }
CButton c_stopButton
Definition: OperatorConsoleDlg.h:120
CButton c_startButton
Definition: OperatorConsoleDlg.h:119

Here is the caller graph for this function:

void COperatorConsoleDlg::ShowStartStop ( bool  start,
bool  stop 
)
protected
void COperatorConsoleDlg::UpdateFPS ( long long  ms)

References c_fps, and c_image.

Referenced by COperatorConsoleApp::UpdateResults().

377 {
378  double fps = 1000./(double)ms;
379  char str[40];
380 
381  sprintf_s(str, sizeof(str)-1, "%.3lf FPS", fps);
382 
383  c_fps.SetWindowText(str);
384  c_fps.Invalidate();
385  c_image.Invalidate(); // if we don't do this the old QSO value doesn't get erased
386 }
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127
CStatic c_fps
The frames-per-second display.
Definition: OperatorConsoleDlg.h:134

Here is the caller graph for this function:

void COperatorConsoleDlg::UpdateFPS ( long long  ms)
void COperatorConsoleDlg::UpdateImage ( void *  buf)

References c_image, and CStaticBmp::Update().

Referenced by COperatorConsoleApp::UpdateResults().

333 {
334  c_image.Update(buf);
335 }
void Update(void *buf)
Definition: StaticBmp.cpp:60
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127

Here is the call graph for this function:

Here is the caller graph for this function:

void COperatorConsoleDlg::UpdateImage ( void *  buf)
void COperatorConsoleDlg::UpdateQuadrant ( const bool *  passed,
EQuadrant  quadrant,
CWnd *  control 
)
protected

References FAIL_COLOR, m_qsoColor, PASS_COLOR, QSO_FAILED, and QSO_PASSED.

Referenced by UpdateQuadrants().

390 {
391  COLORREF color;
392  const char *str;
393 
394  if (passed[quadrant])
395  {
396  color = PASS_COLOR;
397  str = QSO_PASSED;
398  }
399  else
400  {
401  color = FAIL_COLOR;
402  str = QSO_FAILED;
403  }
404 
405  m_qsoColor[quadrant] = color;
406  control->SetWindowText(str);
407  control->Invalidate();
408 }
COLORREF m_qsoColor[eNumQuadrants]
color to use for each QSO item
Definition: OperatorConsoleDlg.h:108
#define PASS_COLOR
Definition: OperatorConsoleDlg.cpp:36
#define QSO_FAILED
Definition: OperatorConsoleDlg.cpp:44
#define FAIL_COLOR
Definition: OperatorConsoleDlg.cpp:37
#define QSO_PASSED
Definition: OperatorConsoleDlg.cpp:43

Here is the caller graph for this function:

void COperatorConsoleDlg::UpdateQuadrant ( const bool *  passed,
EQuadrant  quadrant,
CWnd *  control 
)
protected
void COperatorConsoleDlg::UpdateQuadrants ( const bool *  data)

References c_image, c_qsoCENTER, c_qsoLL, c_qsoLR, c_qsoUL, c_qsoUR, eCenter, eLowerLeft, eLowerRight, eUpperLeft, eUpperRight, and UpdateQuadrant().

Referenced by OnBnClickedStart(), and COperatorConsoleApp::UpdateResultsSFRplus().

365 {
371 
372  c_image.Invalidate(); // if we don't do this the old QSO value doesn't get erased
373 }
CStaticBmp c_image
owner-drawn control that displays an image from the acquisition source
Definition: OperatorConsoleDlg.h:127
Definition: qso.h:40
CStatic c_qsoLR
The static text for the lower right QSO.
Definition: OperatorConsoleDlg.h:132
void UpdateQuadrant(const bool *passed, EQuadrant quadrant, CWnd *control)
Definition: OperatorConsoleDlg.cpp:389
Definition: qso.h:37
CStatic c_qsoUR
The static text for the upper right QSO.
Definition: OperatorConsoleDlg.h:130
CStatic c_qsoCENTER
The static text for the center QSO.
Definition: OperatorConsoleDlg.h:133
Definition: qso.h:36
Definition: qso.h:38
Definition: qso.h:39
CStatic c_qsoLL
The static text for the lower left QSO.
Definition: OperatorConsoleDlg.h:131
CStatic c_qsoUL
The static text for the upper left QSO.
Definition: OperatorConsoleDlg.h:129

Here is the call graph for this function:

Here is the caller graph for this function:

void COperatorConsoleDlg::UpdateQuadrants ( const bool *  data)
void COperatorConsoleDlg::UpdateStatus ( bool  passed,
LPCTSTR  reason 
)

References c_reason, c_status, FAIL_COLOR, FAILED_TEXT, m_failBrush, m_passBrush, m_statusBrush, m_statusColor, PASS_COLOR, and PASSED_TEXT.

Referenced by OnBnClickedStart(), and COperatorConsoleApp::UpdateResults().

338 {
339  COLORREF color = passed ? PASS_COLOR : FAIL_COLOR;
340 
341  if (passed)
342  {
345  }
346  else
347  {
350  }
351 
352  // Set the text size (ignore for now)
353  c_status.SetWindowText(passed ? PASSED_TEXT : FAILED_TEXT); // set PASS/FAIL text
354  c_reason.SetSel(0, -1); // select all of the text
355  c_reason.ReplaceSel(passed ? "" : (LPCTSTR)reason); // if test failed, display reason
356 }
#define PASS_COLOR
Definition: OperatorConsoleDlg.cpp:36
#define PASSED_TEXT
Definition: OperatorConsoleDlg.cpp:41
HBRUSH m_statusBrush
handle to the brush to be used when drawing the Status item
Definition: OperatorConsoleDlg.h:106
#define FAILED_TEXT
Definition: OperatorConsoleDlg.cpp:42
CBrush m_passBrush
the brush (i.e. background color) to be used for Status item when the test has passed ...
Definition: OperatorConsoleDlg.h:104
CEdit c_reason
The reason display.
Definition: OperatorConsoleDlg.h:123
CBrush m_failBrush
the brush (i.e. background color) to be used for Status item when the test has failed ...
Definition: OperatorConsoleDlg.h:105
#define FAIL_COLOR
Definition: OperatorConsoleDlg.cpp:37
COLORREF m_statusColor
unused if m_statusBrush == NULL
Definition: OperatorConsoleDlg.h:107
CStatic c_status
The status display.
Definition: OperatorConsoleDlg.h:122

Here is the caller graph for this function:

void COperatorConsoleDlg::UpdateStatus ( bool  passed,
LPCTSTR  reason 
)
void COperatorConsoleDlg::UpdateSummary ( LPCTSTR  summary)

References c_summary.

Referenced by COperatorConsoleApp::UpdateResults().

359 {
360  c_summary.SetSel(0, -1); // select all the text
361  c_summary.ReplaceSel(summary); // replace selection
362 }
CEdit c_summary
The summary display.
Definition: OperatorConsoleDlg.h:121

Here is the caller graph for this function:

void COperatorConsoleDlg::UpdateSummary ( LPCTSTR  summary)

Member Data Documentation

CButton COperatorConsoleDlg::c_blemish

The Blemish radial button.

Referenced by DoDataExchange().

CStatic COperatorConsoleDlg::c_fps

The frames-per-second display.

Referenced by DoDataExchange(), MoveFPS(), and UpdateFPS().

CStaticBmp COperatorConsoleDlg::c_image

owner-drawn control that displays an image from the acquisition source

Referenced by DoDataExchange(), DrawImage(), MoveFPS(), QsoMove(), ReInitDialog(), UpdateFPS(), UpdateImage(), and UpdateQuadrants().

CEdit COperatorConsoleDlg::c_log

The log display.

Referenced by DoDataExchange(), GetLog(), and LogMessage().

CStatic COperatorConsoleDlg::c_logo

Referenced by DoDataExchange().

CButton COperatorConsoleDlg::c_pass_fail

Referenced by DoDataExchange().

CStatic COperatorConsoleDlg::c_qsoCENTER

The static text for the center QSO.

Referenced by DoDataExchange(), OnEraseBkgnd(), QsoMove(), QsoShow(), and UpdateQuadrants().

CStatic COperatorConsoleDlg::c_qsoLL

The static text for the lower left QSO.

Referenced by DoDataExchange(), OnEraseBkgnd(), QsoMove(), QsoShow(), and UpdateQuadrants().

CStatic COperatorConsoleDlg::c_qsoLR

The static text for the lower right QSO.

Referenced by DoDataExchange(), OnEraseBkgnd(), QsoMove(), QsoShow(), and UpdateQuadrants().

CStatic COperatorConsoleDlg::c_qsoUL

The static text for the upper left QSO.

Referenced by DoDataExchange(), OnEraseBkgnd(), QsoMove(), QsoShow(), and UpdateQuadrants().

CStatic COperatorConsoleDlg::c_qsoUR

The static text for the upper right QSO.

Referenced by DoDataExchange(), OnEraseBkgnd(), QsoMove(), QsoShow(), and UpdateQuadrants().

CEdit COperatorConsoleDlg::c_reason

The reason display.

Referenced by DoDataExchange(), and UpdateStatus().

CButton COperatorConsoleDlg::c_setup

The setup button.

Referenced by DoDataExchange(), OnBnClickedStart(), and OnBnClickedStop().

CButton COperatorConsoleDlg::c_sfrPlus

The sfrPlus radial button.

Referenced by DoDataExchange().

CButton COperatorConsoleDlg::c_showjson

The 'show JSON' button.

Referenced by DoDataExchange().

CButton COperatorConsoleDlg::c_startButton

Referenced by DoDataExchange(), and ShowStartStop().

CStatic COperatorConsoleDlg::c_status

The status display.

Referenced by DoDataExchange(), and UpdateStatus().

CButton COperatorConsoleDlg::c_stopButton

Referenced by DoDataExchange(), and ShowStartStop().

CEdit COperatorConsoleDlg::c_summary

The summary display.

Referenced by DoDataExchange(), and UpdateSummary().

CSize COperatorConsoleDlg::m_delta
protected

number of pixels to increase image item and dialog size

CBrush COperatorConsoleDlg::m_failBrush
protected

the brush (i.e. background color) to be used for Status item when the test has failed

Referenced by UpdateStatus().

HICON COperatorConsoleDlg::m_hIcon
protected

Referenced by OnPaint(), and OnQueryDragIcon().

CImage COperatorConsoleDlg::m_logo
protected

Imatest logo (goes at top of info display)

Referenced by DrawLogo().

CBrush COperatorConsoleDlg::m_passBrush
protected

the brush (i.e. background color) to be used for Status item when the test has passed

Referenced by UpdateStatus().

COLORREF COperatorConsoleDlg::m_qsoColor
protected

color to use for each QSO item

Referenced by QsoSet(), and UpdateQuadrant().

CFont COperatorConsoleDlg::m_qsoFont
protected

font to use for QSO (Quadrant Status Overlay) items

HBRUSH COperatorConsoleDlg::m_statusBrush
protected

handle to the brush to be used when drawing the Status item

Referenced by OnCtlColor(), and UpdateStatus().

COLORREF COperatorConsoleDlg::m_statusColor
protected

unused if m_statusBrush == NULL

Referenced by OnCtlColor(), and UpdateStatus().

CFont COperatorConsoleDlg::m_statusFont
protected

font to use for Status item (used to change font size for the item)

Timestamp COperatorConsoleDlg::m_timestamp
protected

Referenced by LogMessage().

CBrush COperatorConsoleDlg::m_whiteBrush
protected

Referenced by OnCtlColor().


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