ModuleBase_WidgetRadiobox.h
ModuleBase_WidgetPointInput.h
ModuleBase_ITreeNode.h
+ ModuleBase_WorkController.h
+ ModuleBase_EventsListener.h
)
SET(PROJECT_MOC_HEADERS
ModuleBase_WidgetNameEdit.h
ModuleBase_WidgetRadiobox.h
ModuleBase_WidgetPointInput.h
+ ModuleBase_WorkController.h
+ ModuleBase_EventsListener.h
+ ModuleBase_IconFactory.h
)
SET(PROJECT_SOURCES
ModuleBase_WidgetNameEdit.cpp
ModuleBase_WidgetRadiobox.cpp
ModuleBase_WidgetPointInput.cpp
+ ModuleBase_WorkController.cpp
+ ModuleBase_EventsListener.cpp
)
SET(PROJECT_LIBRARIES
--- /dev/null
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#include "ModuleBase_EventsListener.h"
+#include "ModuleBase_Events.h"
+
+#include <ModelAPI_Events.h>
+
+#include <Events_Loop.h>
+#include <Events_InfoMessage.h>
+#include <Events_LongOp.h>
+#include <Config_FeatureMessage.h>
+
+
+
+static ModuleBase_EventsListener* MYListener = NULL;
+
+//Q_DECLARE_METATYPE(EventMsgPtr)
+//qRegisterMetaType<std::shared_ptr<Events_Message>>();
+//qRegisterMetaType<std::shared_ptr<Events_Message>>("std::shared_ptr<Events_Message>");
+
+
+ModuleBase_EventsListener::ModuleBase_EventsListener()
+ : QThread()
+{
+ //Initialize event listening
+ Events_Loop* aLoop = Events_Loop::loop();
+ aLoop->registerListener(this, Events_InfoMessage::errorID()); //!< Listening application errors.
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+ aLoop->registerListener(this, Events_LongOp::eventID());
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_PLUGIN_LOADED));
+
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION));
+
+ aLoop->registerListener(this, Events_Loop::eventByName("FinishOperation"));
+ aLoop->registerListener(this, Events_Loop::eventByName("AbortOperation"));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED));
+ aLoop->registerListener(this, Events_Loop::eventByName(Config_FeatureMessage::GUI_EVENT()));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_ORDER_UPDATED));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_FEATURE_STATE_RESPONSE));
+ aLoop->registerListener(this, Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION));
+}
+
+
+
+ModuleBase_EventsListener* ModuleBase_EventsListener::instance()
+{
+ if (!MYListener) {
+ MYListener = new ModuleBase_EventsListener();
+ MYListener->start();
+ }
+ return MYListener;
+}
+
+void ModuleBase_EventsListener::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+{
+ ModuleBase_Event* aEvnt = new ModuleBase_Event(theMessage);
+ myMutex.lock();
+ myMessages.append(aEvnt);
+ myMutex.unlock();
+}
+
+void ModuleBase_EventsListener::run()
+{
+ while (1) {
+ while (myMessages.size()) {
+ myMutex.lock();
+ ModuleBase_Event* aMsg = myMessages.first();
+ myMessages.removeFirst();
+ myMutex.unlock();
+ emit hasEvent(aMsg);
+ //aMsg->deleteLater();
+ }
+ msleep(10);
+ }
+}
--- /dev/null
+#pragma once
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#ifndef ModuleBase_EventsListener_H
+#define ModuleBase_EventsListener_H
+
+#include "ModuleBase.h"
+
+#include <Events_Listener.h>
+#include <Events_Message.h>
+
+#include <QThread>
+#include <QList>
+#include <QMutex>
+
+
+class MODULEBASE_EXPORT ModuleBase_Event: public QObject
+{
+ Q_OBJECT
+public:
+ ModuleBase_Event() {}
+
+ ModuleBase_Event(const std::shared_ptr<Events_Message>& theMsg) : myMsg(theMsg) {}
+
+ void setMessage(const std::shared_ptr<Events_Message>& theMsg) {
+ myMsg = theMsg;
+ }
+
+ std::shared_ptr<Events_Message> message() const { return myMsg; }
+
+private:
+ std::shared_ptr<Events_Message> myMsg;
+};
+
+
+class MODULEBASE_EXPORT ModuleBase_EventsListener : public QThread, public Events_Listener
+{
+ Q_OBJECT
+public:
+ static ModuleBase_EventsListener* instance();
+
+ //! Redefinition of Events_Listener method
+ virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+
+signals:
+ void hasEvent(ModuleBase_Event* theMsg);
+
+protected:
+ virtual void run();
+
+private:
+ ModuleBase_EventsListener();
+
+private:
+ QList<ModuleBase_Event*> myMessages;
+ QMutex myMutex;
+};
+
+#endif
\ No newline at end of file
#include <QPixmap>
#include <QIcon>
#include <QImage>
+#include <QObject>
/**\class ModuleBase_IconFactory
* \ingroup GUI
* \brief This is a class which provides icons of objects for object browser
*/
-class MODULEBASE_EXPORT ModuleBase_IconFactory
+class MODULEBASE_EXPORT ModuleBase_IconFactory: public QObject
{
+ Q_OBJECT
public:
/// Returns icons factory instance
static ModuleBase_IconFactory* get();
#include <QDebug>
#endif
+
+void ModuleBase_FinishOperation::work()
+{
+ SessionPtr aMgr = ModelAPI_Session::get();
+ aMgr->finishOperation();
+ thread()->quit();
+}
+
+
ModuleBase_Operation::ModuleBase_Operation(const QString& theId, QObject* theParent)
: QObject(theParent),
myIsModified(false),
if (aPanel)
aPanel->onAcceptData();
- SessionPtr aMgr = ModelAPI_Session::get();
commitOperation();
+
+ SessionPtr aMgr = ModelAPI_Session::get();
aMgr->finishOperation();
+ //ModuleBase_FinishOperation* aFinish = new ModuleBase_FinishOperation();
+ //ModuleBase_WorkController aController(aFinish);
+ //aController.perform();
stopOperation();
emit stopped();
#define ModuleBase_Operation_H
#include <ModuleBase.h>
+#include <ModuleBase_WorkController.h>
#include <QObject>
#include <QString>
class QKeyEvent;
+
+
+class ModuleBase_FinishOperation : public ModuleBase_IWorker
+{
+ Q_OBJECT
+public slots:
+ virtual void work();
+};
+
+
/*!
* \class ModuleBase_Operation
* \ingroup GUI
myFeature->setStable(true);
SessionPtr aMgr = ModelAPI_Session::get();
- /// Set current feature and remeber old current feature
+ // Set current feature and remeber old current feature
commitOperation();
aMgr->finishOperation();
+ //ModuleBase_FinishOperation* aFinish = new ModuleBase_FinishOperation();
+ //ModuleBase_WorkController aController(aFinish);
+ //aController.perform();
stopOperation();
emit stopped();
--- /dev/null
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#include "ModuleBase_WorkController.h"
+#include <QApplication>
+
+ModuleBase_WorkController::ModuleBase_WorkController(ModuleBase_IWorker* theWorker)
+ : QObject(),
+ myWorker(theWorker)
+{
+}
+
+
+ModuleBase_WorkController::~ModuleBase_WorkController()
+{
+ while (myThread.isRunning())
+ myThread.wait(1);
+}
+
+void ModuleBase_WorkController::perform()
+{
+ myWorker->moveToThread(&myThread);
+ connect(&myThread, SIGNAL(finished()), myWorker, SLOT(deleteLater()));
+ connect(&myThread, SIGNAL(started()), myWorker, SLOT(work()));
+ myThread.start();
+}
--- /dev/null
+// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
+
+#ifndef ModuleBase_WorkController_H
+#define ModuleBase_WorkController_H
+
+#include "ModuleBase.h"
+
+#include <QObject>
+#include <QThread>
+
+
+class MODULEBASE_EXPORT ModuleBase_IWorker: public QObject
+{
+ Q_OBJECT
+public slots:
+ virtual void work() {}
+};
+
+
+class MODULEBASE_EXPORT ModuleBase_WorkController: public QObject
+{
+ Q_OBJECT
+public:
+ ModuleBase_WorkController(ModuleBase_IWorker* theWorker);
+
+ ~ModuleBase_WorkController();
+
+ void perform();
+
+private:
+ ModuleBase_IWorker* myWorker;
+ QThread myThread;
+};
+
+#endif
\ No newline at end of file
PartSet_WidgetSketchCreator.h
PartSet_WidgetSketchLabel.h
PartSet_ExternalPointsMgr.h
+ PartSet_IconFactory.h
+ PartSet_CustomPrs.h
)
SET(PROJECT_SOURCES
PartSet_CustomPrs::PartSet_CustomPrs(ModuleBase_IWorkshop* theWorkshop)
: myWorkshop(theWorkshop), myFeature(FeaturePtr()), myPresentationIsEmpty(false)
{
- Events_Loop* aLoop = Events_Loop::loop();
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION));
+ //Events_Loop* aLoop = Events_Loop::loop();
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION));
+ ModuleBase_EventsListener* aListener = ModuleBase_EventsListener::instance();
+ connect(aListener, SIGNAL(hasEvent(ModuleBase_Event*)),
+ SLOT(processEvent(ModuleBase_Event*)), Qt::QueuedConnection);
initPresentation(ModuleBase_IModule::CustomizeArguments);
initPresentation(ModuleBase_IModule::CustomizeResults);
clearPresentation(ModuleBase_IModule::CustomizeHighlightedObjects);
}
-void PartSet_CustomPrs::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void PartSet_CustomPrs::processEvent(ModuleBase_Event* theMessage)
{
- if (theMessage->eventID() == Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION))
+ std::shared_ptr<Events_Message> aMsg = theMessage->message();
+ if (aMsg->eventID() == Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION))
myPresentationIsEmpty = true; /// store state to analize it after display/erase is finished
}
#include "PartSet_OperationPrs.h"
#include <ModuleBase_IModule.h>
+#include <ModuleBase_EventsListener.h>
+
#include <ModelAPI_Object.h>
#include <ModelAPI_Result.h>
#include <ModelAPI_Feature.h>
* This is the module custom presentation, which manage an AIS presentation, that can be filled
* by a feature and visualized in the viewer additionally to usual workshop objects.
*/
-class PartSet_CustomPrs : public Events_Listener
+class PartSet_CustomPrs : public QObject //Events_Listener
{
+ Q_OBJECT
public:
/// Returns yellow color
static const std::string OPERATION_PARAMETER_COLOR() { return "255, 255, 0"; }
/// it caused erroneus case because the presentation has linkage to the previous context.
void clearPrs();
+private slots:
//! Redefinition of Events_Listener method to listen a moment that the presentation becomes empty
- virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+ virtual void processEvent(ModuleBase_Event* theMessage);
private:
/// Creates the AIS operation presentation
PartSet_IconFactory::PartSet_IconFactory():ModuleBase_IconFactory()
{
- Events_Loop::loop()->registerListener(this,
- Events_Loop::eventByName(Config_FeatureMessage::GUI_EVENT()));
+ //Events_Loop::loop()->registerListener(this,
+ // Events_Loop::eventByName(Config_FeatureMessage::GUI_EVENT()));
+ ModuleBase_EventsListener* aListener = ModuleBase_EventsListener::instance();
+ connect(aListener, SIGNAL(hasEvent(ModuleBase_Event*)),
+ SLOT(processEvent(ModuleBase_Event*)), Qt::QueuedConnection);
}
return anIcon;
}
-void PartSet_IconFactory::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void PartSet_IconFactory::processEvent(ModuleBase_Event* theMessage)
{
- if (theMessage->eventID() ==
+ std::shared_ptr<Events_Message> aMsg = theMessage->message();
+ if (aMsg->eventID() ==
Events_Loop::loop()->eventByName(Config_FeatureMessage::GUI_EVENT())) {
std::shared_ptr<Config_FeatureMessage> aFeatureMsg =
- std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
+ std::dynamic_pointer_cast<Config_FeatureMessage>(aMsg);
if (!aFeatureMsg->isInternal()) {
ActionInfo aFeatureInfo;
aFeatureInfo.initFrom(aFeatureMsg);
#include "PartSet.h"
#include <ModuleBase_IconFactory.h>
-#include <Events_Listener.h>
+#include <ModuleBase_EventsListener.h>
+//#include <Events_Listener.h>
+#include <Events_Message.h>
#include <QMap>
* \brief This is a class is redefined in order to provide
* icons of objects for object browser specific for PartSetModule
*/
-class PARTSET_EXPORT PartSet_IconFactory : public ModuleBase_IconFactory, public Events_Listener
+class PARTSET_EXPORT PartSet_IconFactory : public ModuleBase_IconFactory
+ //, public Events_Listener
{
+ Q_OBJECT
public:
/// Constructor
PartSet_IconFactory();
/// Event Listener method
/// \param theMessage an event message
- virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+ //virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+
+private slots:
+ /// Event Listener method
+ /// \param theMessage an event message
+ virtual void processEvent(ModuleBase_Event* theMessage);
private:
static QMap<QString, QString> myIcons;
myOverconstraintListener = new PartSet_OverconstraintListener(theWshop);
- Events_Loop* aLoop = Events_Loop::loop();
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED));
+ //Events_Loop* aLoop = Events_Loop::loop();
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED));
+ ModuleBase_EventsListener* aListener = ModuleBase_EventsListener::instance();
+ connect(aListener, SIGNAL(hasEvent(ModuleBase_Event*)),
+ SLOT(processEvent(ModuleBase_Event*)), Qt::QueuedConnection);
registerSelectionFilter(SF_GlobalFilter, new PartSet_GlobalFilter(myWorkshop));
registerSelectionFilter(SF_FilterInfinite, new PartSet_FilterInfinite(myWorkshop));
connect(aOB->treeView(), SIGNAL(doubleClicked(const QModelIndex&)),
SLOT(onTreeViewDoubleClick(const QModelIndex&)));
- Events_Loop* aLoop = Events_Loop::loop();
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
+ //Events_Loop* aLoop = Events_Loop::loop();
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
}
}
}
//******************************************************
-void PartSet_Module::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void PartSet_Module::processEvent(ModuleBase_Event* theMessage)
{
- if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
+ std::shared_ptr<Events_Message> aMsg = theMessage->message();
+
+ if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
// Do not change activation of parts if an operation active
static QStringList aAllowActivationList;
if (aAllowActivationList.isEmpty())
if (needUpdate) {
aTreeView->viewport()->repaint(aTreeView->viewport()->rect());
}
- } else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
+ } else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(aMsg);
std::set<ObjectPtr> aObjects = aUpdMsg->objects();
ObjectPtr aConstrObj;
#include <ModuleBase_IModule.h>
#include <ModuleBase_Definitions.h>
+#include <ModuleBase_EventsListener.h>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Attribute.h>
#include <ModelAPI_CompositeFeature.h>
-#include <Events_Listener.h>
+//#include <Events_Listener.h>
//#include <StdSelect_FaceFilter.hxx>
#include <TopoDS_Shape.hxx>
* \ingroup Modules
* Implementation of Partset module
*/
-class PARTSET_EXPORT PartSet_Module : public ModuleBase_IModule, public Events_Listener
+class PARTSET_EXPORT PartSet_Module : public ModuleBase_IModule//, public Events_Listener
{
Q_OBJECT
/// Event Listener method
/// \param theMessage an event message
- virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+ // virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
/// Set the object with the object results are customized
/// \param theFeature a feature
/// \param theIndex the current choice index
void onChoiceChanged(ModuleBase_ModelWidget* theWidget, int theIndex);
+ /// Event Listener method
+ /// \param theMessage an event message
+ virtual void processEvent(ModuleBase_Event* theMessage);
+
protected:
/// Appends specific selection modes for the module to the list of types
/// \param theModes a selection modes to be extended
XGUI_Workshop.h
XGUI_WorkshopListener.h
XGUI_InspectionPanel.h
+ XGUI_MenuMgr.h
)
# sources / moc wrappings
myShortcuts << QKeySequence::Close;
//Initialize event listening
- Events_Loop* aLoop = Events_Loop::loop();
- static Events_ID aStateResponseEventId =
- Events_Loop::loop()->eventByName(EVENT_FEATURE_STATE_RESPONSE);
- aLoop->registerListener(this, aStateResponseEventId, NULL, true);
+ ModuleBase_EventsListener* aListener = ModuleBase_EventsListener::instance();
+ connect(aListener, SIGNAL(hasEvent(ModuleBase_Event*)),
+ SLOT(processEvent(ModuleBase_Event*)), Qt::QueuedConnection);
}
XGUI_ActionsMgr::~XGUI_ActionsMgr()
return aResult;
}
-void XGUI_ActionsMgr::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void XGUI_ActionsMgr::processEvent(ModuleBase_Event* theMessage)
{
+ std::shared_ptr<Events_Message> aMsg = theMessage->message();
+
const Events_ID kResponseEvent =
Events_Loop::loop()->eventByName(EVENT_FEATURE_STATE_RESPONSE);
- if (theMessage->eventID() == kResponseEvent) {
+ if (aMsg->eventID() == kResponseEvent) {
std::shared_ptr<ModelAPI_FeatureStateMessage> aStateMessage =
- std::dynamic_pointer_cast<ModelAPI_FeatureStateMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_FeatureStateMessage>(aMsg);
if (!aStateMessage.get())
return;
std::list<std::string> aFeaturesList = aStateMessage->features();
}
setActionEnabled(anActionId, aStateMessage->state(*it, theDefaultState));
}
- } else if (theMessage.get()) {
- #ifdef _DEBUG
- std::cout << "XGUI_ActionsMgr::processEvent: unhandled message caught: " << std::endl
- << theMessage->eventID().eventText() << std::endl;
- #endif
}
}
#include "XGUI.h"
-#include <Events_Listener.h>
#include <ModelAPI_Feature.h>
#include <ModuleBase_ActionInfo.h>
+#include <ModuleBase_EventsListener.h>
#include <QObject>
#include <QMap>
/// class XGUI_ActionsMgr
/// \ingroup GUI
/// A class for management of actions (features) activation/deactivation
-class XGUI_EXPORT XGUI_ActionsMgr : public QObject, public Events_Listener
+class XGUI_EXPORT XGUI_ActionsMgr : public QObject//, public Events_Listener
{
Q_OBJECT
/// \param theKeySequence - string that contain a key sequence to register
QKeySequence registerShortcut(const QString& theKeySequence);
- /// Redefinition of Events_Listener method
- virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
-
/// Return property panel's action like ok, cancel, help.
/// If there is no such action, it will be created.
QAction* operationStateAction(OperationStateActionId theId);
/// if it was registered in the manager
ActionInfo actionInfoById(const QString& theId);
+private slots:
+ /// Redefinition of Events_Listener method
+ virtual void processEvent(ModuleBase_Event* theMessage);
+
private:
/// Update workbench actions according to OperationMgr state:
/// No active operations: all actions but nested are available
XGUI_ObjectsBrowser* aOB = qobject_cast<XGUI_ObjectsBrowser*>(theParent);
myWorkshop = aOB->workshop();
- Events_Loop* aLoop = Events_Loop::loop();
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_ORDER_UPDATED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+ ModuleBase_EventsListener* aListener = ModuleBase_EventsListener::instance();
+ connect(aListener, SIGNAL(hasEvent(ModuleBase_Event*)),
+ SLOT(processEvent(ModuleBase_Event*)), Qt::QueuedConnection);
+ //Events_Loop* aLoop = Events_Loop::loop();
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_DELETED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_ORDER_UPDATED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_DOCUMENT_CHANGED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
}
XGUI_DataModel::~XGUI_DataModel()
}
//******************************************************
-void XGUI_DataModel::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void XGUI_DataModel::processEvent(ModuleBase_Event* theMessage)
{
- if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
+ std::shared_ptr<Events_Message> aMsg = theMessage->message();
+
+ if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(aMsg);
std::set<ObjectPtr> aObjects = aUpdMsg->objects();
QObjectPtrList aCreated;
std::set<ObjectPtr>::const_iterator aIt;
dataChanged(aParentIndex1, aParentIndex2);
}
}
- else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_DELETED)) {
+ else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_DELETED)) {
std::shared_ptr<ModelAPI_ObjectDeletedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectDeletedMessage>(aMsg);
const std::list<std::pair<std::shared_ptr<ModelAPI_Document>, std::string>>& aMsgGroups =
aUpdMsg->groups();
std::list<std::pair<std::shared_ptr<ModelAPI_Document>, std::string>>::const_iterator aIt;
QTreeNodesList aList = myRoot->objectsDeleted(aIt->first, aIt->second.c_str());
rebuildDataTree();
}
- else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
+ else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(aMsg);
std::set<ObjectPtr> aObjects = aUpdMsg->objects();
QObjectPtrList aCreated;
}
}
}
- else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_ORDER_UPDATED)) {
+ else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_ORDER_UPDATED)) {
std::shared_ptr<ModelAPI_OrderUpdatedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_OrderUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_OrderUpdatedMessage>(aMsg);
if (aUpdMsg->reordered().get()) {
DocumentPtr aDoc = aUpdMsg->reordered()->document();
std::string aGroup = aUpdMsg->reordered()->group();
}
}
}
- else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
+ else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_DOCUMENT_CHANGED)) {
DocumentPtr aDoc = ModelAPI_Session::get()->activeDocument();
ModuleBase_ITreeNode* aRoot = myRoot->findRoot(aDoc);
if (aRoot) {
updateSubTree(aRoot);
}
}
- else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)) {
+ else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)) {
std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(aMsg);
std::set<ObjectPtr> aObjects = aUpdMsg->objects();
QObjectPtrList aCreated;
#include "XGUI.h"
#include <ModuleBase_Definitions.h>
+#include <ModuleBase_EventsListener.h>
#include <ModelAPI_Object.h>
#include <ModelAPI_Document.h>
#include <Events_Listener.h>
* - An index which contains internal pointer as ModelAPI_Document is
* a folder which belongs to this document
*/
-class XGUI_EXPORT XGUI_DataModel : public QAbstractItemModel, public Events_Listener
+class XGUI_EXPORT XGUI_DataModel : public QAbstractItemModel//, public Events_Listener
{
Q_OBJECT
public:
/// Event Listener method
/// \param theMessage an event message
- virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+ //virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
//! Returns an object by the given Model index.
//! Returns 0 if the given index is not index of an object
/// Signal about tree had been rebuilt
void treeRebuilt();
+private slots:
+ /// Event Listener method
+ /// \param theMessage an event message
+ void processEvent(ModuleBase_Event* theMessage);
+
private:
enum VisibilityState {
NoneState,
void updateSubTree(ModuleBase_ITreeNode* theParent);
- /// Find a root index which contains objects of the given document
- /// \param theDoc the document object
- //QModelIndex findDocumentRootIndex(const ModelAPI_Document* theDoc, int aColumn = 1) const;
-
- /// Returns number of folders in document.
- /// Considered folders which has to be shown only if they are not empty.
- /// \param theDoc document which has to be checked. If 0 then Root document will be considered
- //int foldersCount(ModelAPI_Document* theDoc = 0) const;
-
- /// Retrurns indexes of folders which can not be shown because they are empty
- /// \param theDoc document which has to be checked. If 0 then Root document will be considered
- //QIntList missedFolderIndexes(ModelAPI_Document* theDoc = 0) const;
-
- /// Returns Id (row) of a folder taking into consideration
- /// folders which can not be shown non empty
- /// \param theType Type of the folder
- /// \param theDoc a document which contains this folder
- //int folderId(std::string theType, ModelAPI_Document* theDoc = 0) const;
-
- /// Removes a row from branch of tree
- /// \param theStart - start row to update indexes
- /// \param theSize - number of indexes in the folder
- /// \param theParent - index of parent folder
- //void rebuildBranch(int theRow, int theCount, const QModelIndex& theParent = QModelIndex());
-
- /// Returns list of folders types which can not be shown empty
- /// \param fromRoot - root document flag
- //QStringList listOfShowNotEmptyFolders(bool fromRoot = true) const;
-
- //int getNumberOfFolderItems(const ModelAPI_Folder* theFolder) const;
- //ObjectPtr getObjectInFolder(const ModelAPI_Folder* theFolder, int theId) const;
-
- //VisibilityState getVisibilityState(const QModelIndex& theIndex) const;
-
- //void addShownFolder(DocumentPtr theDoc, QString theFolder)
- //{
- // if (!myShownFolders.contains(theDoc)) {
- // myShownFolders[theDoc] = QStringList();
- // }
- // myShownFolders[theDoc].append(theFolder);
- //}
-
- //void removeShownFolder(DocumentPtr theDoc, QString theFolder)
- //{
- // if (myShownFolders.contains(theDoc)) {
- // myShownFolders[theDoc].removeAll(theFolder);
- // if (myShownFolders[theDoc].isEmpty())
- // myShownFolders.remove(theDoc);
- // }
- //}
-
- //bool hasShownFolder(DocumentPtr theDoc, QString theFolder) const
- //{
- // if (myShownFolders.contains(theDoc))
- // return myShownFolders[theDoc].contains(theFolder);
- // return false;
- //}
-
- //Config_DataModelReader* myXMLReader;
XGUI_Workshop* myWorkshop;
QMap<DocumentPtr, QStringList> myShownFolders;
- //bool myIsEventsProcessingBlocked;
ModuleBase_ITreeNode* myRoot;
};
XGUI_MenuMgr::XGUI_MenuMgr(XGUI_Workshop* theWorkshop)
: myWorkshop(theWorkshop)
{
- Events_Loop* aLoop = Events_Loop::loop();
-
- aLoop->registerListener(this, Events_Loop::eventByName(Config_FeatureMessage::GUI_EVENT()));
+ ModuleBase_EventsListener* aListener = ModuleBase_EventsListener::instance();
+ connect(aListener, SIGNAL(hasEvent(ModuleBase_Event*)),
+ SLOT(processEvent(ModuleBase_Event*)), Qt::QueuedConnection);
}
-void XGUI_MenuMgr::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void XGUI_MenuMgr::processEvent(ModuleBase_Event* theMessage)
{
+ std::shared_ptr<Events_Message> aMsg = theMessage->message();
+
//A message to start feature creation received.
- if (theMessage->eventID() ==
+ if (aMsg->eventID() ==
Events_Loop::loop()->eventByName(Config_FeatureMessage::GUI_EVENT())) {
std::shared_ptr<Config_FeatureMessage> aFeatureMsg =
- std::dynamic_pointer_cast<Config_FeatureMessage>(theMessage);
+ std::dynamic_pointer_cast<Config_FeatureMessage>(aMsg);
if (!aFeatureMsg->isInternal()) {
addFeature(aFeatureMsg);
}
#include "XGUI.h"
-#include <Events_Listener.h>
+#include <ModuleBase_EventsListener.h>
#include <string>
#include <list>
#include <memory>
+#include <QObject>
class XGUI_MenuWorkbench;
class XGUI_Workshop;
* in XML file. It listens the read feature of XML and fills internal structure of menu workbenches
* and groups of feature. After, it creates menues and tools in the module.
*/
-class XGUI_MenuMgr : public Events_Listener
+class XGUI_EXPORT XGUI_MenuMgr : public QObject //Events_Listener
{
+ Q_OBJECT
public:
/// Constructor
/// \param theWorkshop the current workshop
- XGUI_EXPORT XGUI_MenuMgr(XGUI_Workshop* theWorkshop);
- XGUI_EXPORT virtual ~XGUI_MenuMgr() {}
+ XGUI_MenuMgr(XGUI_Workshop* theWorkshop);
+ virtual ~XGUI_MenuMgr() {}
/// Creates feature actions
- XGUI_EXPORT void createFeatureActions();
+ void createFeatureActions();
+public slots:
/// Redefinition of Events_Listener method
/// \param theMessage a message
- XGUI_EXPORT virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+ void processEvent(ModuleBase_Event* theMessage);
protected:
/// Process event "Add a feature"
//******************************************************
void XGUI_WorkshopListener::initializeEventListening()
{
+ ModuleBase_EventsListener* aListener = ModuleBase_EventsListener::instance();
+ connect(aListener, SIGNAL(hasEvent(ModuleBase_Event*)),
+ SLOT(processEvent(ModuleBase_Event*)), Qt::QueuedConnection);
//Initialize event listening
- Events_Loop* aLoop = Events_Loop::loop();
- aLoop->registerListener(this, Events_InfoMessage::errorID()); //!< Listening application errors.
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
- aLoop->registerListener(this, Events_LongOp::eventID());
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_PLUGIN_LOADED));
-
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION));
- aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION));
-
- aLoop->registerListener(this, Events_Loop::eventByName("FinishOperation"));
- aLoop->registerListener(this, Events_Loop::eventByName("AbortOperation"));
+ //Events_Loop* aLoop = Events_Loop::loop();
+ //aLoop->registerListener(this, Events_InfoMessage::errorID()); //!< Listening application errors.
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_UPDATED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_CREATED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY));
+ //aLoop->registerListener(this, Events_LongOp::eventID());
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_PLUGIN_LOADED));
+
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION));
+ //aLoop->registerListener(this, Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION));
+
+ //aLoop->registerListener(this, Events_Loop::eventByName("FinishOperation"));
+ //aLoop->registerListener(this, Events_Loop::eventByName("AbortOperation"));
}
//******************************************************
-void XGUI_WorkshopListener::processEvent(const std::shared_ptr<Events_Message>& theMessage)
+void XGUI_WorkshopListener::processEvent(ModuleBase_Event* theMessage)
{
+ std::shared_ptr<Events_Message> aMsg = theMessage->message();
+
if (QApplication::instance() &&
QApplication::instance()->thread() != QThread::currentThread()) {
#ifdef _DEBUG
std::cout << "XGUI_Workshop::processEvent: " << "Working in another thread." << std::endl;
#endif
SessionPtr aMgr = ModelAPI_Session::get();
- PostponeMessageQtEvent* aPostponeEvent = new PostponeMessageQtEvent(theMessage);
+ PostponeMessageQtEvent* aPostponeEvent = new PostponeMessageQtEvent(aMsg);
QApplication::postEvent(this, aPostponeEvent);
return;
}
// Process creation of Part
- if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
+ if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_CREATED)) {
std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(aMsg);
onFeatureCreatedMsg(aUpdMsg);
if (myUpdatePrefs) {
XGUI_SalomeConnector* aSalomeConnector = workshop()->salomeConnector();
myUpdatePrefs = false;
}
}
- else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_PLUGIN_LOADED)) {
+ else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_PLUGIN_LOADED)) {
myUpdatePrefs = true;
}
// Redisplay feature
- else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)) {
+ else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)) {
std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(aMsg);
onFeatureRedisplayMsg(aUpdMsg);
- } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION)) {
+ } else if (aMsg->eventID() == Events_Loop::eventByName(EVENT_EMPTY_AIS_PRESENTATION)) {
std::shared_ptr<ModelAPI_ObjectUpdatedMessage> aUpdMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(aMsg);
onFeatureEmptyPresentationMsg(aUpdMsg);
- } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION)) {
+ } else if (aMsg->eventID() == Events_Loop::eventByName(EVENT_UPDATE_BY_WIDGET_SELECTION)) {
ModuleBase_ModelWidget* aWidget = workshop()->propertyPanel()->activeWidget();
if (aWidget) {
ModuleBase_WidgetSelector* aWidgetSelector =
if (aWidgetSelector)
workshop()->selector()->setSelected(aWidgetSelector->getAttributeSelection());
}
- } else if (theMessage->eventID() == Events_Loop::eventByName("FinishOperation")/* ||
+ } else if (aMsg->eventID() == Events_Loop::eventByName("FinishOperation")/* ||
theMessage->eventID() == Events_Loop::eventByName("AbortOperation")*/)
workshop()->facesPanel()->reset(false); // do not flush redisplay, it is flushed after event
//Update property panel on corresponding message. If there is no current operation (no
//property panel), or received message has different feature to the current - do nothing.
- else if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
+ else if (aMsg->eventID() == Events_Loop::loop()->eventByName(EVENT_OBJECT_UPDATED)) {
std::shared_ptr<ModelAPI_ObjectUpdatedMessage> anUpdateMsg =
- std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(theMessage);
+ std::dynamic_pointer_cast<ModelAPI_ObjectUpdatedMessage>(aMsg);
onFeatureUpdatedMsg(anUpdateMsg);
- } else if (theMessage->eventID() == Events_LongOp::eventID()) {
+ } else if (aMsg->eventID() == Events_LongOp::eventID()) {
if (Events_LongOp::isPerformed()) {
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
} else {
QApplication::restoreOverrideCursor();
}
- } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED)) {
+ } else if (aMsg->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_BLOCKED)) {
// the viewer's update context will not happens until viewer updated is emitted
workshop()->displayer()->enableUpdateViewer(false);
- } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED)) {
+ } else if (aMsg->eventID() == Events_Loop::eventByName(EVENT_UPDATE_VIEWER_UNBLOCKED)) {
// the viewer's update context is unblocked, the viewer's update works
XGUI_Displayer* aDisplayer = workshop()->displayer();
aDisplayer->enableUpdateViewer(true);
} else {
//Show error dialog if error message received.
std::shared_ptr<Events_InfoMessage> anIngfoMsg =
- std::dynamic_pointer_cast<Events_InfoMessage>(theMessage);
+ std::dynamic_pointer_cast<Events_InfoMessage>(aMsg);
if (anIngfoMsg) {
emit errorOccurred(anIngfoMsg);
}
PostponeMessageQtEvent* aPostponedEv = dynamic_cast<PostponeMessageQtEvent*>(theEvent);
if (aPostponedEv) {
std::shared_ptr<Events_Message> aEventPtr = aPostponedEv->postponedMessage();
- processEvent(aEventPtr);
+ ModuleBase_Event aEv(aEventPtr);
+ processEvent(&aEv);
return true;
}
return false;
#define XGUI_WORKSHOP_LISTENER_H
#include "XGUI.h"
+#include <ModuleBase_EventsListener.h>
#include <Events_Listener.h>
#include <Events_Message.h>
* \ingroup GUI
* \brief Class which process the events from the event loop.
*/
-class XGUI_EXPORT XGUI_WorkshopListener : public QObject, public Events_Listener
+class XGUI_EXPORT XGUI_WorkshopListener : public QObject//, public Events_Listener
{
Q_OBJECT
public:
void initializeEventListening();
//! Redefinition of Events_Listener method
- virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
+ //virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
signals:
/// Emitted when error in applivation happens
void errorOccurred(std::shared_ptr<Events_InfoMessage> theMsg);
+private slots:
+ void processEvent(ModuleBase_Event* theMessage);
+
protected:
/// Procedure to process postponed events
bool event(QEvent * theEvent);