SETestKCL  1.0.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
MainWindow Class Reference

#include <MainWindow.h>

Inheritance diagram for MainWindow:
Inheritance graph
[legend]
Collaboration diagram for MainWindow:
Collaboration graph
[legend]

Public Types

enum  OperationIds { Operation_No = 0, Operation_Yes = 1 }
 
enum  RefreshModeIds { Refresh_Continuous = 0, Refresh_NonContinuous = 1 }
 

Public Member Functions

 MainWindow ()
 
 ~MainWindow ()
 
void SetCalculator (BinomialCalculator *c)
 
BinomialCalculatorGetCalculator (void) const
 
unsigned int GetRefreshMode (void) const
 
void SetRefreshMode (unsigned int m)
 

Protected Member Functions

void keyPressEvent (QKeyEvent *e)
 
void UpdateCounter (void)
 
void UpdateSummary (void)
 
void WriteSummary (const char *filename)
 

Detailed Description

This class implements the main window of the program.

It shows the usage help message, detects key stroke and process it, and allows for the count of 'yes' and 'no' during the negotiation.

The method keyPressEvent() implements the callback for any key stroke

Author
Nicolas Toussaint

Definition at line 36 of file MainWindow.h.

Member Enumeration Documentation

List of operations captured

Enumerator
Operation_No 
Operation_Yes 

Definition at line 47 of file MainWindow.h.

List of refresh modes

Enumerator
Refresh_Continuous 
Refresh_NonContinuous 

Definition at line 55 of file MainWindow.h.

Constructor & Destructor Documentation

Definition at line 28 of file MainWindow.cpp.

References Refresh_Continuous.

~MainWindow ( )
inline

Definition at line 42 of file MainWindow.h.

Member Function Documentation

BinomialCalculator* GetCalculator ( void  ) const
inline

Get the Binomial calculator object, used to estimate the probability of the observed sequence of yes and no

See Also
class BinomialCalculator

Definition at line 73 of file MainWindow.h.

unsigned int GetRefreshMode ( void  ) const
inline

Get the refresh mode of the window. if set to MainWindow::Refresh_Continuous, the summary will be refresh at every stroke of 'y', 'n', and 'z', additionally to 's' and 'q' if set to MainWindow::Refresh_NonContinuous, the summary will be refresh only at the stroke of 's' or 'q'

Definition at line 84 of file MainWindow.h.

void keyPressEvent ( QKeyEvent *  e)
protected

Callback method for the QKeyEvent (key stroke) This method is a re-implementation of the QDialog::keyPressEvent() method Allows to detect key stroke and process the key accordingly

Definition at line 126 of file MainWindow.cpp.

References Operation_No, Operation_Yes, Refresh_Continuous, UpdateCounter(), and UpdateSummary().

void SetCalculator ( BinomialCalculator c)
inline

Set the Binomial calculator object, used to estimate the probability of the observed sequence of yes and no

Definition at line 64 of file MainWindow.h.

Referenced by main().

void SetRefreshMode ( unsigned int  m)
inline

Set the refresh mode of the window. if set to MainWindow::Refresh_Continuous, the summary will be refresh at every stroke of 'y', 'n' and 'z', additionally to 's' and 'q' if set to MainWindow::Refresh_NonContinuous, the summary will be refresh only at the stroke of 's' or 'q'

Definition at line 95 of file MainWindow.h.

void UpdateCounter ( void  )
protected

Update the labels containing the number of yes and no in the window

Definition at line 167 of file MainWindow.cpp.

References Operation_No, and Operation_Yes.

Referenced by keyPressEvent().

void UpdateSummary ( void  )
protected
void WriteSummary ( const char *  filename)
inlineprotected

Writes the summary in a file for future reference

Definition at line 124 of file MainWindow.h.


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