#include <Events_Loop.h>
#include <Events_Error.h>
+#include <Events_LongOp.h>
#include <ModuleBase_Operation.h>
#include <ModuleBase_Operation.h>
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+ aLoop->registerListener(this, Events_Loop::eventByName("LongOperation"));
registerValidators();
activateModule();
void XGUI_Workshop::processEvent(const Events_Message* theMessage)
{
//A message to start feature creation received.
- static Events_ID aFeatureLoadedId = Events_Loop::loop()->eventByName(EVENT_FEATURE_LOADED);
- if (theMessage->eventID() == aFeatureLoadedId) {
+ if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_LOADED)) {
const Config_FeatureMessage* aFeatureMsg = dynamic_cast<const Config_FeatureMessage*>(theMessage);
if(!aFeatureMsg->isInternal()) {
addFeature(aFeatureMsg);
return;
}
+ if (theMessage->eventID() == Events_Loop::loop()->eventByName("LongOperation")) {
+ if (Events_LongOp::isPerformed())
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ else
+ QApplication::restoreOverrideCursor();
+ return;
+ }
+
//An operation passed by message. Start it, process and commit.
if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OPERATION_LAUNCHED)) {
const Config_PointerMessage* aPartSetMsg = dynamic_cast<const Config_PointerMessage*>(theMessage);