1-goldbach/{v2.0 → v2.1}/MainWindow.h RENAMED
@@ -1,40 +1,41 @@
1
  #ifndef MAINWINDOW_H
2
  #define MAINWINDOW_H
3
 
4
  #include <QMainWindow>
5
  #include <QTime>
6
 
7
  namespace Ui {
8
  class MainWindow;
9
  }
10
 
11
  // Forward declaration
12
  class QProgressBar;
 
13
 
14
  class MainWindow : public QMainWindow
15
  {
16
  Q_OBJECT
17
 
18
  private:
19
  Ui::MainWindow* ui = nullptr;
20
  QProgressBar* progressBar = nullptr;
21
- bool userStopped = false;
22
  QTime time;
23
 
24
  public:
25
  explicit MainWindow(QWidget *parent = nullptr);
26
  ~MainWindow() override;
27
 
28
  private slots:
29
  void on_lineEditNumber_textEdited(const QString &arg1);
30
 
31
  void on_pushButtonCalculate_clicked();
32
 
33
  void on_pushButtonStop_clicked();
34
 
35
  void appendResult(const QString& result);
36
  void calculationDone(long long sumCount);
37
  void updateProgressBar(int percent);
38
  };
39
 
40
  #endif // MAINWINDOW_H
1
  #ifndef MAINWINDOW_H
2
  #define MAINWINDOW_H
3
 
4
  #include <QMainWindow>
5
  #include <QTime>
6
 
7
  namespace Ui {
8
  class MainWindow;
9
  }
10
 
11
  // Forward declaration
12
  class QProgressBar;
13
+ class GoldbachWorker;
14
 
15
  class MainWindow : public QMainWindow
16
  {
17
  Q_OBJECT
18
 
19
  private:
20
  Ui::MainWindow* ui = nullptr;
21
  QProgressBar* progressBar = nullptr;
22
+ GoldbachWorker* worker = nullptr;
23
  QTime time;
24
 
25
  public:
26
  explicit MainWindow(QWidget *parent = nullptr);
27
  ~MainWindow() override;
28
 
29
  private slots:
30
  void on_lineEditNumber_textEdited(const QString &arg1);
31
 
32
  void on_pushButtonCalculate_clicked();
33
 
34
  void on_pushButtonStop_clicked();
35
 
36
  void appendResult(const QString& result);
37
  void calculationDone(long long sumCount);
38
  void updateProgressBar(int percent);
39
  };
40
 
41
  #endif // MAINWINDOW_H