]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Bug IPAL19361 - Qt4 porting. It is impossible showing ID of elements in 3D Viewer...
authorouv <ouv@opencascade.com>
Fri, 28 Mar 2008 11:18:22 +0000 (11:18 +0000)
committerouv <ouv@opencascade.com>
Fri, 28 Mar 2008 11:18:22 +0000 (11:18 +0000)
src/LightApp/LightApp_Module.cxx
src/LightApp/LightApp_Module.h
src/LightApp/LightApp_Selection.cxx
src/LightApp/LightApp_Selection.h
src/LightApp/LightApp_ShowHideOp.cxx
src/SalomeApp/SalomeApp_Module.cxx
src/SalomeApp/SalomeApp_Module.h

index 901ca9bd0b6e8269e0ba35e02f156b01ca74d9b3..883cfccf3704d65775f977dfe3fba3db30491f31 100644 (file)
@@ -124,7 +124,8 @@ void LightApp_Module::viewManagers( QStringList& ) const
 /*!Context menu popup.*/
 void LightApp_Module::contextMenuPopup( const QString& client, QMenu* menu, QString& /*title*/ )
 {
-  LightApp_Selection* sel = createSelection( client, getApp()->selectionMgr() );
+  LightApp_Selection* sel = createSelection();
+  sel->init( client, getApp()->selectionMgr() );
   popupMgr()->setSelection( sel );
   popupMgr()->setMenu( menu );
   popupMgr()->updateMenu();
@@ -290,9 +291,9 @@ CAM_DataModel* LightApp_Module::createDataModel()
 }
 
 /*!Create and return instance of LightApp_Selection.*/
-LightApp_Selection* LightApp_Module::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const
+LightApp_Selection* LightApp_Module::createSelection() const
 {
-  return new LightApp_Selection( client, mgr );
+  return new LightApp_Selection();
 }
 
 /*!NOT IMPLEMENTED*/
index 58dec54acf2a4bc9800e64e31392f541e280077e..b05611454a699e15b86b6ca4889318049bdace67 100644 (file)
@@ -88,7 +88,7 @@ public:
   virtual void                        studyActivated() {};
 
   virtual LightApp_Displayer*         displayer();
-  virtual LightApp_Selection*         createSelection( const QString&, LightApp_SelectionMgr* ) const;
+  virtual LightApp_Selection*         createSelection() const;
 
 public slots:
   virtual bool                        activateModule( SUIT_Study* );
index c0654025cbdad035f744c7271fe70d3f3dc5ad6f..e087293e4deb0c4dcbfb6372fec560ac212b4b9f 100644 (file)
 /*!
   Constructor
 */
-LightApp_Selection::LightApp_Selection( const QString& client, LightApp_SelectionMgr* mgr )
+LightApp_Selection::LightApp_Selection()
 : myStudy( 0 )
+{
+}
+
+/*!
+  Destructor.
+*/
+LightApp_Selection::~LightApp_Selection()
+{
+}
+
+/*!
+  Initialization.
+*/
+void LightApp_Selection::init( const QString& client, LightApp_SelectionMgr* mgr)
 {
   myPopupClient = client;
   
@@ -92,13 +106,6 @@ LightApp_Selection::LightApp_Selection( const QString& client, LightApp_Selectio
   }
 }
 
-/*!
-  Destructor.
-*/
-LightApp_Selection::~LightApp_Selection()
-{
-}
-
 QString LightApp_Selection::referencedToEntry( const QString& entry ) const
 {
   return myStudy->referencedToEntry( entry );
index c95c53d9db88cc9d00277176c9e9d3c657994ceb..c7d084c551a43975c8f6543c052767bf265ff622 100644 (file)
@@ -47,9 +47,10 @@ class SUIT_ViewWindow;
 class LIGHTAPP_EXPORT LightApp_Selection : public QtxPopupSelection
 {
 public:
-  LightApp_Selection( const QString&, LightApp_SelectionMgr* );
+  LightApp_Selection();
   virtual ~LightApp_Selection();
 
+  virtual void                   init( const QString&, LightApp_SelectionMgr* );
   virtual void                   processOwner( const LightApp_DataOwner* );
 
   virtual int                    count() const;
index 39d845bac5fdf9958d49fe7160a51a9c1b63c1b6..86d694c1b625af756e15681e989f1f4f5476477d 100644 (file)
@@ -65,10 +65,11 @@ void LightApp_ShowHideOp::startOperation()
   if( !mod )
     return;
 
-  LightApp_Selection* sel = mod->createSelection( "", mgr );
+  LightApp_Selection* sel = mod->createSelection();
   if( !sel )
     return;
 
+  sel->init( "", mgr );
   if( sel->count()==0 && myActionType!=ERASE_ALL )
   {
     abort();
index 918c514ac3827dc8606704ecde14b8f117e2f11f..7c800c4263fed6ac9b730f9db0e27e3568154caa 100644 (file)
@@ -65,9 +65,9 @@ CAM_DataModel* SalomeApp_Module::createDataModel()
 }
 
 /*!Create and return instance of LightApp_Selection.*/
-LightApp_Selection* SalomeApp_Module::createSelection( const QString& client, LightApp_SelectionMgr* mgr ) const
+LightApp_Selection* SalomeApp_Module::createSelection() const
 {
-  return LightApp_Module::createSelection( client, mgr );
+  return LightApp_Module::createSelection();
 }
 
 /*!
index 1231c267889af4b49e7d00408d6d4bc91244c412..dbb1631a8bc84a12373fa7a2c235e60be4279413 100644 (file)
@@ -58,7 +58,7 @@ public:
 
   virtual void                        storeVisualParameters(int savePoint);
   virtual void                        restoreVisualParameters(int savePoint);
-  virtual LightApp_Selection*         createSelection( const QString&, LightApp_SelectionMgr* ) const;
+  virtual LightApp_Selection*         createSelection() const;
 
 protected:
   virtual CAM_DataModel*              createDataModel();