From: nri Date: Wed, 9 Jul 2003 16:00:06 +0000 (+0000) Subject: NRI : Merge from V1_2. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c07ebeb1dc57f1382ad1eda4a32279b925b7220c;p=modules%2Fyacs.git NRI : Merge from V1_2. --- diff --git a/src/SALOMEGUI/CLIENT_msg_en.po b/src/SALOMEGUI/CLIENT_msg_en.po index 6af226945..1cdf343b7 100644 --- a/src/SALOMEGUI/CLIENT_msg_en.po +++ b/src/SALOMEGUI/CLIENT_msg_en.po @@ -1,6 +1,12 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". +# SALOME SALOMEGUI : implementation of desktop and GUI kernel +# +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : CLIENT_msg_en.po +# Module : SALOME + msgid "" msgstr "" "Project-Id-Version: example-Qt-message-extraction\n" @@ -14,7 +20,7 @@ msgstr "" #--------------- msgid "INF_VERSION" -msgstr "Version 1.1a" +msgstr "Version 1.2" msgid "INF_COPYRIGHT" msgstr " " @@ -32,8 +38,8 @@ msgstr "salome" #: QAD_Application.cxx:133 msgid "QAD_Application::APP_DEFAULTTITLE" -msgstr "SALOME 1.1a" +msgstr "SALOME 1.2" #: QAD_Desktop.cxx:424 msgid "QAD_Desktop::DESK_DEFAULTTITLE" -msgstr "SALOME 1.1a" \ No newline at end of file +msgstr "SALOME 1.2" diff --git a/src/SALOMEGUI/Makefile.in b/src/SALOMEGUI/Makefile.in index 87325560a..2067c607f 100644 --- a/src/SALOMEGUI/Makefile.in +++ b/src/SALOMEGUI/Makefile.in @@ -1,4 +1,29 @@ -# source path +# SALOME SALOMEGUI : implementation of desktop and GUI kernel +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Module : SALOME + top_srcdir=@top_srcdir@ top_builddir=../.. srcdir=@srcdir@ @@ -9,6 +34,7 @@ VPATH=.:@srcdir@:@top_srcdir@/idl EXPORT_HEADERS = \ QAD.h \ + QAD_Action.h \ QAD_Application.h \ QAD_Config.h \ QAD_Desktop.h \ @@ -160,6 +186,7 @@ LIB_MOC = \ SALOMEGUI_Application.h \ SALOMEGUI_Desktop.h \ QAD_Application.h \ + QAD_Action.h \ QAD_Desktop.h \ QAD_DirListDlg.h \ QAD_FileDlg.h \ diff --git a/src/SALOMEGUI/PyInterp_base.cxx b/src/SALOMEGUI/PyInterp_base.cxx index 7356b8429..f9d03e760 100644 --- a/src/SALOMEGUI/PyInterp_base.cxx +++ b/src/SALOMEGUI/PyInterp_base.cxx @@ -1,13 +1,15 @@ -using namespace std; -//============================================================================= -// File : PyInterp_base.cxx -// Created : ven fév 7 10:01:36 CET 2003 -// Author : Christian CAREMOLI, Paul RASCLE, EDF -// Project : SALOME -// Copyright : EDF 2003 -// $Header$ -//============================================================================= +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 CEA/DEN, EDF R&D +// +// +// +// File : PyInterp_base.cxx +// Author : Christian CAREMOLI, Paul RASCLE, EDF +// Module : SALOME +// $Header$ +using namespace std; #include "PyInterp_base.h" #include "utilities.h" #include diff --git a/src/SALOMEGUI/QAD_Desktop.cxx b/src/SALOMEGUI/QAD_Desktop.cxx index c8777a104..189665a8e 100644 --- a/src/SALOMEGUI/QAD_Desktop.cxx +++ b/src/SALOMEGUI/QAD_Desktop.cxx @@ -1,13 +1,29 @@ -using namespace std; -// File : QAD_Desktop.cxx -// Created : UI team, 02.10.00 -// Descr : Main desktop of QAD-based application - -// Modified : Mon Dec 03 13:40:28 2001 -// Author : Nicolas REJNERI -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE 2001 +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : QAD_Desktop.cxx +// Author : Nicolas REJNERI +// Module : SALOME // $Header$ /*! @@ -70,6 +86,7 @@ using namespace std; #include #include #include +#include #if QT_VERSION > 300 #include @@ -173,7 +190,7 @@ myQueryClose( true ) /* default background icon */ QPixmap backgroundicon ( QAD_Desktop::getResourceManager()->loadPixmap( "CLIENT", tr("ICON_DESK_BACKGROUNDICON") )); - myToolBarAction.setAutoDelete( true ); +//myToolBarAction.setAutoDelete( true ); /* default icon and title */ QPixmap icon ( QAD_Desktop::getResourceManager()->loadPixmap( "CLIENT", @@ -293,6 +310,11 @@ myQueryClose( true ) /* VSR 13/01/03 : installing global event filter for the application */ qApp->installEventFilter( this ); + + /* init pseudo random numbers generator */ + QTime cTime = QTime::currentTime(); + int secs = cTime.second() + 1; + for ( int s = 0; s < secs; s++ ) random(); } /*! @@ -450,7 +472,7 @@ void QAD_Desktop::createActions() /* 'File' actions */ /* new */ QAD_ResourceMgr* rmgr = QAD_Desktop::getResourceManager(); - QAction* fileNewAction = new QAction ( tr("TOT_DESK_FILE_NEW"), + QActionP* fileNewAction = new QActionP ( tr("TOT_DESK_FILE_NEW"), rmgr->loadPixmap( "QAD", tr("ICON_FILE_NEW") ) , tr("MEN_DESK_FILE_NEW"), CTRL+Key_N, this ); fileNewAction->setStatusTip ( tr("PRP_DESK_FILE_NEW") ); @@ -461,7 +483,7 @@ void QAD_Desktop::createActions() myStdActions.insert ( FileNewId, fileNewAction ); /* open */ - QAction* fileOpenAction = new QAction( tr("TOT_DESK_FILE_OPEN"), rmgr->loadPixmap( "QAD", tr("ICON_FILE_OPEN") ), + QActionP* fileOpenAction = new QActionP( tr("TOT_DESK_FILE_OPEN"), rmgr->loadPixmap( "QAD", tr("ICON_FILE_OPEN") ), tr("MEN_DESK_FILE_OPEN"), CTRL+Key_O, this ); fileOpenAction->setStatusTip ( tr("PRP_DESK_FILE_OPEN") ); fileOpenAction->setEnabled ( true ); @@ -471,7 +493,7 @@ void QAD_Desktop::createActions() myStdActions.insert ( FileOpenId, fileOpenAction ); /* load */ - QAction* fileLoadAction = new QAction( tr("TOT_DESK_FILE_LOAD"), rmgr->loadPixmap( "QAD", tr("ICON_FILE_LOAD") ), + QActionP* fileLoadAction = new QActionP( tr("TOT_DESK_FILE_LOAD"), rmgr->loadPixmap( "QAD", tr("ICON_FILE_LOAD") ), tr("MEN_DESK_FILE_LOAD"), CTRL+Key_L, this ); fileLoadAction->setStatusTip ( tr("PRP_DESK_FILE_LOAD") ); fileLoadAction->setEnabled ( true ); @@ -480,7 +502,7 @@ void QAD_Desktop::createActions() myStdActions.insert ( FileLoadId, fileLoadAction ); /* close */ - QAction* fileCloseAction = new QAction( "", rmgr->loadPixmap( "QAD", tr("ICON_FILE_CLOSE") ), + QActionP* fileCloseAction = new QActionP( "", rmgr->loadPixmap( "QAD", tr("ICON_FILE_CLOSE") ), tr("MEN_DESK_FILE_CLOSE"), CTRL+Key_W, this ); fileCloseAction->setStatusTip ( tr("PRP_DESK_FILE_CLOSE") ); QAD_ASSERT ( connect( fileCloseAction, SIGNAL( activated() ), this, SLOT( onCloseStudy() ))); @@ -491,7 +513,7 @@ void QAD_Desktop::createActions() myFilePopup.insertSeparator(); /* save */ - QAction* fileSaveAction = new QAction( tr("TOT_DESK_FILE_SAVE"), rmgr->loadPixmap( "QAD", tr("ICON_FILE_SAVE") ), + QActionP* fileSaveAction = new QActionP( tr("TOT_DESK_FILE_SAVE"), rmgr->loadPixmap( "QAD", tr("ICON_FILE_SAVE") ), tr("MEN_DESK_FILE_SAVE"), CTRL+Key_S, this ); fileSaveAction->setStatusTip ( tr("PRP_DESK_FILE_SAVE") ); QAD_ASSERT ( connect( fileSaveAction, SIGNAL( activated() ), this, SLOT( onSaveStudy() ))); @@ -500,7 +522,7 @@ void QAD_Desktop::createActions() myStdActions.insert ( FileSaveId, fileSaveAction ); /* save as */ - QAction* fileSaveAsAction = new QAction( "", tr("MEN_DESK_FILE_SAVEAS"), 0, this ); + QActionP* fileSaveAsAction = new QActionP( "", tr("MEN_DESK_FILE_SAVEAS"), 0, this ); fileSaveAsAction->setStatusTip ( tr("PRP_DESK_FILE_SAVEAS") ); QAD_ASSERT ( connect( fileSaveAsAction, SIGNAL( activated() ), this, SLOT( onSaveAsStudy() ))); @@ -512,7 +534,7 @@ void QAD_Desktop::createActions() myFilePopup.insertSeparator(); // Study properties - QAction* filePropsAction = new QAction( "", QPixmap(), tr("MEN_DESK_FILE_PROPERTIES"), 0, this ); + QActionP* filePropsAction = new QActionP( "", QPixmap(), tr("MEN_DESK_FILE_PROPERTIES"), 0, this ); filePropsAction->setStatusTip ( tr("PRP_DESK_FILE_PROPERTIES") ); filePropsAction->setEnabled(false); QAD_ASSERT ( connect( filePropsAction, SIGNAL( activated() ), this, SLOT( onStudyProperties() ))); @@ -527,7 +549,7 @@ void QAD_Desktop::createActions() myFilePos = myFilePopup.indexOf( id ) + 1; /* exit application */ - QAction* exitAction = new QAction( "", tr("MEN_DESK_FILE_EXIT"), + QActionP* exitAction = new QActionP( "", tr("MEN_DESK_FILE_EXIT"), CTRL+Key_X, this ); exitAction->setStatusTip ( tr("PRP_DESK_FILE_EXIT") ); QAD_ASSERT ( connect( exitAction, SIGNAL( activated() ), @@ -545,7 +567,7 @@ void QAD_Desktop::createActions() this, SLOT(onToolBarPopupAboutToShow()) )); /* status bar */ - QAction* viewStatusBarAction = new QAction( "", + QActionP* viewStatusBarAction = new QActionP( "", tr("MEN_DESK_VIEW_STATUSBAR"), 0, this, 0, true ); viewStatusBarAction->setStatusTip ( tr("PRP_DESK_VIEW_STATUSBAR") ); @@ -556,22 +578,22 @@ void QAD_Desktop::createActions() // myViewPopup.insertItem( tr("MEN_DESK_SELECTION_MODE"), &mySelectionModePopup ); - QAction* SelectionPointAction = new QAction( "", tr("MEN_DESK_SELECTION_POINT"), 0, this, 0, true ); + QActionP* SelectionPointAction = new QActionP( "", tr("MEN_DESK_SELECTION_POINT"), 0, this, 0, true ); QAD_ASSERT(connect( SelectionPointAction, SIGNAL(activated()), this, SLOT(onSelectionMode() ))); SelectionPointAction->addTo( &mySelectionModePopup ); myStdActions.insert( SelectionPointId, SelectionPointAction ); - QAction* SelectionEdgeAction = new QAction( "", tr("MEN_DESK_SELECTION_EDGE"), 0, this, 0, true ); + QActionP* SelectionEdgeAction = new QActionP( "", tr("MEN_DESK_SELECTION_EDGE"), 0, this, 0, true ); QAD_ASSERT(connect( SelectionEdgeAction, SIGNAL(activated()), this, SLOT(onSelectionMode() ))); SelectionEdgeAction->addTo( &mySelectionModePopup ); myStdActions.insert( SelectionEdgeId, SelectionEdgeAction ); - QAction* SelectionCellAction = new QAction( "", tr("MEN_DESK_SELECTION_CELL"), 0, this, 0, true ); + QActionP* SelectionCellAction = new QActionP( "", tr("MEN_DESK_SELECTION_CELL"), 0, this, 0, true ); QAD_ASSERT(connect( SelectionCellAction, SIGNAL(activated()), this, SLOT(onSelectionMode() ))); SelectionCellAction->addTo( &mySelectionModePopup ); myStdActions.insert( SelectionCellId, SelectionCellAction ); - QAction* SelectionActorAction = new QAction( "", tr("MEN_DESK_SELECTION_ACTOR"), 0, this, 0, true ); + QActionP* SelectionActorAction = new QActionP( "", tr("MEN_DESK_SELECTION_ACTOR"), 0, this, 0, true ); QAD_ASSERT(connect( SelectionActorAction, SIGNAL(activated()), this, SLOT(onSelectionMode() ))); SelectionActorAction->addTo( &mySelectionModePopup ); myStdActions.insert( SelectionActorId, SelectionActorAction ); @@ -635,22 +657,22 @@ void QAD_Desktop::createActions() /* Viewer BackgroundColor */ myPrefPopup.insertItem( tr("MEN_DESK_PREF_VIEWER"), &myViewerPopup ); - QAction* viewerOCCAction = new QAction( "", tr("MEN_DESK_PREF_VIEWER_OCC"), 0, this ); + QActionP* viewerOCCAction = new QActionP( "", tr("MEN_DESK_PREF_VIEWER_OCC"), 0, this ); QAD_ASSERT(connect( viewerOCCAction, SIGNAL(activated()), this, SLOT(onViewerOCC() ))); viewerOCCAction->addTo( &myViewerPopup ); myStdActions.insert( PrefViewerOCCId, viewerOCCAction ); - QAction* viewerVTKAction = new QAction( "", tr("MEN_DESK_PREF_VIEWER_VTK"), 0, this ); + QActionP* viewerVTKAction = new QActionP( "", tr("MEN_DESK_PREF_VIEWER_VTK"), 0, this ); QAD_ASSERT(connect( viewerVTKAction, SIGNAL(activated()), this, SLOT(onViewerVTK() ))); viewerVTKAction->addTo( &myViewerPopup ); myStdActions.insert( PrefViewerVTKId, viewerVTKAction ); - QAction* graphSupervisorAction = new QAction( "", tr("MEN_DESK_PREF_GRAPH_SUPERVISOR"), 0, this ); + QActionP* graphSupervisorAction = new QActionP( "", tr("MEN_DESK_PREF_GRAPH_SUPERVISOR"), 0, this ); QAD_ASSERT(connect( graphSupervisorAction, SIGNAL(activated()), this, SLOT(onGraphSupervisor() ))); graphSupervisorAction->addTo( &myViewerPopup ); myStdActions.insert( PrefGraphSupervisorId, graphSupervisorAction ); - QAction* viewerPlot2dAction = new QAction( "", tr("MEN_DESK_PREF_VIEWER_PLOT2D"), 0, this ); + QActionP* viewerPlot2dAction = new QActionP( "", tr("MEN_DESK_PREF_VIEWER_PLOT2D"), 0, this ); QAD_ASSERT(connect( viewerPlot2dAction, SIGNAL(activated()), this, SLOT(onPlot2d() ))); viewerPlot2dAction->addTo( &myViewerPopup ); myStdActions.insert( PrefViewerPlot2dId, viewerPlot2dAction ); @@ -663,48 +685,48 @@ void QAD_Desktop::createActions() aViewerValue = VIEW_VTK; myPrefPopup.insertItem( tr("MEN_DESK_PREF_DEFAULT_VIEWER"), &myDefaultViewer ); - QActionGroup* myQAG = new QActionGroup ( this); - QAction* viewerOCCAction1 = new QAction( "", tr("MEN_DESK_PREF_VIEWER_OCC"), 0, this ); + QActionPGroup* myQAG = new QActionPGroup ( this); + QActionP* viewerOCCAction1 = new QActionP( "", tr("MEN_DESK_PREF_VIEWER_OCC"), 0, this ); viewerOCCAction1->setToggleAction ( true); viewerOCCAction1->setOn ( aViewerValue == VIEW_OCC ); myQAG->insert( viewerOCCAction1 ); myStdActions.insert( DefaultViewerOCCId, viewerOCCAction1 ); - QAction* viewerVTKAction1 = new QAction( "", tr("MEN_DESK_PREF_VIEWER_VTK"), 0, this ); + QActionP* viewerVTKAction1 = new QActionP( "", tr("MEN_DESK_PREF_VIEWER_VTK"), 0, this ); viewerVTKAction1->setToggleAction ( true); viewerVTKAction1->setOn ( aViewerValue == VIEW_VTK ); myQAG->insert( viewerVTKAction1 ); myStdActions.insert( DefaultViewerVTKId, viewerVTKAction1 ); /* Remove Supervisor viewer from setting the background */ -// QAction* graphSupervisorAction1 = new QAction( "", tr("MEN_DESK_PREF_GRAPH_SUPERVISOR"), 0, this ); +// QActionP* graphSupervisorAction1 = new QActionP( "", tr("MEN_DESK_PREF_GRAPH_SUPERVISOR"), 0, this ); // graphSupervisorAction1->setToggleAction ( true); // graphSupervisorAction1->setOn ( aViewerValue == VIEW_GRAPHSUPERV ); // myQAG->insert( graphSupervisorAction1 ); // myStdActions.insert( DefaultGraphSupervisorId, graphSupervisorAction1 ); - QAction* viewerPlot2dAction1 = new QAction( "", tr("MEN_DESK_PREF_VIEWER_PLOT2D"), 0, this ); + QActionP* viewerPlot2dAction1 = new QActionP( "", tr("MEN_DESK_PREF_VIEWER_PLOT2D"), 0, this ); viewerPlot2dAction1->setToggleAction ( true); viewerPlot2dAction1->setOn ( aViewerValue == VIEW_PLOT2D ); myQAG->insert( viewerPlot2dAction1 ); myStdActions.insert( DefaultPlot2dId, viewerPlot2dAction1 ); myQAG->addTo( &myDefaultViewer ); - QAD_ASSERT(connect( myQAG, SIGNAL(selected(QAction * )), this, SLOT(onDefaultViewer(QAction *) ))); + QAD_ASSERT(connect( myQAG, SIGNAL(selected(QActionP * )), this, SLOT(onDefaultViewer(QActionP *) ))); //VRV: T2.5 - add default viewer - QAction* viewerTrihedronAction = new QAction( "", tr("MEN_DESK_PREF_VIEWER_TRIHEDRON"), 0, this ); + QActionP* viewerTrihedronAction = new QActionP( "", tr("MEN_DESK_PREF_VIEWER_TRIHEDRON"), 0, this ); QAD_ASSERT(connect( viewerTrihedronAction, SIGNAL(activated()), this, SLOT(onViewerTrihedron() ))); viewerTrihedronAction->addTo( &myPrefPopup ); myStdActions.insert( PrefViewerTrihedronId, viewerTrihedronAction ); - QAction* consoleFontAction = new QAction( "", tr("MEN_DESK_PREF_CONSOLE_FONT"), 0, this ); + QActionP* consoleFontAction = new QActionP( "", tr("MEN_DESK_PREF_CONSOLE_FONT"), 0, this ); QAD_ASSERT(connect( consoleFontAction, SIGNAL(activated()), this, SLOT(onConsoleFontAction() ))); consoleFontAction->addTo( &myPrefPopup ); myStdActions.insert( PrefConsoleFontId, consoleFontAction ); /* MultiFile save */ - QAction* multiFileSaveAction = new QAction( "", tr("MEN_DESK_PREF_MULTI_FILE_SAVE"), 0, this, 0, true ); + QActionP* multiFileSaveAction = new QActionP( "", tr("MEN_DESK_PREF_MULTI_FILE_SAVE"), 0, this, 0, true ); QAD_ASSERT(connect( multiFileSaveAction, SIGNAL(activated()), this, SLOT(onMultiFileSave() ))); multiFileSaveAction->setToggleAction( true ); QString MultiSave = QAD_CONFIG->getSetting("Desktop:MultiFileSave"); @@ -712,12 +734,21 @@ void QAD_Desktop::createActions() multiFileSaveAction->addTo( &myPrefPopup ); myStdActions.insert( PrefMultiFileSave, multiFileSaveAction ); + /* ASCII save */ + QActionP* ASCIISaveAction = new QActionP( "", tr("MEN_DESK_PREF_ASCII_SAVE"), 0, this, 0, true ); + QAD_ASSERT(connect( ASCIISaveAction, SIGNAL(activated()), this, SLOT(onASCIISave() ))); + ASCIISaveAction->setToggleAction( true ); + QString ASCIISave = QAD_CONFIG->getSetting("Desktop:ASCIISave"); + ASCIISaveAction->setOn( ASCIISave.compare( aTrueQString ) == 0 ); + ASCIISaveAction->addTo( &myPrefPopup ); + myStdActions.insert( PrefASCIISave, ASCIISaveAction ); + myPrefPopup.insertSeparator(); /* BrowserPopup */ myPrefPopup.insertItem( tr("MEN_DESK_PREF_OBJECTBROWSER"), &myObjBrowserPopup ); - QAction* objectBrowserEntryAction = new QAction( "", tr("MEN_DESK_PREF_OBJECTBROWSER_ENTRY"), 0, this, 0, true ); + QActionP* objectBrowserEntryAction = new QActionP( "", tr("MEN_DESK_PREF_OBJECTBROWSER_ENTRY"), 0, this, 0, true ); QAD_ASSERT(connect( objectBrowserEntryAction, SIGNAL(activated()), this, SLOT(onObjectBrowser() ))); objectBrowserEntryAction->setToggleAction(true); QString AddColumn = QAD_CONFIG->getSetting("ObjectBrowser:AddColumn"); @@ -730,7 +761,7 @@ void QAD_Desktop::createActions() objectBrowserEntryAction->addTo( &myObjBrowserPopup ); myStdActions.insert( PrefObjectBrowserEntryId, objectBrowserEntryAction ); - QAction* objectBrowserValueAction = new QAction( "", tr("MEN_DESK_PREF_OBJECTBROWSER_VALUE"), 0, this, 0, true ); + QActionP* objectBrowserValueAction = new QActionP( "", tr("MEN_DESK_PREF_OBJECTBROWSER_VALUE"), 0, this, 0, true ); QAD_ASSERT(connect( objectBrowserValueAction, SIGNAL(activated()), this, SLOT(onObjectBrowser() ))); objectBrowserValueAction->setToggleAction(true); QString ValueColumn = QAD_CONFIG->getSetting("ObjectBrowser:ValueColumn"); @@ -743,7 +774,7 @@ void QAD_Desktop::createActions() objectBrowserValueAction->addTo( &myObjBrowserPopup ); myStdActions.insert( PrefObjectBrowserValueId, objectBrowserValueAction ); - QAction* objectBrowserIAPPAction = new QAction( "", tr("MEN_DESK_PREF_OBJECTBROWSER_IAPP"), 0, this, 0, true ); + QActionP* objectBrowserIAPPAction = new QActionP( "", tr("MEN_DESK_PREF_OBJECTBROWSER_IAPP"), 0, this, 0, true ); QAD_ASSERT(connect( objectBrowserIAPPAction, SIGNAL(activated()), this, SLOT(onObjectBrowser() ))); objectBrowserIAPPAction->setToggleAction(true); QString showIAPP = QAD_CONFIG->getSetting("ObjectBrowser:IAPP"); @@ -757,7 +788,7 @@ void QAD_Desktop::createActions() myStdActions.insert( PrefObjectBrowserIAPPId, objectBrowserIAPPAction ); /* Chronological sorting of shapes on the entry creation */ - QAction* objectBrowserCHRONO_SORTAction = new QAction( "", tr("MEN_DESK_PREF_OBJECTBROWSER_CHRONO_SORT"), 0, this, 0, true ); + QActionP* objectBrowserCHRONO_SORTAction = new QActionP( "", tr("MEN_DESK_PREF_OBJECTBROWSER_CHRONO_SORT"), 0, this, 0, true ); QAD_ASSERT(connect( objectBrowserCHRONO_SORTAction, SIGNAL(activated()), this, SLOT(onObjectBrowser() ))); objectBrowserCHRONO_SORTAction->setToggleAction(true); QString showSORT = QAD_CONFIG->getSetting("ObjectBrowser:CHRONO_SORT"); @@ -772,14 +803,14 @@ void QAD_Desktop::createActions() myPrefPopup.insertSeparator(); - QAction* dirAction = new QAction( "", tr("MEN_DESK_PREF_DIRICTORIES"), ALT+Key_D, this ); + QActionP* dirAction = new QActionP( "", tr("MEN_DESK_PREF_DIRICTORIES"), ALT+Key_D, this ); QAD_ASSERT(connect( dirAction, SIGNAL(activated()), this, SLOT(onDirList() ))); dirAction->addTo( &myPrefPopup ); myStdActions.insert( PrefDirsId, dirAction ); myPrefPopup.insertSeparator(); - QAction* saveAction = new QAction( "", tr("MEN_DESK_PREF_SAVE"), 0, this ); + QActionP* saveAction = new QActionP( "", tr("MEN_DESK_PREF_SAVE"), 0, this ); QAD_ASSERT(connect( saveAction, SIGNAL(activated()), this, SLOT(onSavePref() ))); saveAction->addTo( &myPrefPopup ); myStdActions.insert( PrefSaveId, saveAction ); @@ -789,22 +820,22 @@ void QAD_Desktop::createActions() //NRI : SAL2214 myWindowPopup.insertItem( tr("MEN_DESK_WINDOW_NEW3D"), &myNewViewPopup, WindowNew3dId ); - QAction* viewOCCAction = new QAction( "", tr("MEN_DESK_VIEW_OCC"), ALT+Key_O, this ); + QActionP* viewOCCAction = new QActionP( "", tr("MEN_DESK_VIEW_OCC"), ALT+Key_O, this ); QAD_ASSERT(connect( viewOCCAction, SIGNAL(activated()), this, SLOT(onNewWindow3d() ))); viewOCCAction->addTo( &myNewViewPopup ); myStdActions.insert( ViewOCCId, viewOCCAction ); - QAction* viewVTKAction = new QAction( "", tr("MEN_DESK_VIEW_VTK"), ALT+Key_V, this ); + QActionP* viewVTKAction = new QActionP( "", tr("MEN_DESK_VIEW_VTK"), ALT+Key_K, this ); QAD_ASSERT(connect( viewVTKAction, SIGNAL(activated()), this, SLOT(onNewWindow3d() ))); viewVTKAction->addTo( &myNewViewPopup ); myStdActions.insert( ViewVTKId, viewVTKAction ); - QAction* viewPlot2dAction = new QAction( "", tr("MEN_DESK_VIEW_PLOT2D"), ALT+Key_P, this ); + QActionP* viewPlot2dAction = new QActionP( "", tr("MEN_DESK_VIEW_PLOT2D"), ALT+Key_P, this ); QAD_ASSERT(connect( viewPlot2dAction, SIGNAL(activated()), this, SLOT(onNewWindow3d() ))); viewPlot2dAction->addTo( &myNewViewPopup ); myStdActions.insert( ViewPlot2dId, viewPlot2dAction ); - // QAction* windowNew3dAction = new QAction( "",/* rmgr->loadPixmap( "QAD", tr("ICON_DESK_WINDOW_NEW3D") ), */ + // QActionP* windowNew3dAction = new QActionP( "",/* rmgr->loadPixmap( "QAD", tr("ICON_DESK_WINDOW_NEW3D") ), */ /*tr("MEN_DESK_WINDOW_NEW3D"), 0, this ); windowNew3dAction->addTo( &myWindowPopup ); QAD_ASSERT( connect( windowNew3dAction, SIGNAL(activated()), this , @@ -815,7 +846,7 @@ void QAD_Desktop::createActions() //NRI : SAL2214 /* cascaded */ - QAction* windowCascadeAction = new QAction( "", rmgr->loadPixmap( "QAD", tr("ICON_DESK_WINDOW_CASCADE") ), + QActionP* windowCascadeAction = new QActionP( "", rmgr->loadPixmap( "QAD", tr("ICON_DESK_WINDOW_CASCADE") ), tr("MEN_DESK_WINDOW_CASCADE"), 0, this ); windowCascadeAction->setStatusTip ( tr("PRP_DESK_WINDOW_CASCADE") ); QAD_ASSERT( connect( windowCascadeAction, SIGNAL(activated()), this, @@ -823,7 +854,7 @@ void QAD_Desktop::createActions() myStdActions.insert( WindowCascadeId, windowCascadeAction ); /* tiled */ - QAction* windowTileAction = new QAction( "", rmgr->loadPixmap( "QAD", tr("ICON_DESK_WINDOW_TILE") ), + QActionP* windowTileAction = new QActionP( "", rmgr->loadPixmap( "QAD", tr("ICON_DESK_WINDOW_TILE") ), tr("MEN_DESK_WINDOW_TILE"), 0, this ); windowTileAction->setStatusTip ( tr("PRP_DESK_WINDOW_TILE") ); QAD_ASSERT( connect( windowTileAction, SIGNAL(activated()), myWorkspace, SLOT( tile() ))); @@ -834,7 +865,7 @@ void QAD_Desktop::createActions() /* 'Help' actions */ /* contents */ - QAction* helpContentsAction = new QAction( "", tr("MEN_DESK_HELP_CONTENTS"), Key_F1, this ); + QActionP* helpContentsAction = new QActionP( "", tr("MEN_DESK_HELP_CONTENTS"), Key_F1, this ); helpContentsAction->setStatusTip ( tr("PRP_DESK_HELP_CONTENTS") ); QAD_ASSERT(connect( helpContentsAction, SIGNAL(activated()), this, SLOT( onHelpContents() ))); @@ -842,14 +873,14 @@ void QAD_Desktop::createActions() myStdActions.insert( HelpContentsId , helpContentsAction ); /* search */ -// QAction* helpSearchAction = new QAction( "", tr("MEN_DESK_HELP_SEARCH"), 0, this ); +// QActionP* helpSearchAction = new QActionP( "", tr("MEN_DESK_HELP_SEARCH"), 0, this ); // helpSearchAction->setStatusTip ( tr("PRP_DESK_HELP_SEARCH") ); // QAD_ASSERT( connect( helpSearchAction, SIGNAL(activated()), this, SLOT( onHelpSearch() ))); // helpSearchAction->addTo( &myHelpPopup ); // myStdActions.insert( HelpSearchId, helpSearchAction ); /* What's This */ -// QAction* helpWhatsThisAction = new QAction( "", tr("MEN_DESK_HELP_WHATSTHIS"), SHIFT+Key_F1, this ); +// QActionP* helpWhatsThisAction = new QActionP( "", tr("MEN_DESK_HELP_WHATSTHIS"), SHIFT+Key_F1, this ); // helpWhatsThisAction->setStatusTip ( tr("PRP_DESK_HELP_WHATSTHIS" )); // QAD_ASSERT( connect( helpWhatsThisAction, SIGNAL(activated()), this, SLOT( whatsThis() ))); // helpWhatsThisAction->addTo( &myHelpPopup ); @@ -860,7 +891,7 @@ void QAD_Desktop::createActions() myHelpPos = myHelpPopup.indexOf( id ); /* about */ - QAction* helpAboutAction = new QAction( "", tr("MEN_DESK_HELP_ABOUT"), 0, this ); + QActionP* helpAboutAction = new QActionP( "", tr("MEN_DESK_HELP_ABOUT"), 0, this ); helpAboutAction->setStatusTip ( tr("PRP_DESK_HELP_ABOUT") ); QAD_ASSERT( connect( helpAboutAction, SIGNAL(activated()), this, SLOT( onHelpAbout() ))); helpAboutAction->addTo( &myHelpPopup ); @@ -913,7 +944,8 @@ void QAD_Desktop::closeDesktop( bool forceClose ) void QAD_Desktop::putInfo ( const QString& msg ) { if ( myStatusBar ) - myStatusBar->message ( msg ); + //NRI : bug 1209. message is now displayed during 3000 ms + myStatusBar->message ( msg, 3000 ); } /*! @@ -1388,6 +1420,40 @@ void QAD_Desktop::onLoadStudy() putInfo ( tr("INF_READY") ); } + + +QAD_Study* QAD_Desktop::loadStudy(QString theStudyName) { + QString studyname(""); + + CORBA::Object_var obj = myNameService->Resolve("/myStudyManager"); + SALOMEDS::StudyManager_var myStudyMgr = SALOMEDS::StudyManager::_narrow(obj); + ASSERT(! CORBA::is_nil(myStudyMgr)); + + SALOMEDS::ListOfOpenStudies_var List = myStudyMgr->GetOpenStudies(); + for (unsigned int ind = 0; ind < List->length();ind++) { + if (theStudyName == QString(List[ind])) { + studyname = theStudyName; + break; + } + } + if (studyname == "") { + return NULL; + } + bool appFound = false; + for ( QAD_Application* app = myApps.first(); app; app = myApps.next() ) { + appFound = true; + QAD_Study* openStudy = app->loadStudy( studyname ); + if (openStudy) { + // if (myActiveApp == 0) + //myActiveApp = app; + return openStudy; + } + break; + } + return NULL; +} + + /*! Opens the existing study. Displays select file dialog and calls corresponding function of @@ -1738,7 +1804,7 @@ void QAD_Desktop::onCascade() QWidgetListIt it(wList); for(;it.current(); ++it) - it.current()->resize(0.8*w, 0.8*h); + it.current()->resize((int)(0.8*w), (int)(0.8*h)); } /*! @@ -1793,7 +1859,7 @@ void QAD_Desktop::onToolBarPopupAboutToShow() */ void QAD_Desktop::onSelectionMode() { - const QAction* obj = (QAction*) sender(); + const QActionP* obj = (QActionP*) sender(); int SelectionMode = 4; @@ -1907,7 +1973,7 @@ void QAD_Desktop::onNewWindow3d() } //VRV: T2.5 - add default viewer */ - const QAction* obj = (QAction*) sender(); + const QActionP* obj = (QActionP*) sender(); if ( obj == myStdActions.at(ViewOCCId) ) { myActiveApp->getActiveStudy()->newWindow3d(QString(""),(ViewType)(0)); } else if ( obj == myStdActions.at(ViewVTKId) ) { @@ -2009,6 +2075,12 @@ void QAD_Desktop::updateActions() // myPrefPopup.setEnabled ( myActiveStudy != NULL ); mySelectionModePopup.setEnabled ( myActiveStudy != NULL ); + + // VSR ==> SAL2982 + myStdActions.at( ViewOCCId )->setEnabled( myActiveStudy != NULL ); + myStdActions.at( ViewVTKId )->setEnabled( myActiveStudy != NULL ); + myStdActions.at( ViewPlot2dId )->setEnabled( myActiveStudy != NULL ); + // VSR <== SAL2982 } /*! @@ -3072,7 +3144,7 @@ void QAD_Desktop::onViewerTrihedron() for ( QAD_Study* study = studies.first(); study; study = studies.next() ) { int nbSf = study->getStudyFramesCount(); for ( int i = 0; i < nbSf; i++ ) { - study->getStudyFrame(i)->getRightFrame()->getViewFrame()->SetTrihedronSize(dim); + study->getStudyFrame(i)->getRightFrame()->getViewFrame()->SetTrihedronSize((int)dim); } } } @@ -3122,7 +3194,7 @@ void QAD_Desktop::onSavePref() } //VRV: T2.5 - add default viewer -void QAD_Desktop::onDefaultViewer(QAction * theAction) +void QAD_Desktop::onDefaultViewer(QActionP * theAction) { int type = VIEW_TYPE_MAX; @@ -3350,6 +3422,15 @@ void QAD_Desktop::onMultiFileSave() QAD_CONFIG->addSetting( "Desktop:MultiFileSave", "false"); } +/* Preferences/ASCII Save */ +void QAD_Desktop::onASCIISave() +{ + if ( myStdActions.at( PrefASCIISave )->isOn() ) + QAD_CONFIG->addSetting( "Desktop:ASCIISave", "true"); + else + QAD_CONFIG->addSetting( "Desktop:ASCIISave", "false"); +} + /********************************************************************* ** Class: AppSelectionDlg ** Descr: Dialog for the selection of the application when several diff --git a/src/SALOMEGUI/QAD_Desktop.h b/src/SALOMEGUI/QAD_Desktop.h index 5744ca283..065837548 100644 --- a/src/SALOMEGUI/QAD_Desktop.h +++ b/src/SALOMEGUI/QAD_Desktop.h @@ -1,12 +1,29 @@ -// File : QAD_Desktop.h -// Created : UI team, 02.10.00 -// Descr : Main desktop of QAD-based application - -// Modified : Mon Dec 03 13:40:28 2001 -// Author : Nicolas REJNERI -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE 2001 +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : QAD_Desktop.h +// Author : Nicolas REJNERI +// Module : SALOME // $Header$ #ifndef QAD_DESKTOP_H @@ -18,6 +35,7 @@ #include "QAD_OperatorMenus.h" #include "QAD_Menus.h" #include "QAD_HelpWindow.h" +#include "QAD_Action.h" #include "SALOME_NamingService.hxx" #include "SALOME_LifeCycleCORBA.hxx" @@ -30,7 +48,6 @@ // QT Includes #include -#include #include #include #include @@ -45,47 +62,6 @@ // Open CASCADE Includes #include -class ActionMap { - public: - ActionMap() {} - ~ActionMap() - { - QMapIterator it; - for ( it = myMap.begin(); it != myMap.end(); it++ ) delete (QAction*)it.data(); - myMap.clear(); - } - bool isEmpty() { return myMap.isEmpty(); } - void insert( const unsigned int id, QAction* action ) { myMap[id] = action; } - QAction* at( const unsigned int id ) { return myMap[id]; } - void clear() { myMap.clear(); } - QAction*& operator[] (const unsigned int id) { return myMap[id]; } - - private: - QMap myMap; - -}; - -class ToggleAction : public QAction { - Q_OBJECT - public: - ToggleAction( const QString& text, const QString& menuText, - QKeySequence accel, QObject* parent, - const char* name = 0, bool toggle = FALSE) - : QAction( text, menuText, accel, parent, name, toggle ) - { - connect( this, SIGNAL(toggled(bool)), this, SLOT(onToggled(bool))); - } - private slots: - void onToggled( bool on) - { - on ? emit( toggledOn() ) : emit( toggledOff() ); - } - - signals: - void toggledOn(); - void toggledOff(); -}; - class QAD_XmlHandler; class QAD_EXPORT QAD_Desktop : public QMainWindow @@ -104,7 +80,7 @@ protected: //VRV: T2.5 - add default viewer PrefViewerTrihedronId, PrefConsoleFontId, PrefObjectBrowserEntryId, PrefObjectBrowserIAPPId, PrefObjectBrowserValueId, PrefObjectBrowserCHRONO_SORTId, - PrefDirsId, PrefMultiFileSave, PrefSaveId, + PrefDirsId, PrefMultiFileSave, PrefASCIISave, PrefSaveId, //NRI : SAL2214 WindowNew3dId, ViewOCCId, ViewVTKId, ViewPlot2dId, //NRI : SAL2214 @@ -201,6 +177,8 @@ public: bool onMousePress(QMouseEvent*); void onKeyPress(QKeyEvent*); + virtual QAD_Study* loadStudy(QString theStudyName); + protected: bool closeAllStudies( QAD_Application* ); void closeEvent( QCloseEvent* ); @@ -251,12 +229,13 @@ protected slots: void onPlot2d(); void onConsoleFontAction(); //VRV: T2.5 - add default viewer - void onDefaultViewer( QAction * theAction); + void onDefaultViewer( QActionP * theAction); //VRV: T2.5 - add default viewer void onViewerTrihedron(); void onObjectBrowser(); void onMultiFileSave(); + void onASCIISave(); void onActivateApp(QAD_Application* app); void onDeactivateApp(QAD_Application* app); diff --git a/src/SALOMEGUI/QAD_HelpWindow.cxx b/src/SALOMEGUI/QAD_HelpWindow.cxx index 3f86cf15c..8cb020a7e 100644 --- a/src/SALOMEGUI/QAD_HelpWindow.cxx +++ b/src/SALOMEGUI/QAD_HelpWindow.cxx @@ -1,12 +1,32 @@ -using namespace std; -// File : QAD_HelpWindow.cxx -// Created : Thu Jun 14 16:12:49 2001 -// Author : Nicolas REJNERI -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : QAD_HelpWindow.cxx +// Author : Nicolas REJNERI +// Module : SALOME // $Header$ +using namespace std; /*! \class QAD_HelpWindow QAD_HelpWindow.h \brief Html browser for help. diff --git a/src/SALOMEGUI/QAD_ObjectBrowser.cxx b/src/SALOMEGUI/QAD_ObjectBrowser.cxx index b7c79346b..35bcde863 100644 --- a/src/SALOMEGUI/QAD_ObjectBrowser.cxx +++ b/src/SALOMEGUI/QAD_ObjectBrowser.cxx @@ -1,13 +1,32 @@ -using namespace std; -// File : QAD_ObjectBrowser.cxx -// Created : Thu Jun 14 15:42:10 2001 -// Author : Nicolas REJNERI -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : QAD_ObjectBrowser.cxx +// Author : Nicolas REJNERI +// Module : SALOME // $Header$ - +using namespace std; #include "QAD_ObjectBrowserItem.h" #include "QAD_ObjectBrowser.h" #include "QAD_Application.h" @@ -646,15 +665,15 @@ void QAD_ObjectBrowser::Update( SALOMEDS::SObject_ptr SO, // TextColor if ( CSO->FindAttribute(anAttr, "AttributeTextColor") ) { aTextColor = SALOMEDS::AttributeTextColor::_narrow(anAttr); - QColor aColor(aTextColor->TextColor().R, aTextColor->TextColor().G, aTextColor->TextColor().B) ; + QColor aColor((int)(aTextColor->TextColor().R), (int)(aTextColor->TextColor().G), (int)(aTextColor->TextColor().B)) ; Item->setTextColor(aColor); } // TextHighlightColor if ( CSO->FindAttribute(anAttr, "AttributeTextHighlightColor") ) { aTextHighlightColor = SALOMEDS::AttributeTextHighlightColor::_narrow(anAttr); - QColor aColor(aTextHighlightColor->TextHighlightColor().R, - aTextHighlightColor->TextHighlightColor().G, - aTextHighlightColor->TextHighlightColor().B) ; + QColor aColor((int)(aTextHighlightColor->TextHighlightColor().R), + (int)(aTextHighlightColor->TextHighlightColor().G), + (int)(aTextHighlightColor->TextHighlightColor().B)) ; Item->setTextHighlightColor(aColor); } // Pixmap @@ -783,15 +802,15 @@ void QAD_ObjectBrowser::Update() // TextColor if ( SC->FindAttribute(anAttr, "AttributeTextColor") ) { aTextColor = SALOMEDS::AttributeTextColor::_narrow(anAttr); - QColor aColor(aTextColor->TextColor().R, aTextColor->TextColor().G, aTextColor->TextColor().B) ; + QColor aColor((int)(aTextColor->TextColor().R), (int)(aTextColor->TextColor().G), (int)(aTextColor->TextColor().B)) ; Item->setTextColor(aColor); } // TextHighlightColor if ( SC->FindAttribute(anAttr, "AttributeTextHighlightColor") ) { aTextHighlightColor = SALOMEDS::AttributeTextHighlightColor::_narrow(anAttr); - QColor aColor(aTextHighlightColor->TextHighlightColor().R, - aTextHighlightColor->TextHighlightColor().G, - aTextHighlightColor->TextHighlightColor().B) ; + QColor aColor((int)(aTextHighlightColor->TextHighlightColor().R), + (int)(aTextHighlightColor->TextHighlightColor().G), + (int)(aTextHighlightColor->TextHighlightColor().B)) ; Item->setTextHighlightColor(aColor); } @@ -1006,17 +1025,17 @@ void QAD_ObjectBrowser::UpdateUCItem( SALOMEDS::SObject_var UCObject, QAD_Object // TextColor if ( UCObject->FindAttribute(anAttr, "AttributeTextColor" ) ) { aTextColor = SALOMEDS::AttributeTextColor::_narrow( anAttr ); - QColor aColor( aTextColor->TextColor().R, - aTextColor->TextColor().G, - aTextColor->TextColor().B ); + QColor aColor( (int)(aTextColor->TextColor().R), + (int)(aTextColor->TextColor().G), + (int)(aTextColor->TextColor().B) ); UCSubItem->setTextColor( aColor ); } // TextHighlightColor if ( UCObject->FindAttribute( anAttr, "AttributeTextHighlightColor" ) ) { aTextHighlightColor = SALOMEDS::AttributeTextHighlightColor::_narrow( anAttr ); - QColor aColor( aTextHighlightColor->TextHighlightColor().R, - aTextHighlightColor->TextHighlightColor().G, - aTextHighlightColor->TextHighlightColor().B ); + QColor aColor( (int)(aTextHighlightColor->TextHighlightColor().R), + (int)(aTextHighlightColor->TextHighlightColor().G), + (int)(aTextHighlightColor->TextHighlightColor().B) ); UCSubItem->setTextHighlightColor( aColor ); } // Pixmap diff --git a/src/SALOMEGUI/QAD_PyInterp.cxx b/src/SALOMEGUI/QAD_PyInterp.cxx index e3996723b..5f04d820f 100644 --- a/src/SALOMEGUI/QAD_PyInterp.cxx +++ b/src/SALOMEGUI/QAD_PyInterp.cxx @@ -1,18 +1,33 @@ -using namespace std; -using namespace std; -//============================================================================= -// File : QAD_PyInterp.cxx -// Created : Thu Jun 14 14:03:58 2001 -// Author : Nicolas REJNERI -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : QAD_PyInterp.cxx +// Author : Nicolas REJNERI +// Module : SALOME // $Header$ -//============================================================================= - -// TODO: -// control & limit history length +using namespace std; +using namespace std; #include "QAD_PyInterp.h" #include "utilities.h" diff --git a/src/SALOMEGUI/QAD_ResourceMgr.cxx b/src/SALOMEGUI/QAD_ResourceMgr.cxx index 3e61d033e..bb52c0aee 100644 --- a/src/SALOMEGUI/QAD_ResourceMgr.cxx +++ b/src/SALOMEGUI/QAD_ResourceMgr.cxx @@ -1,13 +1,32 @@ -using namespace std; -// File : QAD_ResourceMgr.cxx -// Created : UI team, 22.10.00 -// Descr : ResourceMgr QAD-based application -// Author : UI team -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : QAD_ResourceMgr.cxx +// Author : UI team +// Module : SALOME // $Header$ +using namespace std; /*! \class QAD_ResourceMgr QAD_ResourceMgr.h \brief ResourceMgr QAD-based application. diff --git a/src/SALOMEGUI/QAD_RightFrame.cxx b/src/SALOMEGUI/QAD_RightFrame.cxx index b7a30e2b4..1dea45a20 100644 --- a/src/SALOMEGUI/QAD_RightFrame.cxx +++ b/src/SALOMEGUI/QAD_RightFrame.cxx @@ -1,12 +1,32 @@ -using namespace std; -// File : QAD_RightFrame.cxx -// Created : Thu Jun 14 14:51:52 2001 -// Author : Nicolas REJNERI -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : QAD_RightFrame.cxx +// Author : Nicolas REJNERI +// Module : SALOME // $Header$ +using namespace std; #include "QAD_RightFrame.h" #include "QAD_Application.h" #include "QAD_Desktop.h" @@ -54,8 +74,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libOCCViewer.dll" ; #else @@ -75,8 +93,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libOCCViewer.dll" ; #else @@ -118,8 +134,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libVTKViewer.dll" ; #else @@ -139,8 +153,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libVTKViewer.dll" ; #else @@ -181,8 +193,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libSUPERVGraph.dll" ; #else @@ -202,8 +212,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libSUPERVGraph.dll" ; #else @@ -244,8 +252,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libPlot2d.dll" ; #else @@ -265,8 +271,6 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, dir = QAD_Tools::addSlash(dir) ; dir = dir + "lib" ; dir = QAD_Tools::addSlash(dir) ; - dir = dir + "salome" ; - dir = QAD_Tools::addSlash(dir) ; #ifdef WNT dir = dir + "libPlot2d.dll" ; #else @@ -341,12 +345,12 @@ QAD_RightFrame::QAD_RightFrame(QWidget *parent, const char *name, myMessage = new QAD_Message( vsplitter ,"Message"); myMessage->setMinimumSize( 1, 1 ); - sizes.append( 0.48 * DesktopHeight ); - sizes.append( 0.16 * DesktopHeight ); + sizes.append( (int)(0.48 * DesktopHeight) ); + sizes.append( (int)(0.16 * DesktopHeight) ); setSizes( sizes ); sizes.clear(); - sizes.append( 0.25 * DesktopWidth ); - sizes.append( 0.25 * DesktopWidth ); + sizes.append( (int)(0.25 * DesktopWidth) ); + sizes.append( (int)(0.25 * DesktopWidth) ); vsplitter->setSizes( sizes ); } diff --git a/src/SALOMEGUI/QAD_Study.cxx b/src/SALOMEGUI/QAD_Study.cxx index b0289587e..0e1796ab3 100644 --- a/src/SALOMEGUI/QAD_Study.cxx +++ b/src/SALOMEGUI/QAD_Study.cxx @@ -1,15 +1,32 @@ -using namespace std; -// File : QAD_Study.cxx -// Created : UI team, 05.09.00 -// Descr : Study for QAD-based application - -// Modified : Mon Dec 03 14:20:05 2001 -// Author : Nicolas REJNERI -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE 2001 +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : QAD_Study.cxx +// Author : Nicolas REJNERI +// Module : SALOME // $Header$ +using namespace std; /*! \class QAD_Study QAD_Study.h \brief Study for QAD-based application. @@ -98,7 +115,6 @@ QAD_Study::~QAD_Study () close(); //SRN: added - clear selection in case the study will be loaded again so the title will coincide SALOME_Selection::RemoveSelection( QString(myTitle + "_" + mySelection) ); - } /*! @@ -944,8 +960,8 @@ QAD_StudyFrame* QAD_Study::newWindow3d(QString name, ViewType theViewType, bool } void QAD_Study::showFrame(QAD_StudyFrame* theFrame){ - theFrame->resize(0.64*QAD_Application::getDesktop()->getMainFrame()->width(), - 0.64*QAD_Application::getDesktop()->getMainFrame()->height()); + theFrame->resize( (int)(0.64*QAD_Application::getDesktop()->getMainFrame()->width()), + (int)(0.64*QAD_Application::getDesktop()->getMainFrame()->height())); theFrame->show(); } diff --git a/src/SALOMEGUI/QAD_msg_en.po b/src/SALOMEGUI/QAD_msg_en.po index c15207e21..f31e12f8d 100644 --- a/src/SALOMEGUI/QAD_msg_en.po +++ b/src/SALOMEGUI/QAD_msg_en.po @@ -1,6 +1,29 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". +# SALOME SALOMEGUI : implementation of desktop and GUI kernel +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : QAD_msg_en.po +# Module : SALOME + msgid "" msgstr "" "Project-Id-Version: example-Qt-message-extraction\n" @@ -174,7 +197,7 @@ msgstr "Save" #: QAD_Config.cxx:376 msgid "MEN_DESK_PREF_VIEWER" -msgstr "3D View background" +msgstr "Viewer background" #: QAD_Config.cxx:376 msgid "MEN_DESK_PREF_VIEWER_TRIHEDRON" @@ -722,6 +745,9 @@ msgstr "Clears use case" msgid "MEN_DESK_PREF_MULTI_FILE_SAVE" msgstr "MultiFile Save" +msgid "MEN_DESK_PREF_ASCII_SAVE" +msgstr "ASCII Save" + msgid "TOT_APP_EDIT_COPY" msgstr "Copy" diff --git a/src/SALOMEGUI/QAD_msg_fr.po b/src/SALOMEGUI/QAD_msg_fr.po index 921c6fc65..8027e10fc 100644 --- a/src/SALOMEGUI/QAD_msg_fr.po +++ b/src/SALOMEGUI/QAD_msg_fr.po @@ -1,6 +1,29 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". +# SALOME SALOMEGUI : implementation of desktop and GUI kernel +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : QAD_msg_fr.po +# Module : SALOME + msgid "" msgstr "" "Project-Id-Version: example-Qt-message-extraction\n" diff --git a/src/SALOMEGUI/SALOMEGUI_Application.cxx b/src/SALOMEGUI/SALOMEGUI_Application.cxx index 56fc4e2b6..bd982b59f 100644 --- a/src/SALOMEGUI/SALOMEGUI_Application.cxx +++ b/src/SALOMEGUI/SALOMEGUI_Application.cxx @@ -1,12 +1,32 @@ -using namespace std; -// File : SALOMEGUI_Application.cxx -// Created : Thu Jun 14 12:01:00 2001 -// Author : Nicolas REJNERI -// Project : SALOME -// Module : SALOMEGUI -// Copyright : Open CASCADE +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEGUI_Application.cxx +// Author : Nicolas REJNERI +// Module : SALOME // $Header$ +using namespace std; #include "SALOMEGUI_Application.h" #include "SALOMEGUI_Desktop.h" #include "SALOMEGUI_ImportOperation.h" @@ -50,7 +70,7 @@ QAD_Application( format, description, filters ) if ( !palette) palette = QAD_Desktop::createPalette(); // if ( !palette) palette->loadPalette(); - myViewActions.setAutoDelete( true ); + //myViewActions.setAutoDelete( true ); /* We need to know that the desktop is created to have some additional internal initialization */ @@ -83,7 +103,7 @@ void SALOMEGUI_Application::createActions() QAD_ResourceMgr* rmgr = QAD_Desktop::getResourceManager(); #define CREATE_ACTION(ID,NAME) \ if(!myViewActions.at(ID)){ \ - QAction* action = new QAction(tr("TOT_APP_VIEW_" #NAME), \ + QActionP* action = new QActionP(tr("TOT_APP_VIEW_" #NAME), \ rmgr->loadPixmap("SALOMEGUI", tr("ICON_APP_VIEW_" #NAME)), \ tr("MEN_APP_VIEW_" #NAME), 0, QAD_Application::getDesktop()); \ action->setStatusTip(tr("PRP_APP_VIEW_" #NAME)); \ @@ -266,9 +286,9 @@ void SALOMEGUI_Application::connectToViewer( QAD_ViewFrame* vf ) if ( vf ) { QToolBar* tbView = getToolBar( ViewToolBarId ); - QListIterator it( myViewActions ); - for( ; it.current(); ++it ) - it.current()->removeFrom( tbView ); + for ( int cmd = ViewDumpId; cmd <= ViewResetId; cmd++ ) + if ( myViewActions.at( cmd ) ) + myViewActions.at( cmd )->removeFrom(tbView); if( vf->getTypeView() == VIEW_GRAPHSUPERV ) { //myViewActions.at(ViewDumpId)->addTo(tbView); //myViewActions.at(ViewFitAllId)->addTo(tbView); @@ -288,9 +308,9 @@ void SALOMEGUI_Application::connectToViewer( QAD_ViewFrame* vf ) //myViewActions.at(ViewResetId)->addTo(tbView); } else { - it.toFirst(); - for( ; it.current(); ++it ) - it.current()->addTo(tbView); + for ( int cmd = ViewDumpId; cmd <= ViewResetId; cmd++ ) + if ( myViewActions.at( cmd ) ) + myViewActions.at( cmd )->addTo(tbView); } //CONNECT_ACTION(Mu4Id) CONNECT_ACTION(Dump); diff --git a/src/SALOMEGUI/SALOMEGUI_Swig.cxx b/src/SALOMEGUI/SALOMEGUI_Swig.cxx index 86b711edf..7103d349a 100644 --- a/src/SALOMEGUI/SALOMEGUI_Swig.cxx +++ b/src/SALOMEGUI/SALOMEGUI_Swig.cxx @@ -1,17 +1,32 @@ -using namespace std; -//============================================================================= -// File : SALOMEGUI_Swig.cxx -// Created : ven oct 12 15:44:16 CEST 2001 -// Author : Paul RASCLE, EDF -// Project : SALOME -// Copyright : EDF 2001 - -// Modified : Mon Jul 29 21:38:07 2002 -// Author : Nicolas REJNERI -// Copyright : OPEN CASCADE 2002 -// $Header$ -//============================================================================= +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEGUI_Swig.cxx +// Author : Nicolas REJNERI +// Module : SALOME +// $Header$ +using namespace std; #include "QAD_Application.h" #include "QAD_Desktop.h" #include "QAD_Study.h" @@ -28,7 +43,8 @@ using namespace std; /*! Constructor */ -SALOMEGUI_Swig::SALOMEGUI_Swig(): _studyId(0) +SALOMEGUI_Swig::SALOMEGUI_Swig() +// VSR 06-05-03 : _studyId(0) { // MESSAGE("Constructeur"); } @@ -41,12 +57,26 @@ SALOMEGUI_Swig::~SALOMEGUI_Swig() // MESSAGE("Destructeur"); } +/*! + Gets active study or 0 if no study opened +*/ +QAD_Study* SALOMEGUI_Swig::getActiveStudy() +{ + QAD_Application* app = QAD_Application::getDesktop()->getActiveApp(); + if ( app ) return app->getActiveStudy(); + return 0; +} + /*! Call when updated object browser. */ void SALOMEGUI_Swig::updateObjBrowser( bool updateSelection ) { - QAD_Study* myActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myActiveStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myActiveStudy = getActiveStudy(); + if ( !myActiveStudy) return; + // end of VSR 06-05-03 ===================================================== myActiveStudy->updateObjBrowser( updateSelection ); } @@ -60,8 +90,14 @@ int SALOMEGUI_Swig::getActiveStudyId() // { // QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); // _name = myStudy->getTitle(); - _studyId = QAD_Application::getDesktop()->getActiveStudy()->getStudyId(); - SCRUTE(_studyId); + + // VSR 06-05-03 ============================================================ + // _studyId = QAD_Application::getDesktop()->getActiveStudy()->getStudyId(); + int _studyId = 0; + QAD_Study* myActiveStudy = getActiveStudy(); + if ( myActiveStudy) _studyId = myActiveStudy->getStudyId(); + // SCRUTE(_studyId); + // end of VSR 06-05-03 ===================================================== // } return _studyId; } @@ -71,8 +107,14 @@ int SALOMEGUI_Swig::getActiveStudyId() */ const char *SALOMEGUI_Swig::getActiveStudyName() { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); - _name = myStudy->getTitle(); + // VSR 06-05-03 ============================================================ + // QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // _name = myStudy->getTitle(); + QString _name = QString::null; + QAD_Study* myActiveStudy = getActiveStudy(); + if ( myActiveStudy) _name = myActiveStudy->getTitle(); + // end of VSR 06-05-03 ===================================================== + // NRI 24-02-03 : //if (_studyId ==0) // getActiveStudyId(); @@ -99,7 +141,11 @@ const char* SALOMEGUI_Swig::getComponentUserName( const char* ComponentName ) */ int SALOMEGUI_Swig::SelectedCount() { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return 0; + // end of VSR 06-05-03 ===================================================== SALOME_Selection* Sel = SALOME_Selection::Selection( myStudy->getSelection() ); return Sel->IObjectCount(); @@ -110,7 +156,11 @@ int SALOMEGUI_Swig::SelectedCount() */ const char* SALOMEGUI_Swig::getSelected(int i) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return ""; + // end of VSR 06-05-03 ===================================================== SALOME_Selection* Sel = SALOME_Selection::Selection( myStudy->getSelection() ); SALOME_ListIteratorOfListIO It( Sel->StoredIObjects() ); @@ -132,11 +182,15 @@ const char* SALOMEGUI_Swig::getSelected(int i) */ void SALOMEGUI_Swig::AddIObject(const char *Entry) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return; + // end of VSR 06-05-03 ===================================================== SALOME_Selection* Sel = SALOME_Selection::Selection( myStudy->getSelection() ); - if ( !SALOMEGUI_Swig::IsInCurrentView( Entry ) ) + if ( !IsInCurrentView( Entry ) ) return; Handle(SALOME_InteractiveObject) IO = @@ -150,12 +204,15 @@ void SALOMEGUI_Swig::AddIObject(const char *Entry) */ void SALOMEGUI_Swig::RemoveIObject(const char *Entry) { - QAD_Study* myStudy - = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return; + // end of VSR 06-05-03 ===================================================== SALOME_Selection* Sel = SALOME_Selection::Selection( myStudy->getSelection() ); - if ( !SALOMEGUI_Swig::IsInCurrentView( Entry ) ) + if ( !IsInCurrentView( Entry ) ) return; Handle(SALOME_InteractiveObject) IO = @@ -169,7 +226,11 @@ void SALOMEGUI_Swig::RemoveIObject(const char *Entry) */ void SALOMEGUI_Swig::ClearIObjects() { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return; + // end of VSR 06-05-03 ===================================================== SALOME_Selection* Sel = SALOME_Selection::Selection( myStudy->getSelection() ); Sel->ClearIObjects(); @@ -180,9 +241,13 @@ void SALOMEGUI_Swig::ClearIObjects() */ void SALOMEGUI_Swig::Display(const char *Entry) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return; + // end of VSR 06-05-03 ===================================================== - if ( !SALOMEGUI_Swig::IsInCurrentView( Entry ) ) + if ( !IsInCurrentView( Entry ) ) return; Handle(SALOME_InteractiveObject) IO = @@ -196,10 +261,14 @@ void SALOMEGUI_Swig::Display(const char *Entry) */ void SALOMEGUI_Swig::DisplayOnly(const char *Entry) { - if ( !SALOMEGUI_Swig::IsInCurrentView( Entry ) ) - return; + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return; + // end of VSR 06-05-03 ===================================================== - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + if ( !IsInCurrentView( Entry ) ) + return; Handle(SALOME_InteractiveObject) IO = myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame()->FindIObject( Entry ); @@ -214,10 +283,14 @@ void SALOMEGUI_Swig::DisplayOnly(const char *Entry) */ void SALOMEGUI_Swig::Erase(const char *Entry) { - if ( !SALOMEGUI_Swig::IsInCurrentView( Entry ) ) - return; + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return; + // end of VSR 06-05-03 ===================================================== - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + if ( !IsInCurrentView( Entry ) ) + return; Handle(SALOME_InteractiveObject) IO = myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame()->FindIObject( Entry ); @@ -230,16 +303,24 @@ void SALOMEGUI_Swig::Erase(const char *Entry) */ void SALOMEGUI_Swig::DisplayAll() { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return; + // end of VSR 06-05-03 ===================================================== myStudy->getActiveStudyFrame()->getRightFrame()->getViewFrame()->DisplayAll(); } /*! - Erse only + Erase only */ void SALOMEGUI_Swig::EraseAll() { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return; + // end of VSR 06-05-03 ===================================================== SALOME_Selection* Sel = SALOME_Selection::Selection( myStudy->getSelection() ); @@ -248,17 +329,31 @@ void SALOMEGUI_Swig::EraseAll() } /*! - Check + Checks if object is displayed in current viewer */ bool SALOMEGUI_Swig::IsInCurrentView(const char *Entry) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Study* myStudy = getActiveStudy(); + if ( !myStudy) return false; + // end of VSR 06-05-03 ===================================================== return myStudy->isInViewer( Entry, myStudy->getActiveStudyFrame()->entry() ); } -vtkRenderer *SALOMEGUI_Swig::getRenderer(int viewId) +/*! + Gets VTK renderer if available +*/ +//san:T3.13 - move getRenderer() implementation from here to SalomePy.cxx +/*vtkRenderer *SALOMEGUI_Swig::getRenderer(int viewId) { - QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + // VSR 06-05-03 ============================================================ + //QAD_Study* myStudy = QAD_Application::getDesktop()->getActiveStudy(); + QAD_Application* app = QAD_Application::getDesktop()->getActiveApp(); + if ( !app ) return NULL; + QAD_Study* myStudy = app->getActiveStudy(); + if ( !myStudy) return NULL; + // end of VSR 06-05-03 ===================================================== int nbStudyFrames = myStudy->getStudyFramesCount(); vtkRenderer *myRenderer = NULL; if (viewId == -1) // find the first frame with VTK viewer & get renderer @@ -282,3 +377,5 @@ vtkRenderer *SALOMEGUI_Swig::getRenderer(int viewId) if (myRenderer == NULL) INFOS("No VTK Renderer available !"); return myRenderer; } +*/ + diff --git a/src/SALOMEGUI/SALOMEGUI_Swig.hxx b/src/SALOMEGUI/SALOMEGUI_Swig.hxx index 341abca2e..0af5330a1 100644 --- a/src/SALOMEGUI/SALOMEGUI_Swig.hxx +++ b/src/SALOMEGUI/SALOMEGUI_Swig.hxx @@ -1,15 +1,30 @@ -//============================================================================= -// File : SALOMEGUI_Swig.hxx -// Created : ven oct 12 15:44:16 CEST 2001 -// Author : Paul RASCLE, EDF -// Project : SALOME -// Copyright : EDF 2001 - -// Modified : Mon Jul 29 21:38:07 2002 -// Author : Nicolas REJNERI -// Copyright : OPEN CASCADE 2002 -// $Header$ -//============================================================================= +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEGUI_Swig.hxx +// Author : Nicolas REJNERI +// Module : SALOME +// $Header$ #ifndef _SALOMEGUI_SWIG_HXX_ #define _SALOMEGUI_SWIG_HXX_ @@ -20,6 +35,7 @@ #include class vtkRenderer; +class QAD_Study; class SALOMEGUI_Swig { @@ -27,15 +43,17 @@ public: SALOMEGUI_Swig(); ~SALOMEGUI_Swig(); - static vtkRenderer* getRenderer(int viewId = -1); + //san:T3.13 - move getRenderer() implementation from here to SalomePy.cxx + //static vtkRenderer* getRenderer(int viewId = -1); - void updateObjBrowser( bool updateSelection ); - int getActiveStudyId(); - const char* getActiveStudyName(); + void updateObjBrowser( bool updateSelection ); + QAD_Study* getActiveStudy(); + int getActiveStudyId(); + const char* getActiveStudyName(); /* selection */ - int SelectedCount(); - const char* getSelected(int i); + int SelectedCount(); + const char* getSelected(int i); void AddIObject(const char *Entry); void RemoveIObject(const char *Entry); diff --git a/src/SALOMEGUI/SALOMEGUI_Swig.i b/src/SALOMEGUI/SALOMEGUI_Swig.i index b1df59b53..d5c5a5007 100644 --- a/src/SALOMEGUI/SALOMEGUI_Swig.i +++ b/src/SALOMEGUI/SALOMEGUI_Swig.i @@ -1,11 +1,30 @@ -//============================================================================= -// File : SALOMEGUI_Swig.i -// Created : ven oct 12 15:44:16 CEST 2001 -// Author : Paul RASCLE, EDF -// Project : SALOME -// Copyright : EDF 2001 -// $Header$ -//============================================================================= +// SALOME SALOMEGUI : implementation of desktop and GUI kernel +// +// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. +// +// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// +// +// File : SALOMEGUI_Swig.i +// Author : Paul RASCLE, EDF +// Module : SALOME +// $Header$ %{ #include "SALOMEGUI_Swig.hxx" diff --git a/src/SALOMEGUI/SALOMEGUI_msg_en.po b/src/SALOMEGUI/SALOMEGUI_msg_en.po index d3d15bef5..bcdf3d4c6 100644 --- a/src/SALOMEGUI/SALOMEGUI_msg_en.po +++ b/src/SALOMEGUI/SALOMEGUI_msg_en.po @@ -1,6 +1,29 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". +# SALOME SALOMEGUI : implementation of desktop and GUI kernel +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : SALOMEGUI_msg_en.po +# Module : SALOME + msgid "" msgstr "" "Project-Id-Version: example-Qt-message-extraction\n" @@ -631,3 +654,34 @@ msgstr "Do you want to close or only unload the study ?" msgid "SALOMEGUI_HELP_TITLE" msgstr "SALOME Help" + +msgid "TOT_PLOT2D_FITDATA" +msgstr "Fit range" +msgid "MEN_PLOT2D_FITDATA" +msgstr "Fit &Range" +msgid "PRP_PLOT2D_FITDATA" +msgstr "Fits view to the given data range" + +msgid "FIT_DATA_TLT" +msgstr "Fit Data Range" + +msgid "Plot2d_FitDataDlg::FIT_ALL" +msgstr "Fit both" + +msgid "Plot2d_FitDataDlg::FIT_HORIZONTAL" +msgstr "Fit horizontally" + +msgid "Plot2d_FitDataDlg::FIT_VERTICAL" +msgstr "Fit vertically" + +msgid "Plot2d_FitDataDlg::HORIZONTAL_AXIS" +msgstr "Horizontal axis" + +msgid "Plot2d_FitDataDlg::VERTICAL_AXIS" +msgstr "Vertical axis" + +msgid "Plot2d_FitDataDlg::MIN_VALUE_LAB" +msgstr "Min:" + +msgid "Plot2d_FitDataDlg::MAX_VALUE_LAB" +msgstr "Max:" diff --git a/src/SALOMEGUI/SALOMEGUI_msg_fr.po b/src/SALOMEGUI/SALOMEGUI_msg_fr.po index 4b7d6bdd2..b595f87c2 100644 --- a/src/SALOMEGUI/SALOMEGUI_msg_fr.po +++ b/src/SALOMEGUI/SALOMEGUI_msg_fr.po @@ -1,6 +1,29 @@ -# This is a Qt message file in .po format. Each msgid starts with -# a scope. This scope should *NOT* be translated - eg. "Foo::Bar" -# would be translated to "Pub", not "Foo::Pub". +# SALOME SALOMEGUI : implementation of desktop and GUI kernel +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : SALOMEGUI_msg_fr.po +# Module : SALOME + msgid "" msgstr "" "Project-Id-Version: example-Qt-message-extraction\n" diff --git a/src/SALOME_PY/Makefile.in b/src/SALOME_PY/Makefile.in index 535a8cae0..08fac84a5 100644 --- a/src/SALOME_PY/Makefile.in +++ b/src/SALOME_PY/Makefile.in @@ -1,13 +1,31 @@ -#============================================================================== -# File : Makefile.in -# Created : ven nov 16 18:12:41 CET 2001 -# Author : Paul RASCLE, EDF -# Project : SALOME -# Copyright : EDF 2001 +# SALOME SALOME_PY : binding of VTK graphics and Python +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : Paul RASCLE, EDF +# Module : SALOME # $Header$ -#============================================================================== -# source path top_srcdir=@top_srcdir@ top_builddir=../.. srcdir=@srcdir@ @@ -26,7 +44,7 @@ LIB_CLIENT_IDL = SALOMEDS.idl \ SALOME_Exception.idl CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) $(OCC_INCLUDES) -DHAVE_CONFIG_H -LDFLAGS+= $(PYTHON_LIBS) $(QT_MT_LIBS) $(VTK_LIBS) $(OGL_LIBS) -lSALOME_Swigcmodule -lSalomeGUI -lVTKCommonPython -lVTKGraphicsPython -lVTKContribPython -lVTKImagingPython +LDFLAGS+= $(PYTHON_LIBS) $(QT_MT_LIBS) $(OCC_LIBS) $(VTK_LIBS) $(OGL_LIBS) -lSalomeGUI -lvtkCommonPython -lvtkGraphicsPython -lvtkImagingPython -lVTKViewer @CONCLUDE@ diff --git a/src/SALOME_PYQT/Makefile.in b/src/SALOME_PYQT/Makefile.in index 5e609dc11..525764d5d 100644 --- a/src/SALOME_PYQT/Makefile.in +++ b/src/SALOME_PYQT/Makefile.in @@ -1,13 +1,12 @@ -#============================================================================== -# File : Makefile.in -# Created : ven sep 28 17:32:46 CEST 2001 -# Author : Nicolas REJNERI -# Project : SALOME -# Copyright : EDF 2001 +# Copyright (C) 2003 CEA/DEN, EDF R&D +# +# +# +# File : Makefile.in +# Author : Nicolas REJNERI +# Module : SALOME # $Header$ -#============================================================================== -# source path top_srcdir=@top_srcdir@ top_builddir=../.. srcdir=@srcdir@ @@ -50,8 +49,8 @@ EXPORT_SHAREDPYSCRIPTS = SalomePyQt.py LIB_CLIENT_IDL = SALOME_Exception.idl CPPFLAGS+=$(QT_INCLUDES) $(PYTHON_INCLUDES) $(SIP_INCLUDES) $(OCC_INCLUDES) $(VTK_INCLUDES) $(OGL_INCLUDES) -LIBS+= $(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(VTK_LIBS) $(OGL_LIBS) -LDFLAGS+= -lSalomeGUI +LIBS+= $(PYTHON_LIBS) $(SIP_LIBS) $(PYQT_LIBS) $(OCC_LIBS) $(VTK_LIBS) $(OGL_LIBS) +LDFLAGS+= -lSalomeGUI -lqtcmodule # Custom build step: generate C++ wrapping according to $(SIP_FILES) diff --git a/src/SALOME_SWIG/Makefile.in b/src/SALOME_SWIG/Makefile.in index b24711574..ddd2ccfbd 100644 --- a/src/SALOME_SWIG/Makefile.in +++ b/src/SALOME_SWIG/Makefile.in @@ -1,13 +1,29 @@ -#============================================================================== -# File : Makefile.in -# Created : ven sep 28 17:32:46 CEST 2001 -# Author : Paul RASCLE, EDF -# Project : SALOME -# Copyright : EDF 2001 +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : Paul RASCLE, EDF +# Module : SALOME # $Header$ -#============================================================================== -# source path top_srcdir=@top_srcdir@ top_builddir=../.. srcdir=@srcdir@ @@ -22,7 +38,7 @@ LIB = libSALOME_Swigcmodule.la LIB_SRC = SWIG_DEF = libSALOME_Swig.i -EXPORT_PYSCRIPTS = libSALOME_Swig.py Help.py PyInterp.py salome.py examplevtk1.py supervisionexample.py supervisiongeomexample.py salome_shared_modules.py batchmode_salome.py test_table.py test_big_table.py test_many_objects.py import_hook.py +EXPORT_PYSCRIPTS = libSALOME_Swig.py Help.py PyInterp.py salome.py examplevtk1.py supervisionexample.py supervisiongeomexample.py salome_shared_modules.py batchmode_salome.py test_table.py test_big_table.py test_many_objects.py import_hook.py salome_test.py EXPORT_SHAREDPYSCRIPTS=kernel_shared_modules.py diff --git a/src/SALOME_SWIG/salome.py b/src/SALOME_SWIG/salome.py index 5e585358c..92a99f11f 100644 --- a/src/SALOME_SWIG/salome.py +++ b/src/SALOME_SWIG/salome.py @@ -1,11 +1,28 @@ -#============================================================================== -# File : salome.py -# Created : sam nov 10 00:49:00 CET 2001 -# Author : Paul RASCLE, EDF -# Project : SALOME -# Copyright : EDF 2001 +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : salome.py +# Author : Paul RASCLE, EDF +# Module : SALOME # $Header$ -#============================================================================== from omniORB import CORBA from LifeCycleCORBA import * diff --git a/src/SALOME_SWIG/salome_shared_modules.py b/src/SALOME_SWIG/salome_shared_modules.py index de2b8742d..31115f14c 100644 --- a/src/SALOME_SWIG/salome_shared_modules.py +++ b/src/SALOME_SWIG/salome_shared_modules.py @@ -1,3 +1,30 @@ +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : salome_shared_modules.py +# Module : SALOME + +from SALOME_utilities import * + +""" """ This module with help of import_hook and *_shared_modules filters imports when using the embedded Python interpretor. diff --git a/src/Session/Makefile.in b/src/Session/Makefile.in index 3388ac67c..2448c8e77 100644 --- a/src/Session/Makefile.in +++ b/src/Session/Makefile.in @@ -1,15 +1,34 @@ -#============================================================================== -# File : Makefile.in -# Created : mar jui 3 12:59:20 CEST 2001 -# Author : Paul RASCLE, EDF -# Project : SALOME -# Copyright : EDF 2001 +# SALOME Session : implementation of Session.idl +# +# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# +# 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. +# +# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +# +# +# +# File : Makefile.in +# Author : Paul RASCLE, EDF +# Module : SALOME # $Header$ -#============================================================================== # source path top_srcdir=@top_srcdir@ -top_builddir=../.. +top_builddir=../../.. srcdir=@srcdir@ VPATH=.:@srcdir@:@top_srcdir@/idl @@ -27,14 +46,12 @@ LIB_SRC=\ # Executables targets BIN = SALOME_Session_Server BIN_SRC = -#***#BIN_SERVER_IDL = SALOME_Session.idl VISU_Gen.idl MED.idl BIN_SERVER_IDL = SALOME_Session.idl -#***#BIN_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Registry.idl SALOME_ModuleCatalog.idl SALOME_Component.idl SALOME_Exception.idl VISU_Gen.idl BIN_CLIENT_IDL = SALOMEDS.idl SALOMEDS_Attributes.idl SALOME_Component.idl SALOME_Registry.idl SALOME_ModuleCatalog.idl SALOME_Exception.idl CPPFLAGS+=$(QT_MT_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) CXXFLAGS+=$(OCC_CXXFLAGS) -LDFLAGS+=$(QT_MT_LIBS) -lSalomeNS -lSalomeGUI -lSalomeObject -lSalomeLifeCycleCORBA -lqsplitterP -lOpUtil -lSalomeLoggerServer +LDFLAGS+=$(QT_MT_LIBS) $(CAS_KERNEL) $(CAS_OCAF) $(CAS_VIEWER) $(CAS_MODELER) -lSalomeNS -lSalomeGUI -lSalomeObject -lSalomeLifeCycleCORBA -lqsplitterP -lOpUtil -lSalomeLoggerServer -lPlot2d @CONCLUDE@