@@ -1,41 +1,38 @@
|
|
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
|
14 |
|
15 |
class MainWindow : public QMainWindow
|
16 |
{
|
17 |
Q_OBJECT
|
18 |
|
19 |
private:
|
20 |
Ui::MainWindow* ui = nullptr;
|
21 |
QProgressBar* progressBar = nullptr;
|
22 |
-
|
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
|
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 GoldbachModel;
|
14 |
|
15 |
class MainWindow : public QMainWindow
|
16 |
{
|
17 |
Q_OBJECT
|
18 |
|
19 |
private:
|
20 |
Ui::MainWindow* ui = nullptr;
|
21 |
QProgressBar* progressBar = nullptr;
|
22 |
+
GoldbachModel* model = 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 |
void on_pushButtonCalculate_clicked();
|
|
|
32 |
void on_pushButtonStop_clicked();
|
33 |
|
|
|
34 |
void calculationDone(long long sumCount);
|
35 |
void updateProgressBar(int percent);
|
36 |
};
|
37 |
|
38 |
#endif // MAINWINDOW_H
|