-
Notifications
You must be signed in to change notification settings - Fork 0
/
ToNumberThread.h
46 lines (37 loc) · 950 Bytes
/
ToNumberThread.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
#ifndef THREAD2_H
#define THREAD2_H
#include <QObject>
#include <QDebug>
#include <QMap>
#include <QChar>
#include <QJsonArray>
#include <QVector>
#include <mutex>
#include "Item.h"
class ToNumberThread: public QObject
{
Q_OBJECT
public:
ToNumberThread(QObject *parent = 0);
~ToNumberThread() = default;
///
/// \brief start thread (part 2)
///
void run2();
void setThreadID(const QString &value);
void setJsonArrForRead(const QJsonArray &jsonArrForRead);
signals:
///
/// \brief goForResult
/// \param myvec
/// \connect_to: &Part2::showResult
/// for get all result from multiThread
void goForResult(QVector<Item *> myvec);
protected:
private:
QString _ThreadID; // current Thread
QJsonArray _jsonArrForRead; // get json from part 2
static QVector<Item *> _items; // get all result as Vector from multiThreading
static std::mutex mut;
};
#endif // THREAD2_H