OSDN Git Service

Ver0.26
[gefu/Gefu.git] / operationdialog.h
index 5821c77..e4c1f96 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef OPERATIONDIALOG_H\r
 #define OPERATIONDIALOG_H\r
 \r
-#include "iworker.h"\r
 #include <QDialog>\r
+class OperationWorker;\r
 \r
 namespace Ui {\r
 class OperationDialog;\r
@@ -16,28 +16,29 @@ public:
     explicit OperationDialog(QWidget *parent = 0);\r
     ~OperationDialog();\r
 \r
-    void setWorker(IWorker *worker) {\r
+    void setWorker(OperationWorker *worker) {\r
         m_worker = worker;\r
     }\r
     void setAutoClose(bool yes);\r
     bool autoClose() const;\r
 \r
-protected:\r
-    void showEvent(QShowEvent *);\r
-\r
 private:\r
     Ui::OperationDialog *ui;\r
-    IWorker *m_worker;\r
-    bool m_Error;\r
+\r
+    OperationWorker*    m_worker;\r
+    bool                m_Error;\r
 \r
 private slots:\r
-    void onOperation(const QString &msg);\r
+    void onProgress(const QString &msg);\r
     void onSuccess(const QString &msg);\r
     void onError(const QString &msg);\r
-    void onFinished();\r
-    void onCanceled();\r
+    void onFinished(bool abort);\r
     void on_btnCloseCancel_clicked();\r
     void on_btnShowDetail_clicked();\r
+\r
+    // QDialog interface\r
+public slots:\r
+    int exec();\r
 };\r
 \r
 #endif // OPERATIONDIALOG_H\r