Salome HOME
updated copyright message
[samples/sierpinsky.git] / src / SierpinskyGUI / SierpinskyGUI.cxx
index f6176b8d97a8ffafa6c87257c3dd476dd935fae2..0139ce4afdda657f713ff2ee465d0e31ca4cacea 100644 (file)
@@ -1,12 +1,32 @@
+// Copyright (C) 2005-2023  OPEN CASCADE
+//
+// 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
+//
+
 ///////////////////////////////////////////////////////////
 // File    : SierpinskyGUI.cxx
 // Author  : Vadim SANDLER (OCN)
 // Created : 13/07/05
-// Copyright (C) 2005 Open CASCADE
 ///////////////////////////////////////////////////////////
 
 #include "SierpinskyGUI.h"
 
+#include <SIERPINSKY_version.h>
+
 #include <SUIT_MessageBox.h>
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Desktop.h>
@@ -14,6 +34,7 @@
 #include <SVTK_ViewModel.h>
 #include <SALOME_LifeCycleCORBA.hxx>
 #include <SierpinskyGUI_RunDlg.h>
+#include <utilities.h>
 
 /*!
  * Constructor
@@ -30,7 +51,7 @@ SIERPINSKY_ORB::SIERPINSKY_ptr SierpinskyGUI::InitSIERPINSKYGen( SalomeApp_Appli
 {
   SIERPINSKY_ORB::SIERPINSKY_ptr clr;
   try{
-    Engines::Component_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer","SIERPINSKY" );
+    Engines::EngineComponent_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer","SIERPINSKY" );
     clr = SIERPINSKY_ORB::SIERPINSKY::_narrow(comp);
   }
   catch (CORBA::Exception&){
@@ -56,7 +77,7 @@ void SierpinskyGUI::initialize( CAM_Application* app )
 
   // create actions
   QPixmap aPixmap = aResourceMgr->loadPixmap( "SIERPINSKY",tr( "ICON_RUN_DLG" ) );
-  createAction( 901, tr( "Run Dialog" ), QIconSet(aPixmap), tr( "RUN" ), tr( "CAPTION" ), 0, aParent, false,
+  createAction( 901, tr( "Run Dialog" ), QIcon(aPixmap), tr( "RUN" ), tr( "CAPTION" ), 0, aParent, false,
                this, SLOT( OnRun() ) );
 
   // create menus
@@ -83,7 +104,7 @@ QString SierpinskyGUI::engineIOR() const
  */
 void SierpinskyGUI::windows( QMap<int, int>& wmap ) const
 {
-  wmap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::DockLeft );
+  wmap.insert( SalomeApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
 }
 
 /*!
@@ -135,8 +156,14 @@ void SierpinskyGUI::OnRun()
 }
 
 extern "C" {
+  SIERPINSKY_EXPORT
   CAM_Module* createModule()
   {
     return new SierpinskyGUI();
   }
+  SIERPINSKY_EXPORT
+  char* getModuleVersion()
+  {
+    return (char*)SIERPINSKY_VERSION_STR;
+  }
 }