SETestKCL  1.0.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MainWindow.h
Go to the documentation of this file.
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3 
4 #include<QDialog>
5 
6 class QKeyEvent;
7 class QElapsedTimer;
8 class QAction;
9 class QDialogButtonBox;
10 class QGroupBox;
11 class QLabel;
12 class QLineEdit;
13 class QMenu;
14 class QMenuBar;
15 class QPushButton;
16 class QTextEdit;
17 class QElapsedTimer;
18 
19 class QCustomPlot;
20 class BinomialCalculator;
21 
36 class MainWindow: public QDialog
37 {
38  Q_OBJECT
39 
40  public:
41  MainWindow();
43 
48  {
51  };
56  {
59  };
65  {
66  this->Calculator = c;
67  }
74  {
75  return this->Calculator;
76  }
84  unsigned int GetRefreshMode (void) const
85  {
86  return this->RefreshMode;
87  }
95  void SetRefreshMode (unsigned int m)
96  {
97  this->RefreshMode = m;
98  }
99 
100 
101  protected:
102 
103 
109  void keyPressEvent(QKeyEvent* e);
113  void UpdateCounter (void);
120  void UpdateSummary (void);
124  void WriteSummary (const char* filename){};
125 
126 
127  private:
128 
132  void createUsageBox();
136  void createCounterBox();
140  void createSummaryBox();
141 
145  QElapsedTimer* timer;
149  BinomialCalculator* Calculator;
154  std::vector<unsigned int> ListOfOperations;
158  std::string Usage;
162  unsigned int RefreshMode;
163 
164  QGroupBox *usageBox;
165  QGroupBox *counterBox;
166  QGroupBox *summaryBox;
167  QDialogButtonBox *buttonBox;
168  QLabel* numberOfYesLabel;
169  QLabel* numberOfNoLabel;
170  QLabel* eTimeLabel;
171  QLabel* ratioLabel;
172  QLabel* yRateLabel;
173  QLabel* nRateLabel;
174  QCustomPlot* customPlot;
175 
176 };
177 
178 #endif
unsigned int GetRefreshMode(void) const
Definition: MainWindow.h:84
void WriteSummary(const char *filename)
Definition: MainWindow.h:124
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.h:1680
BinomialCalculator * GetCalculator(void) const
Definition: MainWindow.h:73
This class is a simple helper that embeds probability functionalities for a binomial distribution...
void UpdateSummary(void)
Definition: MainWindow.cpp:178
void UpdateCounter(void)
Definition: MainWindow.cpp:167
void SetRefreshMode(unsigned int m)
Definition: MainWindow.h:95
void keyPressEvent(QKeyEvent *e)
Definition: MainWindow.cpp:126
This class implements the main window of the program.
Definition: MainWindow.h:36
void SetCalculator(BinomialCalculator *c)
Definition: MainWindow.h:64