1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
3 // File: XGUI_OperationMgr.cpp
4 // Created: 20 Apr 2014
5 // Author: Natalia ERMOLAEVA
7 #include "XGUI_OperationMgr.h"
8 #include "XGUI_ModuleConnector.h"
9 #include "XGUI_Workshop.h"
10 #include "XGUI_ErrorMgr.h"
11 #include "XGUI_Tools.h"
12 #include "XGUI_ObjectsBrowser.h"
13 #include "XGUI_ContextMenuMgr.h"
15 #include <ModuleBase_IPropertyPanel.h>
16 #include <ModuleBase_ModelWidget.h>
17 #include "ModuleBase_Operation.h"
18 #include "ModuleBase_IWorkshop.h"
19 #include "ModuleBase_IModule.h"
20 #include <ModuleBase_IViewer.h>
21 #include "ModuleBase_OperationDescription.h"
22 #include "ModuleBase_OperationFeature.h"
23 #include "ModuleBase_Tools.h"
25 #include "ModelAPI_CompositeFeature.h"
26 #include "ModelAPI_Session.h"
28 #include <XGUI_PropertyPanel.h>
29 #include <QToolButton>
32 #include <QMessageBox>
33 #include <QApplication>
36 //#define DEBUG_CURRENT_FEATURE
38 /// Processes "Delete" key event of application. This key is used by several application actions.
39 /// There is a logical order of the actions processing. So the key can not be set for actions
40 /// as a shortcut. The class listens the key event and call operation manager processor.
41 class XGUI_ShortCutListener : public QObject
45 /// \param theParent the parent to be deleted when the parent is deleted
46 /// \param theOperationMgr the class to perform deletion
47 XGUI_ShortCutListener(QObject* theParent, XGUI_OperationMgr* theOperationMgr)
48 : QObject(theParent), myOperationMgr(theOperationMgr)
50 qApp->installEventFilter(this);
52 ~XGUI_ShortCutListener() {}
54 /// Switch on short cut listener
55 void setActive(const bool theIsActive) { myIsActive = theIsActive; }
57 /// Redefinition of virtual function to process Delete key release
58 virtual bool eventFilter(QObject *theObject, QEvent *theEvent)
60 bool isAccepted = false;
61 if (myIsActive && theEvent->type() == QEvent::KeyRelease) {
62 QKeyEvent* aKeyEvent = dynamic_cast<QKeyEvent*>(theEvent);
64 switch (aKeyEvent->key()) {
65 case Qt::Key_Delete: {
66 isAccepted = myOperationMgr->onProcessDelete(theObject);
72 isAccepted = QObject::eventFilter(theObject, theEvent);
77 XGUI_OperationMgr* myOperationMgr; /// processor for key event
78 bool myIsActive; /// boolean state whether the event filter perform own signal processing
81 XGUI_OperationMgr::XGUI_OperationMgr(QObject* theParent,
82 ModuleBase_IWorkshop* theWorkshop)
83 : QObject(theParent), myWorkshop(theWorkshop)
85 /// we need to install filter to the application in order to react to 'Delete' key button
86 /// this key can not be a short cut for a corresponded action because we need to set
87 /// the actions priority
88 myShortCutListener = new XGUI_ShortCutListener(theParent, this);
91 XGUI_OperationMgr::~XGUI_OperationMgr()
95 void XGUI_OperationMgr::activate()
97 myShortCutListener->setActive(true);
100 void XGUI_OperationMgr::deactivate()
102 myShortCutListener->setActive(false);
105 ModuleBase_Operation* XGUI_OperationMgr::currentOperation() const
107 return myOperations.count() > 0 ? myOperations.last() : 0;
110 bool XGUI_OperationMgr::isCurrentOperation(ModuleBase_Operation* theOperation)
114 return currentOperation() == theOperation;
117 bool XGUI_OperationMgr::hasOperation() const
119 return !myOperations.isEmpty() && (myOperations.last() != NULL);
122 bool XGUI_OperationMgr::hasOperation(const QString& theId) const
124 foreach(ModuleBase_Operation* aOp, myOperations) {
125 if (aOp->id() == theId)
131 ModuleBase_Operation* XGUI_OperationMgr::findOperation(const QString& theId) const
133 QList<ModuleBase_Operation*>::const_iterator anIt = myOperations.end();
134 while (anIt != myOperations.begin()) {
136 ModuleBase_Operation* anOperation = *anIt;
137 if (anOperation->id() == theId)
144 int XGUI_OperationMgr::operationsCount() const
146 return myOperations.count();
149 QStringList XGUI_OperationMgr::operationList() const
152 foreach(ModuleBase_Operation* eachOperation, myOperations) {
153 ModuleBase_OperationFeature* aFOperation =
154 dynamic_cast<ModuleBase_OperationFeature*>(eachOperation);
156 FeaturePtr aFeature = aFOperation->feature();
158 result << QString::fromStdString(aFeature->getKind());
165 ModuleBase_Operation* XGUI_OperationMgr::previousOperation(ModuleBase_Operation* theOperation) const
167 int idx = myOperations.lastIndexOf(theOperation);
168 if(idx == -1 || idx == 0) {
171 return myOperations.at(idx - 1);
174 bool XGUI_OperationMgr::eventFilter(QObject *theObject, QEvent *theEvent)
176 bool isAccepted = false;
177 if (theEvent->type() == QEvent::KeyRelease) {
178 QKeyEvent* aKeyEvent = dynamic_cast<QKeyEvent*>(theEvent);
180 isAccepted = onKeyReleased(theObject, aKeyEvent);
183 isAccepted = QObject::eventFilter(theObject, theEvent);
188 bool XGUI_OperationMgr::startOperation(ModuleBase_Operation* theOperation)
191 currentOperation()->postpone();
192 myOperations.append(theOperation);
194 connect(theOperation, SIGNAL(beforeStarted()), SLOT(onBeforeOperationStarted()));
195 connect(theOperation, SIGNAL(beforeAborted()), SLOT(onBeforeOperationAborted()));
196 connect(theOperation, SIGNAL(beforeCommitted()), SLOT(onBeforeOperationCommitted()));
198 connect(theOperation, SIGNAL(started()), SLOT(onOperationStarted()));
199 connect(theOperation, SIGNAL(aborted()), SLOT(onOperationAborted()));
200 connect(theOperation, SIGNAL(committed()), SLOT(onOperationCommitted()));
202 connect(theOperation, SIGNAL(stopped()), SLOT(onOperationStopped()));
203 connect(theOperation, SIGNAL(resumed()), SLOT(onOperationResumed()));
205 bool isStarted = theOperation->start();
207 onValidateOperation();
211 bool XGUI_OperationMgr::abortAllOperations()
217 if (operationsCount() == 1) {
218 ModuleBase_Operation* aCurrentOperation = currentOperation();
219 if (canStopOperation(aCurrentOperation)) {
220 abortOperation(aCurrentOperation);
226 aResult = QMessageBox::question(qApp->activeWindow(),
227 tr("Abort operation"),
228 tr("All active operations will be aborted."),
229 QMessageBox::Ok | QMessageBox::Cancel,
230 QMessageBox::Cancel) == QMessageBox::Ok;
231 while(aResult && hasOperation()) {
232 abortOperation(currentOperation());
238 bool XGUI_OperationMgr::commitAllOperations()
240 bool isCompositeCommitted = false, anOperationProcessed = false;
241 while (hasOperation()) {
242 ModuleBase_Operation* anOperation = currentOperation();
243 if (XGUI_Tools::workshop(myWorkshop)->errorMgr()->isApplyEnabled()) {
244 anOperationProcessed = onCommitOperation();
246 abortOperation(anOperation);
247 anOperationProcessed = true;
249 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
252 FeaturePtr aFeature = aFOperation->feature();
253 CompositeFeaturePtr aComposite =
254 std::dynamic_pointer_cast<ModelAPI_CompositeFeature>(aFeature);
255 isCompositeCommitted = aComposite.get();
256 if (isCompositeCommitted)
259 // not processed[committed] operation might be used in composite feature,
260 // so the while will be stopped by the previous check.
261 // this code is not necessary, but logically should be done when the processing will not
262 // be done for not composite feature by some reasons
263 if (!anOperationProcessed)
269 void XGUI_OperationMgr::onValidateOperation()
273 ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
274 (currentOperation());
275 if(aFOperation && aFOperation->feature().get())
276 XGUI_Tools::workshop(myWorkshop)->errorMgr()->updateActions(aFOperation->feature());
279 void XGUI_OperationMgr::updateApplyOfOperations(ModuleBase_Operation* theOperation)
281 XGUI_ErrorMgr* anErrorMgr = XGUI_Tools::workshop(myWorkshop)->errorMgr();
283 ModuleBase_OperationFeature* aFOperation =
284 dynamic_cast<ModuleBase_OperationFeature*>(theOperation);
286 anErrorMgr->updateAcceptAllAction(aFOperation->feature());
289 foreach(ModuleBase_Operation* anOperation, myOperations) {
291 updateApplyOfOperations(anOperation);
294 // Apply button of the current operation should also be updated
295 onValidateOperation();
298 bool XGUI_OperationMgr::canStopOperation(ModuleBase_Operation* theOperation)
300 //in case of nested (sketch) operation no confirmation needed
301 if (isGrantedOperation(theOperation->id()))
303 if (theOperation && theOperation->isModified()) {
304 QString aMessage = tr("%1 operation will be aborted.").arg(theOperation->id());
305 int anAnswer = QMessageBox::question(qApp->activeWindow(),
306 tr("Abort operation"),
308 QMessageBox::Ok | QMessageBox::Cancel,
309 QMessageBox::Cancel);
310 return anAnswer == QMessageBox::Ok;
315 bool XGUI_OperationMgr::commitOperation()
317 //if (hasOperation() && currentOperation()->isValid()) {
318 // onCommitOperation();
322 return onCommitOperation();
325 void XGUI_OperationMgr::resumeOperation(ModuleBase_Operation* theOperation)
327 theOperation->resume();
330 bool XGUI_OperationMgr::isGrantedOperation(const QString& theId)
332 bool isGranted = false;
334 QListIterator<ModuleBase_Operation*> anIt(myOperations);
336 ModuleBase_Operation* aPreviousOperation = 0;
337 while (anIt.hasPrevious() && !isGranted) {
338 ModuleBase_Operation* anOp = anIt.previous();
340 isGranted = anOp->isGranted(theId);
345 void XGUI_OperationMgr::setCurrentFeature(const FeaturePtr& theFeature)
347 SessionPtr aMgr = ModelAPI_Session::get();
348 DocumentPtr aDoc = aMgr->activeDocument();
349 bool aIsOp = aMgr->isOperation();
351 aMgr->startOperation(QString("Set current feature: %1")
352 .arg(theFeature->getKind().c_str()).toStdString());
353 aDoc->setCurrentFeature(theFeature, false);
354 #ifdef DEBUG_CURRENT_FEATURE
355 qDebug(QString(" document->setCurrentFeature(false) = %1 SET").arg(
356 ModuleBase_Tools::objectName(
357 ModelAPI_Session::get()->activeDocument()->currentFeature(false))).toStdString().c_str());
361 aMgr->finishOperation();
364 bool XGUI_OperationMgr::canStartOperation(const QString& theId, bool& isCommitted)
366 bool aCanStart = true;
368 ModuleBase_Operation* aCurrentOp = currentOperation();
370 bool aGranted = aCurrentOp->isGranted(theId);
371 // the started operation is granted for the current one,
372 // e.g. current - Sketch, started - Line
377 if (!isGrantedOperation(theId)) {
378 // the operation is not granted in the current list of operations
379 // e.g. Edit Parameter when Sketch, Line in Sketch is active.
380 aCanStart = abortAllOperations();
382 else if (canStopOperation(aCurrentOp)) {
383 // the started operation is granted in the parrent operation,
384 // e.g. current - Line in Sketch, started Circle
385 stopOperation(aCurrentOp, isCommitted);
394 void XGUI_OperationMgr::stopOperation(ModuleBase_Operation* theOperation, bool& isCommitted)
396 if (XGUI_Tools::workshop(myWorkshop)->errorMgr()->isApplyEnabled() && theOperation->isModified())
397 isCommitted = theOperation->commit();
400 abortOperation(theOperation);
404 void XGUI_OperationMgr::abortOperation(ModuleBase_Operation* theOperation)
406 ModuleBase_Operation* aCurrentOperation = currentOperation();
407 if (theOperation == aCurrentOperation)
408 theOperation->abort();
410 // it is possible to trigger upper operation(e.g. sketch, current is sketch line)
411 // all operation from the current to triggered should also be aborted
412 // operations over the parameter one are not aborted(e.g. extrusion cut, sketch abort)
413 while(hasOperation()) {
414 ModuleBase_Operation* aCurrentOperation = currentOperation();
415 aCurrentOperation->abort();
416 if(theOperation == aCurrentOperation)
422 bool XGUI_OperationMgr::onCommitOperation()
424 bool isCommitted = false;
425 ModuleBase_Operation* anOperation = currentOperation();
426 if (anOperation && myWorkshop->module()->canCommitOperation())
427 isCommitted = anOperation->commit();
431 void XGUI_OperationMgr::onAbortOperation()
433 ModuleBase_Operation* aCurrentOperation = currentOperation();
434 if (aCurrentOperation && canStopOperation(aCurrentOperation)) {
435 abortOperation(aCurrentOperation);
439 void XGUI_OperationMgr::onBeforeOperationStarted()
441 ModuleBase_Operation* aCurrentOperation = dynamic_cast<ModuleBase_Operation*>(sender());
442 if (!aCurrentOperation)
445 /// Set current feature and remeber old current feature
446 ModuleBase_OperationFeature* aFOperation =
447 dynamic_cast<ModuleBase_OperationFeature*>(aCurrentOperation);
449 SessionPtr aMgr = ModelAPI_Session::get();
450 DocumentPtr aDoc = aMgr->activeDocument();
451 // the parameter of current feature should be false, we should use all feature, not only
452 // visible in order to correctly save the previous feature of the nested operation, where the
453 // features can be not visible in the tree. The problem case is Edit sketch entitity(line)
454 // in the Sketch, created in ExtrusionCut operation. The entity disappears by commit.
455 // When sketch entity operation started, the sketch should be cashed here as the current.
456 // Otherwise(the flag is true), the ExtrusionCut is cashed, when commit happens, the sketch
457 // is disabled, sketch entity is disabled as extrusion cut is created earliest then sketch.
458 // As a result the sketch disappears from the viewer.
459 // However after commit it is displayed back.
460 aFOperation->setPreviousCurrentFeature(aDoc->currentFeature(false));
462 #ifdef DEBUG_CURRENT_FEATURE
463 FeaturePtr aFeature = aFOperation->feature();
464 QString aKind = aFeature ? aFeature->getKind().c_str() : "";
466 qDebug(QString("onBeforeOperationStarted() isEditOperation = %1, feature = %2")
467 .arg(aFOperation->isEditOperation())
468 .arg(ModuleBase_Tools::objectName(aFeature)).toStdString().c_str());
469 qDebug(QString(" document->currentFeature(false) = %1 : DO: setPreviousCurrentFeature").arg(
470 ModuleBase_Tools::objectName(aDoc->currentFeature(false))).toStdString().c_str());
473 if (aFOperation->isEditOperation()) {// it should be performed by the feature edit only
474 // in create operation, the current feature is changed by addFeature()
475 aDoc->setCurrentFeature(aFOperation->feature(), false);
476 #ifdef DEBUG_CURRENT_FEATURE
477 qDebug(QString(" document->setCurrentFeature(false) = %1").arg(
478 ModuleBase_Tools::objectName(aDoc->currentFeature(false))).toStdString().c_str());
480 // this is the only place where flushes must be called after setCurrentFeature for the
481 // current moment: after this the opertion is not finished, so, the ObjectBrowser
482 // state may be corrupted (issue #1457)
483 static Events_Loop* aLoop = Events_Loop::loop();
484 static Events_ID aCreateEvent = aLoop->eventByName(EVENT_OBJECT_CREATED);
485 aLoop->flush(aCreateEvent);
486 static Events_ID aDeleteEvent = aLoop->eventByName(EVENT_OBJECT_DELETED);
487 aLoop->flush(aDeleteEvent);
492 void XGUI_OperationMgr::onOperationStarted()
494 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
495 updateApplyOfOperations(aSenderOperation);
496 XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
497 aWorkshop->operationStarted(aSenderOperation);
500 void XGUI_OperationMgr::onBeforeOperationAborted()
502 onBeforeOperationCommitted();
505 void XGUI_OperationMgr::onOperationAborted()
507 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
508 emit operationAborted(aSenderOperation);
511 void XGUI_OperationMgr::onBeforeOperationCommitted()
513 ModuleBase_Operation* aCurrentOperation = dynamic_cast<ModuleBase_Operation*>(sender());
514 if (!aCurrentOperation)
517 /// Restore the previous current feature
518 ModuleBase_OperationFeature* aFOperation =
519 dynamic_cast<ModuleBase_OperationFeature*>(aCurrentOperation);
521 #ifdef DEBUG_CURRENT_FEATURE
522 QString aKind = aFOperation->feature()->getKind().c_str();
523 qDebug(QString("onBeforeOperationCommitted() isEditOperation = %1, feature = %2")
524 .arg(aFOperation->isEditOperation())
525 .arg(ModuleBase_Tools::objectName(aFOperation->feature())).toStdString().c_str());
526 qDebug(QString(" document->currentFeature(false) = %1").arg(
527 ModuleBase_Tools::objectName(
528 ModelAPI_Session::get()->activeDocument()->currentFeature(false)))
529 .toStdString().c_str());
532 if (aFOperation->isEditOperation()) {
533 /// Restore the previous current feature
534 setCurrentFeature(aFOperation->previousCurrentFeature());
536 else { // create operation
537 // the Top created feature should stays the current. In nested operations,
538 // like Line in the Sketch or
539 // Sketch in ExtrusionCut, a previous feature should be restored on commit.
540 // It is performed here
541 // in order to perform it in the current transaction without opening a new one.
542 if (myOperations.front() != aFOperation)
543 setCurrentFeature(aFOperation->previousCurrentFeature());
545 ModuleBase_IModule* aModule = myWorkshop->module();
547 aModule->beforeOperationStopped(aFOperation);
551 void XGUI_OperationMgr::onOperationCommitted()
553 // apply state for all features from the stack of operations should be updated
554 updateApplyOfOperations();
556 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
557 emit operationCommitted(aSenderOperation);
560 void XGUI_OperationMgr::onOperationResumed()
562 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
563 emit operationResumed(aSenderOperation);
566 void XGUI_OperationMgr::onOperationStopped()
568 ModuleBase_Operation* aSenderOperation = dynamic_cast<ModuleBase_Operation*>(sender());
569 ModuleBase_Operation* aCurrentOperation = currentOperation();
570 if (!aSenderOperation || !aCurrentOperation || aSenderOperation != aCurrentOperation)
573 myOperations.removeAll(aCurrentOperation);
574 aCurrentOperation->deleteLater();
576 emit operationStopped(aCurrentOperation);
578 // get last operation which can be resumed
579 ModuleBase_Operation* aResultOp = 0;
580 QListIterator<ModuleBase_Operation*> anIt(myOperations);
582 while (anIt.hasPrevious()) {
583 ModuleBase_Operation* anOp = anIt.previous();
590 bool isModified = aCurrentOperation->isModified();
591 aResultOp->setIsModified(aResultOp->isModified() || isModified);
592 resumeOperation(aResultOp);
593 onValidateOperation();
597 bool XGUI_OperationMgr::onKeyReleased(QObject *theObject, QKeyEvent* theEvent)
599 // Let the manager decide what to do with the given key combination.
600 ModuleBase_Operation* anOperation = currentOperation();
601 bool isAccepted = false;
602 switch (theEvent->key()) {
604 case Qt::Key_Enter: {
605 isAccepted = onProcessEnter(theObject);
610 bool noModifiers = (theEvent->modifiers() == Qt::NoModifier);
612 ModuleBase_IViewer* aViewer = myWorkshop->viewer();
613 Handle(AIS_InteractiveContext) aContext = aViewer->AISContext();
614 if (!aContext.IsNull()) {
615 Handle(V3d_View) aView = aViewer->activeView();
616 if ((theEvent->key() == Qt::Key_N))
617 aContext->HilightNextDetected(aView);
618 else if ((theEvent->key() == Qt::Key_P))
619 aContext->HilightPreviousDetected(aView);
630 // anOperation->keyReleased(theEvent->key());
635 bool XGUI_OperationMgr::onProcessEnter(QObject* theObject)
637 bool isAccepted = false;
638 ModuleBase_Operation* aOperation = currentOperation();
639 // to avoid enter processing when operation has not been started yet
642 ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
643 // only property panel enter is processed in order to do not process enter in application dialogs
644 bool isPPChild = isChildObject(theObject, aPanel);
648 ModuleBase_ModelWidget* anActiveWgt = aPanel->activeWidget();
649 bool isAborted = false;
651 QWidget* aFocusWidget = aPanel->focusWidget();
652 QToolButton* aCancelBtn =
653 dynamic_cast<XGUI_PropertyPanel*>(aPanel)->findButton(PROP_PANEL_CANCEL);
654 if (aFocusWidget && aCancelBtn && aFocusWidget == aCancelBtn) {
655 abortOperation(aOperation);
661 isAccepted = anActiveWgt && anActiveWgt->processEnter();
664 myWorkshop->module()->processEnter(anActiveWgt ? anActiveWgt->attributeID() : "");
666 /// functionality is similar to Apply click
667 ModuleBase_OperationFeature* aFOperation =
668 dynamic_cast<ModuleBase_OperationFeature*>(currentOperation());
670 myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty()) {
671 // key released is emitted to apply the current value to the model
672 // if it was modified in PP
673 emit keyEnterReleased();
685 bool editorControl(QObject* theObject)
687 QLineEdit* aLineEdit = dynamic_cast<QLineEdit*>(theObject);
691 bool XGUI_OperationMgr::onProcessDelete(QObject* theObject)
693 bool isAccepted = false;
694 ModuleBase_Operation* aOperation = currentOperation();
695 ModuleBase_ModelWidget* anActiveWgt = 0;
696 // firstly the widget should process Delete action
697 ModuleBase_IPropertyPanel* aPanel;
698 bool isPPChildObject = false;
700 aPanel = aOperation->propertyPanel();
702 isPPChildObject = isChildObject(theObject, aPanel);
703 // process delete in active widget only if delete sender is child of property panel
704 // it is necessary for the case when OB is shown, user perform selection and click Delete
705 if (isPPChildObject) {
706 anActiveWgt = aPanel->activeWidget();
708 isAccepted = anActiveWgt->processDelete();
714 // after widget, object browser and viewer should process delete
715 /// other widgets such as line edit controls should not lead to
716 /// processing delete by workshop
717 XGUI_ObjectsBrowser* aBrowser = XGUI_Tools::workshop(myWorkshop)->objectBrowser();
718 QWidget* aViewPort = myWorkshop->viewer()->activeViewPort();
719 bool isToDeleteObject = false;
720 XGUI_Workshop* aWorkshop = XGUI_Tools::workshop(myWorkshop);
721 XGUI_ContextMenuMgr* aContextMenuMgr = aWorkshop->contextMenuMgr();
722 if (theObject == aBrowser->treeView()) {
723 aContextMenuMgr->updateObjectBrowserMenu();
724 isToDeleteObject = aContextMenuMgr->action("DELETE_CMD")->isEnabled();
726 else if (isChildObject(theObject, aViewPort)) {
727 aContextMenuMgr->updateViewerMenu();
728 isToDeleteObject = aContextMenuMgr->action("DELETE_CMD")->isEnabled();
730 else if (isPPChildObject) {
731 // property panel child object is processed to process delete performed on Apply button of PP
732 isToDeleteObject = true;
734 else if (editorControl(theObject)) {
735 isToDeleteObject = false; /// Line Edit of Rename operation in ObjectBrowser
739 if (isToDeleteObject) {
740 aWorkshop->deleteObjects();
748 bool XGUI_OperationMgr::isChildObject(const QObject* theObject, const QObject* theParent)
750 bool isPPChild = false;
751 if (theParent && theObject) {
752 QObject* aParent = (QObject*)theObject;
754 isPPChild = aParent == theParent;
757 aParent = aParent->parent();