]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/Events/Events_LongOp.h
Salome HOME
Introduce Long Operation event: now for waiting cursor only
[modules/shaper.git] / src / Events / Events_LongOp.h
diff --git a/src/Events/Events_LongOp.h b/src/Events/Events_LongOp.h
new file mode 100644 (file)
index 0000000..bc698ac
--- /dev/null
@@ -0,0 +1,32 @@
+// File:        Events_LongOp.h
+// Created:     29 Jul 2014
+// Author:      Mikhail PONIKAROV
+
+#ifndef EVENTS_LONGOP_H_
+#define EVENTS_LONGOP_H_
+
+#include <Events.h>
+#include <Events_Message.h>
+
+/**
+ * Informs the application that the long operation is performed.
+ * Causes waiting coursor in GUI.
+ */
+class EVENTS_EXPORT Events_LongOp: public Events_Message
+{
+public:
+  virtual ~Events_LongOp();
+  /// Returns the identifier of this event
+  static Events_ID errorID();
+  /// Starts the long operation
+  static void start(void* theSender = 0);
+  /// Stops the long operation
+  static void end(void* theSender = 0);
+  /// Returns true if the long operation is performed
+  static bool isPerformed(); 
+
+protected:
+  Events_LongOp(void* theSender = 0);
+};
+
+#endif /* EVENTS_ERROR_H_ */