-# 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"
#---------------
msgid "INF_VERSION"
-msgstr "Version 1.1a"
+msgstr "Version 1.2"
msgid "INF_COPYRIGHT"
msgstr " "
#: 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"
-# 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@
EXPORT_HEADERS = \
QAD.h \
+ QAD_Action.h \
QAD_Application.h \
QAD_Config.h \
QAD_Desktop.h \
SALOMEGUI_Application.h \
SALOMEGUI_Desktop.h \
QAD_Application.h \
+ QAD_Action.h \
QAD_Desktop.h \
QAD_DirListDlg.h \
QAD_FileDlg.h \
-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 <string>
-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$
/*!
#include <qiconset.h>
#include <qfontdialog.h>
#include <qlineedit.h>
+#include <qdatetime.h>
#if QT_VERSION > 300
#include <qlistbox.h>
/* 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",
/* 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();
}
/*!
/* '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") );
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 );
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 );
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() )));
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() )));
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() )));
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() )));
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() ),
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") );
// 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 );
/* 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 );
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");
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");
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");
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");
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");
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 );
//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 ,
//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,
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() )));
/* '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() )));
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 );
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 );
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 );
}
/*!
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
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));
}
/*!
*/
void QAD_Desktop::onSelectionMode()
{
- const QAction* obj = (QAction*) sender();
+ const QActionP* obj = (QActionP*) sender();
int SelectionMode = 4;
}
//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) ) {
// 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
}
/*!
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);
}
}
}
}
//VRV: T2.5 - add default viewer
-void QAD_Desktop::onDefaultViewer(QAction * theAction)
+void QAD_Desktop::onDefaultViewer(QActionP * theAction)
{
int type = VIEW_TYPE_MAX;
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
-// 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
#include "QAD_OperatorMenus.h"
#include "QAD_Menus.h"
#include "QAD_HelpWindow.h"
+#include "QAD_Action.h"
#include "SALOME_NamingService.hxx"
#include "SALOME_LifeCycleCORBA.hxx"
// QT Includes
#include <qlist.h>
-#include <qaction.h>
#include <qmap.h>
#include <qmenubar.h>
#include <qtoolbar.h>
// Open CASCADE Includes
#include <OSD_SharedLibrary.hxx>
-class ActionMap {
- public:
- ActionMap() {}
- ~ActionMap()
- {
- QMapIterator<unsigned int, QAction*> 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<unsigned int, QAction*> 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
//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
bool onMousePress(QMouseEvent*);
void onKeyPress(QKeyEvent*);
+ virtual QAD_Study* loadStudy(QString theStudyName);
+
protected:
bool closeAllStudies( QAD_Application* );
void closeEvent( QCloseEvent* );
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);
-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.
-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"
// 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
// 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);
}
// 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
-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"
-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.
-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"
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
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
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
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
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
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
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
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
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 );
}
-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.
close();
//SRN: added - clear selection in case the study will be loaded again so the title will coincide
SALOME_Selection::RemoveSelection( QString(myTitle + "_" + mySelection) );
-
}
/*!
}
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();
}
-# 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"
#: 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"
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"
-# 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"
-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"
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 */
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)); \
if ( vf ) {
QToolBar* tbView = getToolBar( ViewToolBarId );
- QListIterator<QAction> 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);
//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);
-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"
/*!
Constructor
*/
-SALOMEGUI_Swig::SALOMEGUI_Swig(): _studyId(0)
+SALOMEGUI_Swig::SALOMEGUI_Swig()
+// VSR 06-05-03 : _studyId(0)
{
// MESSAGE("Constructeur");
}
// 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 );
}
// {
// 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;
}
*/
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();
*/
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();
*/
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() );
*/
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 =
*/
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 =
*/
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();
*/
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 =
*/
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 );
*/
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 );
*/
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() );
}
/*!
- 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
if (myRenderer == NULL) INFOS("No VTK Renderer available !");
return myRenderer;
}
+*/
+
-//=============================================================================
-// 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_
#include <Standard.hxx>
class vtkRenderer;
+class QAD_Study;
class SALOMEGUI_Swig
{
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);
-//=============================================================================
-// 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"
-# 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"
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:"
-# 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"
-#==============================================================================
-# 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@
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@
-#==============================================================================
-# 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@
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)
-#==============================================================================
-# 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@
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
-#==============================================================================
-# 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 *
+# 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.
-#==============================================================================
-# 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
# 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@