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 setProgressText(QLabel *label);\r
15     void requestStop();\r
16 \r
17 protected:\r
18     QLabel *m_progressText;\r
19 \r
20     bool isStopRequested();\r
21 \r
22 signals:\r
23     void canceled();\r
24     void finished();\r
25     void operation(const QString &msg);\r
26     void success(const QString &msg);\r
27     void error(const QString &msg);\r
28 \r
29 public slots:\r
30     virtual void operate() = 0;\r
31 \r
32 private:\r
33     QMutex m_Mutex;\r
34     bool m_stopRequested;\r
35 };\r
36 \r
37 #endif // ABSTRACTWORKER_H\r