OSDN Git Service

ドラッグ検出のピクセル閾値を変更
[gefu/Gefu.git] / abstractworker.h
1 #ifndef ABSTRACTWORKER_H\r
2 #define ABSTRACTWORKER_H\r
3 \r
4 #include <QLabel>\r
5 #include <QMutex>\r
6 #include <QObject>\r
7 \r
8 class AbstractWorker : public QObject\r
9 {\r
10     Q_OBJECT\r
11 public:\r
12     explicit AbstractWorker(QObject *parent = 0);\r
13 \r
14     void requestStop();\r
15 \r
16 protected:\r
17     bool isStopRequested();\r
18 \r
19 signals:\r
20     void canceled();\r
21     void error(const QString &msg);\r
22     void finished();\r
23     void information(const QString &msg);\r
24     void operation(const QString &msg);\r
25     void success(const QString &msg);\r
26 \r
27 public slots:\r
28     virtual void operate() = 0;\r
29 \r
30 private:\r
31     QMutex m_Mutex;\r
32     bool m_stopRequested;\r
33 };\r
34 \r
35 #endif // ABSTRACTWORKER_H\r