-
Notifications
You must be signed in to change notification settings - Fork 0
/
filterwidget.h
85 lines (65 loc) · 1.94 KB
/
filterwidget.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
76
77
78
79
80
81
82
83
84
85
#ifndef FILTERWIDGET_H
#define FILTERWIDGET_H
#include <QtWidgets/QWidget>
#include <QtCharts/QChartGlobal>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QProgressBar>
#include <QtCore/QThread>
#include <QtCore/QMetaType>
#include "FileDescriptor.h"
#include "HandlerThread.h"
#include "FilterThread.h"
QT_BEGIN_NAMESPACE
class QComboBox;
class QCheckBox;
QT_END_NAMESPACE
QT_CHARTS_BEGIN_NAMESPACE
class QChartView;
class QChart;
QT_CHARTS_END_NAMESPACE
QT_CHARTS_USE_NAMESPACE
enum class PROCESSMODE {
FILEDESCRIPTORMATCH,
BADFILEDESCRIPTOR
};
Q_DECLARE_METATYPE(PROCESSMODE);
class FilterWidget : public QWidget
{
Q_OBJECT
private:
public:
FilterWidget(QWidget *parent = 0);
~FilterWidget();
private Q_SLOTS:
void processBoxChanged();
void threadBoxChanged();
void logFilePathChanged();
void processButtonClicked();
void processBarChanged(double val);
void processDescriptorChanged(ResultData);
private:
void connectSignal();
QComboBox* createProcessBox() const;
QComboBox* createThreadBox() const;
QPushButton* createProcessButton() const;
QProgressBar* createProcessBar() const;
QPushButton* createLogButton() const;
void initUIResources();
private:
void getProcessLine(const QString strFilePath);
private:
QComboBox *mProcessComboBox = nullptr;
QComboBox *mThreadComboBox = nullptr;
QPushButton *mFilePathButton = nullptr;
QPushButton *mProcessButton = nullptr;
QProgressBar *mProcessBar = nullptr;
private:
FileDescriptor *mFileDescriptor = nullptr;
HandlerThread *mpProcessHandler = nullptr;
QBarThread *mpBarThread = nullptr;
QProcessThread *mpProcessThread = nullptr;
unsigned int mThreadNum;
unsigned int mProcessLine;
QString mFilePath;
};
#endif // FILTERWIDGET_H