-
Notifications
You must be signed in to change notification settings - Fork 2
/
miningdialog.h
75 lines (68 loc) · 1.92 KB
/
miningdialog.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//
// Created by 216k155 on 2/26/18.
//
#ifndef CMAKE_AND_CUDA_MININGDIALOG_H
#define CMAKE_AND_CUDA_MININGDIALOG_H
#include <QMainWindow>
#include <QProcess>
#include <QTextBrowser>
#include <QString>
#include <QListIterator>
#include <QTextCharFormat>
#include "customlistmodel.h"
#include "settingsdialog.h"
namespace Ui
{
class MiningDialog;
}
QT_BEGIN_NAMESPACE
class QModelIndex;
QT_END_NAMESPACE
/** Dialog showing transaction details. */
class MiningDialog : public QMainWindow
{
Q_OBJECT
public:
explicit MiningDialog(QWidget* parent = 0);
int abc=11;
void closeEvent (QCloseEvent *event);
void setTextTermFormatting(QTextBrowser * textEdit, QString const & text);
QString osName();
void parseEscapeSequence(int attribute, QListIterator< QString > & i, QTextCharFormat & textCharFormat, QTextCharFormat const & defaultTextCharFormat);
~MiningDialog();
public slots:
void openSettingsDialog();
private:
Ui::MiningDialog* ui;
bool m_NeverShown;
int m_HistoryIndex;
QStringList m_History;
QProcess *minerLogProcess = NULL;
QProcess *benchmarkLogProcess = NULL;
CustomListModel* model;
void createListModelView();
SettingsDialog *settingsDialog;
QString algo = "phi";
int numThreads = 0;
QString password = "";
private Q_SLOTS:
void run_benchmark();
void run_mining();
void stop_mining();
void ReadOut();
void ReadErr();
void startedBenchmark();
void finishedBenchmark(int exitCode, QProcess::ExitStatus exitStatus);
void startedMining();
bool createNewScriptFile();
bool createNewWindowsScriptFile();
void exitButtonClicked();
QString receiveWallet();
QString receivePool();
QString receiveDevices();
QString receiveAlgoName();
QString receivePassword();
QString receiveNumThreads();
void finishedMining(int exitCode, QProcess::ExitStatus exitStatus);
};
#endif //CMAKE_AND_CUDA_MININGDIALOG_H