From 324cc3a655865731d468247ffa376418448c37d1 Mon Sep 17 00:00:00 2001 From: ptv Date: Wed, 4 Oct 2006 08:21:17 +0000 Subject: [PATCH] PTV fixes for COSAC GUI --- src/LightApp/LightApp_Application.cxx | 2 ++ src/LightApp/LightApp_OBSelector.h | 4 ++-- src/LightApp/LightApp_OCCSelector.cxx | 15 ++++++++++++++ src/LightApp/LightApp_OCCSelector.h | 11 ++++++++++- src/LightApp/resources/LightApp.xml | 28 +++++++++++++-------------- src/SUIT/SUIT_Operation.h | 3 ++- 6 files changed, 45 insertions(+), 18 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 7dffb1f0e..b00782443 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -71,6 +71,8 @@ #ifndef DISABLE_PLOT2DVIEWER #include #include + #include + #include #ifndef DISABLE_SALOMEOBJECT #include #else diff --git a/src/LightApp/LightApp_OBSelector.h b/src/LightApp/LightApp_OBSelector.h index f6811946c..c6f8388ec 100644 --- a/src/LightApp/LightApp_OBSelector.h +++ b/src/LightApp/LightApp_OBSelector.h @@ -19,11 +19,11 @@ #ifndef LIGHTAPP_OBSELECTOR_H #define LIGHTAPP_OBSELECTOR_H -#include "LightApp.h" - #include #include +#include "LightApp.h" + class OB_Browser; class LightApp_DataObject; diff --git a/src/LightApp/LightApp_OCCSelector.cxx b/src/LightApp/LightApp_OCCSelector.cxx index 446ae593b..616091a1e 100644 --- a/src/LightApp/LightApp_OCCSelector.cxx +++ b/src/LightApp/LightApp_OCCSelector.cxx @@ -29,6 +29,7 @@ /*! Constructor */ +#ifndef DISABLE_OCCVIEWER LightApp_OCCSelector::LightApp_OCCSelector( OCCViewer_Viewer* viewer, SUIT_SelectionMgr* mgr ) : SUIT_Selector( mgr, viewer ), myViewer( viewer ) @@ -36,6 +37,11 @@ LightApp_OCCSelector::LightApp_OCCSelector( OCCViewer_Viewer* viewer, SUIT_Selec if ( myViewer ) connect( myViewer, SIGNAL( selectionChanged() ), this, SLOT( onSelectionChanged() ) ); } +#else +LightApp_OCCSelector::LightApp_OCCSelector( SUIT_SelectionMgr* mgr ) +: SUIT_Selector( mgr ) +{} +#endif /*! Destructor. @@ -47,10 +53,12 @@ LightApp_OCCSelector::~LightApp_OCCSelector() /*! Gets viewer. */ +#ifndef DISABLE_OCCVIEWER OCCViewer_Viewer* LightApp_OCCSelector::viewer() const { return myViewer; } +#endif /*!On selection changed.*/ void LightApp_OCCSelector::onSelectionChanged() @@ -61,6 +69,7 @@ void LightApp_OCCSelector::onSelectionChanged() /*!Gets selection list.*/ void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const { +#ifndef DISABLE_OCCVIEWER if ( !myViewer ) return; @@ -77,11 +86,13 @@ void LightApp_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( entry( anIt.Value() ) ) ) ); #endif } +#endif } /*!Sets selection list.*/ void LightApp_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) { +#ifndef DISABLE_OCCVIEWER if ( !myViewer ) return; @@ -109,8 +120,10 @@ void LightApp_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList ) myViewer->unHighlightAll( false ); myViewer->setObjectsSelected( aSelList ); +#endif } +#ifndef DISABLE_OCCVIEWER /*!Gets entry ob object.*/ QString LightApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS ) const { @@ -127,3 +140,5 @@ QString LightApp_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS return res; } +#endif + diff --git a/src/LightApp/LightApp_OCCSelector.h b/src/LightApp/LightApp_OCCSelector.h index c358efe8a..d8cc273b8 100644 --- a/src/LightApp/LightApp_OCCSelector.h +++ b/src/LightApp/LightApp_OCCSelector.h @@ -23,9 +23,11 @@ #include +#ifndef DISABLE_OCCVIEWER #include class Handle_AIS_InteractiveObject; +#endif /*! \class LightApp_OCCSelector @@ -36,13 +38,18 @@ class LIGHTAPP_EXPORT LightApp_OCCSelector : public SUIT_Selector Q_OBJECT public: +#ifndef DISABLE_OCCVIEWER LightApp_OCCSelector( OCCViewer_Viewer*, SUIT_SelectionMgr* ); +#else + LightApp_OCCSelector( SUIT_SelectionMgr* ); +#endif virtual ~LightApp_OCCSelector(); +#ifndef DISABLE_OCCVIEWER OCCViewer_Viewer* viewer() const; virtual QString type() const { return OCCViewer_Viewer::Type(); } - +#endif private slots: virtual void onSelectionChanged(); @@ -50,10 +57,12 @@ protected: virtual void getSelection( SUIT_DataOwnerPtrList& ) const; virtual void setSelection( const SUIT_DataOwnerPtrList& ); +#ifndef DISABLE_OCCVIEWER QString entry( const Handle_AIS_InteractiveObject& ) const; private: OCCViewer_Viewer* myViewer; +#endif }; #endif diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index 7cb56db7b..31db6bf1b 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -15,25 +15,25 @@
- +
- - - - - - - - - - - - - + + + + + + + + + + + + +
diff --git a/src/SUIT/SUIT_Operation.h b/src/SUIT/SUIT_Operation.h index 3d15f058c..a156c846c 100755 --- a/src/SUIT/SUIT_Operation.h +++ b/src/SUIT/SUIT_Operation.h @@ -107,6 +107,8 @@ public: virtual QString operationName() const; + int execStatus() const; + signals: void started( SUIT_Operation* ); void aborted( SUIT_Operation* ); @@ -140,7 +142,6 @@ protected: virtual bool hasTransaction() const; virtual bool commitTransaction( const QString& = QString::null ); - int execStatus() const; void setExecStatus( const int ); void setState( const OperationState ); -- 2.39.2