SET(${PROJECT_NAME_UC}_PATCH_VERSION 1)
SET(${PROJECT_NAME_UC}_VERSION
${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
# Find KERNEL
# ===========
ENDIF()
IF(SALOME_USE_VTKVIEWER)
# Required components are listed in the FindSalomeVTK.cmake file:
- FIND_PACKAGE(SalomeVTK 6.1)
+ FIND_PACKAGE(SalomeVTK)
SALOME_LOG_OPTIONAL_PACKAGE(VTK SALOME_USE_VTKVIEWER)
ELSE()
ADD_DEFINITIONS("-DDISABLE_VTKVIEWER")
ENDFOREACH()
#----------------------------------------------------------------------------
-# FULL_GUI is a macro useful for determining whether a GUI module
-# builded in full mode
+# SALOME_GUI_WITH_CORBA is a macro useful for determining whether a SALOME GUI module
+# is built in not light mode (with CORBA)
+#----------------------------------------------------------------------------
+MACRO(SALOME_GUI_WITH_CORBA)
+ IF(SALOME_GUI_LIGHT_ONLY)
+ MESSAGE(FATAL_ERROR "\nWe absolutely need a Salome GUI module with CORBA.\nPlease set option SALOME_LIGHT_ONLY to OFF when building GUI module.")
+ ENDIF()
+ENDMACRO(SALOME_GUI_WITH_CORBA)
+
+#----------------------------------------------------------------------------
+# FULL_GUI is a macro useful for determining whether a GUI module
+# builded in full mode
+#----------------------------------------------------------------------------
+MACRO(FULL_GUI)
+ SET(_options)
+ LIST(APPEND _options SALOME_USE_OCCVIEWER SALOME_USE_GLVIEWER SALOME_USE_VTKVIEWER
+ SALOME_USE_PLOT2DVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_QXGRAPHVIEWER
+ SALOME_USE_SALOMEOBJECT SALOME_USE_PYCONSOLE)
+ SALOME_GUI_MODE(${_options})
+ENDMACRO(FULL_GUI)
+
+#----------------------------------------------------------------------------
+# SALOME_GUI_MODE is a macro useful for determining whether a GUI module
+# builded in particular mode
#----------------------------------------------------------------------------
#########################################################################
# FULL_GUI()
#
-# USAGE: FULL_GUI(with_corba)
+# USAGE: FULL_GUI(_options)
#
# ARGUMENTS:
-# with_corba [input] TRUE or FALSE - use CORBA for building module or no.
+# _options [input] List - The list of CMake options given to SALOME GUI
#
-MACRO(FULL_GUI with_corba)
- SET(_options)
- IF(${with_corba} AND ${SALOME_GUI_LIGHT_ONLY})
- SET(_corba_message "We absolutely need a Salome GUI module with CORBA.\nPlease set option SALOME_LIGHT_ONLY to OFF when building GUI module.")
- ENDIF()
-
- LIST(APPEND _options SALOME_USE_OCCVIEWER SALOME_USE_GLVIEWER SALOME_USE_VTKVIEWER
- SALOME_USE_PLOT2DVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_QXGRAPHVIEWER
- SALOME_USE_SALOMEOBJECT SALOME_USE_PYCONSOLE)
-
+MACRO(SALOME_GUI_MODE _options)
+ MESSAGE(STATUS "Checking status of GUI options ${_options}")
SET(_message)
- FOREACH(_option ${_options})
+ FOREACH(_option ${_options})
IF(NOT ${_option})
LIST(APPEND _message ${_option})
ENDIF()
ELSEIF(_corba_message)
MESSAGE(FATAL_ERROR "${_corba_message}")
ENDIF()
-
-ENDMACRO(FULL_GUI)
+ENDMACRO(SALOME_GUI_MODE)
\image html view2.png
-\n SALOME GUI is based on SUIT (Salome User Interface
+\b SALOME \b GUI is based on SUIT (Salome User Interface
Toolkit) that proposes very flexible, powerful and safe mechanisms of
interaction with SALOME tool components (both CORBA and standalone),
resource management, viewers and selection handling,
-exception and signals processing. This approach brings to the top
-Salome multi-desktop dockable-windowed user interface.
-\n All Graphical User Interfaces of standard modules have plug-in
+exception and signals processing.
+
+All Graphical User Interfaces of standard modules have plug-in
structure, i.e. each module is placed in a dynamic library which is
loaded on demand. So, all modules add their own menu items, buttons
in toolbar, windows etc.
<ul>
<li>\b File menu corresponds to \subpage study_management_page "Study management" functionalities
-(creation, saving, loading, editing studies, etc.).</li>
+(creation, saving, loading, editing studies, connecting, disconnecting, etc.).</li>
<li>\b Edit menu gives access to <b> Copy/Paste</b> allowing to paste the
objects from one study into the other. The availability of this
functionality depends on the module and the nature of an operation or
\page salome_desktop_page SALOME desktop
-<b>Multi-Desktop Approach</b> used in Salome means that there is a separate Desktop
-for each Study and all windows connected to the same Study (viewers, dockable
-windows, etc.) are placed in one container.
-This approach positively differs from the classic multi document interface
-if many windows are used, i.e. when one document contains a lot of
-viewers, dialogs, etc. Each desktop also has its own menu and toolbar.
+SALOME applies <b>Single Document Interface</b> (SDI) approach. Only one
+\ref study_management_page "study (document)" can be opened at the moment.
-The main SALOME Desktop consists of the following sections and toolbars:
+The front-end of the application is represented as a single Desktop top-level window
+that embeds all GUI operations. Desktop window provides access to standard GUI elements
+like viewers, main menu, toolbars, dock windows, dialog boxes, etc.
-\image html desktop.png
+The main elements of the SALOME Desktop are represented on the picture below:
+\image html desktop.png
-<b>Basic parts of the SALOME Desktop:</b>
-<ul>
-<li><b>Main menu</b> - This is a set of context-sensitive menus, which will
+The main parts of the SALOME Desktop are:
+- <b>Main menu</b> - This is a set of context-sensitive menus, which will
be updated according to the functionality of the currently active component. In
-general, these menus contain all functional options of SALOME platform.</li>
-<li><b>Standard toolbar</b> - contains standard actions
+general, these menus contain all functional options of SALOME platform.
+- <b>Standard toolbar</b> - contains standard actions
that allow creating new or opening existing study, saving study, deleting
-objects etc.</li>
-<li><b>Components toolbar</b> - allows activating
-components in SALOME platform.</li>
-<li><b>Module toolbars</b> - contains actions specific to the
-currently active module.</li>
-<li><b>Viewer toolbar</b> - provides a set of tools destined for visualization
-of the presentations in the viewer.</li>
-</ul>
-
+objects etc.
+- <b>Components toolbar</b> - allows activating
+components in SALOME platform.
+- <b>Module toolbars</b> - contain actions specific to the
+currently active module.
+- <b>Viewer toolbar</b> - provides a set of tools destined for visualization
+of the presentations in the viewer.
All toolbars in the \b SALOME Platform are context-sensitive. Loading of a definite component
(Geometry, Mesh etc.) will automatically add some additional
By default all toolbars are located on top of the SALOME desktop, but you can relocate a toolbar by dragging it with the mouse and dropping in any place of the window.
-<b>Parts of the study window:</b>
-<ul>
-<li><b>Object browser</b> - Management of objects created or imported into
-SALOME application.</li>
-<li>\b Viewer - This window is destined for visualization of
-presentations.</li>
-<li><b>Python console</b> - Window for Python interpreter. This window
+Parts of the study window:
+- <b>Object browser</b> - Management of objects created or imported into
+SALOME application.
+- \b Viewer - This window is destined for visualization of
+presentations.
+- <b>Python console</b> - Window for Python interpreter. This window
functions like a standard document: the pop-up menu invoked by
right-click in this window gives access to
-<b>Copy/Paste/SelectAll/ClearAll</b> options.</li>
-</ul>
+<b>Copy/Paste/SelectAll/ClearAll</b> options.
Object Browser, Python Console, MenuBar, etc are, in fact, separate dockable windows.
Dockable windows can be placed in special areas, on the borders of
\image html viewmenu.png
-<ul>
-<li>\b Toolbars - allows to show and hide toolbars</li>
-<li>\b Windows - allows to show and hide dockable windows, such as
-Object Browser and Python Console</li>
-<li><b> Status Bar </b> allows showing and hiding the Status Bar.</li>
-<li>\ref themes_page "Theme" - allows to select and edit the style (colors and fonts) for Salome session.</li>
-</ul>
+- \b Toolbars - allows to show and hide toolbars.
+- \b Windows - allows to show and hide dockable windows, such as
+Object Browser and Python Console.
+- <b> Status Bar </b> allows showing and hiding the Status Bar.
+- \ref themes_page "Theme" - allows to select and edit the style (colors and fonts) for Salome session.
If there are several viewer windows in your current study and you want to display more then one at the same time, you can use the functionalities provided by the \b Window menu.
\image html windowmenu.png
-<ul>
-<li><b>New window </b> - allows to open a new instance of any viewer.</li>
-<li><b>Close</b> - closes the currently active viewer window.</li>
-<li><b>Close all</b> - closes all viewer windows.</li>
-<li><b>Group all</b> - arranges all created viewer windows on the same desktop</li>
-<li><b>Arrange Views</b> - allows choosing the necessary views and their layout.
+- <b>New window </b> - allows to open a new instance of any viewer.
+- <b>Close</b> - closes the currently active viewer window.
+- <b>Close all</b> - closes all viewer windows.
+- <b>Group all</b> - arranges all created viewer windows on the same desktop.
+- <b>Arrange Views</b> - allows choosing the necessary views and their layout (see image below).
+ - The radio-buttons in <b>Views Layout</b> section allow choosing the number of views to be arranged (2, 3 or 4). The buttons with images allow choosing the view layout (depending on the chosen number of views).
+ - <b>Views List</b> contains the list of opened view windows, where it is possible to check in the necessary views.
+ - <b>Close the remaining views</b> check-box allows closing all non-selected views.
+ - <b>Stack the remaining views</b> check-box allows stacking all non-selected views in the last tab area.
\image html arrange_views_dlg.png
-- The radio-buttons in <b>Views Layout</b> section allow choosing the number of views to be arranged (2, 3 or 4). The buttons with images allow choosing the view layout (depending on the chosen number of views).
-- <b>Views List</b> contains the list of opened view windows, where it is possible to check in the necessary views.
-- <b>Close the remaining views</b> check-box allows closing all non-selected views.
-- <b>Stack the remaining views</b> check-box allows stacking all non-selected views in the last tab area.
-
-<li><b>Split Vertically</b> and <b>Split Horizontally</b> allow splitting
-the representation area into two parts, in horizontal or vertical direction.</li>
-<li>List of all opened viewer windows provides fast access to them.</li>
-<li>\b Rename - allows renaming the currently selected viewer window. </li>
-</ul>
-
-
+- <b>Split Vertically</b> and <b>Split Horizontally</b> allow splitting
+the representation area into two parts, in horizontal or vertical direction.
+- List of all opened viewer windows provides fast access to them.
+- \b Rename - allows renaming the currently selected viewer window.
*/
\page study_management_page Study management
-Study is a document within GUI, where you can carry out all
+Study is a document within application, where you can carry out all
operations provided by the SALOME functionality.
This is a certain abstraction layer between actual
document data (probably, remote data available through CORBA) and data
presentation (in the Object Browser). The study is composed of Data
-Object instances, united in a tree-like structure.
+Object instances, combined into a tree-like structure.
-All operations with studies are available from the \b File menu.
+All operations with study are available from the \b File menu.
-\image html studymanagement.png
+\note SALOME is a single-study application. It means that only one study
+can be opened at the moment.
-\b New - creates a new study. The study will be created
-with default name \b Study1. It is possible to create
-several studies, each accessible from the task bar.
+Immediately after application start-up there is (normally) no active study.
+However, you have access to the embedded Python console, that can be used to initialize
+the study by means of Python API (see documentation on SALOME KERNEL module for more details).
-\b Open - allows to open an existing study by browsing for it in a
-standard Search File dialog box, choosing the required
-*.hdf file and clicking \b Open button.
+The following operations are available from the \b File menu:
-\b Reopen - reloads the current study from the *.hdf file. This menu command
-can be used to reverse the study to the latest saved state.
+\image html menu_file.png
-\b Connect - allows to open an unloaded study.
-\image html loadstudy2.png
-Select one of the studies, which has been previously
-created and unloaded and click \b Ok button.
+As soon as study is created, loaded from the file or from the data server,
+some additional operations become available from the \b File menu:
-\note SALOME is a multi-study platform. It means that simultaneously you can
-work with several studies.
-
-\b Close - closes the current study, alternatively it is
-possible to click on the cross in the upper right corner of the study window.
+\image html studymanagement.png
-\note If the study has not been previously saved, this option will
-call the following dialog box with several options:
+\b New - creates a new study. The study will be created
+with default name \b Study1. If there is already opened study,
+you will be asked to close it before creating new one.
-\image html closestudy.png
+\b Open - allows to open an existing study by browsing for it in a
+standard Open File dialog box, choosing the required
+*.hdf file and clicking \a Open button.
+If there is already opened study, you will be asked to close it
+before opening new one.
-Here, \b Unload option unloads the current study from the SALOME
-Desktop. It can be reloaded in the same working session, but if you quit the SALOME application, all changes
-in the unloaded study will be lost.
+\b Reopen - reloads the current study from the associated *.hdf file.
+This menu command can be used to reverse the study to the latest saved state.
\b Save - saves the current study. Saving a study you also save its layout, i.e. all positions and sizes
of dockable windows. It means that the difference in settings of the
will be displayed when this module is active.
\note If the study hasn't been previously saved, \b Save will
-call the standard Search File dialog box where you can enter the name
+call the standard Save File dialog box where you can enter the name
for your study and save it.
-\b Save \b as - allows to save the current study with a new name. Input a new name for the study in the standard
-Search File dialog box and click \b Save button.
+\b Save \b as - allows to save the current study with a new name.
+Input a new name for the study in the standard
+Search File dialog box and click \a Save button.
+
+\b Close - closes the current study; alternatively closing of the study
+can be done by clicking on the cross in the upper right corner of the desktop window.
+
+\note If the study has not been previously saved, you will be prompted
+by the following dialog box with several options:
+
+\image html closestudy.png
+
+\b Connect - allows to open an unloaded or created outside GUI study.
+
+\note Connect is available only if there is an opened study on the data server.
+
+\b Disconnect - unloads the current study from the desktop. The study stays opened
+in the data server; it can be then reloaded in the same working session
+(\b Connect operation), but if you quit SALOME application, all changes in the
+unloaded study can be lost.
+
+\note If the study has not been previously saved, you will be prompted
+by the following dialog box with several options:
+
+\image html disconnect_study.png
<b>Dump study</b> - allows to Dump a SALOME Study in one or several
Python scripts. The following dialog box allows to browse for the location and
saved in the Python file.
</li>
</ul>
-To confirm your choice click \b Save.
+To confirm your choice click \a Save.
<b>Load Script</b> - allows to load a saved Python Script.
\image html loadscript.png
-To confirm your choice click \b Open.
+To confirm your choice click \a Open.
<b>Properties</b> - allows to show/edit the properties of the current study.
createMenu( EditRedoId, editMenu, 0 );
createMenu( separator(), editMenu, -1, 0 );
- int stdTBar = createTool( tr( "INF_DESK_TOOLBAR_STANDARD" ) );
+ int stdTBar = createTool( tr( "INF_DESK_TOOLBAR_STANDARD" ), // title (language-dependant)
+ QString( "SalomeStandard" ) ); // name (language-independant)
createTool( separator(), stdTBar );
createTool( EditUndoId, stdTBar );
if ( res && app && !app->stdApp().IsNull() )
{
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
TColStd_SequenceOfExtendedString formats;
app->stdApp()->Formats( formats );
if ( !formats.IsEmpty() )
bool status = false;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == PCDM_RS_OK;
-#else
- status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == CDF_RS_OK;
-#endif
}
catch ( Standard_Failure ) {
status = false;
bool status = false;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if ( save )
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
status = app->Save( stdDoc() ) == PCDM_SS_OK;
-#else
- status = app->Save( stdDoc() ) == CDF_SS_OK;
-#endif
else
{
TCollection_ExtendedString format, path( CAF_Tools::toExtString( fname ) );
if ( format.Length() )
stdDoc()->ChangeStorageFormat( format );
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
status = app->SaveAs( stdDoc(), path ) == PCDM_SS_OK;
-#else
- status = app->SaveAs( stdDoc(), path ) == CDF_SS_OK;
-#endif
}
}
catch ( Standard_Failure ) {
bool res = true;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
if ( myStdDoc->HasOpenCommand() )
myStdDoc->AbortCommand();
bool res = true;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
myStdDoc->AbortCommand();
update();
}
bool res = true;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
myStdDoc->CommitCommand();
if ( canUndo() )
return false;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
myStdDoc->Undo();
undoModified(); /* decrement modification counter */
}
return false;
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
myStdDoc->Redo();
doModified(); /* increment modification counter */
}
If the toolbar has been already created, its ID is just returned.
- \param name toolbar name
+ \param title toolbar title
+ \param name toolbar name (identifier)
\return toolbar ID or -1 if toolbar could not be created
*/
-int CAM_Module::createTool( const QString& name )
+int CAM_Module::createTool( const QString& title, const QString& name )
{
if ( !toolMgr() )
return -1;
ActionMgrLocker lock( toolMgr(), !myToolShown );
- return toolMgr()->createToolBar( name, myToolShown );
+ return toolMgr()->createToolBar( title, name );
}
/*!
const bool = false, QObject* = 0, const char* = 0, const QString& = QString() );
QtxActionGroup* createActionGroup( const int, const bool = true );
- int createTool( const QString& );
+ int createTool( const QString&, const QString& = QString() );
int createTool( const int, const int, const int = -1 );
int createTool( const int, const QString&, const int = -1 );
int createTool( QAction*, const int, const int = -1, const int = -1 );
# Common packages
##
SET(SUBDIRS_COMMON
- CASCatch Qtx Style DDS QDS ObjBrowser SUIT SUITApp STD CAF
+ CASCatch Qtx HelpBrowser Style DDS QDS ObjBrowser SUIT SUITApp STD CAF
CAM LogWindow Prs Event OpenGLUtils ViewerData ViewerTools ImageComposer GUI_PY
)
#include <TCollection_AsciiString.hxx>
#include <NCollection_DefineDataMap.hxx>
-#include <NCollection_DefineBaseCollection.hxx>
#define UNIT_SYSTEM_SI "SI"
DDS_MT_ERROR, DDS_MT_ALARM,
DDS_MT_INFO, DDS_MT_NONE } DDS_MsgType;
-DEFINE_BASECOLLECTION(DDS_BaseColOfAsciiString,TCollection_AsciiString)
-
#endif
DEFINE_STANDARD_RTTI(DDS_DicGroup)
};
-DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicGroups, Handle(DDS_DicGroup))
-DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicGroups, DDS_BaseCollectionOfDicGroups,
- TCollection_AsciiString, Handle(DDS_DicGroup))
+typedef NCollection_IndexedDataMap<TCollection_AsciiString, Handle(DDS_DicGroup)> DDS_IndexedDataMapOfDicGroups;
#endif
DEFINE_STANDARD_HANDLE(DDS_DicItem, MMgt_TShared)
-DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicItems, Handle(DDS_DicItem))
-DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicItems, DDS_BaseCollectionOfDicItems,
- TCollection_AsciiString, Handle(DDS_DicItem))
+typedef NCollection_IndexedDataMap<TCollection_AsciiString, Handle(DDS_DicItem)> DDS_IndexedDataMapOfDicItems;
#endif
if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
{
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
aRetValue = UnitsAPI::AnyToSI( theValue, theUnits );
}
catch( Standard_Failure ) {
if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
{
try {
-#if OCC_VERSION_LARGE > 0x06010000
OCC_CATCH_SIGNALS;
-#endif
aRetValue = UnitsAPI::AnyFromSI( theValue, theUnits );
}
catch( Standard_Failure ) {
*/
void GLViewer_ViewFrame::createToolBar()
{
- int tid = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL"), false );
+ int tid = toolMgr()->createToolBar( tr( "LBL_TOOLBAR_LABEL" ), // title (language-dependant)
+ QString( "GLViewerViewOperations" ), // name (language-independant)
+ false ); // disable floatable toolbar
toolMgr()->append( DumpId, tid );
QtxMultiAction* aScaleAction = new QtxMultiAction( this );
<!DOCTYPE TS>
<TS version="2.0" language="en_US">
<context>
- <name>@default</name>
+ <name>GLViewer_ViewFrame</name>
<message>
- <source>DSC_FITSELECT</source>
- <translation>Fit area of selection within the view frame</translation>
+ <source>MNU_FITSELECT</source>
+ <translation>Fit Selection</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>Error</translation>
+ <source>DSC_FITSELECT</source>
+ <translation>Fit area of selection within the view frame</translation>
</message>
<message>
<source>MNU_DUMP_VIEW</source>
<translation>Dump</translation>
</message>
+ <message>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>Saves the active view in the image file</translation>
+ </message>
<message>
<source>MNU_PAN_VIEW</source>
<translation>Panning</translation>
</message>
+ <message>
+ <source>DSC_PAN_VIEW</source>
+ <translation>Panning the view</translation>
+ </message>
+ <message>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>Global Panning</translation>
+ </message>
<message>
<source>DSC_GLOBALPAN_VIEW</source>
<translation>Selection of a new center of the view</translation>
<translation>Zoom</translation>
</message>
<message>
- <source>DSC_PAN_VIEW</source>
- <translation>Panning the view</translation>
- </message>
- <message>
- <source>DSC_FITALL</source>
- <translation>Fit all objects inside the view frame</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>Zoom the view</translation>
</message>
<message>
<source>MNU_FITALL</source>
<translation>Fit All</translation>
</message>
<message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>Global Panning</translation>
- </message>
- <message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>Dump view</translation>
- </message>
- <message>
- <source>GL_IMAGE_FILES</source>
- <translation>Images Files (*.bmp *.png)</translation>
+ <source>DSC_FITALL</source>
+ <translation>Fit all objects inside the view frame</translation>
</message>
<message>
<source>MNU_RESET_VIEW</source>
<translation>Reset</translation>
</message>
<message>
- <source>DSC_FITRECT</source>
- <translation>Fit area within the view frame</translation>
+ <source>DSC_RESET_VIEW</source>
+ <translation>Reset View Point</translation>
</message>
<message>
<source>MNU_FITRECT</source>
<translation>Fit Area</translation>
</message>
<message>
- <source>CHANGE_BGCOLOR</source>
- <translation>Change background...</translation>
- </message>
- <message>
- <source>DSC_DUMP_VIEW</source>
- <translation>Saves the active view in the image file</translation>
- </message>
- <message>
- <source>MNU_FITSELECT</source>
- <translation>Fit Selection</translation>
- </message>
- <message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>Zoom the view</translation>
- </message>
- <message>
- <source>DSC_RESET_VIEW</source>
- <translation>Reset View Point</translation>
- </message>
- <message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>Cannot save file</translation>
+ <source>DSC_FITRECT</source>
+ <translation>Fit area within the view frame</translation>
</message>
<message>
<source>LBL_TOOLBAR_LABEL</source>
</message>
</context>
<context>
- <name>GLViewer_ViewFrame</name>
- <message>
- <source>DUMP_VIEW_SAVE_FILE_DLG_CAPTION</source>
- <translation>Save Dump View in file</translation>
- </message>
- <message>
- <source>DUMP_VIEW_ERROR_DLG_TEXT</source>
- <translation>Can't save Dump View in file</translation>
- </message>
+ <name>GLViewer_ViewManager</name>
<message>
- <source>DUMP_VIEW_ERROR_DLG_CAPTION</source>
- <translation>Error</translation>
+ <source>GL_VIEW_TITLE</source>
+ <translation>GL Scene:%M - viewer:%V</translation>
</message>
</context>
<context>
- <name>GLViewer_ViewManager</name>
+ <name>GLViewer_Viewer</name>
<message>
- <source>GL_VIEW_TITLE</source>
- <translation>GL Scene:%M - viewer:%V</translation>
+ <source>CHANGE_BGCOLOR</source>
+ <translation>Change background...</translation>
</message>
</context>
</TS>
<!DOCTYPE TS>
<TS version="2.0" language="fr_FR">
<context>
- <name>@default</name>
+ <name>GLViewer_ViewFrame</name>
<message>
- <source>DSC_FITSELECT</source>
- <translation>Montrer la zone choisie dans la vue</translation>
+ <source>MNU_FITSELECT</source>
+ <translation>Afficher la sélection</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>Erreur</translation>
+ <source>DSC_FITSELECT</source>
+ <translation>Montrer la zone choisie dans la vue</translation>
</message>
<message>
<source>MNU_DUMP_VIEW</source>
<translation>Sauvegarder</translation>
</message>
+ <message>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>Sauvegarder la vue en cours dans un fichier image</translation>
+ </message>
<message>
<source>MNU_PAN_VIEW</source>
<translation>Déplacement</translation>
</message>
+ <message>
+ <source>DSC_PAN_VIEW</source>
+ <translation>Déplacer la vue</translation>
+ </message>
+ <message>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>Déplacement global</translation>
+ </message>
<message>
<source>DSC_GLOBALPAN_VIEW</source>
<translation>Sélection d'un nouveau centre de vue</translation>
<translation>Zoomer</translation>
</message>
<message>
- <source>DSC_PAN_VIEW</source>
- <translation>Déplacer la vue</translation>
- </message>
- <message>
- <source>DSC_FITALL</source>
- <translation>Montrer tous les objets dans la vue</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>Zoomer la vue</translation>
</message>
<message>
<source>MNU_FITALL</source>
<translation>Tout afficher</translation>
</message>
<message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>Déplacement global</translation>
- </message>
- <message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>Sauvegarder la vue</translation>
- </message>
- <message>
- <source>GL_IMAGE_FILES</source>
- <translation>Fichiers images (*.bmp *.png)</translation>
+ <source>DSC_FITALL</source>
+ <translation>Montrer tous les objets dans la vue</translation>
</message>
<message>
<source>MNU_RESET_VIEW</source>
<translation>Restaurer</translation>
</message>
<message>
- <source>DSC_FITRECT</source>
- <translation>Montrer la zone dans la vue</translation>
+ <source>DSC_RESET_VIEW</source>
+ <translation>Restaurer le point de vue</translation>
</message>
<message>
<source>MNU_FITRECT</source>
<translation>Afficher la zone</translation>
</message>
<message>
- <source>CHANGE_BGCOLOR</source>
- <translation>Changer la couleur d'arrière-plan...</translation>
- </message>
- <message>
- <source>DSC_DUMP_VIEW</source>
- <translation>Sauvegarder la vue en cours dans un fichier image</translation>
- </message>
- <message>
- <source>MNU_FITSELECT</source>
- <translation>Afficher la sélection</translation>
- </message>
- <message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>Zoomer la vue</translation>
- </message>
- <message>
- <source>DSC_RESET_VIEW</source>
- <translation>Restaurer le point de vue</translation>
- </message>
- <message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>Impossible de sauvegarder le fichier</translation>
+ <source>DSC_FITRECT</source>
+ <translation>Montrer la zone dans la vue</translation>
</message>
<message>
<source>LBL_TOOLBAR_LABEL</source>
</message>
</context>
<context>
- <name>GLViewer_ViewFrame</name>
- <message>
- <source>DUMP_VIEW_SAVE_FILE_DLG_CAPTION</source>
- <translation>Sauvegarder la vue dans le fichier</translation>
- </message>
- <message>
- <source>DUMP_VIEW_ERROR_DLG_TEXT</source>
- <translation>Impossible de sauvegarder la vue dans le fichier</translation>
- </message>
+ <name>GLViewer_ViewManager</name>
<message>
- <source>DUMP_VIEW_ERROR_DLG_CAPTION</source>
- <translation>Erreur</translation>
+ <source>GL_VIEW_TITLE</source>
+ <translation>Scène GL:%M - visualiseur:%V</translation>
</message>
</context>
<context>
- <name>GLViewer_ViewManager</name>
+ <name>GLViewer_Viewer</name>
<message>
- <source>GL_VIEW_TITLE</source>
- <translation>Scène GL:%M - visualiseur:%V</translation>
+ <source>CHANGE_BGCOLOR</source>
+ <translation>Changer la couleur d'arrière-plan...</translation>
</message>
</context>
</TS>
<!DOCTYPE TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
- <name>@default</name>
+ <name>GLViewer_ViewFrame</name>
<message>
- <source>DSC_FITSELECT</source>
- <translation>ã\83\93ã\83¥ã\83¼ã\81§é\81¸æ\8a\9eã\81\97ã\81\9fã\82¾ã\83¼ã\83³ã\82\92表示ã\81\97ã\81¾ã\81\99ã\80\82</translation>
+ <source>MNU_FITSELECT</source>
+ <translation>ã\83\87ã\82£ã\82¹ã\83\97ã\83¬ã\82¤ã\81®é\81¸æ\8a\9e</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>ã\82¨ã\83©ã\83¼</translation>
+ <source>DSC_FITSELECT</source>
+ <translation>ã\83\93ã\83¥ã\83¼ã\81§é\81¸æ\8a\9eã\81\97ã\81\9fã\82¾ã\83¼ã\83³ã\82\92表示ã\81\97ã\81¾ã\81\99ã\80\82</translation>
</message>
<message>
<source>MNU_DUMP_VIEW</source>
<translation>保存</translation>
</message>
+ <message>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>現在のビューをイメージ ファイルに保存します。</translation>
+ </message>
<message>
<source>MNU_PAN_VIEW</source>
<translation>パンニング</translation>
</message>
+ <message>
+ <source>DSC_PAN_VIEW</source>
+ <translation>ビューを移動します。</translation>
+ </message>
+ <message>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>グローバルパンニング</translation>
+ </message>
<message>
<source>DSC_GLOBALPAN_VIEW</source>
<translation>ビューの新しい中心地の選択</translation>
<translation>ズーム</translation>
</message>
<message>
- <source>DSC_PAN_VIEW</source>
- <translation>ビューを移動します。</translation>
- </message>
- <message>
- <source>DSC_FITALL</source>
- <translation>すべてのオブジェクトを表示します。</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>ズーム</translation>
</message>
<message>
<source>MNU_FITALL</source>
<translation>すべて表示</translation>
</message>
<message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>グローバルパンニング</translation>
- </message>
- <message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>ビューを保存します。</translation>
- </message>
- <message>
- <source>GL_IMAGE_FILES</source>
- <translation>イメージ (*.bmp *.png) ファイル</translation>
+ <source>DSC_FITALL</source>
+ <translation>すべてのオブジェクトを表示します。</translation>
</message>
<message>
<source>MNU_RESET_VIEW</source>
<translation>復元</translation>
</message>
<message>
- <source>DSC_FITRECT</source>
- <translation>領域にビューを表示します。</translation>
+ <source>DSC_RESET_VIEW</source>
+ <translation>ビューのポイントを復元します。</translation>
</message>
<message>
<source>MNU_FITRECT</source>
<translation>表示エリア</translation>
</message>
<message>
- <source>CHANGE_BGCOLOR</source>
- <translation>背景色を変更.</translation>
- </message>
- <message>
- <source>DSC_DUMP_VIEW</source>
- <translation>現在のビューをイメージ ファイルに保存します。</translation>
- </message>
- <message>
- <source>MNU_FITSELECT</source>
- <translation>ディスプレイの選択</translation>
- </message>
- <message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>ズーム</translation>
- </message>
- <message>
- <source>DSC_RESET_VIEW</source>
- <translation>ビューのポイントを復元します。</translation>
- </message>
- <message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>ファイルを保存できませんでした。</translation>
+ <source>DSC_FITRECT</source>
+ <translation>領域にビューを表示します。</translation>
</message>
<message>
<source>LBL_TOOLBAR_LABEL</source>
</message>
</context>
<context>
- <name>GLViewer_ViewFrame</name>
- <message>
- <source>DUMP_VIEW_SAVE_FILE_DLG_CAPTION</source>
- <translation>ビューでファイルを保存します。</translation>
- </message>
- <message>
- <source>DUMP_VIEW_ERROR_DLG_TEXT</source>
- <translation>ビューでファイルを保存できませんでした。</translation>
- </message>
+ <name>GLViewer_ViewManager</name>
<message>
- <source>DUMP_VIEW_ERROR_DLG_CAPTION</source>
- <translation>ã\82¨ã\83©ã\83¼</translation>
+ <source>GL_VIEW_TITLE</source>
+ <translation>ã\82·ã\83¼ã\83³ GL: %M - ã\83\93ã\83¥ã\83¼ã\82¢ã\83¼: %V</translation>
</message>
</context>
<context>
- <name>GLViewer_ViewManager</name>
+ <name>GLViewer_Viewer</name>
<message>
- <source>GL_VIEW_TITLE</source>
- <translation>シーン GL: %M - ビューアー: %V</translation>
+ <source>CHANGE_BGCOLOR</source>
+ <translation>背景色を変更.</translation>
</message>
</context>
</TS>
helper.py
mytestdialog.py
selectvars.py
+ dockwidgets.py
+)
+SET(_bin_SCRIPTS
+ test_dockwidgets.py
)
-# scritps / to install
+# scripts / to install
SET(_all_SCRIPTS ${_other_SCRIPTS} ${_pyuic_SCRIPTS})
# --- rules ---
SALOME_INSTALL_SCRIPTS("${_all_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/gui)
+SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_DATA})
--- /dev/null
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
+
+import SalomePyQt
+
+_dockWidgetNames = {
+ SalomePyQt.WT_ObjectBrowser : "objectBrowserDock",
+ SalomePyQt.WT_PyConsole : "pythonConsoleDock",
+ SalomePyQt.WT_LogWindow : "logWindowDock",
+ SalomePyQt.WT_NoteBook : "noteBookDock",
+}
+
+def findDockWidgetByTitle( title ):
+ """
+ Find and return dock widget by its window title.
+ Returns None if dock widget does not exist or is not created yet.
+
+ WARNING: this function is language-dependant as the title of the
+ dock widget is normally internationalized according to the currently
+ used language.
+
+ Example:
+ # get object browser
+ findDockWidgetByTitle( "Object Browser" )
+ """
+ sg = SalomePyQt.SalomePyQt()
+ dwl = sg.getDesktop().findChildren( QDockWidget )
+ dw = filter(lambda a: a.windowTitle() == QString( title ), dwl)
+ if dw: return dw[0]
+ return None
+
+def findDockWidgetByName( dwName ):
+ """
+ Find and return dock widget by its internal name
+ Returns None if dock widget does not exist or is not created yet
+
+ Note: this function is language-independant: internal name
+ of the dock widget does not depend on the currently used language.
+
+ Example:
+ # get object browser
+ findDockWidgetByName( "objectBrowserDock" )
+ """
+ sg = SalomePyQt.SalomePyQt()
+ return sg.getDesktop().findChild( QDockWidget, dwName )
+
+def findDockWidgetById( dwId ):
+ """
+ Find and return dock widget by its id
+ Returns None if dock widget does not exist or is not created yet
+
+ WARNING: this function works only with dock widget ids
+ specified in SalomePyQt interface.
+
+ Example:
+ # get object browser
+ findDockWidgetById( SalomePyQt.WT_ObjectBrowser )
+ """
+ try:
+ return findDockWidgetByName( _dockWidgetNames[ dwId ] )
+ except:
+ pass
+ return None
+
+def getAllDockWindows():
+ """
+ Get all dock widgets.
+
+ WARNING: this function searches all dock widgets starting from the
+ top-level main window; thus, resulting list contains also dock windows
+ that belong to the lower-level windows (e.g. view windows).
+ """
+ sg = SalomePyQt.SalomePyQt()
+ return sg.getDesktop().findChildren( QDockWidget )
+
+def tabifyDockWidgets( dw1, dw2 ):
+ """
+ Tabify two dock widgets.
+ """
+ sg = SalomePyQt.SalomePyQt()
+ if dw1 and dw2: sg.getDesktop().tabifyDockWidget( dw1, dw2 )
+ pass
--- /dev/null
+from salome.gui.dockwidgets import *
+
+print "-- Search dock windows by title"
+ob = findDockWidgetByTitle( "Object Browser" )
+if ob:
+ print "object browser:", ob
+else:
+ print "object browser was not found"
+
+pc = findDockWidgetByTitle( "Python Console" )
+if pc:
+ print "python console:", pc
+else:
+ print "python console was not found"
+print
+
+print "-- Search dock windows by name"
+ob = findDockWidgetByName( "objectBrowserDock" )
+if ob:
+ print "object browser:", ob
+else:
+ print "object browser was not found"
+pc = findDockWidgetByName( "pythonConsoleDock" )
+if pc:
+ print "python console:", pc
+else:
+ print "python console was not found"
+print
+
+print "-- Search dock windows by id"
+ob = findDockWidgetById( SalomePyQt.WT_ObjectBrowser )
+if ob:
+ print "object browser:", ob
+else:
+ print "object browser was not found"
+pc = findDockWidgetById( SalomePyQt.WT_PyConsole )
+if pc:
+ print "python console:", pc
+else:
+ print "python console was not found"
+print
+
+print "-- Tabify dock windows"
+tabifyDockWidgets( findDockWidgetById( SalomePyQt.WT_ObjectBrowser ),
+ findDockWidgetById( SalomePyQt.WT_PyConsole ) )
resources/GraphicsView_images.ts
resources/GraphicsView_msg_en.ts
resources/GraphicsView_msg_fr.ts
+ resources/GraphicsView_msg_ja.ts
)
# resource files / static
myIsOnTop( false ),
myIsHighlighted( false ),
myIsSelected( false ),
- myIsMoving( false )
+ myIsMoving( false ),
+ myIsMovable( true )
{
}
//================================================================
void GraphicsView_Object::move( double theDX, double theDY, bool theIsAtOnce )
{
+ if( !myIsMovable )
+ return;
+
if( theIsAtOnce )
{
finishMove( true );
virtual bool hasSpecificZValue() const { return false; }
virtual bool isSelectable() const { return true; }
- virtual bool isMovable() const { return true; }
+
+ virtual bool isMovable() const { return myIsMovable; }
+ virtual void setMovable( bool theMovable ) { myIsMovable = theMovable; }
virtual QRectF getRect() const;
bool myIsSelected;
bool myIsMoving;
+ bool myIsMovable;
QTransform myViewTransform;
};
// Name : GraphicsView_ViewFrame
// Purpose : Constructor
//=======================================================================
-GraphicsView_ViewFrame::GraphicsView_ViewFrame( SUIT_Desktop* d, GraphicsView_Viewer* vw )
+GraphicsView_ViewFrame::GraphicsView_ViewFrame( SUIT_Desktop* d, GraphicsView_Viewer* vw, QWidget* w )
: SUIT_ViewWindow( d ),
myViewer( vw )
{
aLayout->setMargin( 0 );
aLayout->setSpacing( 0 );
- myViewPort = new GraphicsView_ViewPort( aFrame );
+ if( w )
+ myViewPort = dynamic_cast<GraphicsView_ViewPort*>(w);
+ else
+ myViewPort = new GraphicsView_ViewPort( aFrame );
+
aLayout->addWidget( myViewPort );
createActions();
//================================================================
int GraphicsView_ViewFrame::createToolBar()
{
- int tid = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL") );
+ int tid = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL"), // title (language-dependant)
+ QString( "GraphicsViewViewOperations" ), // name (language-independant)
+ false ); // disable floatable toolbar
toolMgr()->append( DumpId, tid );
myScaleAction = new QtxMultiAction( this );
return tid;
}
+//================================================================
+// Function : getToolBarId
+// Purpose :
+//================================================================
+int GraphicsView_ViewFrame::getToolBarId()
+{
+ return myToolBarId;
+}
+
//================================================================
// Function : dumpView
// Purpose :
enum { DumpId, FitAllId, FitRectId, FitSelectId, ZoomId, PanId, GlobalPanId, ResetId };
public:
- GraphicsView_ViewFrame( SUIT_Desktop*, GraphicsView_Viewer* );
+ GraphicsView_ViewFrame( SUIT_Desktop*, GraphicsView_Viewer*, QWidget* w = NULL );
~GraphicsView_ViewFrame();
public:
virtual void setVisualParameters( const QString& theParameters );
void expandToolBarActions();
+ int getToolBarId();
protected slots:
void onViewPan();
onBoundingRectChanged();
}
+//================================================================
+// Function : isItemAdded
+// Purpose :
+//================================================================
+bool GraphicsView_ViewPort::isItemAdded( QGraphicsItem* theItem )
+{
+ if( GraphicsView_Object* anObject = dynamic_cast<GraphicsView_Object*>( theItem ) )
+ {
+ for( GraphicsView_ObjectList::iterator anIter = myObjects.begin(); anIter != myObjects.end(); anIter++ )
+ if( theItem == *anIter )
+ return true;
+ }
+ else {
+ for( int i = 0; i < myScene->items().size(); i++ )
+ if( theItem == myScene->items().at(i) )
+ return true;
+ }
+ return false;
+}
+
//================================================================
// Function : removeItem
// Purpose :
public:
GraphicsView_Scene* getScene() { return myScene; }
void addItem( QGraphicsItem* theItem );
+ bool isItemAdded( QGraphicsItem* theItem );
void removeItem( QGraphicsItem* theItem );
enum SortType { NoSorting, SelectedFirst, SortByZLevel };
// Name : GraphicsView_Viewer
// Purpose : Constructor
//=======================================================================
-GraphicsView_Viewer::GraphicsView_Viewer( const QString& title )
+GraphicsView_Viewer::GraphicsView_Viewer( const QString& title, QWidget* widget )
: SUIT_ViewModel(),
mySelector( 0 ),
myTransformer( 0 ),
+ myWidget( widget ),
myIsInitialized( false )
{
}
//================================================================
SUIT_ViewWindow* GraphicsView_Viewer::createView( SUIT_Desktop* theDesktop )
{
- GraphicsView_ViewFrame* aViewFrame = new GraphicsView_ViewFrame( theDesktop, this );
+ GraphicsView_ViewFrame* aViewFrame = new GraphicsView_ViewFrame( theDesktop, this, myWidget );
connect( aViewFrame, SIGNAL( keyPressed( QKeyEvent* ) ),
this, SLOT( onKeyEvent( QKeyEvent* ) ) );
enum TransformType { NoTransform, Reset, FitAll, FitRect, FitSelect,
Zoom, PanGlobal, Pan, FitWidth, UserTransform = 100 };
public:
- GraphicsView_Viewer( const QString& title );
+ GraphicsView_Viewer( const QString& title, QWidget* widget = NULL );
~GraphicsView_Viewer();
public:
protected:
GraphicsView_Selector* mySelector;
GraphicsView_ViewTransformer* myTransformer;
+ QWidget* myWidget;
bool myIsInitialized;
};
// share/salome/resources/xsalome/SalomeApp.xml in the install
// directory.
_defaultMenuId = this->createMenu( QCHARSTAR(moduleName()), -1, -1, 30 );
- _defaultToolbarId = this->createTool ( QCHARSTAR(moduleName()) );
+ _defaultToolbarId = this->createTool ( QCHARSTAR(moduleName()), moduleName() );
_actionId_internalCount = StandardApp_Module::ACTIONID_DEFAULT_INIT_VALUE;
//
--- /dev/null
+# Copyright (C) 2012-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# --- options ---
+
+# additional include directories
+INCLUDE_DIRECTORIES(
+ ${QT_INCLUDES}
+ ${PROJECT_SOURCE_DIR}/src/Qtx
+)
+
+# additional preprocessor / compiler flags
+ADD_DEFINITIONS(
+ ${QT_DEFINITIONS}
+)
+
+# libraries to link to
+SET(_link_LIBRARIES
+ ${QT_LIBRARIES}
+ qtx
+)
+
+# --- headers ---
+
+SET(_moc_HEADERS
+ qtlocalpeer.h
+ qtsingleapplication.h
+)
+
+# --- resources ---
+
+# resource files / to be processed by rcc
+SET(_rcc_RESOURCES HelpBrowser.qrc)
+
+# --- sources ---
+
+# sources / rcc wrappings
+QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
+
+# sources / moc wrappings
+QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+
+# sources / to compile
+SET(_other_SOURCES
+ qtlocalpeer.cpp
+ qtsingleapplication.cpp
+ HelpBrowser.cxx
+)
+
+# sources / to compile
+SET(HelpBrowser_SOURCES
+ ${_other_SOURCES}
+ ${_moc_SOURCES}
+ ${_rcc_SOURCES}
+)
+
+# --- rules ---
+
+ADD_EXECUTABLE(HelpBrowser ${HelpBrowser_SOURCES})
+TARGET_LINK_LIBRARIES(HelpBrowser ${_link_LIBRARIES})
+INSTALL(TARGETS HelpBrowser EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+****************************************************************************/
--- /dev/null
+// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// File : HelpBrowser.cxx
+// Author : Vadim SANDLER, OpenCASCADE S.A.S. (vadim.sandler@opencascade.com)
+
+#include "qtsingleapplication.h"
+#include <QDir>
+#include <QFile>
+#include <QFileInfo>
+#include <QLibraryInfo>
+#include <QMessageBox>
+#include <QTextStream>
+#include <QTimer>
+#include <QtxResourceMgr.h>
+#include <QtxTranslator.h>
+#include <QtxWebBrowser.h>
+
+#include <iostream>
+
+namespace
+{
+ void printHelp()
+ {
+ QFileInfo fi( QtSingleApplication::arguments().at(0) );
+
+ std::cout << std::endl;
+ std::cout << "SALOME Help Browser" << std::endl;
+ std::cout << std::endl;
+ std::cout << "usage: " << qPrintable( fi.fileName() ) << " [options] file" << std::endl;
+ std::cout << " file is a help file to be opened" << std::endl;
+ std::cout << std::endl;
+ std::cout << "Options:" << std::endl;
+ std::cout << "-h, --help Prints this help and quits." << std::endl;
+ std::cout << "--language=LANG Use LANG language in menus." << std::endl;
+ std::cout << std::endl;
+ }
+}
+
+class RaiseWindowHelper: public QDialog
+{
+public:
+ RaiseWindowHelper( QWidget* parent ) : QDialog( parent, Qt::FramelessWindowHint )
+ {
+ setAttribute( Qt::WA_DeleteOnClose, true );
+ resize( 1, 1 );
+ show();
+ QTimer::singleShot( 100, this, SLOT( close() ) );
+ QTimer::singleShot( 500, parent, SLOT( setFocus() ) );
+ }
+};
+
+class HelpBrowser: public QtxWebBrowser
+{
+public:
+ HelpBrowser() : QtxWebBrowser()
+ {
+ setAttribute( Qt::WA_DeleteOnClose, false );
+ }
+ ~HelpBrowser()
+ {
+ if ( resourceMgr() )
+ resourceMgr()->save();
+ }
+ void about()
+ {
+ QStringList info;
+ QFile f( ":/COPYING" );
+ f.open( QIODevice::ReadOnly );
+ QTextStream in( &f );
+
+ info << QtxWebBrowser::tr( "%1 has been developed using %2" ).arg( QString( "SALOME %1").arg( tr( "Help Browser" ) ) ).arg( "Qt Solutions Component: Single Application." );
+ info << "";
+ info << in.readAll().split( "\n" );
+
+ QMessageBox::about( this, tr( "About %1" ).arg( tr( "Help Browser" ) ),
+ info.join( "\n" ) );
+ }
+ void load( const QString& url )
+ {
+ QtxWebBrowser::load( url );
+ RaiseWindowHelper* helper = new RaiseWindowHelper( this );
+ }
+};
+
+int main( int argc, char **argv )
+{
+ // set application name (for preferences)
+
+ QtSingleApplication::setApplicationName( "salome" );
+
+ // specify application identifier via its name
+ QFileInfo fi( argv[0] );
+
+ // create application instance
+
+ QtSingleApplication instance( fi.fileName(), argc, argv );
+
+ // parse command line arguments
+
+ bool showHelp = false;
+ QString language;
+ QString helpfile;
+
+ QRegExp rl( "--language=(.+)" );
+ rl.setMinimal( false );
+
+ for ( int a = 1; a < argc; ++a ) {
+ QString param = argv[a];
+ if ( param == "--help" || param == "-h" )
+ showHelp = true;
+ else if ( rl.exactMatch( param ) )
+ language = rl.cap( 1 );
+ else
+ helpfile = param;
+ }
+
+ // show help and exit if --help or -h option has been specified via command line
+
+ if ( showHelp ) {
+ printHelp();
+ exit( 0 );
+ }
+
+ if ( instance.sendMessage( helpfile ) )
+ return 0;
+
+ // load translations
+
+ QtxTranslator tqt, tsal;
+ if ( !language.isEmpty() ) {
+ if ( tqt.load( QString( "qt_%1" ).arg( language ), QLibraryInfo::location( QLibraryInfo::TranslationsPath ) ) )
+ instance.installTranslator( &tqt );
+
+ QDir appDir = QtSingleApplication::applicationDirPath();
+ appDir.cdUp(); appDir.cdUp();
+
+ if ( tsal.load( QString( "Qtx_msg_%1" ).arg( language ), appDir.filePath( "share/salome/resources/gui" ) ) )
+ instance.installTranslator( &tsal );
+ }
+
+ // initialize resource manager (for preferences)
+
+ QtxResourceMgr* resMgr = new QtxResourceMgr( "HelpBrowser", "%1Config" );
+ resMgr->setCurrentFormat( "xml" );
+ QtxWebBrowser::setResourceMgr( resMgr );
+
+ // show main window
+
+ HelpBrowser browser;
+ browser.show();
+
+ // load file specified via command line
+
+ if ( helpfile.isEmpty() ) {
+ QString docdir = qgetenv( "DOCUMENTATION_ROOT_DIR" );
+ if ( !docdir.isEmpty() )
+ helpfile = QDir::toNativeSeparators( QString( "%1/index.html" ).arg( docdir ) );
+ }
+
+ if ( !helpfile.isEmpty() ) {
+ browser.load( helpfile );
+ }
+
+ // finalize main window activation
+
+ instance.setActivationWindow( &browser );
+
+ QObject::connect( &instance, SIGNAL( messageReceived( QString ) ),
+ &browser, SLOT( load ( QString ) ) );
+
+ return instance.exec();
+}
--- /dev/null
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>COPYING</file>
+</qresource>
+</RCC>
+
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "qtlocalpeer.h"
+#include <QCoreApplication>
+#include <QTime>
+
+#if defined(Q_OS_WIN)
+#include <QLibrary>
+#include <qt_windows.h>
+typedef BOOL(WINAPI*PProcessIdToSessionId)(DWORD,DWORD*);
+static PProcessIdToSessionId pProcessIdToSessionId = 0;
+#endif
+#if defined(Q_OS_UNIX)
+#include <sys/types.h>
+#include <time.h>
+#include <unistd.h>
+#endif
+
+namespace QtLP_Private {
+#include "qtlockedfile.cpp"
+#if defined(Q_OS_WIN)
+#include "qtlockedfile_win.cpp"
+#else
+#include "qtlockedfile_unix.cpp"
+#endif
+}
+
+const char* QtLocalPeer::ack = "ack";
+
+QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
+ : QObject(parent), id(appId)
+{
+ QString prefix = id;
+ if (id.isEmpty()) {
+ id = QCoreApplication::applicationFilePath();
+#if defined(Q_OS_WIN)
+ id = id.toLower();
+#endif
+ prefix = id.section(QLatin1Char('/'), -1);
+ }
+ prefix.remove(QRegExp("[^a-zA-Z]"));
+ prefix.truncate(6);
+
+ QByteArray idc = id.toUtf8();
+ quint16 idNum = qChecksum(idc.constData(), idc.size());
+ socketName = QLatin1String("qtsingleapp-") + prefix
+ + QLatin1Char('-') + QString::number(idNum, 16);
+
+#if defined(Q_OS_WIN)
+ if (!pProcessIdToSessionId) {
+ QLibrary lib("kernel32");
+ pProcessIdToSessionId = (PProcessIdToSessionId)lib.resolve("ProcessIdToSessionId");
+ }
+ if (pProcessIdToSessionId) {
+ DWORD sessionId = 0;
+ pProcessIdToSessionId(GetCurrentProcessId(), &sessionId);
+ socketName += QLatin1Char('-') + QString::number(sessionId, 16);
+ }
+#else
+ socketName += QLatin1Char('-') + QString::number(::getuid(), 16);
+#endif
+
+ server = new QLocalServer(this);
+ QString lockName = QDir(QDir::tempPath()).absolutePath()
+ + QLatin1Char('/') + socketName
+ + QLatin1String("-lockfile");
+ lockFile.setFileName(lockName);
+ lockFile.open(QIODevice::ReadWrite);
+}
+
+
+
+bool QtLocalPeer::isClient()
+{
+ if (lockFile.isLocked())
+ return false;
+
+ if (!lockFile.lock(QtLP_Private::QtLockedFile::WriteLock, false))
+ return true;
+
+ bool res = server->listen(socketName);
+#if defined(Q_OS_UNIX) && (QT_VERSION >= QT_VERSION_CHECK(4,5,0))
+ // ### Workaround
+ if (!res && server->serverError() == QAbstractSocket::AddressInUseError) {
+ QFile::remove(QDir::cleanPath(QDir::tempPath())+QLatin1Char('/')+socketName);
+ res = server->listen(socketName);
+ }
+#endif
+ if (!res)
+ qWarning("QtSingleCoreApplication: listen on local socket failed, %s", qPrintable(server->errorString()));
+ QObject::connect(server, SIGNAL(newConnection()), SLOT(receiveConnection()));
+ return false;
+}
+
+
+bool QtLocalPeer::sendMessage(const QString &message, int timeout)
+{
+ if (!isClient())
+ return false;
+
+ QLocalSocket socket;
+ bool connOk = false;
+ for(int i = 0; i < 2; i++) {
+ // Try twice, in case the other instance is just starting up
+ socket.connectToServer(socketName);
+ connOk = socket.waitForConnected(timeout/2);
+ if (connOk || i)
+ break;
+ int ms = 250;
+#if defined(Q_OS_WIN)
+ Sleep(DWORD(ms));
+#else
+ struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
+ nanosleep(&ts, NULL);
+#endif
+ }
+ if (!connOk)
+ return false;
+
+ QByteArray uMsg(message.toUtf8());
+ QDataStream ds(&socket);
+ ds.writeBytes(uMsg.constData(), uMsg.size());
+ bool res = socket.waitForBytesWritten(timeout);
+ if (res) {
+ res &= socket.waitForReadyRead(timeout); // wait for ack
+ if (res)
+ res &= (socket.read(qstrlen(ack)) == ack);
+ }
+ return res;
+}
+
+
+void QtLocalPeer::receiveConnection()
+{
+ QLocalSocket* socket = server->nextPendingConnection();
+ if (!socket)
+ return;
+
+ while (socket->bytesAvailable() < (int)sizeof(quint32))
+ socket->waitForReadyRead();
+ QDataStream ds(socket);
+ QByteArray uMsg;
+ quint32 remaining;
+ ds >> remaining;
+ uMsg.resize(remaining);
+ int got = 0;
+ char* uMsgBuf = uMsg.data();
+ do {
+ got = ds.readRawData(uMsgBuf, remaining);
+ remaining -= got;
+ uMsgBuf += got;
+ } while (remaining && got >= 0 && socket->waitForReadyRead(2000));
+ if (got < 0) {
+ qWarning("QtLocalPeer: Message reception failed %s", socket->errorString().toLatin1().constData());
+ delete socket;
+ return;
+ }
+ QString message(QString::fromUtf8(uMsg));
+ socket->write(ack, qstrlen(ack));
+ socket->waitForBytesWritten(1000);
+ socket->waitForDisconnected(1000); // make sure client reads ack
+ delete socket;
+ emit messageReceived(message); //### (might take a long time to return)
+}
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTLOCALPEER_H
+#define QTLOCALPEER_H
+
+#include <QLocalServer>
+#include <QLocalSocket>
+#include <QDir>
+
+#include "qtlockedfile.h"
+
+class QtLocalPeer : public QObject
+{
+ Q_OBJECT
+
+public:
+ QtLocalPeer(QObject *parent = 0, const QString &appId = QString());
+ bool isClient();
+ bool sendMessage(const QString &message, int timeout);
+ QString applicationId() const
+ { return id; }
+
+Q_SIGNALS:
+ void messageReceived(const QString &message);
+
+protected Q_SLOTS:
+ void receiveConnection();
+
+protected:
+ QString id;
+ QString socketName;
+ QLocalServer* server;
+ QtLP_Private::QtLockedFile lockFile;
+
+private:
+ static const char* ack;
+};
+
+#endif // QTLOCALPEER_H
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtlockedfile.h"
+
+/*!
+ \class QtLockedFile
+
+ \brief The QtLockedFile class extends QFile with advisory locking
+ functions.
+
+ A file may be locked in read or write mode. Multiple instances of
+ \e QtLockedFile, created in multiple processes running on the same
+ machine, may have a file locked in read mode. Exactly one instance
+ may have it locked in write mode. A read and a write lock cannot
+ exist simultaneously on the same file.
+
+ The file locks are advisory. This means that nothing prevents
+ another process from manipulating a locked file using QFile or
+ file system functions offered by the OS. Serialization is only
+ guaranteed if all processes that access the file use
+ QLockedFile. Also, while holding a lock on a file, a process
+ must not open the same file again (through any API), or locks
+ can be unexpectedly lost.
+
+ The lock provided by an instance of \e QtLockedFile is released
+ whenever the program terminates. This is true even when the
+ program crashes and no destructors are called.
+*/
+
+/*! \enum QtLockedFile::LockMode
+
+ This enum describes the available lock modes.
+
+ \value ReadLock A read lock.
+ \value WriteLock A write lock.
+ \value NoLock Neither a read lock nor a write lock.
+*/
+
+/*!
+ Constructs an unlocked \e QtLockedFile object. This constructor
+ behaves in the same way as \e QFile::QFile().
+
+ \sa QFile::QFile()
+*/
+QtLockedFile::QtLockedFile()
+ : QFile()
+{
+#ifdef Q_OS_WIN
+ wmutex = 0;
+ rmutex = 0;
+#endif
+ m_lock_mode = NoLock;
+}
+
+/*!
+ Constructs an unlocked QtLockedFile object with file \a name. This
+ constructor behaves in the same way as \e QFile::QFile(const
+ QString&).
+
+ \sa QFile::QFile()
+*/
+QtLockedFile::QtLockedFile(const QString &name)
+ : QFile(name)
+{
+#ifdef Q_OS_WIN
+ wmutex = 0;
+ rmutex = 0;
+#endif
+ m_lock_mode = NoLock;
+}
+
+/*!
+ Opens the file in OpenMode \a mode.
+
+ This is identical to QFile::open(), with the one exception that the
+ Truncate mode flag is disallowed. Truncation would conflict with the
+ advisory file locking, since the file would be modified before the
+ write lock is obtained. If truncation is required, use resize(0)
+ after obtaining the write lock.
+
+ Returns true if successful; otherwise false.
+
+ \sa QFile::open(), QFile::resize()
+*/
+bool QtLockedFile::open(OpenMode mode)
+{
+ if (mode & QIODevice::Truncate) {
+ qWarning("QtLockedFile::open(): Truncate mode not allowed.");
+ return false;
+ }
+ return QFile::open(mode);
+}
+
+/*!
+ Returns \e true if this object has a in read or write lock;
+ otherwise returns \e false.
+
+ \sa lockMode()
+*/
+bool QtLockedFile::isLocked() const
+{
+ return m_lock_mode != NoLock;
+}
+
+/*!
+ Returns the type of lock currently held by this object, or \e
+ QtLockedFile::NoLock.
+
+ \sa isLocked()
+*/
+QtLockedFile::LockMode QtLockedFile::lockMode() const
+{
+ return m_lock_mode;
+}
+
+/*!
+ \fn bool QtLockedFile::lock(LockMode mode, bool block = true)
+
+ Obtains a lock of type \a mode. The file must be opened before it
+ can be locked.
+
+ If \a block is true, this function will block until the lock is
+ aquired. If \a block is false, this function returns \e false
+ immediately if the lock cannot be aquired.
+
+ If this object already has a lock of type \a mode, this function
+ returns \e true immediately. If this object has a lock of a
+ different type than \a mode, the lock is first released and then a
+ new lock is obtained.
+
+ This function returns \e true if, after it executes, the file is
+ locked by this object, and \e false otherwise.
+
+ \sa unlock(), isLocked(), lockMode()
+*/
+
+/*!
+ \fn bool QtLockedFile::unlock()
+
+ Releases a lock.
+
+ If the object has no lock, this function returns immediately.
+
+ This function returns \e true if, after it executes, the file is
+ not locked by this object, and \e false otherwise.
+
+ \sa lock(), isLocked(), lockMode()
+*/
+
+/*!
+ \fn QtLockedFile::~QtLockedFile()
+
+ Destroys the \e QtLockedFile object. If any locks were held, they
+ are released.
+*/
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTLOCKEDFILE_H
+#define QTLOCKEDFILE_H
+
+#include <QFile>
+#ifdef Q_OS_WIN
+#include <QVector>
+#endif
+
+#if defined(Q_OS_WIN)
+# if !defined(QT_QTLOCKEDFILE_EXPORT) && !defined(QT_QTLOCKEDFILE_IMPORT)
+# define QT_QTLOCKEDFILE_EXPORT
+# elif defined(QT_QTLOCKEDFILE_IMPORT)
+# if defined(QT_QTLOCKEDFILE_EXPORT)
+# undef QT_QTLOCKEDFILE_EXPORT
+# endif
+# define QT_QTLOCKEDFILE_EXPORT __declspec(dllimport)
+# elif defined(QT_QTLOCKEDFILE_EXPORT)
+# undef QT_QTLOCKEDFILE_EXPORT
+# define QT_QTLOCKEDFILE_EXPORT __declspec(dllexport)
+# endif
+#else
+# define QT_QTLOCKEDFILE_EXPORT
+#endif
+
+namespace QtLP_Private {
+
+class QT_QTLOCKEDFILE_EXPORT QtLockedFile : public QFile
+{
+public:
+ enum LockMode { NoLock = 0, ReadLock, WriteLock };
+
+ QtLockedFile();
+ QtLockedFile(const QString &name);
+ ~QtLockedFile();
+
+ bool open(OpenMode mode);
+
+ bool lock(LockMode mode, bool block = true);
+ bool unlock();
+ bool isLocked() const;
+ LockMode lockMode() const;
+
+private:
+#ifdef Q_OS_WIN
+ Qt::HANDLE wmutex;
+ Qt::HANDLE rmutex;
+ QVector<Qt::HANDLE> rmutexes;
+ QString mutexname;
+
+ Qt::HANDLE getMutexHandle(int idx, bool doCreate);
+ bool waitMutex(Qt::HANDLE mutex, bool doBlock);
+
+#endif
+ LockMode m_lock_mode;
+};
+}
+#endif
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+
+#include "qtlockedfile.h"
+
+bool QtLockedFile::lock(LockMode mode, bool block)
+{
+ if (!isOpen()) {
+ qWarning("QtLockedFile::lock(): file is not opened");
+ return false;
+ }
+
+ if (mode == NoLock)
+ return unlock();
+
+ if (mode == m_lock_mode)
+ return true;
+
+ if (m_lock_mode != NoLock)
+ unlock();
+
+ struct flock fl;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ fl.l_type = (mode == ReadLock) ? F_RDLCK : F_WRLCK;
+ int cmd = block ? F_SETLKW : F_SETLK;
+ int ret = fcntl(handle(), cmd, &fl);
+
+ if (ret == -1) {
+ if (errno != EINTR && errno != EAGAIN)
+ qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno));
+ return false;
+ }
+
+
+ m_lock_mode = mode;
+ return true;
+}
+
+
+bool QtLockedFile::unlock()
+{
+ if (!isOpen()) {
+ qWarning("QtLockedFile::unlock(): file is not opened");
+ return false;
+ }
+
+ if (!isLocked())
+ return true;
+
+ struct flock fl;
+ fl.l_whence = SEEK_SET;
+ fl.l_start = 0;
+ fl.l_len = 0;
+ fl.l_type = F_UNLCK;
+ int ret = fcntl(handle(), F_SETLKW, &fl);
+
+ if (ret == -1) {
+ qWarning("QtLockedFile::lock(): fcntl: %s", strerror(errno));
+ return false;
+ }
+
+ m_lock_mode = NoLock;
+ return true;
+}
+
+QtLockedFile::~QtLockedFile()
+{
+ if (isOpen())
+ unlock();
+}
+
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtlockedfile.h"
+#include <qt_windows.h>
+#include <QFileInfo>
+
+#define MUTEX_PREFIX "QtLockedFile mutex "
+// Maximum number of concurrent read locks. Must not be greater than MAXIMUM_WAIT_OBJECTS
+#define MAX_READERS MAXIMUM_WAIT_OBJECTS
+
+#if QT_VERSION >= 0x050000
+#define QT_WA(unicode, ansi) unicode
+#endif
+
+Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate)
+{
+ if (mutexname.isEmpty()) {
+ QFileInfo fi(*this);
+ mutexname = QString::fromLatin1(MUTEX_PREFIX)
+ + fi.absoluteFilePath().toLower();
+ }
+ QString mname(mutexname);
+ if (idx >= 0)
+ mname += QString::number(idx);
+
+ Qt::HANDLE mutex;
+ if (doCreate) {
+ QT_WA( { mutex = CreateMutexW(NULL, FALSE, (LPCWSTR)mname.utf16()); },
+ { mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } );
+ if (!mutex) {
+ qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
+ return 0;
+ }
+ }
+ else {
+ QT_WA( { mutex = OpenMutexW(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, (LPCWSTR)mname.utf16()); },
+ { mutex = OpenMutexA(SYNCHRONIZE | MUTEX_MODIFY_STATE, FALSE, mname.toLocal8Bit().constData()); } );
+ if (!mutex) {
+ if (GetLastError() != ERROR_FILE_NOT_FOUND)
+ qErrnoWarning("QtLockedFile::lock(): OpenMutex failed");
+ return 0;
+ }
+ }
+ return mutex;
+}
+
+bool QtLockedFile::waitMutex(Qt::HANDLE mutex, bool doBlock)
+{
+ Q_ASSERT(mutex);
+ DWORD res = WaitForSingleObject(mutex, doBlock ? INFINITE : 0);
+ switch (res) {
+ case WAIT_OBJECT_0:
+ case WAIT_ABANDONED:
+ return true;
+ break;
+ case WAIT_TIMEOUT:
+ break;
+ default:
+ qErrnoWarning("QtLockedFile::lock(): WaitForSingleObject failed");
+ }
+ return false;
+}
+
+
+
+bool QtLockedFile::lock(LockMode mode, bool block)
+{
+ if (!isOpen()) {
+ qWarning("QtLockedFile::lock(): file is not opened");
+ return false;
+ }
+
+ if (mode == NoLock)
+ return unlock();
+
+ if (mode == m_lock_mode)
+ return true;
+
+ if (m_lock_mode != NoLock)
+ unlock();
+
+ if (!wmutex && !(wmutex = getMutexHandle(-1, true)))
+ return false;
+
+ if (!waitMutex(wmutex, block))
+ return false;
+
+ if (mode == ReadLock) {
+ int idx = 0;
+ for (; idx < MAX_READERS; idx++) {
+ rmutex = getMutexHandle(idx, false);
+ if (!rmutex || waitMutex(rmutex, false))
+ break;
+ CloseHandle(rmutex);
+ }
+ bool ok = true;
+ if (idx >= MAX_READERS) {
+ qWarning("QtLockedFile::lock(): too many readers");
+ rmutex = 0;
+ ok = false;
+ }
+ else if (!rmutex) {
+ rmutex = getMutexHandle(idx, true);
+ if (!rmutex || !waitMutex(rmutex, false))
+ ok = false;
+ }
+ if (!ok && rmutex) {
+ CloseHandle(rmutex);
+ rmutex = 0;
+ }
+ ReleaseMutex(wmutex);
+ if (!ok)
+ return false;
+ }
+ else {
+ Q_ASSERT(rmutexes.isEmpty());
+ for (int i = 0; i < MAX_READERS; i++) {
+ Qt::HANDLE mutex = getMutexHandle(i, false);
+ if (mutex)
+ rmutexes.append(mutex);
+ }
+ if (rmutexes.size()) {
+ DWORD res = WaitForMultipleObjects(rmutexes.size(), rmutexes.constData(),
+ TRUE, block ? INFINITE : 0);
+ if (res != WAIT_OBJECT_0 && res != WAIT_ABANDONED) {
+ if (res != WAIT_TIMEOUT)
+ qErrnoWarning("QtLockedFile::lock(): WaitForMultipleObjects failed");
+ m_lock_mode = WriteLock; // trick unlock() to clean up - semiyucky
+ unlock();
+ return false;
+ }
+ }
+ }
+
+ m_lock_mode = mode;
+ return true;
+}
+
+bool QtLockedFile::unlock()
+{
+ if (!isOpen()) {
+ qWarning("QtLockedFile::unlock(): file is not opened");
+ return false;
+ }
+
+ if (!isLocked())
+ return true;
+
+ if (m_lock_mode == ReadLock) {
+ ReleaseMutex(rmutex);
+ CloseHandle(rmutex);
+ rmutex = 0;
+ }
+ else {
+ foreach(Qt::HANDLE mutex, rmutexes) {
+ ReleaseMutex(mutex);
+ CloseHandle(mutex);
+ }
+ rmutexes.clear();
+ ReleaseMutex(wmutex);
+ }
+
+ m_lock_mode = QtLockedFile::NoLock;
+ return true;
+}
+
+QtLockedFile::~QtLockedFile()
+{
+ if (isOpen())
+ unlock();
+ if (wmutex)
+ CloseHandle(wmutex);
+}
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#include "qtsingleapplication.h"
+#include "qtlocalpeer.h"
+#include <QWidget>
+
+
+/*!
+ \class QtSingleApplication qtsingleapplication.h
+ \brief The QtSingleApplication class provides an API to detect and
+ communicate with running instances of an application.
+
+ This class allows you to create applications where only one
+ instance should be running at a time. I.e., if the user tries to
+ launch another instance, the already running instance will be
+ activated instead. Another usecase is a client-server system,
+ where the first started instance will assume the role of server,
+ and the later instances will act as clients of that server.
+
+ By default, the full path of the executable file is used to
+ determine whether two processes are instances of the same
+ application. You can also provide an explicit identifier string
+ that will be compared instead.
+
+ The application should create the QtSingleApplication object early
+ in the startup phase, and call isRunning() to find out if another
+ instance of this application is already running. If isRunning()
+ returns false, it means that no other instance is running, and
+ this instance has assumed the role as the running instance. In
+ this case, the application should continue with the initialization
+ of the application user interface before entering the event loop
+ with exec(), as normal.
+
+ The messageReceived() signal will be emitted when the running
+ application receives messages from another instance of the same
+ application. When a message is received it might be helpful to the
+ user to raise the application so that it becomes visible. To
+ facilitate this, QtSingleApplication provides the
+ setActivationWindow() function and the activateWindow() slot.
+
+ If isRunning() returns true, another instance is already
+ running. It may be alerted to the fact that another instance has
+ started by using the sendMessage() function. Also data such as
+ startup parameters (e.g. the name of the file the user wanted this
+ new instance to open) can be passed to the running instance with
+ this function. Then, the application should terminate (or enter
+ client mode).
+
+ If isRunning() returns true, but sendMessage() fails, that is an
+ indication that the running instance is frozen.
+
+ Here's an example that shows how to convert an existing
+ application to use QtSingleApplication. It is very simple and does
+ not make use of all QtSingleApplication's functionality (see the
+ examples for that).
+
+ \code
+ // Original
+ int main(int argc, char **argv)
+ {
+ QApplication app(argc, argv);
+
+ MyMainWidget mmw;
+ mmw.show();
+ return app.exec();
+ }
+
+ // Single instance
+ int main(int argc, char **argv)
+ {
+ QtSingleApplication app(argc, argv);
+
+ if (app.isRunning())
+ return !app.sendMessage(someDataString);
+
+ MyMainWidget mmw;
+ app.setActivationWindow(&mmw);
+ mmw.show();
+ return app.exec();
+ }
+ \endcode
+
+ Once this QtSingleApplication instance is destroyed (normally when
+ the process exits or crashes), when the user next attempts to run the
+ application this instance will not, of course, be encountered. The
+ next instance to call isRunning() or sendMessage() will assume the
+ role as the new running instance.
+
+ For console (non-GUI) applications, QtSingleCoreApplication may be
+ used instead of this class, to avoid the dependency on the QtGui
+ library.
+
+ \sa QtSingleCoreApplication
+*/
+
+
+void QtSingleApplication::sysInit(const QString &appId)
+{
+ actWin = 0;
+ peer = new QtLocalPeer(this, appId);
+ connect(peer, SIGNAL(messageReceived(const QString&)), SIGNAL(messageReceived(const QString&)));
+}
+
+
+/*!
+ Creates a QtSingleApplication object. The application identifier
+ will be QCoreApplication::applicationFilePath(). \a argc, \a
+ argv, and \a GUIenabled are passed on to the QAppliation constructor.
+
+ If you are creating a console application (i.e. setting \a
+ GUIenabled to false), you may consider using
+ QtSingleCoreApplication instead.
+*/
+
+QtSingleApplication::QtSingleApplication(int &argc, char **argv, bool GUIenabled)
+ : QApplication(argc, argv, GUIenabled)
+{
+ sysInit();
+}
+
+
+/*!
+ Creates a QtSingleApplication object with the application
+ identifier \a appId. \a argc and \a argv are passed on to the
+ QAppliation constructor.
+*/
+
+QtSingleApplication::QtSingleApplication(const QString &appId, int &argc, char **argv)
+ : QApplication(argc, argv)
+{
+ sysInit(appId);
+}
+
+#if QT_VERSION < 0x050000
+
+/*!
+ Creates a QtSingleApplication object. The application identifier
+ will be QCoreApplication::applicationFilePath(). \a argc, \a
+ argv, and \a type are passed on to the QAppliation constructor.
+*/
+QtSingleApplication::QtSingleApplication(int &argc, char **argv, Type type)
+ : QApplication(argc, argv, type)
+{
+ sysInit();
+}
+
+
+# if defined(Q_WS_X11)
+/*!
+ Special constructor for X11, ref. the documentation of
+ QApplication's corresponding constructor. The application identifier
+ will be QCoreApplication::applicationFilePath(). \a dpy, \a visual,
+ and \a cmap are passed on to the QApplication constructor.
+*/
+QtSingleApplication::QtSingleApplication(Display* dpy, Qt::HANDLE visual, Qt::HANDLE cmap)
+ : QApplication(dpy, visual, cmap)
+{
+ sysInit();
+}
+
+/*!
+ Special constructor for X11, ref. the documentation of
+ QApplication's corresponding constructor. The application identifier
+ will be QCoreApplication::applicationFilePath(). \a dpy, \a argc, \a
+ argv, \a visual, and \a cmap are passed on to the QApplication
+ constructor.
+*/
+QtSingleApplication::QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap)
+ : QApplication(dpy, argc, argv, visual, cmap)
+{
+ sysInit();
+}
+
+/*!
+ Special constructor for X11, ref. the documentation of
+ QApplication's corresponding constructor. The application identifier
+ will be \a appId. \a dpy, \a argc, \a
+ argv, \a visual, and \a cmap are passed on to the QApplication
+ constructor.
+*/
+QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual, Qt::HANDLE cmap)
+ : QApplication(dpy, argc, argv, visual, cmap)
+{
+ sysInit(appId);
+}
+# endif // Q_WS_X11
+#endif // QT_VERSION < 0x050000
+
+
+/*!
+ Returns true if another instance of this application is running;
+ otherwise false.
+
+ This function does not find instances of this application that are
+ being run by a different user (on Windows: that are running in
+ another session).
+
+ \sa sendMessage()
+*/
+
+bool QtSingleApplication::isRunning()
+{
+ return peer->isClient();
+}
+
+
+/*!
+ Tries to send the text \a message to the currently running
+ instance. The QtSingleApplication object in the running instance
+ will emit the messageReceived() signal when it receives the
+ message.
+
+ This function returns true if the message has been sent to, and
+ processed by, the current instance. If there is no instance
+ currently running, or if the running instance fails to process the
+ message within \a timeout milliseconds, this function return false.
+
+ \sa isRunning(), messageReceived()
+*/
+bool QtSingleApplication::sendMessage(const QString &message, int timeout)
+{
+ return peer->sendMessage(message, timeout);
+}
+
+
+/*!
+ Returns the application identifier. Two processes with the same
+ identifier will be regarded as instances of the same application.
+*/
+QString QtSingleApplication::id() const
+{
+ return peer->applicationId();
+}
+
+
+/*!
+ Sets the activation window of this application to \a aw. The
+ activation window is the widget that will be activated by
+ activateWindow(). This is typically the application's main window.
+
+ If \a activateOnMessage is true (the default), the window will be
+ activated automatically every time a message is received, just prior
+ to the messageReceived() signal being emitted.
+
+ \sa activateWindow(), messageReceived()
+*/
+
+void QtSingleApplication::setActivationWindow(QWidget* aw, bool activateOnMessage)
+{
+ actWin = aw;
+ if (activateOnMessage)
+ connect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
+ else
+ disconnect(peer, SIGNAL(messageReceived(const QString&)), this, SLOT(activateWindow()));
+}
+
+
+/*!
+ Returns the applications activation window if one has been set by
+ calling setActivationWindow(), otherwise returns 0.
+
+ \sa setActivationWindow()
+*/
+QWidget* QtSingleApplication::activationWindow() const
+{
+ return actWin;
+}
+
+
+/*!
+ De-minimizes, raises, and activates this application's activation window.
+ This function does nothing if no activation window has been set.
+
+ This is a convenience function to show the user that this
+ application instance has been activated when he has tried to start
+ another instance.
+
+ This function should typically be called in response to the
+ messageReceived() signal. By default, that will happen
+ automatically, if an activation window has been set.
+
+ \sa setActivationWindow(), messageReceived(), initialize()
+*/
+void QtSingleApplication::activateWindow()
+{
+ if (actWin) {
+ actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
+ actWin->raise();
+ actWin->activateWindow();
+ }
+}
+
+
+/*!
+ \fn void QtSingleApplication::messageReceived(const QString& message)
+
+ This signal is emitted when the current instance receives a \a
+ message from another instance of this application.
+
+ \sa sendMessage(), setActivationWindow(), activateWindow()
+*/
+
+
+/*!
+ \fn void QtSingleApplication::initialize(bool dummy = true)
+
+ \obsolete
+*/
--- /dev/null
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Solutions component.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTSINGLEAPPLICATION_H
+#define QTSINGLEAPPLICATION_H
+
+#include <QApplication>
+
+class QtLocalPeer;
+
+#if defined(Q_OS_WIN)
+# if !defined(QT_QTSINGLEAPPLICATION_EXPORT) && !defined(QT_QTSINGLEAPPLICATION_IMPORT)
+# define QT_QTSINGLEAPPLICATION_EXPORT
+# elif defined(QT_QTSINGLEAPPLICATION_IMPORT)
+# if defined(QT_QTSINGLEAPPLICATION_EXPORT)
+# undef QT_QTSINGLEAPPLICATION_EXPORT
+# endif
+# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllimport)
+# elif defined(QT_QTSINGLEAPPLICATION_EXPORT)
+# undef QT_QTSINGLEAPPLICATION_EXPORT
+# define QT_QTSINGLEAPPLICATION_EXPORT __declspec(dllexport)
+# endif
+#else
+# define QT_QTSINGLEAPPLICATION_EXPORT
+#endif
+
+class QT_QTSINGLEAPPLICATION_EXPORT QtSingleApplication : public QApplication
+{
+ Q_OBJECT
+
+public:
+ QtSingleApplication(int &argc, char **argv, bool GUIenabled = true);
+ QtSingleApplication(const QString &id, int &argc, char **argv);
+#if QT_VERSION < 0x050000
+ QtSingleApplication(int &argc, char **argv, Type type);
+# if defined(Q_WS_X11)
+ QtSingleApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
+ QtSingleApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0);
+ QtSingleApplication(Display* dpy, const QString &appId, int argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
+# endif // Q_WS_X11
+#endif // QT_VERSION < 0x050000
+
+ bool isRunning();
+ QString id() const;
+
+ void setActivationWindow(QWidget* aw, bool activateOnMessage = true);
+ QWidget* activationWindow() const;
+
+ // Obsolete:
+ void initialize(bool dummy = true)
+ { isRunning(); Q_UNUSED(dummy) }
+
+public Q_SLOTS:
+ bool sendMessage(const QString &message, int timeout = 5000);
+ void activateWindow();
+
+
+Q_SIGNALS:
+ void messageReceived(const QString &message);
+
+
+private:
+ void sysInit(const QString &appId = QString());
+ QtLocalPeer *peer;
+ QWidget *actWin;
+};
+
+#endif // QTSINGLEAPPLICATION_H
#include <QtxSearchTool.h>
#include <QtxWorkstack.h>
#include <QtxMap.h>
-#include <QtxWebBrowser.h>
#include <LogWindow.h>
SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
QPixmap aLogo = aResMgr->loadPixmap( "LightApp", tr( "APP_DEFAULT_ICO" ), false );
- QtxWebBrowser::setResourceManager( aResMgr );
- QtxWebBrowser::setData("browser:icon", aResMgr->loadPixmap( "LightApp", tr( "BROWSER_ICON" ) ) );
- QtxWebBrowser::setData("browser:title", tr( "BROWSER_TITLE" ) );
- QtxWebBrowser::setData("toolbar:title", tr( "BROWSER_TOOLBAR_TITLE" ) );
- QtxWebBrowser::setData("menu:file:title", tr( "BROWSER_FILEMENU" ) );
- QtxWebBrowser::setData("action:close:title", tr( "BROWSER_CLOSE" ) );
- QtxWebBrowser::setData("action:close:icon", aResMgr->loadPixmap( "LightApp", tr( "BROWSER_CLOSE_ICON" ) ) );
- QtxWebBrowser::setData("action:back:title", tr( "BROWSER_BACK" ) );
- QtxWebBrowser::setData("action:forward:title", tr( "BROWSER_FORWARD" ) );
- QtxWebBrowser::setData("action:find:title", tr( "BROWSER_FIND" ) );
- QtxWebBrowser::setData("action:findnext:title", tr( "BROWSER_FINDNEXT" ) );
- QtxWebBrowser::setData("action:findprev:title", tr( "BROWSER_FINDPREV" ) );
-
desktop()->setWindowIcon( aLogo );
desktop()->setDockableMenuBar( false );
desktop()->setDockableStatusBar( false );
updateWindows();
updateViewManagers();
+ updateCommandsStatus();
putInfo( "" );
desktop()->statusBar()->showMessage( "" );
createMenu( StyleId, viewMenu, 20, -1 );
createMenu( FullScreenId, viewMenu, 20, -1 );
- int modTBar = createTool( tr( "INF_TOOLBAR_MODULES" ) );
+ int modTBar = createTool( tr( "INF_TOOLBAR_MODULES" ), // title (language-dependant)
+ QString( "SalomeModules" ) ); // name (language-independant)
createTool( ModulesListId, modTBar );
}
*/
void LightApp_Application::onNewDoc()
{
- //asl: fix for 0020515
- if ( activeStudy() ) {
- saveDockWindowsState();
- }
-
#ifdef SINGLE_DESKTOP
if ( !checkExistingDoc() )
return;
#endif
+ //asl: fix for 0020515
+ saveDockWindowsState();
+
CAM_Application::onNewDoc();
}
void LightApp_Application::onOpenDoc()
{
SUIT_Study* study = activeStudy();
- saveDockWindowsState();
#ifdef SINGLE_DESKTOP
if ( !checkExistingDoc() )
if ( !checkExistingDoc() )
return false;
#endif
+
+ saveDockWindowsState();
+
// We should take mru action first because this application instance can be deleted later.
QtxMRUAction* mru = ::qobject_cast<QtxMRUAction*>( action( MRUId ) );
}
}
else {
-#ifdef WIN32
- // On Win32 platform QWebKit of the Qt 4.6.3 hang up in case 'file://' protocol
- // is defined. On Linux platform QWebKit doesn't work correctly without 'file://' protocol.
- QtxWebBrowser::loadUrl(helpFile);
-#else
- QtxWebBrowser::loadUrl(QString("file://%1").arg(helpFile));
-#endif
+ QStringList parameters;
+ parameters << QString( "--language=%1" ).arg( resMgr->stringValue( "language", "language" ) );
+ parameters << helpFile;
+ QProcess::startDetached( "HelpBrowser", parameters );
}
}
}
}
else {
-#ifdef WIN32
- // On Win32 platform QWebKit of the Qt 4.6.3 hang up in case 'file://' protocol
- // is defined. On Linux platform QWebKit doesn't work correctly without 'file://' protocol.
- QtxWebBrowser::loadUrl(helpFile, context);
-#else
- QtxWebBrowser::loadUrl(QString("file://%1").arg(helpFile), context);
-#endif
-
+ QStringList parameters;
+ parameters << QString( "--language=%1" ).arg( resMgr->stringValue( "language", "language" ) );
+ parameters << QString( "%1#%2" ).arg( helpFile ).arg( context );
+ QProcess::startDetached( "HelpBrowser", parameters );
}
}
action( EditPasteId )->setEnabled(canPaste);
}
-/*!
- Adds window to application.
- \param wid - QWidget
- \param flag - key for window
- \param studyId - study id
- Flag used how identificator of window in windows list.
-*/
-/*
-void LightApp_Application::addWindow( QWidget* wid, const int flag, const int studyId )
-{
- if ( !wid )
- return;
-
- int sId = studyId;
- if ( sId < 0 )
- {
- if ( !activeStudy() )
- return;
- else
- sId = activeStudy()->id();
- }
-
- if ( !myWindows.contains( flag ) )
- {
- QMap<int, int> winMap;
- currentWindows( winMap );
-
- LightApp_WidgetContainer* newWC = new LightApp_WidgetContainer( flag, desktop() );
- connect( newWC, SIGNAL( destroyed ( QObject* ) ), this, SLOT( onWCDestroyed( QObject* ) ) );
- // asv: connecting a slot for storing visibility flag of a window
- connect( newWC, SIGNAL( visibilityChanged ( bool ) ), SLOT( onVisibilityChanged( bool ) ) );
- myWindows.insert( flag, newWC );
- if ( winMap.contains( flag ) ) {
- //desktop()->removeDockWidget( myWindows[flag] );
- desktop()->addDockWidget( (Qt::DockWidgetArea)winMap[flag], myWindows[flag] );
- }
-
- //myWindows[flag]->setResizeEnabled( true );
- myWindows[flag]->setFeatures( QDockWidget::AllDockWidgetFeatures );
- myWindows[flag]->setObjectName( QString( "dock_window_%1" ).arg( flag ) );
- //myWindows[flag]->setFixedExtentWidth( wid->width() );
- //myWindows[flag]->setFixedExtentHeight( wid->height() );
- myWindows[flag]->resize( wid->width(), wid->height() );
- }
-
- QFont f;
-#ifndef DISABLE_PYCONSOLE
- if( wid->inherits( "PyConsole_Console" ) )
- {
- if( resourceMgr()->hasValue( "PyConsole", "font" ) )
- f = resourceMgr()->fontValue( "PyConsole", "font" );
- else
- {
- f = ( ( PyConsole_Console* )wid )->font();
- resourceMgr()->setValue( "PyConsole", "font", f );
- }
- }
- else
-#endif
- f = wid->font();
-
- myWindows[flag]->insert( sId, wid );
- wid->setFont( f );
-
- setWindowShown( flag, !myWindows[flag]->isEmpty() );
-}
-*/
-
QWidget* LightApp_Application::dockWindow( const int id ) const
{
QWidget* wid = 0;
connect( dock, SIGNAL( destroyed( QObject* ) ), this, SLOT( onWCDestroyed( QObject* ) ) );
dock->setFeatures( QDockWidget::AllDockWidgetFeatures );
- dock->setObjectName( QString( "window_%1" ).arg( id ) );
+ dock->setObjectName( wid->objectName().isEmpty() ? QString( "window_%1" ).arg( id ) :
+ QString( "%1Dock" ).arg( wid->objectName() ) );
dock->setWidget( wid );
QKeySequence accel = wid->property( "shortcut" ).value<QKeySequence>();
return vm;
}
+SUIT_ViewManager* LightApp_Application::createViewManager( SUIT_ViewModel* theModel )
+{
+ SUIT_ResourceMgr* resMgr = resourceMgr();
+
+ SUIT_ViewManager* vm = new SUIT_ViewManager( activeStudy(),
+ desktop(),
+ theModel );
+
+ QString vmType = vm->getType();
+
+ vm->setTitle( QString( "%1: %M - viewer %V" ).arg( vmType ) );
+
+ addViewManager( vm );
+ SUIT_ViewWindow* vw = vm->createViewWindow();
+ if ( vw && desktop() ) {
+ vw->resize( (int)( desktop()->width() * 0.6 ), (int)( desktop()->height() * 0.6 ) );
+ vw->setDropDownButtons( resMgr->booleanValue( "viewers", "drop_down_buttons", true ) );
+ }
+
+ if ( !vmType.isEmpty() && !myUserWmTypes.contains( vmType ) )
+ myUserWmTypes << vmType;
+
+ return vm;
+}
+
/*!
SLOT: Removes view manager from application
*/
if ( objectBrowser() )
objectBrowser()->openLevels();
+
+#ifndef DISABLE_PYCONSOLE
+ if( pythonConsole() )
+ pythonConsole()->getInterp()->initStudy();
+#endif
}
/*!
if ( objectBrowser() )
objectBrowser()->openLevels();
+#ifndef DISABLE_PYCONSOLE
+ if( pythonConsole() )
+ pythonConsole()->getInterp()->initStudy();
+#endif
+
emit studyOpened();
}
/*!Remove all windows from study.*/
void LightApp_Application::beforeCloseDoc( SUIT_Study* s )
{
+ saveDockWindowsState();
+
if ( SUIT_DataBrowser* ob = objectBrowser() )
ob->setModel(0);
if ( flag == WT_ObjectBrowser )
{
SUIT_DataBrowser* ob = new SUIT_DataBrowser( new LightApp_DataObject(), desktop() );
+ ob->setObjectName( "objectBrowser" );
ob->setSortMenuEnabled( true );
ob->setAutoUpdate( true );
if ( resMgr->hasValue( "ObjectBrowser", "auto_hide_search_tool" ) )
else if ( flag == WT_PyConsole )
{
PyConsole_Console* pyCons = new PyConsole_EnhConsole( desktop(),new LightApp_PyInterp());
+ pyCons->setObjectName( "pythonConsole" );
pyCons->setWindowTitle( tr( "PYTHON_CONSOLE" ) );
pyCons->setFont(resourceMgr()->fontValue( "PyConsole", "font" ));
pyCons->setIsShowBanner(resourceMgr()->booleanValue( "PyConsole", "show_banner", true ));
else if ( flag == WT_LogWindow )
{
LogWindow* logWin = new LogWindow( desktop() );
+ logWin->setObjectName( "logWindow" );
logWin->setWindowTitle( tr( "LOG_WINDOW" ) );
logWin->setProperty( "shortcut", QKeySequence( "Alt+Shift+L" ) );
wid = logWin;
*/
void LightApp_Application::defaultWindows( QMap<int, int>& aMap ) const
{
- aMap.insert( WT_ObjectBrowser, Qt::LeftDockWidgetArea );
#ifndef DISABLE_PYCONSOLE
aMap.insert( WT_PyConsole, Qt::BottomDockWidgetArea );
#endif
- // aMap.insert( WT_LogWindow, Qt::DockBottom );
+ if ( activeStudy() ) {
+ aMap.insert( WT_ObjectBrowser, Qt::LeftDockWidgetArea );
+ // aMap.insert( WT_LogWindow, Qt::DockBottom );
+ }
}
/*!Default view managers*/
pref->setItemProperty( "strings", aValuesList, vtkStyleMode );
pref->setItemProperty( "indexes", anIndicesList, vtkStyleMode );
// ... -> zooming mode
- #if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
- int occZoomingStyleMode = pref->addPreference( tr( "PREF_ZOOMING" ), Viewer3DGroup,
- LightApp_Preferences::Selector, "3DViewer", "zooming_mode" );
- aValuesList.clear();
- anIndicesList.clear();
- aValuesList << tr("PREF_ZOOMING_AT_CENTER") << tr("PREF_ZOOMING_AT_CURSOR");
- anIndicesList << 0 << 1;
- pref->setItemProperty( "strings", aValuesList, occZoomingStyleMode );
- pref->setItemProperty( "indexes", anIndicesList, occZoomingStyleMode );
- #endif
+ int occZoomingStyleMode = pref->addPreference( tr( "PREF_ZOOMING" ), Viewer3DGroup,
+ LightApp_Preferences::Selector, "3DViewer", "zooming_mode" );
+ aValuesList.clear();
+ anIndicesList.clear();
+ aValuesList << tr("PREF_ZOOMING_AT_CENTER") << tr("PREF_ZOOMING_AT_CURSOR");
+ anIndicesList << 0 << 1;
+ pref->setItemProperty( "strings", aValuesList, occZoomingStyleMode );
+ pref->setItemProperty( "indexes", anIndicesList, occZoomingStyleMode );
// ... "Trihedron" group <<start>>
int occTriGroup = pref->addPreference( tr( "PREF_TRIHEDRON" ), Viewer3DGroup );
pref->setItemProperty( "columns", 2, occTriGroup );
dynamic_cast<STD_TabDesktop*>( desktop() )->workstack()->setOpaqueResize( opaqueResize );
}
- if ( sec == "ExternalBrowser" && param == "use_external_browser" ) {
- if ( resMgr->booleanValue("ExternalBrowser", "use_external_browser", false ) )
- {
- QtxWebBrowser::shutdown();
- }
- }
-
#ifndef DISABLE_PLOT2DVIEWER
QList<SUIT_ViewManager*> lst;
viewManagers( Plot2d_Viewer::Type(), lst );
if ( desktop() )
aResMgr->setValue( "desktop", "geometry", desktop()->storeGeometry() );
+#if GUI_DEVELOPMENT > 0
+ aResMgr->setValue( "salome", "version", QString(GUI_VERSION_STR)+"dev" );
+#else
+ aResMgr->setValue( "salome", "version", QString(GUI_VERSION_STR) );
+#endif
+
aResMgr->save();
}
void LightApp_Application::currentWindows( QMap<int, int>& winMap ) const
{
winMap.clear();
- if ( !activeStudy() )
- return;
-
if ( activeModule() && activeModule()->inherits( "LightApp_Module" ) )
((LightApp_Module*)activeModule())->windows( winMap );
else
QMap<int, int> winMap;
currentWindows( winMap );
- if ( activeStudy() )
+ for ( QMap<int, int>::ConstIterator it = winMap.begin(); it != winMap.end(); ++it )
{
- for ( QMap<int, int>::ConstIterator it = winMap.begin(); it != winMap.end(); ++it )
- {
- if ( !dockWindow( it.key() ) )
- getWindow( it.key() );
- }
+ if ( !dockWindow( it.key() ) )
+ getWindow( it.key() );
}
for ( WinMap::ConstIterator it = myWin.begin(); it != myWin.end(); ++it )
{
QWidget* wid = it.value();
- if ( activeStudy() )
- wid->setVisible( winMap.contains( it.key() ) );
+ if ( winMap.contains( it.key() ) )
+ wid->setVisible( true );
else
delete wid;
}
- if ( activeStudy() )
- loadDockWindowsState();
- else
- myWin.clear();
+ loadDockWindowsState();
}
/*!
QString modName;
if ( activeModule() )
modName = activeModule()->name();
+ else if ( activeStudy() )
+ modName = "nomodule";
QtxResourceMgr::WorkingMode prevMode = aResMgr->workingMode();
- aResMgr->setWorkingMode(QtxResourceMgr::IgnoreUserValues);
+ aResMgr->setWorkingMode( QtxResourceMgr::IgnoreUserValues );
QByteArray aDefaultState;
- aResMgr->value("windows_geometry", modName , aDefaultState );
+ aResMgr->value( "windows_geometry", modName, aDefaultState );
QByteArray aDefaultVisibility;
- aResMgr->value("windows_visibility", modName , aDefaultVisibility );
+ aResMgr->value( "windows_visibility", modName, aDefaultVisibility );
bool hasDefaultVisibility = !aDefaultVisibility.isEmpty();
aResMgr->setWorkingMode(prevMode);
return;
if ( aResMgr->hasValue("windows_geometry" ,modName ) ) {
+ long version = Qtx::versionToId( aResMgr->stringValue( "windows_geometry_version", modName, "" ) );
QByteArray arr;
- aResMgr->value("windows_geometry", modName , arr );
+ if ( version > Qtx::versionToId( "7.4.1" ) )
+ aResMgr->value( "windows_geometry", modName , arr );
+ else
+ arr = aDefaultState;
QByteArray aTargetArray = processState(arr, storeWin, storeTb, true, aDefaultState);
desktop()->restoreState( aTargetArray );
}
+ QStringList mainToolbarsNames;
+ mainToolbarsNames << "SalomeStandard" << "SalomeModules";
+ QList<QToolBar*> mainToolbars = findToolBars( mainToolbarsNames );
+ foreach( QToolBar* tb, mainToolbars ) tb->setVisible( true );
/*
if ( !myWinVis.contains( modName ) && aDefaultVisibility.isEmpty())
return;
QString modName;
if ( activeModule() )
modName = activeModule()->name();
+ else if ( activeStudy() )
+ modName = "nomodule";
+
+ QString versionId = GUI_VERSION_STR;
+#if GUI_DEVELOPMENT > 0
+ versionId += "dev";
+#endif
QByteArray arr = desktop()->saveState();
resourceMgr()->setValue( "windows_geometry", modName, processState(arr, storeWin, storeTb, false) );
+ resourceMgr()->setValue( "windows_geometry_version", modName, versionId );
QByteArray visArr;
if ( myWinVis.contains( modName ) )
Returns all top level toolbars.
Note : Result list contains only main window toolbars, not including toolbars from viewers.
*/
-QList<QToolBar*> LightApp_Application::findToolBars() {
+QList<QToolBar*> LightApp_Application::findToolBars( const QStringList& names )
+{
QList<QToolBar*> aResult;
QList<QToolBar*> tbList = qFindChildren<QToolBar*>( desktop() );
for ( QList<QToolBar*>::iterator tit = tbList.begin(); tit != tbList.end(); ++tit ) {
QObject* po = Qtx::findParent( tb, "QMainWindow" );
if ( po != desktop() )
continue;
- aResult.append(tb);
+ if ( names.isEmpty() || names.contains( tb->objectName() ) )
+ aResult.append(tb);
}
return aResult;
}
}
int toolBarMarkerIndex = getToolbarMarkerIndex(input,aNames);
- QDataStream anInputData(&input, QIODevice::ReadOnly);
if(toolBarMarkerIndex < 0)
return aRes;
+ QDataStream anInputData(&input, QIODevice::ReadOnly);
int toolBarMarkerIndexDef;
if(hasDefaultState) {
/*!
Check existing document.
*/
-bool LightApp_Application::checkExistingDoc() {
- return true;
+bool LightApp_Application::checkExistingDoc()
+{
+ bool result = true;
+ if( activeStudy() ) {
+ int answer = SUIT_MessageBox::question( desktop(),
+ tr( "APPCLOSE_CAPTION" ),
+ tr( "STUDYCLOSE_DESCRIPTION" ),
+ tr( "APPCLOSE_SAVE" ),
+ tr( "APPCLOSE_CLOSE" ),
+ tr( "APPCLOSE_CANCEL" ), 0 );
+ if(answer == 0) {
+ if ( activeStudy()->isSaved() ) {
+ onSaveDoc();
+ closeDoc( false );
+ } else if ( onSaveAsDoc() ) {
+ if( !closeDoc( false ) ) {
+ result = false;
+ }
+ } else {
+ result = false;
+ }
+ }
+ else if( answer == 1 ) {
+ closeDoc( false );
+ } else if( answer == 2 ) {
+ result = false;
+ }
+ }
+ return result;
}
virtual void removeViewManager( SUIT_ViewManager* );
virtual SUIT_ViewManager* createViewManager( const QString& vmType );
virtual SUIT_ViewManager* createViewManager( const QString& vmType, QWidget* w );
+ virtual SUIT_ViewManager* createViewManager( SUIT_ViewModel* );
QWidget* getWindow( const int, const int = -1 );
QWidget* dockWindow( const int ) const;
private:
void emptyPreferences( const QString& );
- QList<QToolBar*> findToolBars();
+ QList<QToolBar*> findToolBars( const QStringList& names = QStringList() );
QByteArray processState(QByteArray& input,
const bool processWin,
<parameter name="Developer resources" value="${DOCUMENTATION_ROOT_DIR}/index.html" />
</section>
<section name="windows_geometry">
- <parameter value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #88 #FC #02 #00 #00 #00 #01 #FC #00 #00 #00 #37 #00 #00 #02 #88 #00 #00 #00 #97 #01 #00 #00 #14 #FA #00 #00 #00 #00 #01 #00 #00 #00 #02 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #46 #00 #FF #FF #FF #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #00 #C0 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #88 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" name=""/>
+ <parameter name="nomodule" value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #8D #FC #02 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #37 #00 #00 #02 #8D #00 #00 #00 #53 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #8D #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" />
+ <parameter name="" value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #8D #FC #02 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #37 #00 #00 #02 #8D #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #74 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #05 #40 #00 #00 #02 #6C #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" />
</section>
<section name="windows_visibility">
- <parameter value="#00 #00 #00 #00 #02 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #03 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" name=""/>
+ <parameter name="nomodule" value="#00 #00 #00 #00 #04 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #05 #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" />
+ <parameter name="" value="#00 #00 #00 #00 #04 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1A #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #1C #00 #53 #00 #61 #00 #6C #00 #6F #00 #6D #00 #65 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #05 #00 #00 #00 #22 #00 #6F #00 #62 #00 #6A #00 #65 #00 #63 #00 #74 #00 #42 #00 #72 #00 #6F #00 #77 #00 #73 #00 #65 #00 #72 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #22 #00 #70 #00 #79 #00 #74 #00 #68 #00 #6F #00 #6E #00 #43 #00 #6F #00 #6E #00 #73 #00 #6F #00 #6C #00 #65 #00 #44 #00 #6F #00 #63 #00 #6B #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" />
</section>
</document>
<source>APP_MODULE_ICO</source>
<translation>icon_module.png</translation>
</message>
- <message>
- <source>BROWSER_ICON</source>
- <translation>icon_default.png</translation>
- </message>
- <message>
- <source>BROWSER_CLOSE_ICON</source>
- <translation>close.png</translation>
- </message>
</context>
</TS>
<message>
<source>ABOUT_CLOSE</source>
<translation>&Close</translation>
- </message>
+ </message>
<message>
<source>APP_NAME</source>
<translation>SALOME</translation>
<translation>Entry</translation>
</message>
<message>
- <source>BROWSER_TITLE</source>
- <translation>SALOME Help Browser</translation>
- </message>
- <message>
- <source>BROWSER_TOOLBAR_TITLE</source>
- <translation>Navigation</translation>
- </message>
- <message>
- <source>BROWSER_FILEMENU</source>
- <translation>&File</translation>
- </message>
- <message>
- <source>BROWSER_CLOSE</source>
- <translation>&Close</translation>
- </message>
- <message>
- <source>BROWSER_BACK</source>
- <translation>Go Back</translation>
- </message>
+ <source>APPCLOSE_CAPTION</source>
+ <translation>Close active study</translation>
+ </message>
<message>
- <source>BROWSER_FORWARD</source>
- <translation>Go Forward</translation>
- </message>
+ <source>STUDYCLOSE_DESCRIPTION</source>
+ <translation>You already have an active study in your session. It has to be closed before working with another study.</translation>
+ </message>
<message>
- <source>BROWSER_FIND</source>
- <translation>&Find...</translation>
- </message>
+ <source>APPCLOSE_SAVE</source>
+ <translation>&Save && Close</translation>
+ </message>
<message>
- <source>BROWSER_FINDNEXT</source>
- <translation>Find &next</translation>
- </message>
+ <source>APPCLOSE_CLOSE</source>
+ <translation>Close &w/o saving</translation>
+ </message>
<message>
- <source>BROWSER_FINDPREV</source>
- <translation>Find &previous</translation>
- </message>
+ <source>APPCLOSE_CANCEL</source>
+ <translation>&Cancel</translation>
+ </message>
</context>
<context>
<name>LightApp_Application</name>
<message>
<source>PREF_STORE_TOOL_POS</source>
<translation>Store positions of toolbars</translation>
- </message>
+ </message>
<message>
<source>PREF_AUTO_SAVE</source>
<translation>Auto-save interval (min)</translation>
<message>
<source>MEN_RENAME_OBJ</source>
<translation>Rename</translation>
- </message>
+ </message>
<message>
<source>LOG_WINDOW</source>
<translation>Message Window</translation>
</message>
<message>
<source>PREF_AUTO_SIZE_FIRST</source>
- <translation>Auto size for "Name" column</translation>
+ <translation>Auto size for "Name" column</translation>
</message>
<message>
<source>PREF_RESIZE_ON_EXPAND_ITEM</source>
<message>
<source>PREF_VIEWER_SELECTION</source>
<translation>Selection color</translation>
- </message>
+ </message>
<message>
<source>PREF_XYVIEWER_BACKGROUND</source>
<translation>XY View</translation>
<message>
<source>PREF_SELECTED_FONT_COLOR</source>
<translation>Highlighted legend font color</translation>
- </message>
+ </message>
<message>
<source>PREF_LEFT</source>
<translation>Left</translation>
<translation>Entrée</translation>
</message>
<message>
- <source>BROWSER_TITLE</source>
- <translation>Aide de SALOME</translation>
+ <source>APPCLOSE_CAPTION</source>
+ <translation>Fermer l'étude actuelle</translation>
</message>
<message>
- <source>BROWSER_TOOLBAR_TITLE</source>
- <translation>Navigation</translation>
+ <source>STUDYCLOSE_DESCRIPTION</source>
+ <translation>Une étude est déjà ouverte. Elle doit être fermée avant d'en ouvrir une autre.</translation>
</message>
<message>
- <source>BROWSER_FILEMENU</source>
- <translation>&Fichier</translation>
+ <source>APPCLOSE_SAVE</source>
+ <translation>&Sauvegarder && Fermer</translation>
</message>
<message>
- <source>BROWSER_CLOSE</source>
- <translation>&Fermer</translation>
- </message>
- <message>
- <source>BROWSER_BACK</source>
- <translation>Reculer</translation>
- </message>
- <message>
- <source>BROWSER_FORWARD</source>
- <translation>Avancer</translation>
+ <source>APPCLOSE_CLOSE</source>
+ <translation>&Fermer sans sauvegarder</translation>
</message>
<message>
- <source>BROWSER_FIND</source>
- <translation>&Chercher...</translation>
- </message>
- <message>
- <source>BROWSER_FINDNEXT</source>
- <translation>Chercher &suivant</translation>
- </message>
- <message>
- <source>BROWSER_FINDPREV</source>
- <translation>Chercher &précédent</translation>
+ <source>APPCLOSE_CANCEL</source>
+ <translation>&Annuler</translation>
</message>
</context>
<context>
<translation>エントリ</translation>
</message>
<message>
- <source>BROWSER_TITLE</source>
- <translation>Salome ヘルプ ・ ブラウザー</translation>
+ <source>APPCLOSE_CAPTION</source>
+ <translation>現在のスタディを閉じる</translation>
</message>
<message>
- <source>BROWSER_TOOLBAR_TITLE</source>
- <translation>ナビゲーション</translation>
+ <source>STUDYCLOSE_DESCRIPTION</source>
+ <translation type="unfinished">You already have an active study in your
+session. It has to be closed before working with another study.</translation>
</message>
<message>
- <source>BROWSER_FILEMENU</source>
- <translation>ファイル(&F)</translation>
+ <source>APPCLOSE_SAVE</source>
+ <translation>保存して閉じる(&S)</translation>
</message>
<message>
- <source>BROWSER_CLOSE</source>
- <translation>閉じる(&C)</translation>
- </message>
- <message>
- <source>BROWSER_BACK</source>
- <translation>戻る</translation>
- </message>
- <message>
- <source>BROWSER_FORWARD</source>
- <translation>進む</translation>
+ <source>APPCLOSE_CLOSE</source>
+ <translation>保存せずに閉じる(&C)</translation>
</message>
<message>
- <source>BROWSER_FIND</source>
- <translation>検索(&F)</translation>
- </message>
- <message>
- <source>BROWSER_FINDNEXT</source>
- <translation>次を検索(&n)</translation>
- </message>
- <message>
- <source>BROWSER_FINDPREV</source>
- <translation>前を検索(&p)</translation>
+ <source>APPCLOSE_CANCEL</source>
+ <translation>キャンセル(&C)</translation>
</message>
</context>
<context>
return ChangeFind(K);
}
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
Standard_EXPORT Standard_Address Find1 (const Handle(SALOME_InteractiveObject)& K) const;
Standard_EXPORT Standard_Address ChangeFind1 (const Handle(SALOME_InteractiveObject)& K);
-#endif
private:
Standard_EXPORT SALOME_DataMapOfIOMapOfInteger(const SALOME_DataMapOfIOMapOfInteger& Other);
# libraries to link to
SET(_link_LIBRARIES
${OPENGL_LIBRARIES} ${QT_LIBRARIES} ${CAS_KERNEL} ${CAS_VIEWER} ${CAS_TKGeomAlgo}
- ${CAS_TKTopAlgo} ${CAS_TKG2d}
+ ${CAS_TKTopAlgo} ${CAS_TKG2d} ${CAS_TKOpenGl}
CASCatch qtx suit OpenGLUtils ViewerTools ViewerData
)
OCCViewer.h
OCCViewer_ClipPlane.h
OCCViewer_Trihedron.h
- OCCViewer_Utilities.h
OCCViewer_VService.h
+ OCCViewer_Utilities.h
)
# header files / no moc processing / internal
# --- resources ---
+# resource files / to be processed by rcc
+SET(_rcc_RESOURCES OCCViewer.qrc)
+
# resource files / to be processed by lrelease
SET(_ts_RESOURCES
resources/OCCViewer_images.ts
# sources / moc wrappings
QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+# sources / rcc wrappings
+QT4_ADD_RESOURCES(_rcc_SOURCES ${_rcc_RESOURCES})
+
# sources / static
SET(_other_SOURCES
OCCViewer_AISSelector.cxx
OCCViewer_SetRotationPointDlg.cxx
OCCViewer_ToolTip.cxx
OCCViewer_Trihedron.cxx
- OCCViewer_Utilities.cxx
OCCViewer_VService.cxx
OCCViewer_ViewFrame.cxx
OCCViewer_ViewManager.cxx
OCCViewer_ViewWindow.cxx
OCCViewer_ViewportInputFilter.cxx
OCCViewer_ClipPlaneInteractor.cxx
+ OCCViewer_Utilities.cxx
)
# sources / to compile
-SET(OCCViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES})
+SET(OCCViewer_SOURCES ${_other_SOURCES} ${_moc_SOURCES} ${_rcc_SOURCES})
# --- rules ---
--- /dev/null
+ <!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>images/hatch.png</file>
+ </qresource>
+ </RCC>
myIsClickable = isClickable( aPlane );
// process mouse click on the object
- if ( myIsClickable );
+ if ( myIsClickable )
{
myViewer->getAISContext()->SetSelected( aPlane );
emit planeClicked( aPlane );
buttonClose->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonClose );
- QPushButton* buttonHelp = new QPushButton( tr( "SMESH_BUT_HELP" ), GroupButtons );
+ QPushButton* buttonHelp = new QPushButton( tr( "HELP" ), GroupButtons );
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp );
*/
void OCCViewer_CubeAxesDlg::ApplyData( const Handle(V3d_View)& theView )
{
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
if( theView.IsNull() )
return;
theView->GraduatedTrihedronErase();
theView->Redraw();
-#endif
}
/*!
* Sets the bounding box (MinMax values).
*/
+#if OCC_VERSION_LARGE > 0x06070100 // for OCC-6.7.2 and higher version
+void OCCViewer_Trihedron::bounds( Graphic3d_BndBox4f& theMinMax ) const
+{
+ Graphic3d_Vec4 aMinPt (-1.f, -1.f, -1.f, 1.f);
+ Graphic3d_Vec4 aMaxPt (1.f, 1.f, 1.f, 1.f);
+
+ theMinMax.Add (aMinPt);
+ theMinMax.Add (aMaxPt);
+}
+#else
void OCCViewer_Trihedron::bounds( Graphic3d_CBounds& aMinMax ) const
{
Standard_Real aXMin = -1, aYMin = -1, aZMin = -1;
Standard_Real aXMax = 1, aYMax = 1, aZMax = 1;
-
+
if( aMinMax.XMin > aXMin ) aMinMax.XMin = aXMin;
if( aMinMax.YMin > aYMin ) aMinMax.YMin = aYMin;
if( aMinMax.ZMin > aZMin ) aMinMax.ZMin = aZMin;
if( aMinMax.YMax < aYMax ) aMinMax.YMax = aYMax;
if( aMinMax.ZMax < aZMax ) aMinMax.ZMax = aZMax;
}
+#endif
/*!
* Redefined method. Calculates the object presentation.
#include "OCCViewer.h"
#include <AIS_InteractiveObject.hxx>
-#include <Graphic3d_CBounds.hxx>
+#include <Basics_OCCTVersion.hxx>
+#if OCC_VERSION_LARGE > 0x06070100 // for OCC-6.7.2 and higher version
+ #include <Graphic3d_BndBox4f.hxx>
+#else
+ #include <Graphic3d_CBounds.hxx>
+#endif
#include <Standard_DefineHandle.hxx>
/*!
virtual void ComputeSelection( const Handle( SelectMgr_Selection )&,
const Standard_Integer );
+#if OCC_VERSION_LARGE > 0x06070100
+ virtual void bounds( Graphic3d_BndBox4f& ) const;
+#else
virtual void bounds( Graphic3d_CBounds& ) const;
+#endif
virtual void display();
+// Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// internal includes
#include "OCCViewer_Utilities.h"
#include "OCCViewer_ViewFrame.h"
#include "OCCViewer_ViewModel.h"
#include "SUIT_ViewManager.h"
#include "QtxActionToolMgr.h"
-#include <QtxMultiAction.h>
+#include "QtxMultiAction.h"
+
+// KERNEL includes
+#include <Basics_OCCTVersion.hxx>
+
+// OCC includes
#include <V3d_View.hxx>
+// QT includes
+#include <QImage>
#include <QAction>
+Handle(Image_PixMap) OCCViewer_Utilities::imageToPixmap( const QImage& anImage )
+{
+ Handle(Image_PixMap) aPixmap = new Image_PixMap();
+ if ( !anImage.isNull() ) {
+ aPixmap->InitTrash( Image_PixMap::ImgBGRA, anImage.width(), anImage.height() );
+ aPixmap->SetTopDown( Standard_True );
+
+ const uchar* aImageBytes = anImage.bits();
+
+ for ( int aLine = anImage.height() - 1; aLine >= 0; --aLine ) {
+#if OCC_VERSION_LARGE > 0x06070100
+ // convert pixels from ARGB to renderer-compatible RGBA
+ for ( int aByte = 0; aByte < anImage.width(); ++aByte ) {
+ Image_ColorBGRA& aPixmapBytes = aPixmap->ChangeValue<Image_ColorBGRA>(aLine, aByte);
+
+ aPixmapBytes.b() = (Standard_Byte) *aImageBytes++;
+ aPixmapBytes.g() = (Standard_Byte) *aImageBytes++;
+ aPixmapBytes.r() = (Standard_Byte) *aImageBytes++;
+ aPixmapBytes.a() = (Standard_Byte) *aImageBytes++;
+ }
+#else
+ Image_ColorBGRA* aPixmapBytes = aPixmap->EditData<Image_ColorBGRA>().ChangeRow(aLine);
+
+ // convert pixels from ARGB to renderer-compatible RGBA
+ for ( int aByte = 0; aByte < anImage.width(); ++aByte ) {
+ aPixmapBytes->b() = (Standard_Byte) *aImageBytes++;
+ aPixmapBytes->g() = (Standard_Byte) *aImageBytes++;
+ aPixmapBytes->r() = (Standard_Byte) *aImageBytes++;
+ aPixmapBytes->a() = (Standard_Byte) *aImageBytes++;
+ aPixmapBytes++;
+ }
+#endif
+ }
+ }
+ return aPixmap;
+}
+
void OCCViewer_Utilities::setViewer2DMode( OCCViewer_Viewer* theViewer,
const OCCViewer_ViewWindow::Mode2dType& theMode )
{
+// Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
#ifndef OCCVIEWER_UTILITIES_H
#define OCCVIEWER_UTILITIES_H
+// internal includes
#include "OCCViewer.h"
#include "OCCViewer_ViewWindow.h"
+// OCC includes
+#include <Image_PixMap.hxx>
+
+class QImage;
class OCCViewer_Viewer;
#ifdef WIN32
{
public:
+ /*!
+ * Convert Qt image to OCCT pixmap
+ * \param theImage Qt source image
+ * \return resulting OCCT pixmap
+ */
+ static Handle(Image_PixMap) imageToPixmap( const QImage& theImage );
+
/*!
* Set 2D mode for the viewer. Hide or show 3D actions.
* \param theViewer an OCC viewer
};
-#endif
+#endif // OCCVIEWER_UTILITIES_H
#include <V3d_View.hxx>
#include <Aspect_DisplayConnection.hxx>
+#include <Basics_OCCTVersion.hxx>
+#if OCC_VERSION_LARGE > 0x06070200 // for OCC-6.7.3 and higher version
+#include <OpenGl_GraphicDriver.hxx>
+#else
#include <Graphic3d.hxx>
#include <Graphic3d_GraphicDriver.hxx>
+#endif
+
#ifdef WIN32
#include <WNT_Window.hxx>
#else
const Standard_Boolean computedMode,
const Standard_Boolean defaultComputedMode )
{
+#if OCC_VERSION_LARGE > 0x06070200 // for OCC-6.7.3 and higher version
+ static Handle(OpenGl_GraphicDriver) aGraphicDriver;
+#else
static Handle(Graphic3d_GraphicDriver) aGraphicDriver;
+#endif
if (aGraphicDriver.IsNull())
{
Handle(Aspect_DisplayConnection) aDisplayConnection;
#else
aDisplayConnection = new Aspect_DisplayConnection();
#endif
+#if OCC_VERSION_LARGE > 0x06070200 // for OCC-6.7.3 and higher version
+ aGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection);
+#else
aGraphicDriver = Graphic3d::InitGraphicDriver( aDisplayConnection );
+#endif
}
return new V3d_Viewer( aGraphicDriver, name, domain, viewSize, viewProjection,
mySplitMode = CreateSubViewsDlg.getSplitMode();
myViewsMode = CreateSubViewsDlg.getViewsMode();
splitSubViews();
- }
- else {
- myMaximizedView->setMaximized(true);
+ myMaximizedView->setMaximized(false, false);
}
}
myLayout->invalidate();
#include "OCCViewer_VService.h"
#include "OCCViewer_ViewPort3d.h"
#include "OCCViewer_ClippingDlg.h"
+#include "OCCViewer_Utilities.h"
#include "SUIT_ViewWindow.h"
#include "SUIT_ViewManager.h"
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
+#include <Graphic3d_Texture2Dmanual.hxx>
+#include <Graphic3d_TextureParams.hxx>
+
#include <Geom_Axis2Placement.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_DatumAspect.hxx>
#include <Visual3d_View.hxx>
-
-// VSR: Uncomment below line to allow texture background support in OCC viewer
-#define OCC_ENABLE_TEXTURED_BACKGROUND
-
/*!
Get data for supported background modes: gradient types, identifiers and supported image formats
*/
Diagonal1Gradient << Diagonal2Gradient <<
Corner1Gradient << Corner2Gradient <<
Corner3Gradient << Corner4Gradient;
-#if OCC_VERSION_LARGE > 0x06050200 // enabled since OCCT 6.5.3, since in previous version this functionality is buggy
-#ifdef OCC_ENABLE_TEXTURED_BACKGROUND
txtList << Qtx::CenterTexture << Qtx::TileTexture << Qtx::StretchTexture;
-#endif
-#endif
return tr("BG_IMAGE_FILES");
}
//myV3dViewer->Init(); // to avoid creation of the useless perspective view (see OCCT issue 0024267)
myV3dViewer->SetDefaultLights();
-#if OCC_VERSION_LARGE <= 0x06060000 // Porting to OCCT higher 6.6.0 version
- myV3dCollector = OCCViewer_VService::CreateViewer( TCollection_ExtendedString("Collector3d").ToExtString() );
- //myV3dCollector->Init(); // to avoid creation of the useless perspective view (see OCCT issue 0024267)
- myV3dCollector->SetDefaultLights();
-#endif
-
// init selector
-#if OCC_VERSION_LARGE <= 0x06060000
- myAISContext = new AIS_InteractiveContext( myV3dViewer, myV3dCollector );
-#else
myAISContext = new AIS_InteractiveContext( myV3dViewer );
-#endif
myAISContext->SelectionColor( Quantity_NOC_WHITE );
// display isoline on planar faces (box for ex.)
{
myAISContext.Nullify();
myV3dViewer.Nullify();
-#if OCC_VERSION_LARGE <= 0x06060000
- myV3dCollector.Nullify();
-#endif
}
/*!
int OCCViewer_Viewer::getTopLayerId()
{
-#if OCC_VERSION_LARGE > 0x06050200
if ( myTopLayerId == 0 && !myAISContext->CurrentViewer().IsNull() )
myAISContext->CurrentViewer()->AddZLayer( myTopLayerId );
-#endif
return myTopLayerId;
}
AIS_ListOfInteractive List;
myAISContext->DisplayedObjects(List);
-#if OCC_VERSION_LARGE <= 0x06060000
- if( !onlyInViewer )
- {
- AIS_ListOfInteractive List1;
- myAISContext->ObjectsInCollector(List1);
- List.Append(List1);
- }
-#endif
-
AIS_ListIteratorOfListOfInteractive ite(List);
for ( ; ite.More(); ite.Next() )
if( ite.Value()==obj )
}
}
-
+/*!
+ Creates clipping plane based on the incoming plane
+*/
+Handle(Graphic3d_ClipPlane) OCCViewer_Viewer::createClipPlane(const gp_Pln& thePlane, const Standard_Boolean theIsOn)
+{
+ Handle(Graphic3d_ClipPlane) aGraphic3dPlane = new Graphic3d_ClipPlane( thePlane );
+ aGraphic3dPlane->SetOn( theIsOn );
+ aGraphic3dPlane->SetCapping( Standard_True );
+
+ // load capping texture
+ QPixmap px( ":images/hatch.png" );
+ if( !px.isNull() ) {
+ const Handle(Image_PixMap) aPixmap = OCCViewer_Utilities::imageToPixmap( px.toImage() );
+ Handle(Graphic3d_Texture2Dmanual) aTexture = new Graphic3d_Texture2Dmanual( aPixmap );
+ if( aTexture->IsDone() ) {
+ aTexture->EnableModulate();
+ aTexture->EnableRepeat();
+ aTexture->GetParams()->SetScale( Graphic3d_Vec2( 0.01, 0.01 ) );
+ aGraphic3dPlane->SetCappingTexture( aTexture );
+ }
+ }
+ return aGraphic3dPlane;
+}
/*!
Applies clipping planes to clippable objects
*/
gp_Pnt anOrigin( aPlane.X, aPlane.Y, aPlane.Z );
gp_Dir aDirection( aDx, aDy, aDz );
- Handle(Graphic3d_ClipPlane) aGraphic3dPlane = new Graphic3d_ClipPlane( gp_Pln( anOrigin, aDirection ) );
- aGraphic3dPlane->SetOn( aPlane.IsOn );
-
- myInternalClipPlanes.Append( aGraphic3dPlane );
+ myInternalClipPlanes.Append( createClipPlane( gp_Pln( anOrigin, aDirection ), aPlane.IsOn ) );
myClipPlanes.push_back( aPlane );
}
public:
Handle(V3d_Viewer) getViewer3d() const { return myV3dViewer;}
-#if OCC_VERSION_LARGE <= 0x06060000
- Handle(V3d_Viewer) getCollector3d() const { return myV3dCollector; }
-#endif
Handle(AIS_InteractiveContext) getAISContext() const { return myAISContext; }
Handle(AIS_Trihedron) getTrihedron() const { return myTrihedron; }
void setStaticTrihedronDisplayed(const bool on);
/* Clip planes management */
+ Handle(Graphic3d_ClipPlane) createClipPlane(const gp_Pln& thePlane, const Standard_Boolean theIsOn);
void setClipPlanes (ClipPlanesList theList);
ClipPlanesList getClipPlanes() const;
void applyExistingClipPlanesToObject (const Handle(AIS_InteractiveObject)& theObject);
protected:
Handle(V3d_Viewer) myV3dViewer;
-#if OCC_VERSION_LARGE <= 0x06060000
- Handle(V3d_Viewer) myV3dCollector;
-#endif
-
-
Handle(AIS_Trihedron) myTrihedron;
Handle(AIS_InteractiveContext) myAISContext;
if ( activeView().IsNull() ) return;
if ( !myBackground.isValid() ) return;
- // VSR: Important note on below code.
- // In OCCT (in version 6.5.2), things about the background drawing
- // are not straightforward and not clearly understandable:
- // - Horizontal gradient is drawn vertically (!), well ok, from top side to bottom one.
- // - Vertical gradient is drawn horizontally (!), from right side to left one (!!!).
- // - First and second diagonal gradients are confused.
- // - Image texture, once set, can not be removed (!).
- // - Texture image fill mode Aspect_FM_NONE is not taken into account (and means the same
- // as Aspect_FM_CENTERED).
- // - The only way to cancel gradient background (and get back to single colored) is to
- // set gradient background style to Aspect_GFM_NONE while passing two colors is also needed
- // (see V3d_View::SetBgGradientColors() function).
- // - Also, it is impossible to draw texture image above the gradiented background (only above
- // single-colored).
- // In OCCT 6.5.3 all above mentioned problems are fixed; so, above comment should be removed as soon
- // as SALOME is migrated to OCCT 6.5.3. The same concerns #ifdef statements in the below code
switch ( myBackground.mode() ) {
case Qtx::ColorBackground:
{
// Unset texture should be done here
// ...
Quantity_Color qCol( c.red()/255., c.green()/255., c.blue()/255., Quantity_TOC_RGB );
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
activeView()->SetBgGradientStyle( Aspect_GFM_NONE ); // cancel gradient background
activeView()->SetBgImageStyle( Aspect_FM_NONE ); // cancel texture background
-#else
- // cancel gradient background (in OCC before v6.5.3 the only way to do this is to set it to NONE type passing arbitrary colors as parameters)
- activeView()->SetBgGradientColors( qCol, qCol, Aspect_GFM_NONE );
-#endif
// then change background color
activeView()->SetBackgroundColor( qCol );
// update viewer
activeView()->SetBgImageStyle( Aspect_FM_NONE ); // cancel texture background
switch ( type ) {
case OCCViewer_Viewer::HorizontalGradient:
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_HOR, Standard_True );
-#else
- // in OCCT before v6.5.3, to draw horizontal gradient it's necessary to use Aspect_GFM_VER type
- // and interchange the colors
- activeView()->SetBgGradientColors( qCol2, qCol1, Aspect_GFM_VER, Standard_True );
-#endif
break;
case OCCViewer_Viewer::VerticalGradient:
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_VER, Standard_True );
-#else
- // in OCCT before v6.5.3, to draw vertical gradient it's necessary to use Aspect_GFM_HOR type
- activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_HOR, Standard_True );
-#endif
break;
case OCCViewer_Viewer::Diagonal1Gradient:
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG1, Standard_True );
-#else
- // in OCCT before v6.5.3, to draw 1st dialognal gradient it's necessary to use Aspect_GFM_DIAG2 type
- // and interchange the colors
- activeView()->SetBgGradientColors( qCol2, qCol1, Aspect_GFM_DIAG2, Standard_True );
-#endif
break;
case OCCViewer_Viewer::Diagonal2Gradient:
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG2, Standard_True );
-#else
- // in OCCT before v6.5.3, to draw 2nd dialognal gradient it's necessary to use Aspect_GFM_DIAG1 type
- activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG1, Standard_True );
-#endif
break;
case OCCViewer_Viewer::Corner1Gradient:
activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_CORNER1, Standard_True );
default:
break;
}
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
- // VSR: In OCCT before v6.5.3 below code can't be used because of very ugly bug - it has been impossible to
- // clear the background texture image as soon as it was once set to the viewer.
if ( myBackground.isTextureShown() ) {
QString fileName;
int textureMode = myBackground.texture( fileName );
activeView()->Update();
}
}
-#endif
}
/*!
*/
void OCCViewer_ViewPort3d::startZoomAtPoint( int x, int y )
{
-#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
if ( !activeView().IsNull() && isAdvancedZoomingEnabled() )
activeView()->StartZoomAtPoint( x, y );
-#endif
}
/*!
// as OCCT respects a sign of only dx,
// but we want both signes to be taken into account
//activeView()->Zoom( x0, y0, x, y );
-#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
if ( isAdvancedZoomingEnabled() )
activeView()->ZoomAtPoint( x0, y0, x, y );
else
-#endif
activeView()->Zoom( x0 + y0, 0, x + y, 0 );
emit vpTransformed( this );
}
#include <gp_GTrsf.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
-#if OCC_VERSION_LARGE > 0x06060000
#include <Graphic3d_SequenceOfHClipPlane.hxx>
#include <Graphic3d_ClipPlane.hxx>
-#endif
+#include <Image_PixMap.hxx>
#include <Standard_Version.hxx>
connect(aAction, SIGNAL(triggered()), this, SLOT(onCloneView()));
toolMgr()->registerAction( aAction, CloneId );
- aAction = new QtxAction (tr ("MNU_CLIPPING"), aResMgr->loadPixmap ("OCCViewer", tr ("ICON_OCCVIEWER_CLIPPING")),
- tr ("MNU_CLIPPING"), 0, this);
- aAction->setStatusTip (tr ("DSC_CLIPPING"));
+ aAction = new QtxAction (tr("MNU_CLIPPING"), aResMgr->loadPixmap ("OCCViewer", tr("ICON_OCCVIEWER_CLIPPING")),
+ tr("MNU_CLIPPING"), 0, this);
+ aAction->setStatusTip (tr("DSC_CLIPPING"));
aAction->setCheckable (true);
connect (aAction, SIGNAL (toggled (bool)), this, SLOT (onClipping (bool)));
toolMgr()->registerAction (aAction, ClippingId);
*/
void OCCViewer_ViewWindow::createToolBar()
{
- QString aToolbarName;
- switch (my2dMode) {
- case XYPlane:
- aToolbarName = tr( "LBL_XYTOOLBAR_LABEL" );
- break;
- case XZPlane:
- aToolbarName = tr( "LBL_XZTOOLBAR_LABEL" );
- break;
- case YZPlane:
- aToolbarName = tr( "LBL_YZTOOLBAR_LABEL" );
- break;
- default:
- aToolbarName = tr( "LBL_3DTOOLBAR_LABEL" );
- }
-
- int tid = toolMgr()->createToolBar( aToolbarName, false );
+ static const char* titles[] = {
+ "LBL_3DTOOLBAR_LABEL",
+ "LBL_XYTOOLBAR_LABEL",
+ "LBL_XZTOOLBAR_LABEL",
+ "LBL_YZTOOLBAR_LABEL",
+ };
+ static const char* names[] = {
+ "OCCViewer3DViewOperations",
+ "OCCViewerXYViewOperations",
+ "OCCViewerXZViewOperations",
+ "OCCViewerYZViewOperations",
+ };
+ int tid = toolMgr()->createToolBar( tr( titles[my2dMode] ), // title (language-dependant)
+ QString( names[my2dMode] ), // name (language-independant)
+ false ); // disable floatable toolbar
if ( my2dMode != No2dMode ){
toolMgr()->append( ReturnTo3dViewId, tid );
toolMgr()->append( toolMgr()->separator(), tid );
}
toolMgr()->append( DumpId, tid );
toolMgr()->append( SwitchInteractionStyleId, tid );
-#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
toolMgr()->append( SwitchZoomingStyleId, tid );
-#endif
toolMgr()->append( SwitchPreselectionId, tid );
toolMgr()->append( SwitchSelectionId, tid );
if( myModel->trihedronActivated() )
toolMgr()->append( toolMgr()->separator(), tid );
toolMgr()->append( ClippingId, tid );
toolMgr()->append( AxialScaleId, tid );
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
toolMgr()->append( GraduatedAxesId, tid );
-#endif
toolMgr()->append( AmbientId, tid );
toolMgr()->append( MaximizedId, tid );
myModel->setTrihedronShown( anItem.isVisible );
myModel->setTrihedronSize( anItem.size );
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
// graduated trihedron
bool anIsVisible = anItem.gtIsVisible;
OCCViewer_AxisWidget::AxisData anAxisData[3];
myCubeAxesDlg->SetData( anIsVisible, anAxisData );
myCubeAxesDlg->ApplyData( aView3d );
-#endif
} // if ( !baseParamsOnly )
int aWidth = myViewPort->width();
int aHeight = myViewPort->height();
+
+ // rnv: An old approach to dump the OCCViewer content
+ // Now used OCCT built-in procedure.
+ /*
QApplication::syncX();
view->Redraw(); // In order to reactivate GL context
//view->Update();
glReadPixels( p.x(), p.y(), aWidth, aHeight, GL_RGBA, GL_UNSIGNED_BYTE,
data);
+ */
+
+ Image_PixMap aPix;
+ view->ToPixMap(aPix,aWidth, aHeight,Graphic3d_BT_RGBA);
- QImage anImage( data, aWidth, aHeight, QImage::Format_ARGB32 );
+ QImage anImage( aPix.Data(), aWidth, aHeight, QImage::Format_ARGB32 );
anImage = anImage.mirrored();
- anImage = anImage.rgbSwapped();
return anImage;
}
pln.Coefficients(a, b, c, d);
Graphic3d_SequenceOfHClipPlane aPlanes = view->GetClipPlanes();
- Handle(Graphic3d_ClipPlane) aClipPlane;
if(aPlanes.Size() > 0 ) {
Graphic3d_SequenceOfHClipPlane::Iterator anIter (aPlanes);
- aClipPlane = anIter.Value();
+ Handle(Graphic3d_ClipPlane) aClipPlane = anIter.Value();
aClipPlane->SetEquation(pln);
aClipPlane->SetOn(Standard_True);
} else {
- aClipPlane = new Graphic3d_ClipPlane(pln);
- view->AddClipPlane(aClipPlane);
- aClipPlane->SetOn(Standard_True);
+ view->AddClipPlane( myModel->createClipPlane( pln, Standard_True ) );
}
}
else {
aView3d->Center( params.centerX, params.centerY );
#endif
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
// graduated trihedron
bool anIsVisible = false;
OCCViewer_AxisWidget::AxisData anAxisData[3];
params.gtTickmarkLengthX = anAxisData[0].TickmarkLength;
params.gtTickmarkLengthY = anAxisData[1].TickmarkLength;
params.gtTickmarkLengthZ = anAxisData[2].TickmarkLength;
-#endif
return params;
}
data << ClippingPlane;
}
-
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 or newer version
// graduated trihedron
data << QString( "gtIsVisible=%1" ) .arg( params.gtIsVisible );
data << QString( "gtDrawNameX=%1" ) .arg( params.gtDrawNameX );
data << QString( "gtTickmarkLengthX=%1" ).arg( params.gtTickmarkLengthX );
data << QString( "gtTickmarkLengthY=%1" ).arg( params.gtTickmarkLengthY );
data << QString( "gtTickmarkLengthZ=%1" ).arg( params.gtTickmarkLengthZ );
-#endif
QString bg = Qtx::backgroundToString( background() ).replace( "=", "$" );
data << QString( "background=%1" ).arg( bg );
<TS version="2.0" language="en_US">
<context>
<name>@default</name>
+ <message>
+ <!-- used in GEOM module: to be moved there? -->
+ <source>OCC_TEXTURE_FILES</source>
+ <translatorcomment>Update to new supported format (see OCCT Image_AlienPixMap documentation)</translatorcomment>
+ <translation>Image files (*.jpeg *jpg *.jpe *.png *.bmp *.gif *.ppm *.tif *.tiff* .tga *.exr)</translation>
+ </message>
+</context>
+<context>
+ <name>OCCViewer_ViewWindow</name>
<message>
<source>MNU_FRONT_VIEW</source>
<translation>Front</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>Error</translation>
+ <source>DSC_FRONT_VIEW</source>
+ <translation>Front View</translation>
</message>
<message>
- <source>MNU_DUMP_VIEW</source>
- <translation>Dump view</translation>
+ <source>MNU_TOP_VIEW</source>
+ <translation>Top</translation>
</message>
<message>
<source>DSC_TOP_VIEW</source>
<translation>Top View</translation>
</message>
<message>
- <source>MNU_PAN_VIEW</source>
- <translation>Panning</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>Dump view</translation>
</message>
<message>
- <source>MNU_CLONE_VIEW</source>
- <translation>Clone View</translation>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>Saves the active view in the image file</translation>
</message>
<message>
- <source>DSC_SHOW_TRIHEDRE</source>
- <translation>Show/Hide trihedron in the current view</translation>
+ <source>MNU_PAN_VIEW</source>
+ <translation>Panning</translation>
</message>
<message>
- <source>MNU_SHOW_TRIHEDRE</source>
- <translation>Show/Hide trihedron</translation>
+ <source>DSC_PAN_VIEW</source>
+ <translation>Panning the view</translation>
</message>
<message>
- <source>MNU_TOP_VIEW</source>
- <translation>Top</translation>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>Global Panning</translation>
</message>
<message>
<source>DSC_GLOBALPAN_VIEW</source>
<translation>Selection of a new center of the view</translation>
</message>
<message>
- <source>DSC_ROTATE_VIEW</source>
- <translation>Rotation of the point of view around the scene center</translation>
- </message>
- <message>
- <source>MNU_ZOOM_VIEW</source>
- <translation>Zoom</translation>
- </message>
- <message>
- <source>DSC_PAN_VIEW</source>
- <translation>Panning the view</translation>
- </message>
- <message>
- <source>DSC_LEFT_VIEW</source>
- <translation>Left View</translation>
+ <source>MNU_CLONE_VIEW</source>
+ <translation>Clone View</translation>
</message>
<message>
- <source>DSC_SHOOT_VIEW</source>
- <translation>Memorizes the state of the active view and adds it to the list</translation>
+ <source>DSC_CLONE_VIEW</source>
+ <translation>Create new OCC viewer for the active scene</translation>
</message>
<message>
- <source>DSC_FITALL</source>
- <translation>Fit all objects inside the view frame</translation>
+ <source>MNU_SHOW_TRIHEDRE</source>
+ <translation>Show/Hide trihedron</translation>
</message>
<message>
- <source>MNU_FITALL</source>
- <translation>Fit All</translation>
+ <source>DSC_SHOW_TRIHEDRE</source>
+ <translation>Show/Hide trihedron in the current view</translation>
</message>
<message>
<source>MNU_ROTATE_VIEW</source>
<translation>Rotation</translation>
</message>
<message>
- <source>DSC_FRONT_VIEW</source>
- <translation>Front View</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINTGRAVITY_VIEW</source>
- <translation>Rotation Point : the gravity center</translation>
- </message>
- <message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>Global Panning</translation>
- </message>
- <message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>Dump view</translation>
- </message>
- <message>
- <source>DSC_CLIPPING</source>
- <translation>Set clipping plane</translation>
+ <source>DSC_ROTATE_VIEW</source>
+ <translation>Rotation of the point of view around the scene center</translation>
</message>
<message>
- <source>DSC_CLONE_VIEW</source>
- <translation>Create new OCC viewer for the active scene</translation>
+ <source>MNU_ZOOM_VIEW</source>
+ <translation>Zoom</translation>
</message>
<message>
- <source>INF_APP_SHOOT_VIEW</source>
- <translation>Memorize view</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>Zoom the view</translation>
</message>
<message>
- <source>MNU_CLIPPING</source>
- <translation>Clipping</translation>
+ <source>MNU_LEFT_VIEW</source>
+ <translation>Left</translation>
</message>
<message>
- <source>MNU_BACK_VIEW</source>
- <translation>Back</translation>
+ <source>DSC_LEFT_VIEW</source>
+ <translation>Left View</translation>
</message>
<message>
<source>MNU_SHOOT_VIEW</source>
<translation>Memorize View</translation>
</message>
<message>
- <source>DSC_CHANGINGROTATIONPOINT_VIEW</source>
- <translation>Change the point, around which the rotation is performed</translation>
+ <source>DSC_SHOOT_VIEW</source>
+ <translation>Memorizes the state of the active view and adds it to the list</translation>
</message>
<message>
- <source>MNU_BOTTOM_VIEW</source>
- <translation>Bottom</translation>
+ <source>MNU_FITALL</source>
+ <translation>Fit All</translation>
</message>
<message>
- <source>MNU_RESET_VIEW</source>
- <translation>Reset</translation>
+ <source>DSC_FITALL</source>
+ <translation>Fit all objects inside the view frame</translation>
</message>
<message>
- <source>MNU_LEFT_VIEW</source>
- <translation>Left</translation>
+ <source>MNU_CLIPPING</source>
+ <translation>Clipping</translation>
</message>
<message>
- <source>DSC_RIGHT_VIEW</source>
- <translation>Right View</translation>
+ <source>DSC_CLIPPING</source>
+ <translation>Set clipping plane</translation>
</message>
<message>
- <source>DSC_ANTICLOCKWISE_VIEW</source>
- <translation>Rotate view counterclockwise</translation>
+ <source>MNU_BACK_VIEW</source>
+ <translation>Back</translation>
</message>
<message>
- <source>DSC_CLOCKWISE_VIEW</source>
- <translation>Rotate View Clockwise</translation>
+ <source>DSC_BACK_VIEW</source>
+ <translation>Back View</translation>
</message>
<message>
<source>MNU_CHANGINGROTATIONPOINT_VIEW</source>
<translation>Change Rotation Point</translation>
</message>
<message>
- <source>DSC_FITRECT</source>
- <translation>Fit area within the view frame</translation>
+ <source>DSC_CHANGINGROTATIONPOINT_VIEW</source>
+ <translation>Change the point, around which the rotation is performed</translation>
</message>
<message>
- <source>MNU_FITRECT</source>
- <translation>Fit Area</translation>
+ <source>MNU_BOTTOM_VIEW</source>
+ <translation>Bottom</translation>
</message>
<message>
<source>DSC_BOTTOM_VIEW</source>
<translation>Bottom View</translation>
</message>
<message>
- <source>DSC_DUMP_VIEW</source>
- <translation>Saves the active view in the image file</translation>
- </message>
- <message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>Zoom the view</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINT000_VIEW</source>
- <translation>Rotation Point : (0,0,0)</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINTSELECTED_VIEW</source>
- <translation>Rotation Point : the point selected by the user</translation>
+ <source>MNU_RESET_VIEW</source>
+ <translation>Reset</translation>
</message>
<message>
<source>DSC_RESET_VIEW</source>
<translation>Reset View Point</translation>
</message>
<message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>Cannot save file</translation>
- </message>
- <message>
- <source>DSC_PRESETS_VIEW</source>
- <translation>Selection of the memorized state of the active view</translation>
+ <source>MNU_RIGHT_VIEW</source>
+ <translation>Right</translation>
</message>
<message>
- <source>MNU_PRESETS_VIEW</source>
- <translation>Restore View</translation>
+ <source>DSC_RIGHT_VIEW</source>
+ <translation>Right View</translation>
</message>
<message>
<source>MNU_ANTICLOCKWISE_VIEW</source>
<translation>Rotate counterclockwise</translation>
</message>
<message>
- <source>MNU_CLOCKWISE_VIEW</source>
- <translation>Rotate clockwise</translation>
- </message>
- <message>
- <source>MNU_RIGHT_VIEW</source>
- <translation>Right</translation>
- </message>
- <message>
- <source>INF_APP_PRESETS_VIEW</source>
- <translation>Restore view</translation>
+ <source>DSC_ANTICLOCKWISE_VIEW</source>
+ <translation>Rotate view counterclockwise</translation>
</message>
<message>
- <source>LBL_XYTOOLBAR_LABEL</source>
- <translation>XY View Operations</translation>
+ <source>MNU_CLOCKWISE_VIEW</source>
+ <translation>Rotate clockwise</translation>
</message>
<message>
- <source>LBL_XZTOOLBAR_LABEL</source>
- <translation>XZ View Operations</translation>
+ <source>DSC_CLOCKWISE_VIEW</source>
+ <translation>Rotate View Clockwise</translation>
</message>
<message>
- <source>LBL_YZTOOLBAR_LABEL</source>
- <translation>YZ View Operations</translation>
+ <source>MNU_FITRECT</source>
+ <translation>Fit Area</translation>
</message>
<message>
- <source>LBL_3DTOOLBAR_LABEL</source>
- <translation>3D View Operations</translation>
+ <source>DSC_FITRECT</source>
+ <translation>Fit area within the view frame</translation>
</message>
<message>
- <source>DSC_BACK_VIEW</source>
- <translation>Back View</translation>
+ <source>MNU_PRESETS_VIEW</source>
+ <translation>Restore View</translation>
</message>
<message>
- <source>DSC_SCALING</source>
- <translation>Change scale of axes</translation>
+ <source>DSC_PRESETS_VIEW</source>
+ <translation>Selection of the memorized state of the active view</translation>
</message>
<message>
<source>MNU_SCALING</source>
<translation>Scaling</translation>
</message>
<message>
- <source>DSC_GRADUATED_AXES</source>
- <translation>Graduated axes</translation>
+ <source>DSC_SCALING</source>
+ <translation>Change scale of axes</translation>
</message>
<message>
<source>MNU_GRADUATED_AXES</source>
<translation>Graduated axes</translation>
</message>
<message>
- <source>DSC_AMBIENT</source>
- <translation>Toogle keep only ambient light</translation>
+ <source>DSC_GRADUATED_AXES</source>
+ <translation>Graduated axes</translation>
</message>
<message>
<source>MNU_AMBIENT</source>
<translation>Toogle keep only ambient light</translation>
</message>
<message>
- <source>DSC_STYLE_SWITCH</source>
- <translation>Interaction style switch</translation>
+ <source>DSC_AMBIENT</source>
+ <translation>Toogle keep only ambient light</translation>
</message>
<message>
<source>MNU_STYLE_SWITCH</source>
<translation>Interaction style switch</translation>
</message>
<message>
- <source>DSC_ZOOMING_STYLE_SWITCH</source>
- <translation>Zooming style switch</translation>
+ <source>DSC_STYLE_SWITCH</source>
+ <translation>Interaction style switch</translation>
</message>
<message>
<source>MNU_ZOOMING_STYLE_SWITCH</source>
<translation>Zooming style switch</translation>
</message>
<message>
- <source>DSC_ENABLE_PRESELECTION</source>
- <translation>Enable/disable preselection</translation>
+ <source>DSC_ZOOMING_STYLE_SWITCH</source>
+ <translation>Zooming style switch</translation>
</message>
<message>
<source>MNU_ENABLE_PRESELECTION</source>
<translation>Enable/disable preselection</translation>
</message>
<message>
- <source>DSC_ENABLE_SELECTION</source>
- <translation>Enable/disable selection</translation>
+ <source>DSC_ENABLE_PRESELECTION</source>
+ <translation>Enable/disable preselection</translation>
</message>
<message>
<source>MNU_ENABLE_SELECTION</source>
<translation>Enable/disable selection</translation>
</message>
<message>
- <source>OCC_IMAGE_FILES</source>
- <translation>Images Files (*.bmp *.png *.jpg *.jpeg *.eps *.ps)</translation>
+ <source>DSC_ENABLE_SELECTION</source>
+ <translation>Enable/disable selection</translation>
</message>
<message>
- <source>OCC_TEXTURE_FILES</source>
- <translatorcomment>Update to new supported format (see OCCT Image_AlienPixMap documentation)</translatorcomment>
- <translation>Image files (*.jpeg *jpg *.jpe *.png *.bmp *.gif *.ppm *.tif *.tiff* .tga *.exr)</translation>
+ <source>MNU_MAXIMIZE_VIEW</source>
+ <translation>Maximize</translation>
</message>
<message>
<source>DSC_MAXIMIZE_VIEW</source>
<translation>Maximize view</translation>
</message>
+ <message>
+ <source>MNU_MINIMIZE_VIEW</source>
+ <translation>Minimize</translation>
+ </message>
<message>
<source>DSC_MINIMIZE_VIEW</source>
<translation>Minimize view</translation>
</message>
+ <message>
+ <source>MNU_RETURN_3D_VIEW</source>
+ <translation>Return to 3D</translation>
+ </message>
<message>
<source>DSC_RETURN_3D_VIEW</source>
<translation>Return to 3D view</translation>
</message>
<message>
- <source>MNU_MAXIMIZE_VIEW</source>
- <translation>Maximize</translation>
+ <source>OCC_IMAGE_FILES</source>
+ <translation>Images Files (*.bmp *.png *.jpg *.jpeg *.eps *.ps)</translation>
</message>
<message>
- <source>MNU_MINIMIZE_VIEW</source>
- <translation>Minimize</translation>
+ <source>LBL_XYTOOLBAR_LABEL</source>
+ <translation>XY View Operations</translation>
</message>
<message>
- <source>MNU_RETURN_3D_VIEW</source>
- <translation>Return to 3D</translation>
+ <source>LBL_XZTOOLBAR_LABEL</source>
+ <translation>XZ View Operations</translation>
+ </message>
+ <message>
+ <source>LBL_YZTOOLBAR_LABEL</source>
+ <translation>YZ View Operations</translation>
+ </message>
+ <message>
+ <source>LBL_3DTOOLBAR_LABEL</source>
+ <translation>3D View Operations</translation>
</message>
</context>
<context>
<source>PARAMETERS</source>
<translation>Parameters</translation>
</message>
+ <message>
+ <source>HELP</source>
+ <translation>&Help</translation>
+ </message>
</context>
</TS>
<TS version="2.0" language="fr_FR" sourcelanguage="en_US">
<context>
<name>@default</name>
+ <message>
+ <!-- used in GEOM module: to be moved there? -->
+ <source>OCC_TEXTURE_FILES</source>
+ <translatorcomment>Update to new supported format (see OCCT Image_AlienPixMap documentation)</translatorcomment>
+ <translation>Fichiers images (*.jpeg *jpg *.jpe *.png *.bmp *.gif *.ppm *.tif *.tiff* .tga *.exr)</translation>
+ </message>
+</context>
+<context>
+ <name>OCCViewer_ViewWindow</name>
<message>
<source>MNU_FRONT_VIEW</source>
<translation>Avant</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>Erreur</translation>
+ <source>DSC_FRONT_VIEW</source>
+ <translation>Vue de devant</translation>
</message>
<message>
- <source>MNU_DUMP_VIEW</source>
- <translation>Sauvegarder la scène</translation>
+ <source>MNU_TOP_VIEW</source>
+ <translation>Dessus</translation>
</message>
<message>
<source>DSC_TOP_VIEW</source>
<translation>Vue de dessus</translation>
</message>
<message>
- <source>MNU_PAN_VIEW</source>
- <translation>Panoramique</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>Sauvegarder la scène</translation>
</message>
<message>
- <source>MNU_CLONE_VIEW</source>
- <translation>Dupliquer la scène</translation>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>Sauvegarder la scène en cours dans un fichier image</translation>
</message>
<message>
- <source>DSC_SHOW_TRIHEDRE</source>
- <translation>Afficher/cacher le trièdre dans la scène</translation>
+ <source>MNU_PAN_VIEW</source>
+ <translation>Panoramique</translation>
</message>
<message>
- <source>MNU_SHOW_TRIHEDRE</source>
- <translation>Afficher/cacher le trièdre</translation>
+ <source>DSC_PAN_VIEW</source>
+ <translation>Déplacer la vue</translation>
</message>
<message>
- <source>MNU_TOP_VIEW</source>
- <translation>Dessus</translation>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>Panoramique global</translation>
</message>
<message>
<source>DSC_GLOBALPAN_VIEW</source>
<translation>Sélection d'un nouveau centre de vue</translation>
</message>
<message>
- <source>DSC_ROTATE_VIEW</source>
- <translation>Tourner le point de vue autour du centre de la scène</translation>
- </message>
- <message>
- <source>MNU_ZOOM_VIEW</source>
- <translation>Zoom</translation>
- </message>
- <message>
- <source>DSC_PAN_VIEW</source>
- <translation>Déplacer la vue</translation>
- </message>
- <message>
- <source>DSC_LEFT_VIEW</source>
- <translation>Vue de gauche</translation>
+ <source>MNU_CLONE_VIEW</source>
+ <translation>Dupliquer la scène</translation>
</message>
<message>
- <source>DSC_SHOOT_VIEW</source>
- <translation>Memoriser l'état courant de la scène et l'ajouter dans la liste</translation>
+ <source>DSC_CLONE_VIEW</source>
+ <translation>Ouvrir une nouvelle fenêtre de visualisation pour la scène en cours</translation>
</message>
<message>
- <source>DSC_FITALL</source>
- <translation>Redimentionner la scène pour montrer tous les objets</translation>
+ <source>MNU_SHOW_TRIHEDRE</source>
+ <translation>Afficher/cacher le trièdre</translation>
</message>
<message>
- <source>MNU_FITALL</source>
- <translation>Tout afficher</translation>
+ <source>DSC_SHOW_TRIHEDRE</source>
+ <translation>Afficher/cacher le trièdre dans la scène</translation>
</message>
<message>
<source>MNU_ROTATE_VIEW</source>
<translation>Rotation</translation>
</message>
<message>
- <source>DSC_FRONT_VIEW</source>
- <translation>Vue de devant</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINTGRAVITY_VIEW</source>
- <translation>Point de Rotation : le centre de gravité</translation>
- </message>
- <message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>Panoramique global</translation>
- </message>
- <message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>Sauvegarder la vue</translation>
- </message>
- <message>
- <source>DSC_CLIPPING</source>
- <translation>Définir le plan de coupe</translation>
+ <source>DSC_ROTATE_VIEW</source>
+ <translation>Tourner le point de vue autour du centre de la scène</translation>
</message>
<message>
- <source>DSC_CLONE_VIEW</source>
- <translation>Ouvrir une nouvelle fenêtre de visualisation pour la scène en cours</translation>
+ <source>MNU_ZOOM_VIEW</source>
+ <translation>Zoom</translation>
</message>
<message>
- <source>INF_APP_SHOOT_VIEW</source>
- <translation>Mémoriser la scène</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>Zoom la vue</translation>
</message>
<message>
- <source>MNU_CLIPPING</source>
- <translation>Plan de coupe</translation>
+ <source>MNU_LEFT_VIEW</source>
+ <translation>Gauche</translation>
</message>
<message>
- <source>MNU_BACK_VIEW</source>
- <translation>Arrière</translation>
+ <source>DSC_LEFT_VIEW</source>
+ <translation>Vue de gauche</translation>
</message>
<message>
<source>MNU_SHOOT_VIEW</source>
<translation>Memoriser la vue</translation>
</message>
<message>
- <source>DSC_CHANGINGROTATIONPOINT_VIEW</source>
- <translation>Changer le point autour duquel la scène est tournée</translation>
+ <source>DSC_SHOOT_VIEW</source>
+ <translation>Memoriser l'état courant de la scène et l'ajouter dans la liste</translation>
</message>
<message>
- <source>MNU_BOTTOM_VIEW</source>
- <translation>Dessous</translation>
+ <source>MNU_FITALL</source>
+ <translation>Tout afficher</translation>
</message>
<message>
- <source>MNU_RESET_VIEW</source>
- <translation>Restaurer le point de vue</translation>
+ <source>DSC_FITALL</source>
+ <translation>Redimentionner la scène pour montrer tous les objets</translation>
</message>
<message>
- <source>MNU_LEFT_VIEW</source>
- <translation>Gauche</translation>
+ <source>MNU_CLIPPING</source>
+ <translation>Plan de coupe</translation>
</message>
<message>
- <source>DSC_RIGHT_VIEW</source>
- <translation>Vue de droite</translation>
+ <source>DSC_CLIPPING</source>
+ <translation>Définir le plan de coupe</translation>
</message>
<message>
- <source>DSC_ANTICLOCKWISE_VIEW</source>
- <translation>Tourner la vue à gauche</translation>
+ <source>MNU_BACK_VIEW</source>
+ <translation>Arrière</translation>
</message>
<message>
- <source>DSC_CLOCKWISE_VIEW</source>
- <translation>Tourner la vue à droite</translation>
+ <source>DSC_BACK_VIEW</source>
+ <translation>Vue arrière</translation>
</message>
<message>
<source>MNU_CHANGINGROTATIONPOINT_VIEW</source>
<translation>Changer le point de rotation</translation>
</message>
<message>
- <source>DSC_FITRECT</source>
- <translation>Redimensionner la scène pour ne montrer que sa partie choisie par l'encadré</translation>
+ <source>DSC_CHANGINGROTATIONPOINT_VIEW</source>
+ <translation>Changer le point autour duquel la scène est tournée</translation>
</message>
<message>
- <source>MNU_FITRECT</source>
- <translation>Afficher la zone</translation>
+ <source>MNU_BOTTOM_VIEW</source>
+ <translation>Dessous</translation>
</message>
<message>
<source>DSC_BOTTOM_VIEW</source>
<translation>Vue de dessous</translation>
</message>
<message>
- <source>DSC_DUMP_VIEW</source>
- <translation>Sauvegarder la scène en cours dans un fichier image</translation>
- </message>
- <message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>Zoom la vue</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINT000_VIEW</source>
- <translation>Point de Rotation : (0,0,0)</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINTSELECTED_VIEW</source>
- <translation>Point de Rotation : le point choisi par l'utilisateur</translation>
+ <source>MNU_RESET_VIEW</source>
+ <translation>Restaurer le point de vue</translation>
</message>
<message>
<source>DSC_RESET_VIEW</source>
<translation>Restaurer le point de vue</translation>
</message>
<message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>Impossible de sauvegarder le fichier</translation>
- </message>
- <message>
- <source>DSC_PRESETS_VIEW</source>
- <translation>Restaurer d'un état mémorisé de la scène courante</translation>
+ <source>MNU_RIGHT_VIEW</source>
+ <translation>Droit</translation>
</message>
<message>
- <source>MNU_PRESETS_VIEW</source>
- <translation>Restaurer la vue</translation>
+ <source>DSC_RIGHT_VIEW</source>
+ <translation>Vue de droite</translation>
</message>
<message>
<source>MNU_ANTICLOCKWISE_VIEW</source>
<translation>Tourner à gauche</translation>
</message>
<message>
- <source>MNU_CLOCKWISE_VIEW</source>
- <translation>Tourner à droite</translation>
- </message>
- <message>
- <source>MNU_RIGHT_VIEW</source>
- <translation>Droit</translation>
- </message>
- <message>
- <source>INF_APP_PRESETS_VIEW</source>
- <translation>Restaurer la scène</translation>
+ <source>DSC_ANTICLOCKWISE_VIEW</source>
+ <translation>Tourner la vue à gauche</translation>
</message>
<message>
- <source>LBL_XYTOOLBAR_LABEL</source>
- <translation>Opérations sur la vue XY</translation>
+ <source>MNU_CLOCKWISE_VIEW</source>
+ <translation>Tourner à droite</translation>
</message>
<message>
- <source>LBL_XZTOOLBAR_LABEL</source>
- <translation>Opérations sur la vue XZ</translation>
+ <source>DSC_CLOCKWISE_VIEW</source>
+ <translation>Tourner la vue à droite</translation>
</message>
<message>
- <source>LBL_YZTOOLBAR_LABEL</source>
- <translation>Opérations sur la vue YZ</translation>
+ <source>MNU_FITRECT</source>
+ <translation>Afficher la zone</translation>
</message>
<message>
- <source>LBL_3DTOOLBAR_LABEL</source>
- <translation>Opérations sur la vue 3D</translation>
+ <source>DSC_FITRECT</source>
+ <translation>Redimensionner la scène pour ne montrer que sa partie choisie par l'encadré</translation>
</message>
<message>
- <source>DSC_BACK_VIEW</source>
- <translation>Vue arrière</translation>
+ <source>MNU_PRESETS_VIEW</source>
+ <translation>Restaurer la vue</translation>
</message>
<message>
- <source>DSC_SCALING</source>
- <translation>Changer l'échelle des axes de coordonnées</translation>
+ <source>DSC_PRESETS_VIEW</source>
+ <translation>Restaurer d'un état mémorisé de la scène courante</translation>
</message>
<message>
<source>MNU_SCALING</source>
<translation>Changer l'échelle</translation>
</message>
<message>
- <source>DSC_GRADUATED_AXES</source>
- <translation>Axes gradués</translation>
+ <source>DSC_SCALING</source>
+ <translation>Changer l'échelle des axes de coordonnées</translation>
</message>
<message>
<source>MNU_GRADUATED_AXES</source>
<translation>Axes gradués</translation>
</message>
<message>
- <source>DSC_AMBIENT</source>
- <translation>Ne montrer que la lumière d'ambiance</translation>
+ <source>DSC_GRADUATED_AXES</source>
+ <translation>Axes gradués</translation>
</message>
<message>
<source>MNU_AMBIENT</source>
<translation>Ne montrer que la lumière d'ambiance</translation>
</message>
<message>
- <source>DSC_STYLE_SWITCH</source>
- <translation>Changer le style d'intéraction</translation>
+ <source>DSC_AMBIENT</source>
+ <translation>Ne montrer que la lumière d'ambiance</translation>
</message>
<message>
<source>MNU_STYLE_SWITCH</source>
<translation>Changer le style d'intéraction</translation>
</message>
<message>
- <source>DSC_ZOOMING_STYLE_SWITCH</source>
- <translation>Changer le style de zoom</translation>
+ <source>DSC_STYLE_SWITCH</source>
+ <translation>Changer le style d'intéraction</translation>
</message>
<message>
<source>MNU_ZOOMING_STYLE_SWITCH</source>
<translation>Changer le style de zoom</translation>
</message>
<message>
- <source>DSC_ENABLE_PRESELECTION</source>
- <translation>Activer/Désactiver la préselection</translation>
+ <source>DSC_ZOOMING_STYLE_SWITCH</source>
+ <translation>Changer le style de zoom</translation>
</message>
<message>
<source>MNU_ENABLE_PRESELECTION</source>
<translation>Activer/Désactiver préselection</translation>
</message>
<message>
- <source>DSC_ENABLE_SELECTION</source>
- <translation>Activer/Désactiver la selection</translation>
+ <source>DSC_ENABLE_PRESELECTION</source>
+ <translation>Activer/Désactiver la préselection</translation>
</message>
<message>
<source>MNU_ENABLE_SELECTION</source>
<translation>Activer/Désactiver selection</translation>
</message>
<message>
- <source>OCC_IMAGE_FILES</source>
- <translation>Fichiers images (*.bmp *.png *.jpg *.jpeg *.eps *.ps)</translation>
+ <source>DSC_ENABLE_SELECTION</source>
+ <translation>Activer/Désactiver la selection</translation>
</message>
<message>
- <source>OCC_TEXTURE_FILES</source>
- <translation>Fichiers images (*.jpeg *jpg *.jpe *.png *.bmp *.gif *.ppm *.tif *.tiff* .tga *.exr)</translation>
+ <source>MNU_MAXIMIZE_VIEW</source>
+ <translation>Maximiser</translation>
</message>
<message>
<source>DSC_MAXIMIZE_VIEW</source>
<translation>Maximiser la vue</translation>
</message>
+ <message>
+ <source>MNU_MINIMIZE_VIEW</source>
+ <translation>Minimiser</translation>
+ </message>
<message>
<source>DSC_MINIMIZE_VIEW</source>
<translation>Minimiser la vue</translation>
</message>
+ <message>
+ <source>MNU_RETURN_3D_VIEW</source>
+ <translation>Retour à la vue 3D</translation>
+ </message>
<message>
<source>DSC_RETURN_3D_VIEW</source>
<translation>Retour à la vue 3D</translation>
</message>
<message>
- <source>MNU_MAXIMIZE_VIEW</source>
- <translation>Maximiser</translation>
+ <source>OCC_IMAGE_FILES</source>
+ <translation>Fichiers images (*.bmp *.png *.jpg *.jpeg *.eps *.ps)</translation>
</message>
<message>
- <source>MNU_MINIMIZE_VIEW</source>
- <translation>Minimiser</translation>
+ <source>LBL_XYTOOLBAR_LABEL</source>
+ <translation>Opérations sur la vue XY</translation>
</message>
<message>
- <source>MNU_RETURN_3D_VIEW</source>
- <translation>Retour à la vue 3D</translation>
+ <source>LBL_XZTOOLBAR_LABEL</source>
+ <translation>Opérations sur la vue XZ</translation>
+ </message>
+ <message>
+ <source>>LBL_YZTOOLBAR_LABEL</source>
+ <translation>Opérations sur la vue YZ</translation>
+ </message>
+ <message>
+ <source>LBL_3DTOOLBAR_LABEL</source>
+ <translation>Opérations sur la vue 3D</translation>
</message>
</context>
<context>
<source>PARAMETERS</source>
<translation>Paramètres</translation>
</message>
+ <message>
+ <source>HELP</source>
+ <translation>Ai&de</translation>
+ </message>
</context>
</TS>
<TS version="2.0" language="ja" sourcelanguage="en">
<context>
<name>@default</name>
+ <message>
+ <!-- used in GEOM module: to be moved there? -->
+ <source>OCC_TEXTURE_FILES</source>
+ <translatorcomment>Update to new supported format (see OCCT Image_AlienPixMap documentation)</translatorcomment>
+ <translation>イメージファイル (*.bmp *.gif *.pix *.xwd *.rgb *.rs)</translation>
+ </message>
+ </context>
+ <context>
+ <name>OCCViewer_ViewWindow</name>
<message>
<source>MNU_FRONT_VIEW</source>
<translation>正面</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>エラー</translation>
+ <source>DSC_FRONT_VIEW</source>
+ <translation>正面</translation>
</message>
<message>
- <source>MNU_DUMP_VIEW</source>
- <translation>シーンを保存します。</translation>
+ <source>MNU_TOP_VIEW</source>
+ <translation>上面</translation>
</message>
<message>
<source>DSC_TOP_VIEW</source>
<translation>上から見る</translation>
</message>
<message>
- <source>MNU_PAN_VIEW</source>
- <translation>並進移動</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>シーンを保存します。</translation>
</message>
<message>
- <source>MNU_CLONE_VIEW</source>
- <translation>ビューの複製</translation>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>現在のシーンをイメージ ファイルに保存します。</translation>
</message>
<message>
- <source>DSC_SHOW_TRIHEDRE</source>
- <translation>表示/非表示の三面体をシーンに</translation>
+ <source>MNU_PAN_VIEW</source>
+ <translation>並進移動</translation>
</message>
<message>
- <source>MNU_SHOW_TRIHEDRE</source>
- <translation>軸の表示/非表示</translation>
+ <source>DSC_PAN_VIEW</source>
+ <translation>ビューを移動します。</translation>
</message>
<message>
- <source>MNU_TOP_VIEW</source>
- <translation>上面</translation>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>グローバルパンニング</translation>
</message>
<message>
<source>DSC_GLOBALPAN_VIEW</source>
<translation>ビューの新しい中心地の選択</translation>
</message>
<message>
- <source>DSC_ROTATE_VIEW</source>
- <translation>ステージの中心の周りを回転します。</translation>
- </message>
- <message>
- <source>MNU_ZOOM_VIEW</source>
- <translation>ズーム</translation>
- </message>
- <message>
- <source>DSC_PAN_VIEW</source>
- <translation>ビューを移動します。</translation>
- </message>
- <message>
- <source>DSC_LEFT_VIEW</source>
- <translation>左側のビュー</translation>
+ <source>MNU_CLONE_VIEW</source>
+ <translation>ビューの複製</translation>
</message>
<message>
- <source>DSC_SHOOT_VIEW</source>
- <translation>ç\8a¶æ\85\8bã\81®ç\8f¾å\9c¨ã\81®ã\82·ã\83¼ã\83³ã\82\92ä¿\9då\98ã\81\97ã\80\81ä¸\80覧ã\81«è¿½å\8a </translation>
+ <source>DSC_CLONE_VIEW</source>
+ <translation>ç\8f¾å\9c¨ã\81®ã\82¹ã\83\86ã\83¼ã\82¸ã\81®å\8f¯è¦\96å\8c\96ã\81®æ\96°ã\81\97ã\81\84ã\82¦ã\82£ã\83³ã\83\89ã\82¦ã\82\92é\96\8bã\81\8f</translation>
</message>
<message>
- <source>DSC_FITALL</source>
- <translation>すべてのオブジェクトを表示するには、シーンを Redimentionner</translation>
+ <source>MNU_SHOW_TRIHEDRE</source>
+ <translation>軸の表示/非表示</translation>
</message>
<message>
- <source>MNU_FITALL</source>
- <translation>全体表示</translation>
+ <source>DSC_SHOW_TRIHEDRE</source>
+ <translation>表示/非表示の三面体をシーンに</translation>
</message>
<message>
<source>MNU_ROTATE_VIEW</source>
<translation>回転</translation>
</message>
<message>
- <source>DSC_FRONT_VIEW</source>
- <translation>正面</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINTGRAVITY_VIEW</source>
- <translation>回転点: 重力の中心部</translation>
- </message>
- <message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>グローバルパンニング</translation>
- </message>
- <message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>ビューを保存します。</translation>
- </message>
- <message>
- <source>DSC_CLIPPING</source>
- <translation>クリップ平面を定義します。</translation>
+ <source>DSC_ROTATE_VIEW</source>
+ <translation>ステージの中心の周りを回転します。</translation>
</message>
<message>
- <source>DSC_CLONE_VIEW</source>
- <translation>現在のステージの可視化の新しいウィンドウを開く</translation>
+ <source>MNU_ZOOM_VIEW</source>
+ <translation>ズーム</translation>
</message>
<message>
- <source>INF_APP_SHOOT_VIEW</source>
- <translation>場面を覚えています。</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>ズーム</translation>
</message>
<message>
- <source>MNU_CLIPPING</source>
- <translation>断面</translation>
+ <source>MNU_LEFT_VIEW</source>
+ <translation>左側面</translation>
</message>
<message>
- <source>MNU_BACK_VIEW</source>
- <translation>背面</translation>
+ <source>DSC_LEFT_VIEW</source>
+ <translation>左側のビュー</translation>
</message>
<message>
<source>MNU_SHOOT_VIEW</source>
<translation>ビューの保存</translation>
</message>
<message>
- <source>DSC_CHANGINGROTATIONPOINT_VIEW</source>
- <translation>シーンになってポイントを変更します。</translation>
+ <source>DSC_SHOOT_VIEW</source>
+ <translation>状態の現在のシーンを保存し、一覧に追加</translation>
</message>
<message>
- <source>MNU_BOTTOM_VIEW</source>
- <translation>åº\95é\9d¢</translation>
+ <source>MNU_FITALL</source>
+ <translation>å\85¨ä½\93表示</translation>
</message>
<message>
- <source>MNU_RESET_VIEW</source>
- <translation>表示リセット</translation>
+ <source>DSC_FITALL</source>
+ <translation>すべてのオブジェクトを表示するには、シーンを Redimentionner</translation>
</message>
<message>
- <source>MNU_LEFT_VIEW</source>
- <translation>左側面</translation>
+ <source>MNU_CLIPPING</source>
+ <translation>断面</translation>
</message>
<message>
- <source>DSC_RIGHT_VIEW</source>
- <translation>右側のビュー</translation>
+ <source>DSC_CLIPPING</source>
+ <translation>クリップ平面を定義します。</translation>
</message>
<message>
- <source>DSC_ANTICLOCKWISE_VIEW</source>
- <translation>表示ã\82\92å·¦ã\81«</translation>
+ <source>MNU_BACK_VIEW</source>
+ <translation>è\83\8cé\9d¢</translation>
</message>
<message>
- <source>DSC_CLOCKWISE_VIEW</source>
- <translation>右のビューを回転させる</translation>
+ <source>DSC_BACK_VIEW</source>
+ <translation>背面図</translation>
</message>
<message>
<source>MNU_CHANGINGROTATIONPOINT_VIEW</source>
<translation>回転の基準点を変更</translation>
</message>
<message>
- <source>DSC_FITRECT</source>
- <translation>彼の党をボックスで選択を表示するには、ステージのサイズを変更します。</translation>
+ <source>DSC_CHANGINGROTATIONPOINT_VIEW</source>
+ <translation>シーンになってポイントを変更します。</translation>
</message>
<message>
- <source>MNU_FITRECT</source>
- <translation>表示ã\82¨ã\83ªã\82¢</translation>
+ <source>MNU_BOTTOM_VIEW</source>
+ <translation>åº\95é\9d¢</translation>
</message>
<message>
<source>DSC_BOTTOM_VIEW</source>
<translation>下から表示します。</translation>
</message>
<message>
- <source>DSC_DUMP_VIEW</source>
- <translation>現在のシーンをイメージ ファイルに保存します。</translation>
- </message>
- <message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>ズーム</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINT000_VIEW</source>
- <translation>回転点: (0,0,0)</translation>
- </message>
- <message>
- <source>MNU_ROTATIONPOINTSELECTED_VIEW</source>
- <translation>回転点: ユーザーが選択したポイント</translation>
+ <source>MNU_RESET_VIEW</source>
+ <translation>表示リセット</translation>
</message>
<message>
<source>DSC_RESET_VIEW</source>
<translation>ビューのポイントを復元します。</translation>
</message>
<message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>ファイルを保存できませんでした。</translation>
- </message>
- <message>
- <source>DSC_PRESETS_VIEW</source>
- <translation>状態の復元は、現在のシーンの記憶</translation>
+ <source>MNU_RIGHT_VIEW</source>
+ <translation>右側面</translation>
</message>
<message>
- <source>MNU_PRESETS_VIEW</source>
- <translation>ビューの読み込み</translation>
+ <source>DSC_RIGHT_VIEW</source>
+ <translation>右側のビュー</translation>
</message>
<message>
<source>MNU_ANTICLOCKWISE_VIEW</source>
<translation>左回転</translation>
</message>
<message>
- <source>MNU_CLOCKWISE_VIEW</source>
- <translation>右回転</translation>
- </message>
- <message>
- <source>MNU_RIGHT_VIEW</source>
- <translation>右側面</translation>
- </message>
- <message>
- <source>INF_APP_PRESETS_VIEW</source>
- <translation>ビューの復元</translation>
+ <source>DSC_ANTICLOCKWISE_VIEW</source>
+ <translation>表示を左に</translation>
</message>
<message>
- <source>LBL_XYTOOLBAR_LABEL</source>
- <translation>XY ビューの操作</translation>
+ <source>MNU_CLOCKWISE_VIEW</source>
+ <translation>右回転</translation>
</message>
<message>
- <source>LBL_XZTOOLBAR_LABEL</source>
- <translation>XZ ビューの操作</translation>
+ <source>DSC_CLOCKWISE_VIEW</source>
+ <translation>右のビューを回転させる</translation>
</message>
<message>
- <source>LBL_YZTOOLBAR_LABEL</source>
- <translation>YZ ビューの操作</translation>
+ <source>MNU_FITRECT</source>
+ <translation>表示エリア</translation>
</message>
<message>
- <source>LBL_3DTOOLBAR_LABEL</source>
- <translation>3D ビューの操作</translation>
+ <source>DSC_FITRECT</source>
+ <translation>彼の党をボックスで選択を表示するには、ステージのサイズを変更します。</translation>
</message>
<message>
- <source>DSC_BACK_VIEW</source>
- <translation>背面図</translation>
+ <source>MNU_PRESETS_VIEW</source>
+ <translation>ビューの読み込み</translation>
</message>
<message>
- <source>DSC_SCALING</source>
- <translation>座標のスケールの軸を変更します。</translation>
+ <source>DSC_PRESETS_VIEW</source>
+ <translation>状態の復元は、現在のシーンの記憶</translation>
</message>
<message>
<source>MNU_SCALING</source>
<translation>軸のスケーリング</translation>
</message>
<message>
- <source>DSC_GRADUATED_AXES</source>
- <translation>目盛付軸</translation>
+ <source>DSC_SCALING</source>
+ <translation>座標のスケールの軸を変更します。</translation>
</message>
<message>
<source>MNU_GRADUATED_AXES</source>
<translation>目盛付軸</translation>
</message>
<message>
- <source>DSC_AMBIENT</source>
- <translation>ç\92°å¢\83å\85\89ã\81®ã\81¿ã\81®è¡¨ç¤º</translation>
+ <source>DSC_GRADUATED_AXES</source>
+ <translation>ç\9b®ç\9b\9bä»\98軸</translation>
</message>
<message>
<source>MNU_AMBIENT</source>
<translation>アンビエント ライトを表示します。</translation>
</message>
<message>
- <source>DSC_STYLE_SWITCH</source>
- <translation>ç\9b¸äº\92ä½\9cç\94¨ã\81®ã\82¹ã\82¿ã\82¤ã\83«ã\82\92å¤\89æ\9b´ã\81\97ã\81¾ã\81\99ã\80\82</translation>
+ <source>DSC_AMBIENT</source>
+ <translation>ç\92°å¢\83å\85\89ã\81®ã\81¿ã\81®è¡¨ç¤º</translation>
</message>
<message>
<source>MNU_STYLE_SWITCH</source>
<translation>相互作用のスタイルを変更します。</translation>
</message>
<message>
- <source>DSC_ZOOMING_STYLE_SWITCH</source>
- <translation>ズームのスタイルを変更します。</translation>
+ <source>DSC_STYLE_SWITCH</source>
+ <translation>相互作用のスタイルを変更します。</translation>
</message>
<message>
<source>MNU_ZOOMING_STYLE_SWITCH</source>
<translation>ズームのスタイルを変更します。</translation>
</message>
<message>
- <source>DSC_ENABLE_PRESELECTION</source>
- <translation>予選の有効/無効にします。</translation>
+ <source>DSC_ZOOMING_STYLE_SWITCH</source>
+ <translation>ズームのスタイルを変更します。</translation>
</message>
<message>
<source>MNU_ENABLE_PRESELECTION</source>
<translation>予選の有効/無効にします。</translation>
</message>
<message>
- <source>DSC_ENABLE_SELECTION</source>
- <translation>選択を有効/無効にします。</translation>
+ <source>DSC_ENABLE_PRESELECTION</source>
+ <translation>予選の有効/無効にします。</translation>
</message>
<message>
<source>MNU_ENABLE_SELECTION</source>
<translation>選択を有効/無効にします。</translation>
</message>
<message>
- <source>OCC_IMAGE_FILES</source>
- <translation>イメージファイル (*.bmp *.png *.jpg *.jpeg *.eps *.ps)</translation>
+ <source>DSC_ENABLE_SELECTION</source>
+ <translation>選択を有効/無効にします。</translation>
</message>
<message>
- <source>OCC_TEXTURE_FILES</source>
- <translatorcomment>Update to new supported format (see OCCT Image_AlienPixMap documentation)</translatorcomment>
- <translation>イメージファイル (*.bmp *.gif *.pix *.xwd *.rgb *.rs)</translation>
+ <source>MNU_MAXIMIZE_VIEW</source>
+ <translation>ビューの最大化</translation>
</message>
<message>
<source>DSC_MAXIMIZE_VIEW</source>
<translation>ビューの最大化</translation>
</message>
+ <message>
+ <source>MNU_MINIMIZE_VIEW</source>
+ <translation>ビューの最小化</translation>
+ </message>
<message>
<source>DSC_MINIMIZE_VIEW</source>
<translation>ビューの最小化</translation>
</message>
+ <message>
+ <source>MNU_RETURN_3D_VIEW</source>
+ <translation>3D に戻る</translation>
+ </message>
<message>
<source>DSC_RETURN_3D_VIEW</source>
<translation>3D view に戻る</translation>
</message>
<message>
- <source>MNU_MAXIMIZE_VIEW</source>
- <translation>ã\83\93ã\83¥ã\83¼ã\81®æ\9c\80大å\8c\96</translation>
+ <source>OCC_IMAGE_FILES</source>
+ <translation>ã\82¤ã\83¡ã\83¼ã\82¸ã\83\95ã\82¡ã\82¤ã\83« (*.bmp *.png *.jpg *.jpeg *.eps *.ps)</translation>
</message>
<message>
- <source>MNU_MINIMIZE_VIEW</source>
- <translation>ビューの最小化</translation>
+ <source>LBL_XYTOOLBAR_LABEL</source>
+ <translation>XY ビューの操作</translation>
</message>
<message>
- <source>MNU_RETURN_3D_VIEW</source>
- <translation>3D に戻る</translation>
+ <source>LBL_XZTOOLBAR_LABEL</source>
+ <translation>XZ ビューの操作</translation>
+ </message>
+ <message>
+ <source>LBL_YZTOOLBAR_LABEL</source>
+ <translation>YZ ビューの操作</translation>
+ </message>
+ <message>
+ <source>LBL_3DTOOLBAR_LABEL</source>
+ <translation>3D ビューの操作</translation>
</message>
</context>
<context>
<source>PARAMETERS</source>
<translation>パラメータ</translation>
</message>
+ <message>
+ <source>HELP</source>
+ <translation>ヘルプ(&H)</translation>
+ </message>
</context>
</TS>
QwtPlotCurve::updateLegend( thePlotItem, theLegendData );
- const QVariant itemInfo = thePlotItem->plot()->itemToInfo( const_cast< QwtPlotItem *>( thePlotItem ) );
- QwtLegend* legend = dynamic_cast<QwtLegend*>( thePlotItem->plot()->legend() );
- QWidget* widget = legend->legendWidget( itemInfo );
- QwtLegendLabel* label = dynamic_cast<QwtLegendLabel*>( widget );
- if( Plot2d_QwtLegendLabel* anItem = (Plot2d_QwtLegendLabel*)label ) {
- int aMode = Plot2d_QwtLegendLabel::IM_None;
- if( myYAxisIdentifierEnabled )
- aMode = myYAxis == QwtPlot::yRight ?
- Plot2d_QwtLegendLabel::IM_Right :
- Plot2d_QwtLegendLabel::IM_Left;
- anItem->setYAxisIdentifierMode( aMode );
-
- anItem->setSymbol( legendSymbol() );
- if( Plot2d_Plot2d* plot = dynamic_cast<Plot2d_Plot2d*>( thePlotItem->plot() ) )
- anItem->setSymbolType( plot->getLegendSymbolType() );
- anItem->setPen( legendPen() );
-
- anItem->setSelected( isSelected() );
- anItem->updateHighlit();
- anItem->repaint();
+ const QVariant itemInfo = thePlotItem->plot()->itemToInfo( const_cast< QwtPlotItem *>( thePlotItem ) );
+ if( QwtLegend* legend = dynamic_cast<QwtLegend*>( thePlotItem->plot()->legend() ) ) {
+ if( QWidget* widget = legend->legendWidget( itemInfo ) ) {
+ QwtLegendLabel* label = dynamic_cast<QwtLegendLabel*>( widget );
+ if( Plot2d_QwtLegendLabel* anItem = (Plot2d_QwtLegendLabel*)label ) {
+ int aMode = Plot2d_QwtLegendLabel::IM_None;
+ if( myYAxisIdentifierEnabled )
+ aMode = myYAxis == QwtPlot::yRight ?
+ Plot2d_QwtLegendLabel::IM_Right :
+ Plot2d_QwtLegendLabel::IM_Left;
+ anItem->setYAxisIdentifierMode( aMode );
+
+ anItem->setSymbol( legendSymbol() );
+ if( Plot2d_Plot2d* plot = dynamic_cast<Plot2d_Plot2d*>( thePlotItem->plot() ) )
+ anItem->setSymbolType( plot->getLegendSymbolType() );
+ anItem->setPen( legendPen() );
+
+ anItem->setSelected( isSelected() );
+ anItem->updateHighlit();
+ anItem->repaint();
+ }
+ }
}
}
aPCurve->setSamples( X, Y, nbPoint);
aPCurve->setPen( QPen( lineColor, lineWidth, lineKind));
- QwtSymbol* aSymbol;
+ QwtSymbol* aSymbol = new QwtSymbol();
aSymbol->setStyle( markerKind );
aPCurve->setSymbol( aSymbol );
// non-positive X/Y coordinate
if ( mode && !isXLogEnabled() ){
#ifndef NO_SUIT
- SUIT_MessageBox::warning(this, tr("WARNING"), tr("WRN_XLOG_NOT_ALLOWED"));
+ SUIT_MessageBox::warning(this, tr("WRN_WARNING"), tr("WRN_XLOG_NOT_ALLOWED"));
#else
- QMessageBox::warning(this, tr("WARNING"), tr("WRN_XLOG_NOT_ALLOWED"));
+ QMessageBox::warning(this, tr("WRN_WARNING"), tr("WRN_XLOG_NOT_ALLOWED"));
#endif
return;
}
// non-positive X/Y coordinate
if ( mode && !isYLogEnabled() ){
#ifndef NO_SUIT
- SUIT_MessageBox::warning(this, tr("WARNING"), tr("WRN_YLOG_NOT_ALLOWED"));
+ SUIT_MessageBox::warning(this, tr("WRN_WARNING"), tr("WRN_YLOG_NOT_ALLOWED"));
#else
- QMessageBox::warning(this, tr("WARNING"), tr("WRN_YLOG_NOT_ALLOWED"));
+ QMessageBox::warning(this, tr("WRN_WARNING"), tr("WRN_YLOG_NOT_ALLOWED"));
#endif
return;
}
void Plot2d_ViewWindow::createToolBar()
{
QtxActionToolMgr* mgr = toolMgr();
- myToolBar = mgr->createToolBar( tr( "LBL_TOOLBAR_LABEL" ), false );
+ myToolBar = mgr->createToolBar( tr( "LBL_TOOLBAR_LABEL" ), // title (language-dependant)
+ QString( "Plot2dViewOperations" ), // name (language-independant)
+ false ); // disable floatable toolbar
mgr->append( DumpId, myToolBar );
mgr->append( ScaleOpId, myToolBar );
mgr->append( MoveOpId, myToolBar );
<context>
<name>@default</name>
<message>
- <source>PLOT2D_CURVE_TYPE_LBL</source>
- <translation>Curve type:</translation>
+ <source>DASHDOT_LINE_LBL</source>
+ <translation>DashDot</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>Error</translation>
+ <source>DASH_LINE_LBL</source>
+ <translation>Dash</translation>
</message>
<message>
- <source>PLOT2D_SET_AS_DEFAULT_CHECK</source>
- <translation>Save settings as default</translation>
+ <source>SOLID_LINE_LBL</source>
+ <translation>Solid</translation>
</message>
<message>
- <source>TLT_SETUP_CURVE</source>
- <translation>Setup Curve</translation>
+ <source>DOT_LINE_LBL</source>
+ <translation>Dot</translation>
</message>
<message>
- <source>MNU_DUMP_VIEW</source>
- <translation>Dump view...</translation>
+ <source>DAHSDOTDOT_LINE_LBL</source>
+ <translation>DashDotDot</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_HOR</source>
- <translation>Horizontal axis:</translation>
+ <source>NONE_LINE_LBL</source>
+ <translation>None</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_TLT</source>
- <translation>Normalization</translation>
+ <source>DTRIANGLE_MARKER_LBL</source>
+ <translation>Downward triangle</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_MODE_MIN</source>
- <translation>Normalize to minimum</translation>
+ <source>UTRIANGLE_MARKER_LBL</source>
+ <translation>Upward triangle</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_MODE_MAX</source>
- <translation>Normalize to maximum</translation>
+ <source>LTRIANGLE_MARKER_LBL</source>
+ <translation>Leftward triangle</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_LEFT_AXIS</source>
- <translation>Left Y Axis: </translation>
+ <source>RTRIANGLE_MARKER_LBL</source>
+ <translation>Rightward triangle</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_RIGHT_AXIS</source>
- <translation>Right Y Axis: </translation>
+ <source>RECTANGLE_MARKER_LBL</source>
+ <translation>Rectangle</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_VER</source>
- <translation>Vertical axis:</translation>
+ <source>CROSS_MARKER_LBL</source>
+ <translation>Cross</translation>
</message>
<message>
- <source>MNU_PAN_VIEW</source>
- <translation>Panning</translation>
+ <source>XCROSS_MARKER_LBL</source>
+ <translation>Diagonal cross</translation>
</message>
<message>
- <source>MNU_CLONE_VIEW</source>
- <translation>Clone View</translation>
+ <source>DIAMOND_MARKER_LBL</source>
+ <translation>Diamond</translation>
</message>
<message>
- <source>MNU_PRINT_VIEW</source>
- <translation>Print View</translation>
+ <source>CIRCLE_MARKER_LBL</source>
+ <translation>Circle</translation>
</message>
<message>
- <source>POSTSCRIPT_FILES</source>
- <translation>PostScript files (*.ps)</translation>
+ <source>NONE_MARKER_LBL</source>
+ <translation>None</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_FitDataDlg</name>
<message>
- <source>ENCAPSULATED_POSTSCRIPT_FILES</source>
- <translation>Encapsulated PostScript files (*.eps)</translation>
+ <source>FIT_DATA_TLT</source>
+ <translation>Fit Data Range</translation>
</message>
<message>
- <source>PDF_FILES</source>
- <translation>PDF files (*.pdf)</translation>
+ <source>FIT_HORIZONTAL</source>
+ <translation>Fit horizontally</translation>
</message>
<message>
- <source>DSC_GLOBALPAN_VIEW</source>
- <translation>Selection of a new center of the view</translation>
+ <source>MIN_VALUE_LAB</source>
+ <translation>Min:</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LINEAR_VER</source>
- <translation>Switches view to linear scaling mode along vertical axis</translation>
+ <source>VERTICAL_AXIS</source>
+ <translation>Vertical axis</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>Switches view to linear scaling mode along horizontal axis</translation>
+ <source>MAX_VALUE_LAB</source>
+ <translation>Max:</translation>
</message>
<message>
- <source>CURVE_LINE_WIDTH_LAB</source>
- <translation>Line width:</translation>
+ <source>HORIZONTAL_AXIS</source>
+ <translation>Horizontal axis</translation>
</message>
<message>
- <source>CURVE_TYPE_POPUP</source>
- <translation>Curve type</translation>
+ <source>VERTICAL_LEFT_AXIS</source>
+ <translation>Vertical left axis</translation>
</message>
<message>
- <source>NORMALIZATION_TYPE_POPUP</source>
- <translation>Normalization</translation>
+ <source>FIT_ALL</source>
+ <translation>Fit both</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LINEAR_VER</source>
- <translation>Vertical axis: linear</translation>
+ <source>VERTICAL_RIGHT_AXIS</source>
+ <translation>Vertical right axis</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>Horizontal axis: linear</translation>
+ <source>FIT_VERTICAL</source>
+ <translation>Fit vertically</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_ViewManager</name>
<message>
- <source>FIT_DATA_TLT</source>
- <translation>Fit Data Range</translation>
+ <source>PLOT2D_VIEW_TITLE</source>
+ <translation>Plot2d scene:%M - viewer:%V</translation>
</message>
<message>
- <source>MNU_ZOOM_VIEW</source>
- <translation>Zoom</translation>
+ <source>PREF_GROUP_PLOT2DVIEWER</source>
+ <translation>Plot2d Viewer</translation>
</message>
<message>
- <source>PLOT2D_GRID_TLT</source>
- <translation>Grid / Axes marks</translation>
+ <source>PREF_SHOW_LEGEND</source>
+ <translation>Show legend</translation>
</message>
<message>
- <source>DSC_PAN_VIEW</source>
- <translation>Panning the view</translation>
+ <source>PREF_LEGEND_POSITION</source>
+ <translation>Legend position:</translation>
</message>
<message>
- <source>DASHDOT_LINE_LBL</source>
- <translation>DashDot</translation>
+ <source>PREF_LEFT</source>
+ <translation>Left</translation>
</message>
<message>
- <source>PRP_PLOT2D_CURVES_SPLINES</source>
- <translation>Switches view to splines mode</translation>
+ <source>PREF_RIGHT</source>
+ <translation>Right</translation>
</message>
<message>
- <source>INF_AXES_X</source>
- <translation>Axis X</translation>
+ <source>PREF_TOP</source>
+ <translation>Top</translation>
</message>
<message>
- <source>PLOT2D_SCALE_TLT</source>
- <translation>Scale mode</translation>
+ <source>PREF_BOTTOM</source>
+ <translation>Bottom</translation>
</message>
<message>
- <source>DSC_FITALL</source>
- <translation>Fit all objects inside the view frame</translation>
+ <source>PREF_CURVE_TYPE</source>
+ <translation>Curve type:</translation>
</message>
<message>
- <source>MNU_FITALL</source>
- <translation>Fit All</translation>
+ <source>PREF_POINTS</source>
+ <translation>Points</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>Horizontal axis: logarithmic</translation>
+ <source>PREF_LINES</source>
+ <translation>Lines</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>Vertical axis: logarithmic</translation>
+ <source>PREF_SPLINE</source>
+ <translation>Spline</translation>
</message>
<message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>Global Panning</translation>
+ <source>PREF_MARKER_SIZE</source>
+ <translation>Marker size:</translation>
</message>
<message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>Dump view</translation>
+ <source>PREF_LINEAR</source>
+ <translation>Linear</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION_BOTTOM</source>
- <translation>Bottom</translation>
+ <source>PREF_LOGARITHMIC</source>
+ <translation>Logarithmic</translation>
</message>
<message>
- <source>INF_COORDINATES</source>
- <translation>Coordinates: X : %1, Y : %2</translation>
+ <source>PREF_HOR_AXIS_SCALE</source>
+ <translation>Horizontal axis scale:</translation>
</message>
<message>
- <source>DSC_CLONE_VIEW</source>
- <translation>Create new OCC viewer for the active scene</translation>
+ <source>PREF_VERT_AXIS_SCALE</source>
+ <translation>Vertical axis scale:</translation>
</message>
<message>
- <source>DSC_PRINT_VIEW</source>
- <translation>Print active view</translation>
+ <source>PREF_VIEWER_BACKGROUND</source>
+ <translation>Background color</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_AnalyticalCurveDlg</name>
<message>
- <source>DASH_LINE_LBL</source>
- <translation>Dash</translation>
+ <source>ANALYTICAL_CURVE_TLT</source>
+ <translation>Analytical curves properties</translation>
</message>
<message>
- <source>DTRIANGLE_MARKER_LBL</source>
- <translation>Downward triangle</translation>
- </message>
+ <source>AC_CURVE_PARAMS</source>
+ <translation>Curve parameters</translation>
+ </message>
<message>
- <source>UTRIANGLE_MARKER_LBL</source>
- <translation>Upward triangle</translation>
- </message>
+ <source>AC_CURVE_PROPS</source>
+ <translation>Curve properties</translation>
+ </message>
<message>
- <source>LTRIANGLE_MARKER_LBL</source>
- <translation>Leftward triangle</translation>
- </message>
+ <source>AC_FORMULA</source>
+ <translation>y(x) = </translation>
+ </message>
<message>
- <source>RTRIANGLE_MARKER_LBL</source>
- <translation>Rightward triangle</translation>
+ <source>AC_NB_INTERVALS</source>
+ <translation>Nb. intervals</translation>
</message>
<message>
- <source>RECTANGLE_MARKER_LBL</source>
- <translation>Rectangle</translation>
+ <source>AC_AUTO_ASSIGN</source>
+ <translation>Auto assign</translation>
</message>
<message>
- <source>TLT_SETUP_PLOT2D_VIEW</source>
- <translation>Plot 2d View Settings</translation>
+ <source>AC_MARKER_TYPE</source>
+ <translation>Marker type</translation>
</message>
<message>
- <source>CURVE_LINE_TYPE_LAB</source>
- <translation>Line type:</translation>
+ <source>AC_LINE_TYPE</source>
+ <translation>Line type</translation>
</message>
<message>
- <source>CROSS_MARKER_LBL</source>
- <translation>Cross</translation>
+ <source>AC_LINE_WIDTH</source>
+ <translation>Line Width</translation>
</message>
<message>
- <source>XCROSS_MARKER_LBL</source>
- <translation>Diagonal cross</translation>
+ <source>AC_CURVE_COLOR</source>
+ <translation>Curve color</translation>
</message>
<message>
- <source>PLOT2D_ENABLE_VER_TITLE</source>
- <translation>Vertical axis title</translation>
- </message>
+ <source>AC_ADD_BTN</source>
+ <translation>Add curve</translation>
+ </message>
<message>
- <source>PLOT2D_ENABLE_HOR_TITLE</source>
- <translation>Horizontal axis title</translation>
+ <source>AC_REM_BTN</source>
+ <translation>Remove curve</translation>
+ </message>
+ <message>
+ <source>AC_OK_BTN</source>
+ <translation>Ok</translation>
+ </message>
+ <message>
+ <source>AC_APPLY_BTN</source>
+ <translation>Apply</translation>
+ </message>
+ <message>
+ <source>AC_CANT_CALCULATE</source>
+ <translation>Can't calculate curve.
+Please, check input parameters!!!</translation>
</message>
<message>
- <source>TOT_PLOT2D_SETTINGS</source>
- <translation>Settings</translation>
+ <source>AC_CLOSE_BTN</source>
+ <translation>&Close</translation>
</message>
<message>
- <source>TOT_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>Analytical curves</translation>
- </message>
+ <source>AC_HELP_BTN</source>
+ <translation>Help</translation>
+ </message>
+</context>
+<context>
+ <name>Plot2d_SetupCurveScaleDlg</name>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>Left Y Axis: Normalize to global maximum</translation>
- </message>
+ <source>TLT_SETUP_CURVE_SCALE</source>
+ <translation>Curve(s) scale</translation>
+ </message>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>Left Y Axis: Normalize to global minimum</translation>
- </message>
+ <source>CURVE_SCALE_FACTOR</source>
+ <translation>Scale factor</translation>
+ </message>
+</context>
+<context>
+ <name>Plot2d_SetupViewDlg</name>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>Right Y Axis: Normalize to global maximum</translation>
- </message>
+ <source>PLOT2D_CURVE_TYPE_LBL</source>
+ <translation>Curve type:</translation>
+ </message>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>Right Y Axis: Normalize to global minimum</translation>
- </message>
+ <source>PLOT2D_SET_AS_DEFAULT_CHECK</source>
+ <translation>Save settings as default</translation>
+ </message>
<message>
- <source>PLOT2D_CURVE_TYPE_LINES</source>
- <translation>Lines</translation>
+ <source>PLOT2D_SCALE_MODE_HOR</source>
+ <translation>Horizontal axis:</translation>
</message>
<message>
- <source>MEN_PLOT2D_CURVES_SPLINES</source>
- <translation>Draw Splines</translation>
+ <source>PLOT2D_NORMALIZE_TLT</source>
+ <translation>Normalization</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>Switches view to logarithmic scaling mode along horizontal axis</translation>
+ <source>PLOT2D_NORMALIZE_MODE_MIN</source>
+ <translation>Normalize to minimum</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>Switches view to logarithmic scaling mode along vertical axis</translation>
+ <source>PLOT2D_NORMALIZE_MODE_MAX</source>
+ <translation>Normalize to maximum</translation>
</message>
<message>
- <source>PLOT2D_IMAGE_FILES</source>
- <translation>Images Files (*.bmp *.png *.jpg *.jpeg)</translation>
+ <source>PLOT2D_NORMALIZE_LEFT_AXIS</source>
+ <translation>Left Y Axis: </translation>
</message>
<message>
- <source>PLOT2D_MAX_INTERVALS</source>
- <translation>Max intervals</translation>
+ <source>PLOT2D_NORMALIZE_RIGHT_AXIS</source>
+ <translation>Right Y Axis: </translation>
</message>
<message>
- <source>INF_AXES_Y_LEFT</source>
- <translation>Axis Y Left</translation>
+ <source>PLOT2D_SCALE_MODE_VER</source>
+ <translation>Vertical axis:</translation>
</message>
<message>
- <source>CURVE_COLOR_LAB</source>
- <translation>Color:</translation>
+ <source>PLOT2D_GRID_TLT</source>
+ <translation>Grid / Axes marks</translation>
</message>
<message>
- <source>CURVE_PREVIEW_LAB</source>
- <translation>Preview:</translation>
+ <source>INF_AXES_X</source>
+ <translation>Axis X</translation>
</message>
<message>
- <source>DIAMOND_MARKER_LBL</source>
- <translation>Diamond</translation>
+ <source>PLOT2D_SCALE_TLT</source>
+ <translation>Scale mode</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION_TOP</source>
- <translation>Top</translation>
+ <source>PLOT2D_LEGEND_POSITION_BOTTOM</source>
+ <translation>Bottom</translation>
</message>
<message>
- <source>TOT_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>Change background</translation>
+ <source>TLT_SETUP_PLOT2D_VIEW</source>
+ <translation>Plot 2d View Settings</translation>
</message>
<message>
- <source>MEN_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>Change Background...</translation>
+ <source>PLOT2D_ENABLE_VER_TITLE</source>
+ <translation>Vertical axis title</translation>
</message>
<message>
- <source>PRP_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>Change background color</translation>
+ <source>PLOT2D_ENABLE_HOR_TITLE</source>
+ <translation>Horizontal axis title</translation>
</message>
<message>
- <source>SOLID_LINE_LBL</source>
- <translation>Solid</translation>
+ <source>PLOT2D_CURVE_TYPE_LINES</source>
+ <translation>Lines</translation>
+ </message>
+ <message>
+ <source>PLOT2D_MAX_INTERVALS</source>
+ <translation>Max intervals</translation>
+ </message>
+ <message>
+ <source>INF_AXES_Y_LEFT</source>
+ <translation>Axis Y Left</translation>
+ </message>
+ <message>
+ <source>PLOT2D_LEGEND_POSITION_TOP</source>
+ <translation>Top</translation>
</message>
<message>
<source>PLOT2D_GRID_ENABLE_VER_MAJOR</source>
<source>PLOT2D_GRID_ENABLE_VER_MINOR</source>
<translation>Vertical minor</translation>
</message>
- <message>
- <source>TOT_PLOT2D_CURVES_POINTS</source>
- <translation>Draw points</translation>
- </message>
<message>
<source>PLOT2D_GRID_ENABLE_HOR_MINOR</source>
<translation>Horizontal minor</translation>
<source>PLOT2D_DEVIATION_CL_LBL</source>
<translation>Color</translation>
</message>
- <message>
- <source>WRN_XLOG_NOT_ALLOWED</source>
- <translation>Some points with non-positive abscissa values have been detected.
-Logarithmic scale for abscissa axis is not allowed.</translation>
- </message>
- <message>
- <source>WRN_YLOG_NOT_ALLOWED</source>
- <translation>Some points with non-positive ordinate values have been detected.
-Logarithmic scale for ordinate axis is not allowed.</translation>
- </message>
- <message>
- <source>DSC_FITRECT</source>
- <translation>Fit area within the view frame</translation>
- </message>
<message>
<source>PLOT2D_LEGEND_POSITION_LEFT</source>
<translation>Left</translation>
</message>
- <message>
- <source>MNU_FITRECT</source>
- <translation>Fit Area</translation>
- </message>
- <message>
- <source>DOT_LINE_LBL</source>
- <translation>Dot</translation>
- </message>
- <message>
- <source>MEN_PLOT2D_CURVES_POINTS</source>
- <translation>Draw Points</translation>
- </message>
- <message>
- <source>PRP_PLOT2D_CURVES_POINTS</source>
- <translation>Switches view to points mode</translation>
- </message>
<message>
<source>PLOT2D_SCALE_MODE_LOGARITHMIC</source>
<translation>Logarithmic</translation>
<source>PLOT2D_LEGEND_POSITION_RIGHT</source>
<translation>Right</translation>
</message>
- <message>
- <source>DSC_DUMP_VIEW</source>
- <translation>Saves the active view in the image file</translation>
- </message>
- <message>
- <source>WARNING</source>
- <translation>Warning</translation>
- </message>
<message>
<source>PLOT2D_ENABLE_LEGEND</source>
<translation>Show legend</translation>
<translation>Legend font</translation>
</message>
<message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>Zoom the view</translation>
+ <source>PLOT2D_SCALE_MODE_LINEAR</source>
+ <translation>Linear</translation>
</message>
<message>
- <source>PRP_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>Setups analytical curves properties</translation>
+ <source>PLOT2D_CURVE_TYPE_POINTS</source>
+ <translation>Points</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>Switches view to maximum normalization mode by left Y axis</translation>
+ <source>PLOT2D_CURVE_TYPE_SPLINE</source>
+ <translation>Spline</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>Switches view to minimum normalization mode by left Y axis</translation>
+ <source>INF_AXES_Y_RIGHT</source>
+ <translation>Axis Y Right</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>Switches view to maximum normalization mode by right Y axis</translation>
+ <source>PLOT2D_MARKER_SIZE_LBL</source>
+ <translation>Marker size:</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>Switches view to minimum normalization mode by right Y axis</translation>
+ <source>PLOT2D_ENABLE_MAIN_TITLE</source>
+ <translation>Main title</translation>
</message>
<message>
- <source>PRP_PLOT2D_SETTINGS</source>
- <translation>Setups view properties</translation>
- </message>
- <message>
- <source>INF_COORDINATES_SOME_Y</source>
- <translation>Coordinates: X : %1, Y : %2 ( %3 )</translation>
+ <source>PLOT2D_LEGEND_GROUP</source>
+ <translation>Legend</translation>
</message>
<message>
- <source>SCALING_POPUP</source>
- <translation>Scaling</translation>
+ <source>PLOT2D_LEGEND_POSITION</source>
+ <translation>Legend position:</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_LINEAR</source>
- <translation>Linear</translation>
+ <source>PLOT2D_LEGEND_SYMBOL_TYPE</source>
+ <translation>Symbol type:</translation>
</message>
<message>
- <source>TOT_PLOT2D_FITDATA</source>
- <translation>Fit range</translation>
+ <source>PLOT2D_MARKER_ABOVE_LINE</source>
+ <translation>Marker above line</translation>
</message>
<message>
- <source>PLOT2D_CURVE_TYPE_POINTS</source>
- <translation>Points</translation>
+ <source>PLOT2D_MARKER_ON_LINE</source>
+ <translation>Marker on line</translation>
</message>
<message>
- <source>PLOT2D_CURVE_TYPE_SPLINE</source>
- <translation>Spline</translation>
+ <source>PLOT2D_LEGEND_FONT_COLOR</source>
+ <translation>Legend font color:</translation>
</message>
<message>
- <source>MEN_PLOT2D_FITDATA</source>
- <translation>Fit &Range</translation>
- </message>
+ <source>PLOT2D_SELECTED_LEGEND_FONT_COLOR</source>
+ <translation>Highlighted legend font color:</translation>
+ </message>
+</context>
+<context>
+ <name>Plot2d_SetupCurveDlg</name>
<message>
- <source>MEN_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>Horizontal Axis: Logarithmic</translation>
+ <source>TLT_SETUP_CURVE</source>
+ <translation>Setup Curve</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>Vertical Axis: Logarithmic</translation>
+ <source>CURVE_LINE_WIDTH_LAB</source>
+ <translation>Line width:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>Left Y Axis: Minimum</translation>
+ <source>CURVE_LINE_TYPE_LAB</source>
+ <translation>Line type:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>Left Y Axis: Maximum</translation>
+ <source>CURVE_COLOR_LAB</source>
+ <translation>Color:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>Right Y Axis: Minimum</translation>
+ <source>CURVE_PREVIEW_LAB</source>
+ <translation>Preview:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>Right Y Axis: Maximum</translation>
+ <source>CURVE_MARKER_TYPE_LAB</source>
+ <translation>Marker type:</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_ViewWindow</name>
<message>
- <source>PRP_PLOT2D_FITDATA</source>
- <translation>Fits view to the given data range</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>Dump view...</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LINEAR_VER</source>
- <translation>Vertical Axis: Linear</translation>
+ <source>MNU_PAN_VIEW</source>
+ <translation>Panning</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>Horizontal Axis: Linear</translation>
+ <source>MNU_CLONE_VIEW</source>
+ <translation>Clone View</translation>
</message>
<message>
- <source>NONE_MARKER_LBL</source>
- <translation>None</translation>
+ <source>MNU_PRINT_VIEW</source>
+ <translation>Print View</translation>
</message>
<message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>Cannot save file</translation>
+ <source>POSTSCRIPT_FILES</source>
+ <translation>PostScript files (*.ps)</translation>
</message>
<message>
- <source>MEN_PLOT2D_SHOW_LEGEND</source>
- <translation>Show &Legend</translation>
+ <source>ENCAPSULATED_POSTSCRIPT_FILES</source>
+ <translation>Encapsulated PostScript files (*.eps)</translation>
</message>
<message>
- <source>PRP_PLOT2D_SHOW_LEGEND</source>
- <translation>Enables/disables legend</translation>
+ <source>PDF_FILES</source>
+ <translation>PDF files (*.pdf)</translation>
</message>
<message>
- <source>TOT_PLOT2D_SHOW_LEGEND</source>
- <translation>Show Legend</translation>
+ <source>DSC_GLOBALPAN_VIEW</source>
+ <translation>Selection of a new center of the view</translation>
</message>
<message>
- <source>INF_AXES_Y_RIGHT</source>
- <translation>Axis Y Right</translation>
+ <source>PRP_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>Switches view to linear scaling mode along vertical axis</translation>
</message>
<message>
- <source>DAHSDOTDOT_LINE_LBL</source>
- <translation>DashDotDot</translation>
+ <source>PRP_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>Switches view to linear scaling mode along horizontal axis</translation>
</message>
<message>
- <source>TOT_PLOT2D_CURVES_SPLINES</source>
- <translation>Draw splines</translation>
+ <source>CURVE_TYPE_POPUP</source>
+ <translation>Curve type</translation>
</message>
<message>
- <source>CURVE_MARKER_TYPE_LAB</source>
- <translation>Marker type:</translation>
+ <source>NORMALIZATION_TYPE_POPUP</source>
+ <translation>Normalization</translation>
</message>
<message>
- <source>MEN_PLOT2D_SETTINGS</source>
- <translation>&Settings</translation>
+ <source>TOT_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>Vertical axis: linear</translation>
</message>
<message>
- <source>MEN_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>Analytical curves</translation>
+ <source>TOT_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>Horizontal axis: linear</translation>
</message>
<message>
- <source>CIRCLE_MARKER_LBL</source>
- <translation>Circle</translation>
+ <source>MNU_ZOOM_VIEW</source>
+ <translation>Zoom</translation>
</message>
<message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>View Operations</translation>
+ <source>DSC_PAN_VIEW</source>
+ <translation>Panning the view</translation>
</message>
<message>
- <source>NONE_LINE_LBL</source>
- <translation>None</translation>
+ <source>PRP_PLOT2D_CURVES_SPLINES</source>
+ <translation>Switches view to splines mode</translation>
</message>
<message>
- <source>PLOT2D_MARKER_SIZE_LBL</source>
- <translation>Marker size:</translation>
+ <source>DSC_FITALL</source>
+ <translation>Fit all objects inside the view frame</translation>
</message>
<message>
- <source>PLOT2D_ENABLE_MAIN_TITLE</source>
- <translation>Main title</translation>
+ <source>MNU_FITALL</source>
+ <translation>Fit All</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_GROUP</source>
- <translation>Legend</translation>
+ <source>TOT_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>Horizontal axis: logarithmic</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION</source>
- <translation>Legend position:</translation>
+ <source>TOT_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>Vertical axis: logarithmic</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_SYMBOL_TYPE</source>
- <translation>Symbol type:</translation>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>Global Panning</translation>
</message>
<message>
- <source>PLOT2D_MARKER_ABOVE_LINE</source>
- <translation>Marker above line</translation>
+ <source>DSC_CLONE_VIEW</source>
+ <translation>Create new OCC viewer for the active scene</translation>
</message>
<message>
- <source>PLOT2D_MARKER_ON_LINE</source>
- <translation>Marker on line</translation>
+ <source>DSC_PRINT_VIEW</source>
+ <translation>Print active view</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_FONT_COLOR</source>
- <translation>Legend font color:</translation>
+ <source>TOT_PLOT2D_SETTINGS</source>
+ <translation>Settings</translation>
</message>
<message>
- <source>PLOT2D_SELECTED_LEGEND_FONT_COLOR</source>
- <translation>Highlighted legend font color:</translation>
- </message>
+ <source>TOT_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>Analytical curves</translation>
+ </message>
<message>
- <source>TOT_PLOT2D_CURVES_LINES</source>
- <translation>Draw lines</translation>
- </message>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>Left Y Axis: Normalize to global maximum</translation>
+ </message>
<message>
- <source>PRP_PLOT2D_CURVES_LINES</source>
- <translation>Switches view to lines mode</translation>
- </message>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>Left Y Axis: Normalize to global minimum</translation>
+ </message>
<message>
- <source>MEN_PLOT2D_CURVES_LINES</source>
- <translation>Draw Lines</translation>
- </message>
-</context>
-<context>
- <name>Plot2d_FitDataDlg</name>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>Right Y Axis: Normalize to global maximum</translation>
+ </message>
<message>
- <source>FIT_HORIZONTAL</source>
- <translation>Fit horizontally</translation>
- </message>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>Right Y Axis: Normalize to global minimum</translation>
+ </message>
<message>
- <source>MIN_VALUE_LAB</source>
- <translation>Min:</translation>
+ <source>MEN_PLOT2D_CURVES_SPLINES</source>
+ <translation>Draw Splines</translation>
</message>
<message>
- <source>VERTICAL_AXIS</source>
- <translation>Vertical axis</translation>
+ <source>PRP_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>Switches view to logarithmic scaling mode along horizontal axis</translation>
</message>
<message>
- <source>MAX_VALUE_LAB</source>
- <translation>Max:</translation>
+ <source>PRP_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>Switches view to logarithmic scaling mode along vertical axis</translation>
</message>
<message>
- <source>HORIZONTAL_AXIS</source>
- <translation>Horizontal axis</translation>
+ <source>TOT_PLOT2D_CURVES_POINTS</source>
+ <translation>Draw points</translation>
</message>
<message>
- <source>VERTICAL_LEFT_AXIS</source>
- <translation>Vertical left axis</translation>
+ <source>DSC_FITRECT</source>
+ <translation>Fit area within the view frame</translation>
</message>
<message>
- <source>FIT_ALL</source>
- <translation>Fit both</translation>
+ <source>MNU_FITRECT</source>
+ <translation>Fit Area</translation>
</message>
<message>
- <source>VERTICAL_RIGHT_AXIS</source>
- <translation>Vertical right axis</translation>
+ <source>MEN_PLOT2D_CURVES_POINTS</source>
+ <translation>Draw Points</translation>
</message>
<message>
- <source>FIT_VERTICAL</source>
- <translation>Fit vertically</translation>
+ <source>PRP_PLOT2D_CURVES_POINTS</source>
+ <translation>Switches view to points mode</translation>
</message>
-</context>
-<context>
- <name>Plot2d_ViewManager</name>
<message>
- <source>PLOT2D_VIEW_TITLE</source>
- <translation>Plot2d scene:%M - viewer:%V</translation>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>Saves the active view in the image file</translation>
</message>
<message>
- <source>PREF_GROUP_PLOT2DVIEWER</source>
- <translation>Plot2d Viewer</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>Zoom the view</translation>
</message>
<message>
- <source>PREF_SHOW_LEGEND</source>
- <translation>Show legend</translation>
+ <source>PRP_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>Setups analytical curves properties</translation>
</message>
<message>
- <source>PREF_LEGEND_POSITION</source>
- <translation>Legend position:</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>Switches view to maximum normalization mode by left Y axis</translation>
</message>
<message>
- <source>PREF_LEFT</source>
- <translation>Left</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>Switches view to minimum normalization mode by left Y axis</translation>
</message>
<message>
- <source>PREF_RIGHT</source>
- <translation>Right</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>Switches view to maximum normalization mode by right Y axis</translation>
</message>
<message>
- <source>PREF_TOP</source>
- <translation>Top</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>Switches view to minimum normalization mode by right Y axis</translation>
</message>
<message>
- <source>PREF_BOTTOM</source>
- <translation>Bottom</translation>
- </message>
+ <source>PRP_PLOT2D_SETTINGS</source>
+ <translation>Setups view properties</translation>
+ </message>
<message>
- <source>PREF_CURVE_TYPE</source>
- <translation>Curve type:</translation>
+ <source>SCALING_POPUP</source>
+ <translation>Scaling</translation>
</message>
<message>
- <source>PREF_POINTS</source>
- <translation>Points</translation>
+ <source>TOT_PLOT2D_FITDATA</source>
+ <translation>Fit range</translation>
</message>
<message>
- <source>PREF_LINES</source>
- <translation>Lines</translation>
+ <source>MEN_PLOT2D_FITDATA</source>
+ <translation>Fit &Range</translation>
</message>
<message>
- <source>PREF_SPLINE</source>
- <translation>Spline</translation>
+ <source>PRP_PLOT2D_FITDATA</source>
+ <translation>Fits view to the given data range</translation>
</message>
<message>
- <source>PREF_MARKER_SIZE</source>
- <translation>Marker size:</translation>
+ <source>MEN_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>Horizontal Axis: Logarithmic</translation>
</message>
<message>
- <source>PREF_LINEAR</source>
- <translation>Linear</translation>
+ <source>MEN_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>Vertical Axis: Logarithmic</translation>
</message>
<message>
- <source>PREF_LOGARITHMIC</source>
- <translation>Logarithmic</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>Left Y Axis: Minimum</translation>
</message>
<message>
- <source>PREF_HOR_AXIS_SCALE</source>
- <translation>Horizontal axis scale:</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>Left Y Axis: Maximum</translation>
</message>
<message>
- <source>PREF_VERT_AXIS_SCALE</source>
- <translation>Vertical axis scale:</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>Right Y Axis: Minimum</translation>
</message>
<message>
- <source>PREF_VIEWER_BACKGROUND</source>
- <translation>Background color</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>Right Y Axis: Maximum</translation>
</message>
-</context>
-<context>
- <name>Plot2d_AnalyticalCurveDlg</name>
<message>
- <source>ANALYTICAL_CURVE_TLT</source>
- <translation>Analytical curves properties</translation>
+ <source>MEN_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>Vertical Axis: Linear</translation>
</message>
<message>
- <source>AC_CURVE_PARAMS</source>
- <translation>Curve parameters</translation>
- </message>
- <message>
- <source>AC_CURVE_PROPS</source>
- <translation>Curve properties</translation>
- </message>
- <message>
- <source>AC_FORMULA</source>
- <translation>y(x) = </translation>
- </message>
- <message>
- <source>AC_NB_INTERVALS</source>
- <translation>Nb. intervals</translation>
+ <source>MEN_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>Horizontal Axis: Linear</translation>
</message>
<message>
- <source>AC_AUTO_ASSIGN</source>
- <translation>Auto assign</translation>
+ <source>MEN_PLOT2D_SHOW_LEGEND</source>
+ <translation>Show &Legend</translation>
</message>
<message>
- <source>AC_MARKER_TYPE</source>
- <translation>Marker type</translation>
+ <source>PRP_PLOT2D_SHOW_LEGEND</source>
+ <translation>Enables/disables legend</translation>
</message>
<message>
- <source>AC_LINE_TYPE</source>
- <translation>Line type</translation>
+ <source>TOT_PLOT2D_SHOW_LEGEND</source>
+ <translation>Show Legend</translation>
</message>
<message>
- <source>AC_LINE_WIDTH</source>
- <translation>Line Width</translation>
+ <source>TOT_PLOT2D_CURVES_SPLINES</source>
+ <translation>Draw splines</translation>
</message>
<message>
- <source>AC_CURVE_COLOR</source>
- <translation>Curve color</translation>
+ <source>MEN_PLOT2D_SETTINGS</source>
+ <translation>&Settings</translation>
</message>
<message>
- <source>AC_ADD_BTN</source>
- <translation>Add curve</translation>
- </message>
+ <source>MEN_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>Analytical curves</translation>
+ </message>
<message>
- <source>AC_REM_BTN</source>
- <translation>Remove curve</translation>
- </message>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>View Operations</translation>
+ </message>
<message>
- <source>AC_OK_BTN</source>
- <translation>Ok</translation>
- </message>
+ <source>TOT_PLOT2D_CURVES_LINES</source>
+ <translation>Draw lines</translation>
+ </message>
<message>
- <source>AC_APPLY_BTN</source>
- <translation>Apply</translation>
- </message>
+ <source>PRP_PLOT2D_CURVES_LINES</source>
+ <translation>Switches view to lines mode</translation>
+ </message>
<message>
- <source>AC_CANT_CALCULATE</source>
- <translation>Can't calculate curve.
-Please, check input parameters!!!</translation>
+ <source>MEN_PLOT2D_CURVES_LINES</source>
+ <translation>Draw Lines</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_Viewer</name>
<message>
- <source>AC_CLOSE_BTN</source>
- <translation>&Close</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>Dump view...</translation>
</message>
<message>
- <source>AC_HELP_BTN</source>
- <translation>Help</translation>
+ <source>MEN_PLOT2D_CHANGE_BACKGROUND</source>
+ <translation>Change Background...</translation>
</message>
</context>
<context>
- <name>Plot2d_SetupCurveScaleDlg</name>
+ <name>Plot2d_ViewFrame</name>
<message>
- <source>TLT_SETUP_CURVE_SCALE</source>
- <translation>Curve(s) scale</translation>
+ <source>INF_COORDINATES</source>
+ <translation>Coordinates: X : %1, Y : %2</translation>
</message>
<message>
- <source>CURVE_SCALE_FACTOR</source>
- <translation>Scale factor</translation>
+ <source>WRN_XLOG_NOT_ALLOWED</source>
+ <translation>Some points with non-positive abscissa values have been detected.
+Logarithmic scale for abscissa axis is not allowed.</translation>
+ </message>
+ <message>
+ <source>WRN_YLOG_NOT_ALLOWED</source>
+ <translation>Some points with non-positive ordinate values have been detected.
+Logarithmic scale for ordinate axis is not allowed.</translation>
+ </message>
+ <message>
+ <source>INF_COORDINATES_SOME_Y</source>
+ <translation>Coordinates: X : %1, Y : %2 ( %3 )</translation>
</message>
</context>
</TS>
<context>
<name>@default</name>
<message>
- <source>PLOT2D_CURVE_TYPE_LBL</source>
- <translation>Type de courbe:</translation>
+ <source>DASHDOT_LINE_LBL</source>
+ <translation>TiretPoint</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>Erreur</translation>
+ <source>DASH_LINE_LBL</source>
+ <translation>Tiret</translation>
</message>
<message>
- <source>PLOT2D_SET_AS_DEFAULT_CHECK</source>
- <translation>Enregistrer comme paramètres par défaut</translation>
+ <source>SOLID_LINE_LBL</source>
+ <translation>Solide</translation>
</message>
<message>
- <source>TLT_SETUP_CURVE</source>
- <translation>Initialiser une courbe</translation>
+ <source>DOT_LINE_LBL</source>
+ <translation>Point</translation>
</message>
<message>
- <source>MNU_DUMP_VIEW</source>
- <translation>Enregistrer la vue...</translation>
+ <source>DAHSDOTDOT_LINE_LBL</source>
+ <translation>TiretPointPoint</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_HOR</source>
- <translation>Axe horizontal:</translation>
+ <source>NONE_LINE_LBL</source>
+ <translation>Aucun</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_TLT</source>
- <translation>Normalisation</translation>
+ <source>DTRIANGLE_MARKER_LBL</source>
+ <translation>Triangle orienté vers le bas</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_MODE_MIN</source>
- <translation>Normaliser sur le minimum</translation>
+ <source>UTRIANGLE_MARKER_LBL</source>
+ <translation>Triangle orienté en haut</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_MODE_MAX</source>
- <translation>Normaliser sur le maximum</translation>
+ <source>LTRIANGLE_MARKER_LBL</source>
+ <translation>Triangle orienté à gauche </translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_LEFT_AXIS</source>
- <translation>Axe Y gauche: </translation>
+ <source>RTRIANGLE_MARKER_LBL</source>
+ <translation>Triangle orienté à droite</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_RIGHT_AXIS</source>
- <translation>Axe Y droite: </translation>
+ <source>RECTANGLE_MARKER_LBL</source>
+ <translation>Rectangle</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_VER</source>
- <translation>Axe vertical:</translation>
+ <source>CROSS_MARKER_LBL</source>
+ <translation>Croix</translation>
</message>
<message>
- <source>MNU_PAN_VIEW</source>
- <translation>Déplacement</translation>
+ <source>XCROSS_MARKER_LBL</source>
+ <translation>Croix diagonale</translation>
</message>
<message>
- <source>MNU_CLONE_VIEW</source>
- <translation>Dupliquer la vue</translation>
+ <source>DIAMOND_MARKER_LBL</source>
+ <translation>Diamant</translation>
</message>
<message>
- <source>MNU_PRINT_VIEW</source>
- <translation>Imprimer la vue</translation>
+ <source>CIRCLE_MARKER_LBL</source>
+ <translation>Cercle</translation>
</message>
<message>
- <source>POSTSCRIPT_FILES</source>
- <translation>Fichiers PostScript (*.ps)</translation>
+ <source>NONE_MARKER_LBL</source>
+ <translation>Aucun</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_FitDataDlg</name>
<message>
- <source>ENCAPSULATED_POSTSCRIPT_FILES</source>
- <translation>Fichiers PostScript encapsulés (*.eps)</translation>
+ <source>FIT_DATA_TLT</source>
+ <translation>Ajuster à la plage de données</translation>
</message>
<message>
- <source>PDF_FILES</source>
- <translation>Fichiers PDF (*.pdf)</translation>
+ <source>FIT_HORIZONTAL</source>
+ <translation>Ajuster horizontalement</translation>
</message>
<message>
- <source>DSC_GLOBALPAN_VIEW</source>
- <translation>Sélection d'un nouveau centre de vue</translation>
+ <source>MIN_VALUE_LAB</source>
+ <translation>Min:</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LINEAR_VER</source>
- <translation>Changer la vue de l'axe vertical au mode d'échelle linéaire</translation>
+ <source>VERTICAL_AXIS</source>
+ <translation>Axe vertical</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>Changer la vue de l'axe horizontal au mode d'échelle linéaire</translation>
+ <source>MAX_VALUE_LAB</source>
+ <translation>Max:</translation>
</message>
<message>
- <source>CURVE_LINE_WIDTH_LAB</source>
- <translation>Epaisseur du trait:</translation>
+ <source>HORIZONTAL_AXIS</source>
+ <translation>Axe horizontal</translation>
</message>
<message>
- <source>CURVE_TYPE_POPUP</source>
- <translation>Type de courbe</translation>
+ <source>VERTICAL_LEFT_AXIS</source>
+ <translation>Axe vertical gauche</translation>
</message>
<message>
- <source>NORMALIZATION_TYPE_POPUP</source>
- <translation>Normalisation</translation>
+ <source>FIT_ALL</source>
+ <translation>Tout ajuster</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LINEAR_VER</source>
- <translation>Axe vertical: linéaire</translation>
+ <source>VERTICAL_RIGHT_AXIS</source>
+ <translation>Axe vertical droite</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>Axe horizontal: linéaire</translation>
+ <source>FIT_VERTICAL</source>
+ <translation>Ajuster verticalement</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_ViewManager</name>
<message>
- <source>FIT_DATA_TLT</source>
- <translation>Ajuster à la plage de données</translation>
+ <source>PLOT2D_VIEW_TITLE</source>
+ <translation>Scène Plot2d:%M - visualiseur:%V</translation>
</message>
<message>
- <source>MNU_ZOOM_VIEW</source>
- <translation>Zoom</translation>
+ <source>PREF_GROUP_PLOT2DVIEWER</source>
+ <translation>Visualiseur Plot2d</translation>
</message>
<message>
- <source>PLOT2D_GRID_TLT</source>
- <translation>Marques de la grille et des axes</translation>
+ <source>PREF_SHOW_LEGEND</source>
+ <translation>Afficher la légende</translation>
</message>
<message>
- <source>DSC_PAN_VIEW</source>
- <translation>Déplacer la vue</translation>
+ <source>PREF_LEGEND_POSITION</source>
+ <translation>Position de la légende:</translation>
</message>
<message>
- <source>DASHDOT_LINE_LBL</source>
- <translation>TiretPoint</translation>
+ <source>PREF_LEFT</source>
+ <translation>Gauche</translation>
</message>
<message>
- <source>PRP_PLOT2D_CURVES_SPLINES</source>
- <translation>Changer la vue en mode splines</translation>
+ <source>PREF_RIGHT</source>
+ <translation>Droite</translation>
</message>
<message>
- <source>INF_AXES_X</source>
- <translation>Axe X</translation>
+ <source>PREF_TOP</source>
+ <translation>Haut</translation>
</message>
<message>
- <source>PLOT2D_SCALE_TLT</source>
- <translation>Mode d'échelle</translation>
+ <source>PREF_BOTTOM</source>
+ <translation>Bas</translation>
</message>
<message>
- <source>DSC_FITALL</source>
- <translation>Ajuster la scène pour afficher tous les objets</translation>
+ <source>PREF_CURVE_TYPE</source>
+ <translation>Type de courbe:</translation>
</message>
<message>
- <source>MNU_FITALL</source>
- <translation>Tout afficher</translation>
+ <source>PREF_POINTS</source>
+ <translation>Points</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>Axe horizontal: logarithmique</translation>
+ <source>PREF_LINES</source>
+ <translation>Lignes</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>Axe vertical: logarithmique</translation>
+ <source>PREF_SPLINE</source>
+ <translation>Spline</translation>
</message>
<message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>Déplacement global</translation>
+ <source>PREF_MARKER_SIZE</source>
+ <translation>Taille du repère:</translation>
</message>
<message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>Enregistrer la vue</translation>
+ <source>PREF_LINEAR</source>
+ <translation>Linéaire</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION_BOTTOM</source>
- <translation>Dessous</translation>
+ <source>PREF_LOGARITHMIC</source>
+ <translation>Logarithmique</translation>
</message>
<message>
- <source>INF_COORDINATES</source>
- <translation>Coordonnées: X : %1, Y : %2</translation>
+ <source>PREF_HOR_AXIS_SCALE</source>
+ <translation>Echelle de l'axe horizontal:</translation>
</message>
<message>
- <source>DSC_CLONE_VIEW</source>
- <translation>Ouvrir un nouveau visualiseur OCC pour la scène actuelle</translation>
+ <source>PREF_VERT_AXIS_SCALE</source>
+ <translation>Echelle de l'axe vertical:</translation>
</message>
<message>
- <source>DSC_PRINT_VIEW</source>
- <translation>Imprimer la vue actuelle</translation>
+ <source>PREF_VIEWER_BACKGROUND</source>
+ <translation>Couleur du fond</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_AnalyticalCurveDlg</name>
<message>
- <source>DASH_LINE_LBL</source>
- <translation>Tiret</translation>
+ <source>ANALYTICAL_CURVE_TLT</source>
+ <translation>Propriétés des courbes analytiques</translation>
</message>
<message>
- <source>DTRIANGLE_MARKER_LBL</source>
- <translation>Triangle orienté vers le bas</translation>
+ <source>AC_CURVE_PARAMS</source>
+ <translation>Paramètres de la courbe</translation>
</message>
<message>
- <source>UTRIANGLE_MARKER_LBL</source>
- <translation>Triangle orienté en haut</translation>
+ <source>AC_CURVE_PROPS</source>
+ <translation>Propriétés de la courbe</translation>
</message>
<message>
- <source>LTRIANGLE_MARKER_LBL</source>
- <translation>Triangle orienté à gauche </translation>
+ <source>AC_FORMULA</source>
+ <translation>y(x) = </translation>
</message>
<message>
- <source>RTRIANGLE_MARKER_LBL</source>
- <translation>Triangle orienté à droite</translation>
+ <source>AC_NB_INTERVALS</source>
+ <translation>Nb. intervalles</translation>
</message>
<message>
- <source>RECTANGLE_MARKER_LBL</source>
- <translation>Rectangle</translation>
+ <source>AC_AUTO_ASSIGN</source>
+ <translation>Affectation auto.</translation>
</message>
<message>
- <source>TLT_SETUP_PLOT2D_VIEW</source>
- <translation>Paramètres de visualisation Plot 2d</translation>
+ <source>AC_MARKER_TYPE</source>
+ <translation>Type de marqueur</translation>
</message>
<message>
- <source>CURVE_LINE_TYPE_LAB</source>
- <translation>Type de trait:</translation>
+ <source>AC_LINE_TYPE</source>
+ <translation>Type de ligne</translation>
</message>
<message>
- <source>CROSS_MARKER_LBL</source>
- <translation>Croix</translation>
+ <source>AC_LINE_WIDTH</source>
+ <translation>Epaisseur de ligne</translation>
</message>
<message>
- <source>XCROSS_MARKER_LBL</source>
- <translation>Croix diagonale</translation>
+ <source>AC_CURVE_COLOR</source>
+ <translation>Couleur de la courbe</translation>
</message>
<message>
- <source>PLOT2D_ENABLE_VER_TITLE</source>
- <translation>Titre de l'axe vertical</translation>
+ <source>AC_ADD_BTN</source>
+ <translation>Ajouter une courbe</translation>
</message>
<message>
- <source>PLOT2D_ENABLE_HOR_TITLE</source>
- <translation>Titre de l'axe horizontal</translation>
+ <source>AC_REM_BTN</source>
+ <translation>Supprimer une courbe</translation>
</message>
<message>
- <source>TOT_PLOT2D_SETTINGS</source>
- <translation>Paramètres</translation>
+ <source>AC_OK_BTN</source>
+ <translation>Ok</translation>
</message>
<message>
- <source>TOT_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>Courbes analytiques</translation>
+ <source>AC_APPLY_BTN</source>
+ <translation>Appliquer</translation>
</message>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>Axe Y gauche: Normaliser sur le maximum global</translation>
+ <source>AC_CANT_CALCULATE</source>
+ <translation>La courbe ne peut pas être calculée.
+Merci de vérifier les paramètres d'entrée</translation>
</message>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>Axe Y gauche: Normaliser sur le minimum global</translation>
+ <source>AC_CLOSE_BTN</source>
+ <translation>&Fermer</translation>
</message>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>Axe Y droite: Normaliser sur le maximum global</translation>
+ <source>AC_HELP_BTN</source>
+ <translation>Aide</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_SetupCurveScaleDlg</name>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>Axe Y droite: Normaliser sur le minimum global</translation>
- </message>
+ <source>TLT_SETUP_CURVE_SCALE</source>
+ <translation>Mise à l'échelle de courbe(s)</translation>
+ </message>
<message>
- <source>PLOT2D_CURVE_TYPE_LINES</source>
- <translation>Lignes</translation>
+ <source>CURVE_SCALE_FACTOR</source>
+ <translation>Facteur d'échelle</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_SetupViewDlg</name>
<message>
- <source>MEN_PLOT2D_CURVES_SPLINES</source>
- <translation>Dessiner les splines</translation>
+ <source>PLOT2D_CURVE_TYPE_LBL</source>
+ <translation>Type de courbe:</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>Changer la vue de l'axe horizontal au mode d'échelle logarithmique</translation>
+ <source>PLOT2D_SET_AS_DEFAULT_CHECK</source>
+ <translation>Enregistrer comme paramètres par défaut</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>Changer la vue de l'axe vertical au mode d'échelle logarithmique</translation>
+ <source>PLOT2D_SCALE_MODE_HOR</source>
+ <translation>Axe horizontal:</translation>
</message>
<message>
- <source>PLOT2D_IMAGE_FILES</source>
- <translation>Fichiers images (*.bmp *.png *.jpg *.jpeg)</translation>
+ <source>PLOT2D_NORMALIZE_TLT</source>
+ <translation>Normalisation</translation>
</message>
<message>
- <source>PLOT2D_MAX_INTERVALS</source>
- <translation>Intervalles max</translation>
+ <source>PLOT2D_NORMALIZE_MODE_MIN</source>
+ <translation>Normaliser sur le minimum</translation>
</message>
<message>
- <source>INF_AXES_Y_LEFT</source>
- <translation>Axe Y gauche</translation>
+ <source>PLOT2D_NORMALIZE_MODE_MAX</source>
+ <translation>Normaliser sur le maximum</translation>
</message>
<message>
- <source>CURVE_COLOR_LAB</source>
- <translation>Couleur:</translation>
+ <source>PLOT2D_NORMALIZE_LEFT_AXIS</source>
+ <translation>Axe Y gauche: </translation>
</message>
<message>
- <source>CURVE_PREVIEW_LAB</source>
- <translation>Prévisualiser</translation>
+ <source>PLOT2D_NORMALIZE_RIGHT_AXIS</source>
+ <translation>Axe Y droite: </translation>
</message>
<message>
- <source>DIAMOND_MARKER_LBL</source>
- <translation>Diamant</translation>
+ <source>PLOT2D_SCALE_MODE_VER</source>
+ <translation>Axe vertical:</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION_TOP</source>
- <translation>Dessus</translation>
+ <source>PLOT2D_GRID_TLT</source>
+ <translation>Marques de la grille et des axes</translation>
+ </message>
+ <message>
+ <source>INF_AXES_X</source>
+ <translation>Axe X</translation>
</message>
<message>
- <source>TOT_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>Changer l'arrière-plan</translation>
+ <source>PLOT2D_SCALE_TLT</source>
+ <translation>Mode d'échelle</translation>
</message>
<message>
- <source>MEN_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>Changer l'arrière-plan...</translation>
+ <source>PLOT2D_LEGEND_POSITION_BOTTOM</source>
+ <translation>Dessous</translation>
</message>
<message>
- <source>PRP_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>Changer la couleur d'arrière plan</translation>
+ <source>TLT_SETUP_PLOT2D_VIEW</source>
+ <translation>Paramètres de visualisation Plot 2d</translation>
</message>
<message>
- <source>SOLID_LINE_LBL</source>
- <translation>Solide</translation>
+ <source>PLOT2D_ENABLE_VER_TITLE</source>
+ <translation>Titre de l'axe vertical</translation>
+ </message>
+ <message>
+ <source>PLOT2D_ENABLE_HOR_TITLE</source>
+ <translation>Titre de l'axe horizontal</translation>
+ </message>
+ <message>
+ <source>PLOT2D_CURVE_TYPE_LINES</source>
+ <translation>Lignes</translation>
+ </message>
+ <message>
+ <source>PLOT2D_MAX_INTERVALS</source>
+ <translation>Intervalles max</translation>
+ </message>
+ <message>
+ <source>INF_AXES_Y_LEFT</source>
+ <translation>Axe Y gauche</translation>
+ </message>
+ <message>
+ <source>PLOT2D_LEGEND_POSITION_TOP</source>
+ <translation>Dessus</translation>
</message>
<message>
<source>PLOT2D_GRID_ENABLE_VER_MAJOR</source>
<source>PLOT2D_GRID_ENABLE_VER_MINOR</source>
<translation>Verticale secondaire</translation>
</message>
- <message>
- <source>TOT_PLOT2D_CURVES_POINTS</source>
- <translation>Dessiner des points</translation>
- </message>
<message>
<source>PLOT2D_GRID_ENABLE_HOR_MINOR</source>
<translation>Horizontale secondaire</translation>
<source>PLOT2D_DEVIATION_CL_LBL</source>
<translation>Couleur</translation>
</message>
- <message>
- <source>WRN_XLOG_NOT_ALLOWED</source>
- <translation>On a détecté des points avec les valeurs non-positives sur l'abscisse.
-L'échelle logarithmique de l'abscisse n'est pas permise.</translation>
- </message>
- <message>
- <source>WRN_YLOG_NOT_ALLOWED</source>
- <translation>On a détecté des points avec les valeurs non-positives sur l'ordonnée.
-L'échelle logarithmique de l'ordonnée n'est pas permise.</translation>
- </message>
- <message>
- <source>DSC_FITRECT</source>
- <translation>Ajuster la scène à la zone choisie par l'encadré</translation>
- </message>
<message>
<source>PLOT2D_LEGEND_POSITION_LEFT</source>
<translation>Gauche</translation>
</message>
- <message>
- <source>MNU_FITRECT</source>
- <translation>Afficher la zone</translation>
- </message>
- <message>
- <source>DOT_LINE_LBL</source>
- <translation>Point</translation>
- </message>
- <message>
- <source>MEN_PLOT2D_CURVES_POINTS</source>
- <translation>Dessiner les points</translation>
- </message>
- <message>
- <source>PRP_PLOT2D_CURVES_POINTS</source>
- <translation>Changer la vue en mode points</translation>
- </message>
<message>
<source>PLOT2D_SCALE_MODE_LOGARITHMIC</source>
<translation>Logarithmique</translation>
<source>PLOT2D_LEGEND_POSITION_RIGHT</source>
<translation>Droite</translation>
</message>
- <message>
- <source>DSC_DUMP_VIEW</source>
- <translation>Sauvegarder la vue actuelle dans un fichier image</translation>
- </message>
- <message>
- <source>WARNING</source>
- <translation>Avertissement</translation>
- </message>
<message>
<source>PLOT2D_ENABLE_LEGEND</source>
<translation>Afficher la légende</translation>
<translation>Police de la légende</translation>
</message>
<message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>Zoomer la vue</translation>
+ <source>PLOT2D_SCALE_MODE_LINEAR</source>
+ <translation>Linéaire</translation>
</message>
<message>
- <source>PRP_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>Réglage des propriétés des courbes analytiques</translation>
+ <source>PLOT2D_CURVE_TYPE_POINTS</source>
+ <translation>Points</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>Bascule la vue vers le mode de normalisation sur le maximum pour l'axe Y gauche</translation>
+ <source>PLOT2D_CURVE_TYPE_SPLINE</source>
+ <translation>Spline</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>Bascule la vue vers le mode de normalisation sur le minimum pour l'axe Y gauche</translation>
+ <source>INF_AXES_Y_RIGHT</source>
+ <translation>Axe Y droite</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>Bascule la vue vers le mode de normalisation sur le maximum pour l'axe Y droite</translation>
+ <source>PLOT2D_MARKER_SIZE_LBL</source>
+ <translation>Taille du marqueur:</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>Bascule la vue vers le mode de normalisation sur le minimum pour l'axe Y droite</translation>
+ <source>PLOT2D_ENABLE_MAIN_TITLE</source>
+ <translation>Titre principal</translation>
</message>
<message>
- <source>PRP_PLOT2D_SETTINGS</source>
- <translation>Définit les paramètres de visualisation</translation>
+ <source>PLOT2D_LEGEND_GROUP</source>
+ <translation>Légende</translation>
</message>
<message>
- <source>INF_COORDINATES_SOME_Y</source>
- <translation>Coordonnées: X : %1, Y : %2 ( %3 )</translation>
+ <source>PLOT2D_LEGEND_POSITION</source>
+ <translation>Position de la Légende:</translation>
</message>
<message>
- <source>SCALING_POPUP</source>
- <translation>Echelle</translation>
+ <source>PLOT2D_LEGEND_SYMBOL_TYPE</source>
+ <translation>Type de symbole:</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_LINEAR</source>
- <translation>Linéaire</translation>
+ <source>PLOT2D_MARKER_ABOVE_LINE</source>
+ <translation>Marqueur dessus de la ligne</translation>
</message>
<message>
- <source>TOT_PLOT2D_FITDATA</source>
- <translation>Ajuster à l'intervalle</translation>
+ <source>PLOT2D_MARKER_ON_LINE</source>
+ <translation>Marqueur sur la ligne</translation>
</message>
<message>
- <source>PLOT2D_CURVE_TYPE_POINTS</source>
- <translation>Points</translation>
+ <source>PLOT2D_LEGEND_FONT_COLOR</source>
+ <translation>Couleur de police de la légende:</translation>
</message>
<message>
- <source>PLOT2D_CURVE_TYPE_SPLINE</source>
- <translation>Spline</translation>
+ <source>PLOT2D_SELECTED_LEGEND_FONT_COLOR</source>
+ <translation>Couleur de surlignement de la légende:</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_SetupCurveDlg</name>
<message>
- <source>MEN_PLOT2D_FITDATA</source>
- <translation>&Ajuster à l'intervalle</translation>
+ <source>TLT_SETUP_CURVE</source>
+ <translation>Initialiser une courbe</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>Axe horizontal: logarithmique</translation>
+ <source>CURVE_LINE_WIDTH_LAB</source>
+ <translation>Epaisseur du trait:</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>Axe vertical: logarithmique</translation>
+ <source>CURVE_LINE_TYPE_LAB</source>
+ <translation>Type de trait:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>Axe Y gauche: Minimum</translation>
+ <source>CURVE_COLOR_LAB</source>
+ <translation>Couleur:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>Axe Y gauche: Maximum</translation>
+ <source>CURVE_PREVIEW_LAB</source>
+ <translation>Prévisualiser</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>Axe Y droite: Minimum</translation>
+ <source>CURVE_MARKER_TYPE_LAB</source>
+ <translation>Type de marqueur:</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_ViewWindow</name>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>Axe Y droite: Maximum</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>Enregistrer la vue...</translation>
</message>
<message>
- <source>PRP_PLOT2D_FITDATA</source>
- <translation>Ajuster la vue à la plage de données indiquée</translation>
+ <source>MNU_PAN_VIEW</source>
+ <translation>Déplacement</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LINEAR_VER</source>
- <translation>Axe vertical: linéaire</translation>
+ <source>MNU_CLONE_VIEW</source>
+ <translation>Dupliquer la vue</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>Axe horizontal: linéaire</translation>
+ <source>MNU_PRINT_VIEW</source>
+ <translation>Imprimer la vue</translation>
</message>
<message>
- <source>NONE_MARKER_LBL</source>
- <translation>Aucun</translation>
+ <source>POSTSCRIPT_FILES</source>
+ <translation>Fichiers PostScript (*.ps)</translation>
</message>
<message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>Impossible de sauvegarder le fichier</translation>
+ <source>ENCAPSULATED_POSTSCRIPT_FILES</source>
+ <translation>Fichiers PostScript encapsulés (*.eps)</translation>
</message>
<message>
- <source>MEN_PLOT2D_SHOW_LEGEND</source>
- <translation>Afficher la &légende</translation>
+ <source>PDF_FILES</source>
+ <translation>Fichiers PDF (*.pdf)</translation>
</message>
<message>
- <source>PRP_PLOT2D_SHOW_LEGEND</source>
- <translation>Activer/désactiver la légende</translation>
+ <source>DSC_GLOBALPAN_VIEW</source>
+ <translation>Sélection d'un nouveau centre de vue</translation>
</message>
<message>
- <source>TOT_PLOT2D_SHOW_LEGEND</source>
- <translation>Afficher la légende</translation>
+ <source>PRP_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>Changer la vue de l'axe vertical au mode d'échelle linéaire</translation>
</message>
<message>
- <source>INF_AXES_Y_RIGHT</source>
- <translation>Axe Y droite</translation>
+ <source>PRP_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>Changer la vue de l'axe horizontal au mode d'échelle linéaire</translation>
</message>
<message>
- <source>DAHSDOTDOT_LINE_LBL</source>
- <translation>TiretPointPoint</translation>
+ <source>CURVE_TYPE_POPUP</source>
+ <translation>Type de courbe</translation>
</message>
<message>
- <source>TOT_PLOT2D_CURVES_SPLINES</source>
- <translation>Dessiner des splines</translation>
+ <source>NORMALIZATION_TYPE_POPUP</source>
+ <translation>Normalisation</translation>
</message>
<message>
- <source>CURVE_MARKER_TYPE_LAB</source>
- <translation>Type de marqueur:</translation>
+ <source>TOT_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>Axe vertical: linéaire</translation>
</message>
<message>
- <source>MEN_PLOT2D_SETTINGS</source>
- <translation>&Paramètres</translation>
- </message>
- <message>
- <source>MEN_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>Courbes analytiques</translation>
- </message>
- <message>
- <source>CIRCLE_MARKER_LBL</source>
- <translation>Cercle</translation>
- </message>
- <message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>Opérations de visualisation</translation>
+ <source>TOT_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>Axe horizontal: linéaire</translation>
</message>
<message>
- <source>NONE_LINE_LBL</source>
- <translation>Aucun</translation>
+ <source>MNU_ZOOM_VIEW</source>
+ <translation>Zoom</translation>
</message>
<message>
- <source>PLOT2D_MARKER_SIZE_LBL</source>
- <translation>Taille du marqueur:</translation>
+ <source>DSC_PAN_VIEW</source>
+ <translation>Déplacer la vue</translation>
</message>
<message>
- <source>PLOT2D_ENABLE_MAIN_TITLE</source>
- <translation>Titre principal</translation>
+ <source>PRP_PLOT2D_CURVES_SPLINES</source>
+ <translation>Changer la vue en mode splines</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_GROUP</source>
- <translation>Légende</translation>
+ <source>DSC_FITALL</source>
+ <translation>Ajuster la scène pour afficher tous les objets</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION</source>
- <translation>Position de la Légende:</translation>
+ <source>MNU_FITALL</source>
+ <translation>Tout afficher</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_SYMBOL_TYPE</source>
- <translation>Type de symbole:</translation>
+ <source>TOT_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>Axe horizontal: logarithmique</translation>
</message>
<message>
- <source>PLOT2D_MARKER_ABOVE_LINE</source>
- <translation>Marqueur dessus de la ligne</translation>
+ <source>TOT_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>Axe vertical: logarithmique</translation>
</message>
<message>
- <source>PLOT2D_MARKER_ON_LINE</source>
- <translation>Marqueur sur la ligne</translation>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>Déplacement global</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_FONT_COLOR</source>
- <translation>Couleur de police de la légende:</translation>
+ <source>DSC_CLONE_VIEW</source>
+ <translation>Ouvrir un nouveau visualiseur OCC pour la scène actuelle</translation>
</message>
<message>
- <source>PLOT2D_SELECTED_LEGEND_FONT_COLOR</source>
- <translation>Couleur de surlignement de la légende:</translation>
+ <source>DSC_PRINT_VIEW</source>
+ <translation>Imprimer la vue actuelle</translation>
</message>
<message>
- <source>TOT_PLOT2D_CURVES_LINES</source>
- <translation>Dessiner des lignes</translation>
+ <source>TOT_PLOT2D_SETTINGS</source>
+ <translation>Paramètres</translation>
</message>
<message>
- <source>PRP_PLOT2D_CURVES_LINES</source>
- <translation>Changer la vue en mode lignes</translation>
+ <source>TOT_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>Courbes analytiques</translation>
</message>
<message>
- <source>MEN_PLOT2D_CURVES_LINES</source>
- <translation>Dessiner les lignes</translation>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>Axe Y gauche: Normaliser sur le maximum global</translation>
</message>
-</context>
-<context>
- <name>Plot2d_FitDataDlg</name>
<message>
- <source>FIT_HORIZONTAL</source>
- <translation>Ajuster horizontalement</translation>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>Axe Y gauche: Normaliser sur le minimum global</translation>
</message>
<message>
- <source>MIN_VALUE_LAB</source>
- <translation>Min:</translation>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>Axe Y droite: Normaliser sur le maximum global</translation>
</message>
<message>
- <source>VERTICAL_AXIS</source>
- <translation>Axe vertical</translation>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>Axe Y droite: Normaliser sur le minimum global</translation>
</message>
<message>
- <source>MAX_VALUE_LAB</source>
- <translation>Max:</translation>
+ <source>MEN_PLOT2D_CURVES_SPLINES</source>
+ <translation>Dessiner les splines</translation>
</message>
<message>
- <source>HORIZONTAL_AXIS</source>
- <translation>Axe horizontal</translation>
+ <source>PRP_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>Changer la vue de l'axe horizontal au mode d'échelle logarithmique</translation>
</message>
<message>
- <source>VERTICAL_LEFT_AXIS</source>
- <translation>Axe vertical gauche</translation>
+ <source>PRP_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>Changer la vue de l'axe vertical au mode d'échelle logarithmique</translation>
</message>
<message>
- <source>FIT_ALL</source>
- <translation>Tout ajuster</translation>
+ <source>TOT_PLOT2D_CURVES_POINTS</source>
+ <translation>Dessiner des points</translation>
</message>
<message>
- <source>VERTICAL_RIGHT_AXIS</source>
- <translation>Axe vertical droite</translation>
+ <source>DSC_FITRECT</source>
+ <translation>Ajuster la scène à la zone choisie par l'encadré</translation>
</message>
<message>
- <source>FIT_VERTICAL</source>
- <translation>Ajuster verticalement</translation>
+ <source>MNU_FITRECT</source>
+ <translation>Afficher la zone</translation>
</message>
-</context>
-<context>
- <name>Plot2d_ViewManager</name>
<message>
- <source>PLOT2D_VIEW_TITLE</source>
- <translation>Scène Plot2d:%M - visualiseur:%V</translation>
+ <source>MEN_PLOT2D_CURVES_POINTS</source>
+ <translation>Dessiner les points</translation>
</message>
<message>
- <source>PREF_GROUP_PLOT2DVIEWER</source>
- <translation>Visualiseur Plot2d</translation>
+ <source>PRP_PLOT2D_CURVES_POINTS</source>
+ <translation>Changer la vue en mode points</translation>
</message>
<message>
- <source>PREF_SHOW_LEGEND</source>
- <translation>Afficher la légende</translation>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>Sauvegarder la vue actuelle dans un fichier image</translation>
</message>
<message>
- <source>PREF_LEGEND_POSITION</source>
- <translation>Position de la légende:</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>Zoomer la vue</translation>
</message>
<message>
- <source>PREF_LEFT</source>
- <translation>Gauche</translation>
+ <source>PRP_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>Réglage des propriétés des courbes analytiques</translation>
</message>
<message>
- <source>PREF_RIGHT</source>
- <translation>Droite</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>Bascule la vue vers le mode de normalisation sur le maximum pour l'axe Y gauche</translation>
</message>
<message>
- <source>PREF_TOP</source>
- <translation>Haut</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>Bascule la vue vers le mode de normalisation sur le minimum pour l'axe Y gauche</translation>
</message>
<message>
- <source>PREF_BOTTOM</source>
- <translation>Bas</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>Bascule la vue vers le mode de normalisation sur le maximum pour l'axe Y droite</translation>
</message>
<message>
- <source>PREF_CURVE_TYPE</source>
- <translation>Type de courbe:</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>Bascule la vue vers le mode de normalisation sur le minimum pour l'axe Y droite</translation>
</message>
<message>
- <source>PREF_POINTS</source>
- <translation>Points</translation>
+ <source>PRP_PLOT2D_SETTINGS</source>
+ <translation>Définit les paramètres de visualisation</translation>
</message>
<message>
- <source>PREF_LINES</source>
- <translation>Lignes</translation>
+ <source>SCALING_POPUP</source>
+ <translation>Echelle</translation>
</message>
<message>
- <source>PREF_SPLINE</source>
- <translation>Spline</translation>
+ <source>TOT_PLOT2D_FITDATA</source>
+ <translation>Ajuster à l'intervalle</translation>
</message>
<message>
- <source>PREF_MARKER_SIZE</source>
- <translation>Taille du repère:</translation>
+ <source>MEN_PLOT2D_FITDATA</source>
+ <translation>&Ajuster à l'intervalle</translation>
</message>
<message>
- <source>PREF_LINEAR</source>
- <translation>Linéaire</translation>
+ <source>PRP_PLOT2D_FITDATA</source>
+ <translation>Ajuster la vue à la plage de données indiquée</translation>
</message>
<message>
- <source>PREF_LOGARITHMIC</source>
- <translation>Logarithmique</translation>
+ <source>MEN_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>Axe horizontal: logarithmique</translation>
</message>
<message>
- <source>PREF_HOR_AXIS_SCALE</source>
- <translation>Echelle de l'axe horizontal:</translation>
+ <source>MEN_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>Axe vertical: logarithmique</translation>
</message>
<message>
- <source>PREF_VERT_AXIS_SCALE</source>
- <translation>Echelle de l'axe vertical:</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>Axe Y gauche: Minimum</translation>
</message>
<message>
- <source>PREF_VIEWER_BACKGROUND</source>
- <translation>Couleur du fond</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>Axe Y gauche: Maximum</translation>
</message>
-</context>
-<context>
- <name>Plot2d_AnalyticalCurveDlg</name>
<message>
- <source>AC_OK_BTN</source>
- <translation>Ok</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>Axe Y droite: Minimum</translation>
</message>
<message>
- <source>ANALYTICAL_CURVE_TLT</source>
- <translation>Propriétés des courbes analytiques</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>Axe Y droite: Maximum</translation>
</message>
<message>
- <source>AC_CURVE_PARAMS</source>
- <translation>Paramètres de la courbe</translation>
+ <source>MEN_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>Axe vertical: linéaire</translation>
</message>
<message>
- <source>AC_CURVE_PROPS</source>
- <translation>Propriétés de la courbe</translation>
+ <source>MEN_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>Axe horizontal: linéaire</translation>
</message>
<message>
- <source>AC_FORMULA</source>
- <translation>y(x) = </translation>
+ <source>MEN_PLOT2D_SHOW_LEGEND</source>
+ <translation>Afficher la &légende</translation>
</message>
<message>
- <source>AC_NB_INTERVALS</source>
- <translation>Nb. intervalles</translation>
+ <source>PRP_PLOT2D_SHOW_LEGEND</source>
+ <translation>Activer/désactiver la légende</translation>
</message>
<message>
- <source>AC_AUTO_ASSIGN</source>
- <translation>Affectation auto.</translation>
+ <source>TOT_PLOT2D_SHOW_LEGEND</source>
+ <translation>Afficher la légende</translation>
</message>
<message>
- <source>AC_MARKER_TYPE</source>
- <translation>Type de marqueur</translation>
+ <source>TOT_PLOT2D_CURVES_SPLINES</source>
+ <translation>Dessiner des splines</translation>
</message>
<message>
- <source>AC_LINE_TYPE</source>
- <translation>Type de ligne</translation>
+ <source>MEN_PLOT2D_SETTINGS</source>
+ <translation>&Paramètres</translation>
</message>
<message>
- <source>AC_LINE_WIDTH</source>
- <translation>Epaisseur de ligne</translation>
+ <source>MEN_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>Courbes analytiques</translation>
</message>
<message>
- <source>AC_CURVE_COLOR</source>
- <translation>Couleur de la courbe</translation>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>Opérations de visualisation</translation>
</message>
<message>
- <source>AC_ADD_BTN</source>
- <translation>Ajouter une courbe</translation>
+ <source>TOT_PLOT2D_CURVES_LINES</source>
+ <translation>Dessiner des lignes</translation>
</message>
<message>
- <source>AC_REM_BTN</source>
- <translation>Supprimer une courbe</translation>
+ <source>PRP_PLOT2D_CURVES_LINES</source>
+ <translation>Changer la vue en mode lignes</translation>
</message>
<message>
- <source>AC_UPD_BTN</source>
- <translation>Mettre à jour la courbe</translation>
+ <source>MEN_PLOT2D_CURVES_LINES</source>
+ <translation>Dessiner les lignes</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_Viewer</name>
<message>
- <source>AC_APPLY_BTN</source>
- <translation>Appliquer</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>Enregistrer la vue...</translation>
</message>
<message>
- <source>AC_CANT_CALCULATE</source>
- <translation>La courbe ne peut pas être calculée.
-Merci de vérifier les paramètres d'entrée</translation>
+ <source>MEN_PLOT2D_CHANGE_BACKGROUND</source>
+ <translation>Changer l'arrière-plan...</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_ViewFrame</name>
<message>
- <source>AC_CLOSE_BTN</source>
- <translation>&Fermer</translation>
+ <source>INF_COORDINATES</source>
+ <translation>Coordonnées: X : %1, Y : %2</translation>
</message>
<message>
- <source>AC_HELP_BTN</source>
- <translation>Aide</translation>
+ <source>WRN_XLOG_NOT_ALLOWED</source>
+ <translation>On a détecté des points avec les valeurs non-positives sur l'abscisse.
+L'échelle logarithmique de l'abscisse n'est pas permise.</translation>
</message>
-</context>
-<context>
- <name>Plot2d_SetupCurveScaleDlg</name>
<message>
- <source>TLT_SETUP_CURVE_SCALE</source>
- <translation>Mise à l'échelle de courbe(s)</translation>
+ <source>WRN_YLOG_NOT_ALLOWED</source>
+ <translation>On a détecté des points avec les valeurs non-positives sur l'ordonnée.
+L'échelle logarithmique de l'ordonnée n'est pas permise.</translation>
</message>
<message>
- <source>CURVE_SCALE_FACTOR</source>
- <translation>Facteur d'échelle</translation>
+ <source>INF_COORDINATES_SOME_Y</source>
+ <translation>Coordonnées: X : %1, Y : %2 ( %3 )</translation>
</message>
</context>
</TS>
<context>
<name>@default</name>
<message>
- <source>PLOT2D_CURVE_TYPE_LBL</source>
- <translation>曲線の種類:</translation>
+ <source>DASHDOT_LINE_LBL</source>
+ <translation>TiretPoint</translation>
</message>
<message>
- <source>ERROR</source>
- <translation>ã\82¨ã\83©ã\83¼</translation>
+ <source>DASH_LINE_LBL</source>
+ <translation>ã\82¤ã\83³ã\83\87ã\83³ã\83\88ã\82\92è¨å®\9aã\81\97ã\81¾ã\81\99ã\80\82</translation>
</message>
<message>
- <source>PLOT2D_SET_AS_DEFAULT_CHECK</source>
- <translation>既定の設定として保存します。</translation>
+ <source>SOLID_LINE_LBL</source>
+ <translation>ソリッド</translation>
</message>
<message>
- <source>TLT_SETUP_CURVE</source>
- <translation>曲線を初期化します。</translation>
+ <source>DOT_LINE_LBL</source>
+ <translation>基準点</translation>
</message>
<message>
- <source>MNU_DUMP_VIEW</source>
- <translation>ビューを保存.</translation>
+ <source>DAHSDOTDOT_LINE_LBL</source>
+ <translation>TiretPointPoint</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_HOR</source>
- <translation>水平軸:</translation>
+ <source>NONE_LINE_LBL</source>
+ <translation>[なし]</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_TLT</source>
- <translation>標準化</translation>
+ <source>DTRIANGLE_MARKER_LBL</source>
+ <translation>下向きの三角形</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_MODE_MIN</source>
- <translation>最小を標準化します。</translation>
+ <source>UTRIANGLE_MARKER_LBL</source>
+ <translation>三角形のトップ指向</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_MODE_MAX</source>
- <translation>最大値を標準化します。</translation>
+ <source>LTRIANGLE_MARKER_LBL</source>
+ <translation>左の三角形を指向</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_LEFT_AXIS</source>
- <translation>å·¦ã\81® Y 軸:</translation>
+ <source>RTRIANGLE_MARKER_LBL</source>
+ <translation>å\8f³å\90\91ã\81\8dä¸\89è§\92å½¢ã\82\92æ\8c\87å\90\91</translation>
</message>
<message>
- <source>PLOT2D_NORMALIZE_RIGHT_AXIS</source>
- <translation>å\8f³ã\81® Y 軸:</translation>
+ <source>RECTANGLE_MARKER_LBL</source>
+ <translation>å\9b\9bè§\92å½¢ã\81®ä½\9cæ\88\90</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_VER</source>
- <translation>垂直軸:</translation>
+ <source>CROSS_MARKER_LBL</source>
+ <translation>クロス</translation>
</message>
<message>
- <source>MNU_PAN_VIEW</source>
- <translation>パンニング</translation>
+ <source>XCROSS_MARKER_LBL</source>
+ <translation>斜め十字</translation>
</message>
<message>
- <source>MNU_CLONE_VIEW</source>
- <translation>ã\83\93ã\83¥ã\83¼ã\81®è¤\87製</translation>
+ <source>DIAMOND_MARKER_LBL</source>
+ <translation>ã\83\80ã\82¤ã\83¤ã\83¢ã\83³ã\83\89</translation>
</message>
<message>
- <source>MNU_PRINT_VIEW</source>
- <translation>印刷ビュー</translation>
+ <source>NONE_MARKER_LBL</source>
+ <translation>[なし]</translation>
</message>
<message>
- <source>POSTSCRIPT_FILES</source>
- <translation>PostScript ファイル (* .ps)</translation>
+ <source>CIRCLE_MARKER_LBL</source>
+ <translation>円</translation>
</message>
+ </context>
+ <context>
+ <name>Plot2d_FitDataDlg</name>
<message>
- <source>ENCAPSULATED_POSTSCRIPT_FILES</source>
- <translation>ã\82«ã\83\97ã\82»ã\83«å\8c\96ã\81\95ã\82\8cã\81\9f PostScript (*.eps) ã\83\95ã\82¡ã\82¤ã\83«</translation>
+ <source>FIT_DATA_TLT</source>
+ <translation>ã\83\87ã\83¼ã\82¿ã\81®ç¯\84å\9b²ã\82\92調æ\95´ã\81\97ã\81¾ã\81\99ã\80\82</translation>
</message>
<message>
- <source>PDF_FILES</source>
- <translation>PDF files (*.pdf)</translation>
+ <source>FIT_HORIZONTAL</source>
+ <translation>水平調整します。</translation>
</message>
<message>
- <source>DSC_GLOBALPAN_VIEW</source>
- <translation>ビューの新しい中心地の選択</translation>
+ <source>MIN_VALUE_LAB</source>
+ <translation>最小:</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LINEAR_VER</source>
- <translation>線形スケールのモードには、垂直軸の表示を変更します。</translation>
+ <source>VERTICAL_AXIS</source>
+ <translation>垂直軸</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>線形スケールのモードに、ビューの水平方向の軸を変更します。</translation>
+ <source>MAX_VALUE_LAB</source>
+ <translation>最大:</translation>
</message>
<message>
- <source>CURVE_LINE_WIDTH_LAB</source>
- <translation>線の太さ:</translation>
+ <source>HORIZONTAL_AXIS</source>
+ <translation>水平軸</translation>
</message>
<message>
- <source>CURVE_TYPE_POPUP</source>
- <translation>曲線の種類</translation>
+ <source>VERTICAL_LEFT_AXIS</source>
+ <translation>左側の垂直軸</translation>
</message>
<message>
- <source>NORMALIZATION_TYPE_POPUP</source>
- <translation>標準化</translation>
+ <source>FIT_ALL</source>
+ <translation>すべてを調整します。</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LINEAR_VER</source>
- <translation>å\9e\82ç\9b´è»¸: ç·\9aå½¢</translation>
+ <source>VERTICAL_RIGHT_AXIS</source>
+ <translation>å\8f³æ\95°å\80¤è»¸</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>水平軸: 線形</translation>
+ <source>FIT_VERTICAL</source>
+ <translation>垂直方向に調整します。</translation>
</message>
+ </context>
+ <context>
+ <name>Plot2d_ViewManager</name>
<message>
- <source>FIT_DATA_TLT</source>
- <translation>ã\83\87ã\83¼ã\82¿ã\81®ç¯\84å\9b²ã\82\92調æ\95´ã\81\97ã\81¾ã\81\99ã\80\82</translation>
+ <source>PLOT2D_VIEW_TITLE</source>
+ <translation>ã\82·ã\83¼ã\83³ Plot2d: %M - ã\83\93ã\83¥ã\83¼ã\82¢ã\83¼: %V</translation>
</message>
<message>
- <source>MNU_ZOOM_VIEW</source>
- <translation>ズーム</translation>
+ <source>PREF_GROUP_PLOT2DVIEWER</source>
+ <translation>Plot 2D Viewer</translation>
</message>
<message>
- <source>PLOT2D_GRID_TLT</source>
- <translation>ã\82°ã\83ªã\83\83ã\83\89ã\80\81軸ã\81®ã\83\9eã\83¼ã\82¯</translation>
+ <source>PREF_SHOW_LEGEND</source>
+ <translation>ã\82ã\83£ã\83\97ã\82·ã\83§ã\83³ã\82\92表示ã\81\97ã\81¾ã\81\99ã\80\82</translation>
</message>
<message>
- <source>DSC_PAN_VIEW</source>
- <translation>ビューを移動します。</translation>
+ <source>PREF_LEGEND_POSITION</source>
+ <translation>凡例の位置:</translation>
</message>
<message>
- <source>DASHDOT_LINE_LBL</source>
- <translation>TiretPoint</translation>
+ <source>PREF_LEFT</source>
+ <translation>左</translation>
</message>
<message>
- <source>PRP_PLOT2D_CURVES_SPLINES</source>
- <translation>表示モードのスプラインを変更します。</translation>
+ <source>PREF_RIGHT</source>
+ <translation>右</translation>
</message>
<message>
- <source>INF_AXES_X</source>
- <translation>X 軸</translation>
+ <source>PREF_TOP</source>
+ <translation>ã\83\9aã\83¼ã\82¸ã\81®ã\83\88ã\83\83ã\83\97ã\81¸</translation>
</message>
<message>
- <source>PLOT2D_SCALE_TLT</source>
- <translation>スケール モード</translation>
+ <source>PREF_BOTTOM</source>
+ <translation type="unfinished">Bottom</translation>
</message>
<message>
- <source>DSC_FITALL</source>
- <translation>すべてのオブジェクトを表示するには、シーンを調整します。</translation>
+ <source>PREF_CURVE_TYPE</source>
+ <translation>曲線の種類:</translation>
</message>
<message>
- <source>MNU_FITALL</source>
- <translation>ã\81\99ã\81¹ã\81¦è¡¨ç¤º</translation>
+ <source>PREF_POINTS</source>
+ <translation>ã\83\9dã\82¤ã\83³ã\83\88</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>水平軸: 対数</translation>
+ <source>PREF_LINES</source>
+ <translation>ライン</translation>
</message>
<message>
- <source>TOT_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>垂直軸: 対数</translation>
+ <source>PREF_SPLINE</source>
+ <translation>スプライン</translation>
</message>
<message>
- <source>MNU_GLOBALPAN_VIEW</source>
- <translation>グローバルパンニング</translation>
+ <source>PREF_MARKER_SIZE</source>
+ <translation>座標系のサイズ:</translation>
</message>
<message>
- <source>INF_APP_DUMP_VIEW</source>
- <translation>ビューを保存します。</translation>
+ <source>PREF_LINEAR</source>
+ <translation>線形</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION_BOTTOM</source>
- <translation>Bottom</translation>
+ <source>PREF_LOGARITHMIC</source>
+ <translation>対数</translation>
</message>
<message>
- <source>INF_COORDINATES</source>
- <translation>お問い合わせ: x: %1、y: %2</translation>
+ <source>PREF_HOR_AXIS_SCALE</source>
+ <translation>水平方向の軸のスケール:</translation>
</message>
<message>
- <source>DSC_CLONE_VIEW</source>
- <translation>現在のステージの新しいビューアー OCC を開く</translation>
+ <source>PREF_VERT_AXIS_SCALE</source>
+ <translation>垂直軸のスケール:</translation>
</message>
<message>
- <source>DSC_PRINT_VIEW</source>
- <translation>現在のビューを印刷します。</translation>
+ <source>PREF_VIEWER_BACKGROUND</source>
+ <translation>背景色</translation>
</message>
+ </context>
+ <context>
+ <name>Plot2d_AnalyticalCurveDlg</name>
<message>
- <source>DASH_LINE_LBL</source>
- <translation>インデントを設定します。</translation>
+ <source>ANALYTICAL_CURVE_TLT</source>
+ <translation>分析曲線のプロパティ</translation>
</message>
<message>
- <source>DTRIANGLE_MARKER_LBL</source>
- <translation>下向きの三角形</translation>
+ <source>AC_CURVE_PARAMS</source>
+ <translation>曲線のパラメーター</translation>
</message>
<message>
- <source>UTRIANGLE_MARKER_LBL</source>
- <translation>三角形のトップ指向</translation>
+ <source>AC_CURVE_PROPS</source>
+ <translation>曲線のプロパティ</translation>
</message>
<message>
- <source>LTRIANGLE_MARKER_LBL</source>
- <translation>左の三角形を指向</translation>
+ <source>AC_FORMULA</source>
+ <translation>y (x) =</translation>
</message>
<message>
- <source>RTRIANGLE_MARKER_LBL</source>
- <translation>右向き三角形を指向</translation>
+ <source>AC_NB_INTERVALS</source>
+ <translation>Nb に登録間隔</translation>
</message>
<message>
- <source>RECTANGLE_MARKER_LBL</source>
- <translation>四角形の作成</translation>
+ <source>AC_AUTO_ASSIGN</source>
+ <translation>自動割り当て。</translation>
</message>
<message>
- <source>TLT_SETUP_PLOT2D_VIEW</source>
- <translation>2次元可視化設定をプロットします。</translation>
+ <source>AC_MARKER_TYPE</source>
+ <translation>マーカーの種類</translation>
</message>
<message>
- <source>CURVE_LINE_TYPE_LAB</source>
- <translation>回線の種類:</translation>
+ <source>AC_LINE_TYPE</source>
+ <translation>行の種類</translation>
</message>
<message>
- <source>CROSS_MARKER_LBL</source>
- <translation>クロス</translation>
+ <source>AC_LINE_WIDTH</source>
+ <translation>線の太さ</translation>
</message>
<message>
- <source>XCROSS_MARKER_LBL</source>
- <translation>æ\96\9cã\82\81å\8d\81å\97</translation>
+ <source>AC_CURVE_COLOR</source>
+ <translation>æ\9b²ç·\9aã\81®è\89²</translation>
</message>
<message>
- <source>PLOT2D_ENABLE_VER_TITLE</source>
- <translation>垂直軸のタイトル</translation>
+ <source>AC_ADD_BTN</source>
+ <translation>カーブを追加します。</translation>
</message>
<message>
- <source>PLOT2D_ENABLE_HOR_TITLE</source>
- <translation>水平軸のタイトル</translation>
+ <source>AC_REM_BTN</source>
+ <translation>カーブを削除します。</translation>
</message>
<message>
- <source>TOT_PLOT2D_SETTINGS</source>
- <translation>ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\83¼</translation>
+ <source>AC_OK_BTN</source>
+ <translation>ã\82\8fã\81\8bã\82\8aã\81¾ã\81\97ã\81\9f</translation>
</message>
<message>
- <source>TOT_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>分析曲線</translation>
+ <source>AC_APPLY_BTN</source>
+ <translation>適用</translation>
</message>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>左の Y 軸: グローバルの最大値を標準化します。</translation>
+ <source>AC_CANT_CALCULATE</source>
+ <translation>曲線は計算できません。入力パラメーターを確認してください。</translation>
</message>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>左の Y 軸: 世界最小の標準化</translation>
+ <source>AC_CLOSE_BTN</source>
+ <translation>閉じる(&C)</translation>
</message>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>右の Y 軸: グローバルの最大値を標準化します。</translation>
+ <source>AC_HELP_BTN</source>
+ <translation>ヘルプ</translation>
</message>
+ </context>
+ <context>
+ <name>Plot2d_SetupCurveScaleDlg</name>
<message>
- <source>TOT_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>右の Y 軸: 世界最小の標準化</translation>
+ <source>TLT_SETUP_CURVE_SCALE</source>
+ <translation>スケールの曲線 (s)</translation>
</message>
<message>
- <source>PLOT2D_CURVE_TYPE_LINES</source>
- <translation>ã\83©ã\82¤ã\83³</translation>
+ <source>CURVE_SCALE_FACTOR</source>
+ <translation>ã\82¹ã\82±ã\83¼ã\83« ã\83\95ã\82¡ã\82¯ã\82¿ã\83¼</translation>
</message>
+ </context>
+ <context>
+ <name>Plot2d_SetupViewDlg</name>
<message>
- <source>MEN_PLOT2D_CURVES_SPLINES</source>
- <translation>スプラインを描画します。</translation>
+ <source>PLOT2D_CURVE_TYPE_LBL</source>
+ <translation>曲線の種類:</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>横軸ã\81«å¯¾æ\95°ã\82¹ã\82±ã\83¼ã\83« ã\83¢ã\83¼ã\83\89ã\81®è¡¨ç¤ºæ\96¹æ³\95ã\82\92å¤\89æ\9b´</translation>
+ <source>PLOT2D_SET_AS_DEFAULT_CHECK</source>
+ <translation>æ\97¢å®\9aã\81®è¨å®\9aã\81¨ã\81\97ã\81¦ä¿\9då\98ã\81\97ã\81¾ã\81\99ã\80\82</translation>
</message>
<message>
- <source>PRP_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>垂直軸を対数スケール モードの表示方法を変更</translation>
+ <source>PLOT2D_SCALE_MODE_HOR</source>
+ <translation>水平軸:</translation>
</message>
<message>
- <source>PLOT2D_IMAGE_FILES</source>
- <translation>イメージ (*.bmp *.png *.jpg *.jpeg) ファイル</translation>
+ <source>PLOT2D_NORMALIZE_TLT</source>
+ <translation>標準化</translation>
</message>
<message>
- <source>PLOT2D_MAX_INTERVALS</source>
- <translation>æ\9c\80大é\96\93é\9a\94</translation>
+ <source>PLOT2D_NORMALIZE_MODE_MIN</source>
+ <translation>æ\9c\80å°\8fã\82\92æ¨\99æº\96å\8c\96ã\81\97ã\81¾ã\81\99ã\80\82</translation>
</message>
<message>
- <source>INF_AXES_Y_LEFT</source>
- <translation>左の Y 軸</translation>
+ <source>PLOT2D_NORMALIZE_MODE_MAX</source>
+ <translation>最大値を標準化します。</translation>
</message>
<message>
- <source>CURVE_COLOR_LAB</source>
- <translation>色:</translation>
+ <source>PLOT2D_NORMALIZE_LEFT_AXIS</source>
+ <translation>左の Y 軸:</translation>
</message>
<message>
- <source>CURVE_PREVIEW_LAB</source>
- <translation>プレビュー</translation>
+ <source>PLOT2D_NORMALIZE_RIGHT_AXIS</source>
+ <translation>右の Y 軸:</translation>
</message>
<message>
- <source>DIAMOND_MARKER_LBL</source>
- <translation>ダイヤモンド</translation>
+ <source>PLOT2D_SCALE_MODE_VER</source>
+ <translation>垂直軸:</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION_TOP</source>
- <translation>ã\83\88ã\83\83ã\83\97</translation>
+ <source>PLOT2D_GRID_TLT</source>
+ <translation>ã\82°ã\83ªã\83\83ã\83\89ã\80\81軸ã\81®ã\83\9eã\83¼ã\82¯</translation>
</message>
<message>
- <source>TOT_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>背景を変更</translation>
+ <source>INF_AXES_X</source>
+ <translation>X 軸</translation>
</message>
<message>
- <source>MEN_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>背景を変更する.</translation>
+ <source>PLOT2D_SCALE_TLT</source>
+ <translation>スケール モード</translation>
</message>
<message>
- <source>PRP_PLOT2D_CHANGE_BACKGROUND</source>
- <translation>背景の色を変更します。</translation>
+ <source>PLOT2D_LEGEND_POSITION_BOTTOM</source>
+ <translation type="unfinished">Bottom</translation>
</message>
<message>
- <source>SOLID_LINE_LBL</source>
- <translation>ソリッド</translation>
+ <source>TLT_SETUP_PLOT2D_VIEW</source>
+ <translation>2次元可視化設定をプロットします。</translation>
+ </message>
+ <message>
+ <source>PLOT2D_ENABLE_VER_TITLE</source>
+ <translation>垂直軸のタイトル</translation>
+ </message>
+ <message>
+ <source>PLOT2D_ENABLE_HOR_TITLE</source>
+ <translation>水平軸のタイトル</translation>
+ </message>
+ <message>
+ <source>PLOT2D_CURVE_TYPE_LINES</source>
+ <translation>ライン</translation>
+ </message>
+ <message>
+ <source>PLOT2D_MAX_INTERVALS</source>
+ <translation>最大間隔</translation>
+ </message>
+ <message>
+ <source>INF_AXES_Y_LEFT</source>
+ <translation>左の Y 軸</translation>
+ </message>
+ <message>
+ <source>PLOT2D_LEGEND_POSITION_TOP</source>
+ <translation>トップ</translation>
</message>
<message>
<source>PLOT2D_GRID_ENABLE_VER_MAJOR</source>
<source>PLOT2D_GRID_ENABLE_VER_MINOR</source>
<translation>セカンダリ垂直</translation>
</message>
- <message>
- <source>TOT_PLOT2D_CURVES_POINTS</source>
- <translation>ポイントを描画します。</translation>
- </message>
<message>
<source>PLOT2D_GRID_ENABLE_HOR_MINOR</source>
<translation>セカンダリ水平</translation>
<source>PLOT2D_DEVIATION_CL_LBL</source>
<translation>色</translation>
</message>
- <message>
- <source>WRN_XLOG_NOT_ALLOWED</source>
- <translation>X 軸上非陽性値を持つポイントが検出されました。カテゴリの対数目盛は許可されていません。</translation>
- </message>
- <message>
- <source>WRN_YLOG_NOT_ALLOWED</source>
- <translation>Y 軸上非陽性値を持つポイントが検出されました。切片の対数目盛は許可されていません。</translation>
- </message>
- <message>
- <source>DSC_FITRECT</source>
- <translation>シーンのボックスで選択した領域を調整します。</translation>
- </message>
<message>
<source>PLOT2D_LEGEND_POSITION_LEFT</source>
<translation>左</translation>
</message>
- <message>
- <source>MNU_FITRECT</source>
- <translation>表示エリア</translation>
- </message>
- <message>
- <source>DOT_LINE_LBL</source>
- <translation>基準点</translation>
- </message>
- <message>
- <source>MEN_PLOT2D_CURVES_POINTS</source>
- <translation>ポイントを描画します。</translation>
- </message>
- <message>
- <source>PRP_PLOT2D_CURVES_POINTS</source>
- <translation>表示モードのポイントを変更します。</translation>
- </message>
<message>
<source>PLOT2D_SCALE_MODE_LOGARITHMIC</source>
<translation>対数</translation>
<source>PLOT2D_LEGEND_POSITION_RIGHT</source>
<translation>右</translation>
</message>
- <message>
- <source>DSC_DUMP_VIEW</source>
- <translation>現在のビューをイメージ ファイルに保存します。</translation>
- </message>
- <message>
- <source>WARNING</source>
- <translation>警告</translation>
- </message>
<message>
<source>PLOT2D_ENABLE_LEGEND</source>
<translation>キャプションを表示します。</translation>
<translation>凡例のフォント</translation>
</message>
<message>
- <source>DSC_ZOOM_VIEW</source>
- <translation>ズーム</translation>
- </message>
- <message>
- <source>PRP_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>分析曲線のプロパティを設定します。</translation>
- </message>
- <message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>左側の Y 軸の最大の標準化の方法に、ビューを切り替える</translation>
+ <source>PLOT2D_SCALE_MODE_LINEAR</source>
+ <translation>線形</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>左側の Y 軸の最小の標準化の方法に、ビューを切り替える</translation>
+ <source>PLOT2D_CURVE_TYPE_POINTS</source>
+ <translation>ポイント</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>右側の Y 軸の最大の標準化の方法に、ビューを切り替える</translation>
+ <source>PLOT2D_CURVE_TYPE_SPLINE</source>
+ <translation>スプライン</translation>
</message>
<message>
- <source>PRP_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>右側の Y 軸の最小の標準化の方法に、ビューを切り替える</translation>
+ <source>INF_AXES_Y_RIGHT</source>
+ <translation>右の Y 軸</translation>
</message>
<message>
- <source>PRP_PLOT2D_SETTINGS</source>
- <translation>可視化を設定します。</translation>
+ <source>PLOT2D_MARKER_SIZE_LBL</source>
+ <translation>マーカーのサイズ:</translation>
</message>
<message>
- <source>INF_COORDINATES_SOME_Y</source>
- <translation>お問い合わせ: x: %1、y: %2 ( %3 )</translation>
+ <source>PLOT2D_ENABLE_MAIN_TITLE</source>
+ <translation>主なタイトル</translation>
</message>
<message>
- <source>SCALING_POPUP</source>
- <translation>スケール</translation>
+ <source>PLOT2D_LEGEND_GROUP</source>
+ <translation>凡例</translation>
</message>
<message>
- <source>PLOT2D_SCALE_MODE_LINEAR</source>
- <translation>線形</translation>
+ <source>PLOT2D_LEGEND_POSITION</source>
+ <translation>凡例の位置</translation>
</message>
<message>
- <source>TOT_PLOT2D_FITDATA</source>
- <translation>間隔を調整します。</translation>
+ <source>PLOT2D_LEGEND_SYMBOL_TYPE</source>
+ <translation>シンボルタイプ:</translation>
</message>
<message>
- <source>PLOT2D_CURVE_TYPE_POINTS</source>
- <translation>ポイント</translation>
+ <source>PLOT2D_MARKER_ABOVE_LINE</source>
+ <translation>線の上のマーカー</translation>
</message>
<message>
- <source>PLOT2D_CURVE_TYPE_SPLINE</source>
- <translation>スプライン</translation>
+ <source>PLOT2D_MARKER_ON_LINE</source>
+ <translation>線上のマーカー</translation>
</message>
<message>
- <source>MEN_PLOT2D_FITDATA</source>
- <translation>間隔を調整します。(&R)</translation>
+ <source>PLOT2D_LEGEND_FONT_COLOR</source>
+ <translation>凡例フォントの色:</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LOGARITHMIC_HOR</source>
- <translation>水平軸: 対数</translation>
+ <source>PLOT2D_SELECTED_LEGEND_FONT_COLOR</source>
+ <translation>ハイライト凡例フォントの色:</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_SetupCurveDlg</name>
<message>
- <source>MEN_PLOT2D_MODE_LOGARITHMIC_VER</source>
- <translation>垂直軸: 対数</translation>
+ <source>TLT_SETUP_CURVE</source>
+ <translation>曲線を初期化します。</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_LMIN</source>
- <translation>左の Y 軸: 最小</translation>
+ <source>CURVE_LINE_WIDTH_LAB</source>
+ <translation>線の太さ:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_LMAX</source>
- <translation>å·¦ã\81® Y 軸: æ\9c\80大</translation>
+ <source>CURVE_LINE_TYPE_LAB</source>
+ <translation>å\9b\9eç·\9aã\81®ç¨®é¡\9e:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_RMIN</source>
- <translation>右の Y 軸: 最小</translation>
+ <source>CURVE_COLOR_LAB</source>
+ <translation>色:</translation>
</message>
<message>
- <source>MEN_PLOT2D_NORMALIZE_MODE_RMAX</source>
- <translation>右の Y 軸: 最大</translation>
+ <source>CURVE_PREVIEW_LAB</source>
+ <translation>プレビュー</translation>
</message>
<message>
- <source>PRP_PLOT2D_FITDATA</source>
- <translation>指定したデータ範囲を調整します。</translation>
+ <source>CURVE_MARKER_TYPE_LAB</source>
+ <translation>マーカーの種類:</translation>
</message>
+</context>
+<context>
+ <name>Plot2d_ViewWindow</name>
<message>
- <source>MEN_PLOT2D_MODE_LINEAR_VER</source>
- <translation>垂直軸: 線形</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>ビューを保存.</translation>
</message>
<message>
- <source>MEN_PLOT2D_MODE_LINEAR_HOR</source>
- <translation>水平軸: 線形</translation>
+ <source>MNU_PAN_VIEW</source>
+ <translation>パンニング</translation>
</message>
<message>
- <source>NONE_MARKER_LBL</source>
- <translation>[なし]</translation>
+ <source>MNU_CLONE_VIEW</source>
+ <translation>ビューの複製</translation>
</message>
<message>
- <source>ERR_DOC_CANT_SAVE_FILE</source>
- <translation>ファイルを保存できませんでした。</translation>
+ <source>MNU_PRINT_VIEW</source>
+ <translation>印刷ビュー</translation>
</message>
<message>
- <source>MEN_PLOT2D_SHOW_LEGEND</source>
- <translation>キャプションを表示します。(&L)</translation>
+ <source>POSTSCRIPT_FILES</source>
+ <translation>PostScript ファイル (* .ps)</translation>
</message>
<message>
- <source>PRP_PLOT2D_SHOW_LEGEND</source>
- <translation>凡例を有効または無効</translation>
+ <source>ENCAPSULATED_POSTSCRIPT_FILES</source>
+ <translation>カプセル化された PostScript (*.eps) ファイル</translation>
</message>
<message>
- <source>TOT_PLOT2D_SHOW_LEGEND</source>
- <translation>キャプションを表示します。</translation>
+ <source>PDF_FILES</source>
+ <translation>PDF files (*.pdf)</translation>
</message>
<message>
- <source>INF_AXES_Y_RIGHT</source>
- <translation>右の Y 軸</translation>
+ <source>DSC_GLOBALPAN_VIEW</source>
+ <translation>ビューの新しい中心地の選択</translation>
</message>
<message>
- <source>DAHSDOTDOT_LINE_LBL</source>
- <translation>TiretPointPoint</translation>
+ <source>PRP_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>線形スケールのモードには、垂直軸の表示を変更します。</translation>
</message>
<message>
- <source>TOT_PLOT2D_CURVES_SPLINES</source>
- <translation>スプラインを描画します。</translation>
+ <source>PRP_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>線形スケールのモードに、ビューの水平方向の軸を変更します。</translation>
</message>
<message>
- <source>CURVE_MARKER_TYPE_LAB</source>
- <translation>マーカーの種類:</translation>
+ <source>CURVE_TYPE_POPUP</source>
+ <translation>曲線の種類</translation>
</message>
<message>
- <source>MEN_PLOT2D_SETTINGS</source>
- <translation>パラメーター(&S)</translation>
+ <source>NORMALIZATION_TYPE_POPUP</source>
+ <translation>標準化</translation>
</message>
<message>
- <source>MEN_PLOT2D_ANALYTICAL_CURVES</source>
- <translation>å\88\86æ\9e\90æ\9b²ç·\9a</translation>
+ <source>TOT_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>å\9e\82ç\9b´è»¸: ç·\9aå½¢</translation>
</message>
<message>
- <source>CIRCLE_MARKER_LBL</source>
- <translation>円</translation>
+ <source>TOT_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>水平軸: 線形</translation>
</message>
<message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>表示操作</translation>
+ <source>MNU_ZOOM_VIEW</source>
+ <translation>ズーム</translation>
</message>
<message>
- <source>NONE_LINE_LBL</source>
- <translation>[なし]</translation>
+ <source>DSC_PAN_VIEW</source>
+ <translation>ビューを移動します。</translation>
</message>
<message>
- <source>PLOT2D_MARKER_SIZE_LBL</source>
- <translation>マーカーのサイズ:</translation>
+ <source>PRP_PLOT2D_CURVES_SPLINES</source>
+ <translation>表示モードのスプラインを変更します。</translation>
</message>
<message>
- <source>PLOT2D_ENABLE_MAIN_TITLE</source>
- <translation>主なタイトル</translation>
+ <source>DSC_FITALL</source>
+ <translation>すべてのオブジェクトを表示するには、シーンを調整します。</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_GROUP</source>
- <translation>凡例</translation>
+ <source>MNU_FITALL</source>
+ <translation>すべて表示</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_POSITION</source>
- <translation>凡例の位置</translation>
+ <source>TOT_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>水平軸: 対数</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_SYMBOL_TYPE</source>
- <translation>シンボルタイプ:</translation>
+ <source>TOT_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>垂直軸: 対数</translation>
</message>
<message>
- <source>PLOT2D_MARKER_ABOVE_LINE</source>
- <translation>線の上のマーカー</translation>
+ <source>MNU_GLOBALPAN_VIEW</source>
+ <translation>グローバルパンニング</translation>
</message>
<message>
- <source>PLOT2D_MARKER_ON_LINE</source>
- <translation>ç·\9aä¸\8aã\81®ã\83\9eã\83¼ã\82«ã\83¼</translation>
+ <source>DSC_CLONE_VIEW</source>
+ <translation>ç\8f¾å\9c¨ã\81®ã\82¹ã\83\86ã\83¼ã\82¸ã\81®æ\96°ã\81\97ã\81\84ã\83\93ã\83¥ã\83¼ã\82¢ã\83¼ OCC ã\82\92é\96\8bã\81\8f</translation>
</message>
<message>
- <source>PLOT2D_LEGEND_FONT_COLOR</source>
- <translation>凡例フォントの色:</translation>
+ <source>DSC_PRINT_VIEW</source>
+ <translation>現在のビューを印刷します。</translation>
</message>
<message>
- <source>PLOT2D_SELECTED_LEGEND_FONT_COLOR</source>
- <translation>ã\83\8fã\82¤ã\83©ã\82¤ã\83\88å\87¡ä¾\8bã\83\95ã\82©ã\83³ã\83\88ã\81®è\89²:</translation>
+ <source>TOT_PLOT2D_SETTINGS</source>
+ <translation>ã\83\91ã\83©ã\83¡ã\83¼ã\82¿ã\83¼</translation>
</message>
<message>
- <source>TOT_PLOT2D_CURVES_LINES</source>
- <translation>線を描く</translation>
+ <source>TOT_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>分析曲線</translation>
</message>
<message>
- <source>PRP_PLOT2D_CURVES_LINES</source>
- <translation>表示モードの行を変更します。</translation>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>左の Y 軸: グローバルの最大値を標準化します。</translation>
</message>
<message>
- <source>MEN_PLOT2D_CURVES_LINES</source>
- <translation>線を描く</translation>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>左の Y 軸: 世界最小の標準化</translation>
</message>
- </context>
- <context>
- <name>Plot2d_FitDataDlg</name>
<message>
- <source>FIT_HORIZONTAL</source>
- <translation>水平調整します。</translation>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>右の Y 軸: グローバルの最大値を標準化します。</translation>
</message>
<message>
- <source>MIN_VALUE_LAB</source>
- <translation>最小:</translation>
+ <source>TOT_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>右の Y 軸: 世界最小の標準化</translation>
</message>
<message>
- <source>VERTICAL_AXIS</source>
- <translation>垂直軸</translation>
+ <source>MEN_PLOT2D_CURVES_SPLINES</source>
+ <translation>スプラインを描画します。</translation>
</message>
<message>
- <source>MAX_VALUE_LAB</source>
- <translation>æ\9c\80大:</translation>
+ <source>PRP_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>横軸ã\81«å¯¾æ\95°ã\82¹ã\82±ã\83¼ã\83« ã\83¢ã\83¼ã\83\89ã\81®è¡¨ç¤ºæ\96¹æ³\95ã\82\92å¤\89æ\9b´</translation>
</message>
<message>
- <source>HORIZONTAL_AXIS</source>
- <translation>水平軸</translation>
+ <source>PRP_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>垂直軸を対数スケール モードの表示方法を変更</translation>
</message>
<message>
- <source>VERTICAL_LEFT_AXIS</source>
- <translation>左側の垂直軸</translation>
+ <source>TOT_PLOT2D_CURVES_POINTS</source>
+ <translation>ポイントを描画します。</translation>
</message>
<message>
- <source>FIT_ALL</source>
- <translation>ã\81\99ã\81¹ã\81¦を調整します。</translation>
+ <source>DSC_FITRECT</source>
+ <translation>ã\82·ã\83¼ã\83³ã\81®ã\83\9cã\83\83ã\82¯ã\82¹ã\81§é\81¸æ\8a\9eã\81\97ã\81\9fé \98å\9f\9fを調整します。</translation>
</message>
<message>
- <source>VERTICAL_RIGHT_AXIS</source>
- <translation>右数値軸</translation>
+ <source>MNU_FITRECT</source>
+ <translation>表示エリア</translation>
</message>
<message>
- <source>FIT_VERTICAL</source>
- <translation>垂直方向に調整します。</translation>
+ <source>MEN_PLOT2D_CURVES_POINTS</source>
+ <translation>ポイントを描画します。</translation>
</message>
- </context>
- <context>
- <name>Plot2d_ViewManager</name>
<message>
- <source>PLOT2D_VIEW_TITLE</source>
- <translation>シーン Plot2d: %M - ビューアー: %V</translation>
+ <source>PRP_PLOT2D_CURVES_POINTS</source>
+ <translation>表示モードのポイントを変更します。</translation>
</message>
<message>
- <source>PREF_GROUP_PLOT2DVIEWER</source>
- <translation>Plot 2D Viewer</translation>
+ <source>DSC_DUMP_VIEW</source>
+ <translation>現在のビューをイメージ ファイルに保存します。</translation>
</message>
<message>
- <source>PREF_SHOW_LEGEND</source>
- <translation>ã\82ã\83£ã\83\97ã\82·ã\83§ã\83³ã\82\92表示ã\81\97ã\81¾ã\81\99ã\80\82</translation>
+ <source>DSC_ZOOM_VIEW</source>
+ <translation>ã\82ºã\83¼ã\83 </translation>
</message>
<message>
- <source>PREF_LEGEND_POSITION</source>
- <translation>å\87¡ä¾\8bã\81®ä½\8dç½®:</translation>
+ <source>PRP_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>å\88\86æ\9e\90æ\9b²ç·\9aã\81®ã\83\97ã\83ã\83\91ã\83\86ã\82£ã\82\92è¨å®\9aã\81\97ã\81¾ã\81\99ã\80\82</translation>
</message>
<message>
- <source>PREF_LEFT</source>
- <translation>左</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>左側の Y 軸の最大の標準化の方法に、ビューを切り替える</translation>
</message>
<message>
- <source>PREF_RIGHT</source>
- <translation>å\8f³</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>å·¦å\81´ã\81® Y 軸ã\81®æ\9c\80å°\8fã\81®æ¨\99æº\96å\8c\96ã\81®æ\96¹æ³\95ã\81«ã\80\81ã\83\93ã\83¥ã\83¼ã\82\92å\88\87ã\82\8aæ\9b¿ã\81\88ã\82\8b</translation>
</message>
<message>
- <source>PREF_TOP</source>
- <translation>ページのトップへ</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>右側の Y 軸の最大の標準化の方法に、ビューを切り替える</translation>
</message>
<message>
- <source>PREF_BOTTOM</source>
- <translation>BAS</translation>
+ <source>PRP_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>右側の Y 軸の最小の標準化の方法に、ビューを切り替える</translation>
</message>
<message>
- <source>PREF_CURVE_TYPE</source>
- <translation>曲線の種類:</translation>
+ <source>PRP_PLOT2D_SETTINGS</source>
+ <translation>可視化を設定します。</translation>
</message>
<message>
- <source>PREF_POINTS</source>
- <translation>ã\83\9dã\82¤ã\83³ã\83\88</translation>
+ <source>SCALING_POPUP</source>
+ <translation>ã\82¹ã\82±ã\83¼ã\83«</translation>
</message>
<message>
- <source>PREF_LINES</source>
- <translation>ライン</translation>
+ <source>TOT_PLOT2D_FITDATA</source>
+ <translation>間隔を調整します。</translation>
</message>
<message>
- <source>PREF_SPLINE</source>
- <translation>スプライン</translation>
+ <source>MEN_PLOT2D_FITDATA</source>
+ <translation>間隔を調整します。(&R)</translation>
</message>
<message>
- <source>PREF_MARKER_SIZE</source>
- <translation>座標系のサイズ:</translation>
+ <source>PRP_PLOT2D_FITDATA</source>
+ <translation>指定したデータ範囲を調整します。</translation>
</message>
<message>
- <source>PREF_LINEAR</source>
- <translation>線形</translation>
+ <source>MEN_PLOT2D_MODE_LOGARITHMIC_HOR</source>
+ <translation>水平軸: 対数</translation>
</message>
<message>
- <source>PREF_LOGARITHMIC</source>
- <translation>対数</translation>
+ <source>MEN_PLOT2D_MODE_LOGARITHMIC_VER</source>
+ <translation>å\9e\82ç\9b´è»¸: 対æ\95°</translation>
</message>
<message>
- <source>PREF_HOR_AXIS_SCALE</source>
- <translation>水平方向の軸のスケール:</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_LMIN</source>
+ <translation>左の Y 軸: 最小</translation>
</message>
<message>
- <source>PREF_VERT_AXIS_SCALE</source>
- <translation>å\9e\82ç\9b´è»¸ã\81®ã\82¹ã\82±ã\83¼ã\83«:</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_LMAX</source>
+ <translation>å·¦ã\81® Y 軸: æ\9c\80大</translation>
</message>
<message>
- <source>PREF_VIEWER_BACKGROUND</source>
- <translation>背景色</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_RMIN</source>
+ <translation>右の Y 軸: 最小</translation>
</message>
- </context>
- <context>
- <name>Plot2d_AnalyticalCurveDlg</name>
<message>
- <source>ANALYTICAL_CURVE_TLT</source>
- <translation>å\88\86æ\9e\90æ\9b²ç·\9aã\81®ã\83\97ã\83ã\83\91ã\83\86ã\82£</translation>
+ <source>MEN_PLOT2D_NORMALIZE_MODE_RMAX</source>
+ <translation>å\8f³ã\81® Y 軸: æ\9c\80大</translation>
</message>
<message>
- <source>AC_CURVE_PARAMS</source>
- <translation>曲線のパラメーター</translation>
+ <source>MEN_PLOT2D_MODE_LINEAR_VER</source>
+ <translation>垂直軸: 線形</translation>
</message>
<message>
- <source>AC_CURVE_PROPS</source>
- <translation>æ\9b²ç·\9aã\81®ã\83\97ã\83ã\83\91ã\83\86ã\82£</translation>
+ <source>MEN_PLOT2D_MODE_LINEAR_HOR</source>
+ <translation>水平軸: ç·\9aå½¢</translation>
</message>
<message>
- <source>AC_FORMULA</source>
- <translation>y (x) =</translation>
+ <source>MEN_PLOT2D_SHOW_LEGEND</source>
+ <translation>キャプションを表示します。(&L)</translation>
</message>
<message>
- <source>AC_NB_INTERVALS</source>
- <translation>Nb に登録間隔</translation>
+ <source>PRP_PLOT2D_SHOW_LEGEND</source>
+ <translation>凡例を有効または無効</translation>
</message>
<message>
- <source>AC_AUTO_ASSIGN</source>
- <translation>自動割り当て。</translation>
+ <source>TOT_PLOT2D_SHOW_LEGEND</source>
+ <translation>キャプションを表示します。</translation>
</message>
<message>
- <source>AC_MARKER_TYPE</source>
- <translation>ã\83\9eã\83¼ã\82«ã\83¼ã\81®ç¨®é¡\9e</translation>
+ <source>TOT_PLOT2D_CURVES_SPLINES</source>
+ <translation>ã\82¹ã\83\97ã\83©ã\82¤ã\83³ã\82\92æ\8f\8fç\94»ã\81\97ã\81¾ã\81\99ã\80\82</translation>
</message>
<message>
- <source>AC_LINE_TYPE</source>
- <translation>行の種類</translation>
+ <source>MEN_PLOT2D_SETTINGS</source>
+ <translation>パラメーター(&S)</translation>
</message>
<message>
- <source>AC_LINE_WIDTH</source>
- <translation>線の太さ</translation>
+ <source>MEN_PLOT2D_ANALYTICAL_CURVES</source>
+ <translation>分析曲線</translation>
</message>
<message>
- <source>AC_CURVE_COLOR</source>
- <translation>曲線の色</translation>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>表示操作</translation>
</message>
<message>
- <source>AC_ADD_BTN</source>
- <translation>カーブを追加します。</translation>
+ <source>TOT_PLOT2D_CURVES_LINES</source>
+ <translation>線を描く</translation>
</message>
<message>
- <source>AC_REM_BTN</source>
- <translation>カーブを削除します。</translation>
+ <source>PRP_PLOT2D_CURVES_LINES</source>
+ <translation>表示モードの行を変更します。</translation>
</message>
<message>
- <source>AC_OK_BTN</source>
- <translation>わかりました</translation>
+ <source>MEN_PLOT2D_CURVES_LINES</source>
+ <translation>線を描く</translation>
</message>
+ </context>
+ <context>
+ <name>Plot2d_Viewer</name>
<message>
- <source>AC_APPLY_BTN</source>
- <translation>適用</translation>
+ <source>MNU_DUMP_VIEW</source>
+ <translation>ビューを保存.</translation>
</message>
<message>
- <source>AC_CANT_CALCULATE</source>
- <translation>曲線は計算できません。入力パラメーターを確認してください。</translation>
+ <source>MEN_PLOT2D_CHANGE_BACKGROUND</source>
+ <translation>背景を変更する.</translation>
</message>
+ </context>
+ <context>
+ <name>Plot2d_ViewFrame</name>
<message>
- <source>AC_CLOSE_BTN</source>
- <translation>閉じる(&C)</translation>
+ <source>INF_COORDINATES</source>
+ <translation>お問い合わせ: x: %1、y: %2</translation>
</message>
<message>
- <source>AC_HELP_BTN</source>
- <translation>ã\83\98ã\83«ã\83\97</translation>
+ <source>INF_COORDINATES_SOME_Y</source>
+ <translation>ã\81\8aå\95\8fã\81\84å\90\88ã\82\8fã\81\9b: x: %1ã\80\81y: %2 ( %3 )</translation>
</message>
- </context>
- <context>
- <name>Plot2d_SetupCurveScaleDlg</name>
<message>
- <source>TLT_SETUP_CURVE_SCALE</source>
- <translation>スケールの曲線 (s)</translation>
+ <source>WRN_XLOG_NOT_ALLOWED</source>
+ <translation>X 軸上非陽性値を持つポイントが検出されました。カテゴリの対数目盛は許可されていません。</translation>
</message>
<message>
- <source>CURVE_SCALE_FACTOR</source>
- <translation>スケール ファクター</translation>
+ <source>WRN_YLOG_NOT_ALLOWED</source>
+ <translation>Y 軸上非陽性値を持つポイントが検出されました。切片の対数目盛は許可されていません。</translation>
</message>
</context>
</TS>
menu->addAction( myActions[SelectAllId] );
menu->addSeparator();
menu->addAction( myActions[DumpCommandsId] );
+ if ( !myEditor->isLogging() )
+ menu->addAction( myActions[StartLogId] );
+ else
+ menu->addAction( myActions[StopLogId] );
Qtx::simplifySeparators( menu );
myActions[ClearId]->setVisible( flags & ClearId );
myActions[SelectAllId]->setVisible( flags & SelectAllId );
myActions[DumpCommandsId]->setVisible( flags & DumpCommandsId );
+ myActions[StartLogId]->setVisible( flags & StartLogId );
+ myActions[StopLogId]->setVisible( flags & StopLogId );
}
/*!
ret = ret | ( myActions[ClearId]->isVisible() ? ClearId : 0 );
ret = ret | ( myActions[SelectAllId]->isVisible() ? SelectAllId : 0 );
ret = ret | ( myActions[DumpCommandsId]->isVisible() ? DumpCommandsId : 0 );
+ ret = ret | ( myActions[StartLogId]->isVisible() ? StartLogId : 0 );
+ ret = ret | ( myActions[StopLogId]->isVisible() ? StopLogId : 0 );
return ret;
}
a->setStatusTip( tr( "EDIT_DUMPCOMMANDS_CMD" ) );
connect( a, SIGNAL( triggered( bool ) ), myEditor, SLOT( dump() ) );
myActions.insert( DumpCommandsId, a );
+
+ a = new QAction( tr( "EDIT_STARTLOG_CMD" ), this );
+ a->setStatusTip( tr( "EDIT_STARTLOG_CMD" ) );
+ connect( a, SIGNAL( triggered( bool ) ), myEditor, SLOT( startLog() ) );
+ myActions.insert( StartLogId, a );
+
+ a = new QAction( tr( "EDIT_STOPLOG_CMD" ), this );
+ a->setStatusTip( tr( "EDIT_STOPLOG_CMD" ) );
+ connect( a, SIGNAL( triggered( bool ) ), myEditor, SLOT( stopLog() ) );
+ myActions.insert( StopLogId, a );
}
/*!
myActions[SelectAllId]->setEnabled( !myEditor->document()->isEmpty() );
}
+/*!
+ \brief Start python trace logging
+ \param fileName the path to the log file
+*/
+void PyConsole_Console::startLog( const QString& fileName )
+{
+ myEditor->startLog( fileName );
+}
+
+/*!
+ \brief Stop python trace logging
+*/
+void PyConsole_Console::stopLog()
+{
+ myEditor->stopLog();
+}
+
/**
* Similar to constructor of the base class but using enhanced objects.
* TODO: this should really be done in a factory to avoid code duplication.
//! Context popup menu actions flags
enum
{
- CopyId = 0x01, //!< "Copy" menu action
- PasteId = 0x02, //!< "Paste" menu action
- ClearId = 0x04, //!< "Clear" menu action
- SelectAllId = 0x08, //!< "Select All" menu action
- DumpCommandsId = 0x16, //!< "DumpCommands" menu action
- All = CopyId | PasteId | ClearId | SelectAllId | DumpCommandsId //!< all menu actions
+ CopyId = 0x01, //!< "Copy" menu action
+ PasteId = 0x02, //!< "Paste" menu action
+ ClearId = 0x04, //!< "Clear" menu action
+ SelectAllId = 0x08, //!< "Select All" menu action
+ DumpCommandsId = 0x10, //!< "DumpCommands" menu action
+ StartLogId = 0x20, //!< "Start log" menu action
+ StopLogId = 0x40, //!< "Stop log" menu action
+ All = 0xFF, //!< all menu actions
};
public:
void setMenuActions( const int );
int menuActions() const;
+ void startLog( const QString& );
+ void stopLog();
+
protected:
void createActions();
void updateActions();
void staticCallbackStdout( void* data, char* c )
{
- if(!((PyConsole_Editor*)data)->isSuppressOutput())
- QApplication::postEvent( (PyConsole_Editor*)data, new PrintEvent( c, false ) );
+ if(!((PyConsole_Editor*)data)->isSuppressOutput()) {
+ PyConsole_Editor* e = (PyConsole_Editor*)data;
+ e->putLog( QString::fromUtf8(c) );
+ QApplication::postEvent( e, new PrintEvent( QString::fromUtf8(c), false ) );
+ }
}
void staticCallbackStderr( void* data, char* c )
{
- if(!((PyConsole_Editor*)data)->isSuppressOutput())
- QApplication::postEvent( (PyConsole_Editor*)data, new PrintEvent( c, true ) );
+ if(!((PyConsole_Editor*)data)->isSuppressOutput()) {
+ PyConsole_Editor* e = (PyConsole_Editor*)data;
+ e->putLog( QString::fromUtf8(c) );
+ QApplication::postEvent( e, new PrintEvent( QString::fromUtf8(c), true ) );
+ }
}
}
}
+/*!
+ \brief Check if trace logging is switched on.
+
+ \sa startLog(), stopLog()
+ \return \c true if trace logging is switched on
+*/
+bool PyConsole_Editor::isLogging() const
+{
+ return !myLogFile.isEmpty();
+}
+
/*!
\brief Get size hint for the Python console window
\return size hint value
if ( !lines[i].trimmed().isEmpty() )
myHistory.push_back( lines[i] );
addText( ( i == 0 ? READY_PROMPT : DOTS_PROMPT ) + lines[i], i != 0 );
+ putLog( QString( "%1%2\n" ).arg( i == 0 ? READY_PROMPT : DOTS_PROMPT ).arg( lines[i] ) );
}
// IPAL20182
addText( "", true );
// add command to the history
if ( !cmd.trimmed().isEmpty() )
myHistory.push_back( cmd );
+ putLog( QString( "%1%2\n" ).arg( myPrompt ).arg( cmd ) );
// IPAL19397
addText( "", true );
aFilters.append( tr( "PYTHON_FILES_FILTER" ) );
QString fileName = SUIT_FileDlg::getFileName( this, QString(),
- aFilters, tr( "TOT_DUMP_PYCOMMANDS" ),
- false, true, new DumpCommandsFileValidator( this ) );
- if ( fileName != "" ) {
+ aFilters, tr( "TOT_DUMP_PYCOMMANDS" ),
+ false, true, new DumpCommandsFileValidator( this ) );
+ if ( !fileName.isEmpty() ) {
QFile file( fileName );
if ( !file.open( QFile::WriteOnly ) )
return;
QTextStream out (&file);
- for( int i=0; i<myHistory.count(); i++ ) {
- out<<myHistory[i]<<endl;
+ for ( int i=0; i<myHistory.count(); i++ ) {
+ out << myHistory[i] << endl;
+ }
+ file.close();
+ }
+}
+/*!
+ \brief "Start log" operation.
+ */
+void PyConsole_Editor::startLog()
+{
+ QStringList aFilters;
+ aFilters.append( tr( "LOG_FILES_FILTER" ) );
+
+ while (1) {
+ QString fileName = SUIT_FileDlg::getFileName( this, QString(),
+ aFilters, tr( "TOT_SAVE_PYLOG" ),
+ false, true );
+ if ( !fileName.isEmpty() ) {
+ if ( startLog( fileName ) ) {
+ break;
+ }
+ else {
+ SUIT_MessageBox::critical( this,
+ QObject::tr("ERR_ERROR"),
+ QObject::tr("ERR_FILE_NOT_WRITABLE") );
+ }
+ }
+ else {
+ break;
}
+ }
+}
+
+/*!
+ \brief Start python trace logging
+ \param fileName the path to the log file
+ \sa stopLog()
+ */
+bool PyConsole_Editor::startLog( const QString& fileName )
+{
+ bool ok = false;
+ if ( !fileName.isEmpty() ) {
+ QFile file( fileName );
+ if ( file.open( QFile::WriteOnly ) ) {
+ file.close();
+ myLogFile = fileName;
+ ok = true;
+ }
+ }
+ return ok;
+}
+
+/*!
+ \brief "Stop log" operation.
+ \sa startLog()
+ */
+void PyConsole_Editor::stopLog()
+{
+ myLogFile = QString();
+}
+
+/*!
+ \brief Put string to the log file
+ */
+void PyConsole_Editor::putLog( const QString& s )
+{
+ if ( !myLogFile.isEmpty() ) {
+ QFile file( myLogFile );
+ if ( !file.open( QFile::Append ) )
+ return;
+
+ QTextStream out (&file);
+ out << s;
+
file.close();
}
}
bool isShowBanner() const;
void setIsShowBanner( const bool );
+ bool isLogging() const;
+
virtual QSize sizeHint() const;
public slots:
void handleReturn();
void onPyInterpChanged( PyConsole_Interp* );
void dump();
+ bool startLog( const QString& );
+ void startLog();
+ void stopLog();
+ void putLog( const QString& );
protected:
virtual void dropEvent( QDropEvent* event );
QString myCurrentCommand; //!< currently being printed command
QString myPrompt; //!< current command line prompt
int myCmdInHistory; //!< current history command index
+ QString myLogFile; //!< current output log
QStringList myHistory; //!< commands history buffer
QEventLoop* myEventLoop; //!< internal event loop
QString myBanner; //!< current banner
if (dirArgument.trimmed() != "")
cmd = dirArgument + ".";
cmd += _last_matches[0] + ".__doc__";
- PyObject * str = PyRun_String(cmd.toStdString().c_str(), Py_eval_input, _context, _context);
+ PyObject * str = PyRun_String(cmd.toStdString().c_str(), Py_eval_input, _global_context, _local_context);
if (!str || str == Py_None || !PyString_Check(str))
{
if (!str)
{
QRegExp re("^[A-Z].+_[A-Z]+[a-z]+.+$"); // discard SWIG static method, e.g. MEDCouplingUMesh_Blabla
QString command("dir(" + dirArgument + ")");
- PyObject * plst = PyRun_String(command.toStdString().c_str(), Py_eval_input, _context, _context);
+ PyObject * plst = PyRun_String(command.toStdString().c_str(), Py_eval_input, _global_context, _local_context);
if(!plst || plst == Py_None) {
if(!plst)
PyErr_Clear();
\param c message text (python trace)
\param isError default to false - if true indicates that an error is being printed.
*/
- PrintEvent( const char* c, bool isError = false) :
+ PrintEvent( const QString& c, bool isError = false) :
QEvent( (QEvent::Type)EVENT_ID ), myText( c ), errorFlag(isError)
{}
// SALOME SALOMEGUI : implementation of desktop and GUI kernel
// File : PyConsole_Interp.cxx
-// Author : Nicolas REJNERI
+// Author : Nicolas REJNERI, Adrien BRUNETON
// Module : SALOME
//
#include "PyConsole_Interp.h"
The method initialize() calls virtuals methods
- initPython() to initialize global Python interpreter
- //- initState() to initialize embedded interpreter state (OBSOLETE)
- initContext() to initialize interpreter internal context
- initRun() to prepare interpreter for running commands
*/
{
}
-/*!
- \brief Initialize python interpeter context.
-
- The GIL is assumed to be held.
- It is the caller responsability to acquire the GIL.
- It must still be held on initContext() exit.
-
- \return \c true on success
-*/
-bool PyConsole_Interp::initContext()
-{
- PyObject *m = PyImport_AddModule("__main__"); // interpreter main module (module context)
- if(!m){
- PyErr_Print();
- return false;
- }
- PyObject* global_dict = PyModule_GetDict(m); // get interpreter dictionnary context
- _context = PyDict_Copy(global_dict);
- return true;
-}
// SALOME SALOMEGUI : implementation of desktop and GUI kernel
// File : PyConsole_Interp.h
-// Author : Nicolas REJNERI
+// Author : Nicolas REJNERI, Adrien BRUNETON
// Module : SALOME
//
#ifndef PYCONSOLE_INTERP_H
public:
PyConsole_Interp();
~PyConsole_Interp();
-
-protected:
- virtual bool initContext();
};
#endif // PYCONSOLE_INTERP_H
</message>
<message>
<source>EDIT_DUMPCOMMANDS_CMD</source>
- <translation>D&ump commands</translation>
+ <translation>D&ump Commands</translation>
+ </message>
+ <message>
+ <source>EDIT_STARTLOG_CMD</source>
+ <translation>Start &Log</translation>
+ </message>
+ <message>
+ <source>EDIT_STOPLOG_CMD</source>
+ <translation>Stop &Log</translation>
</message>
</context>
<context>
<source>TOT_DUMP_PYCOMMANDS</source>
<translation>Dump commands</translation>
</message>
+ <message>
+ <source>TOT_SAVE_PYLOG</source>
+ <translation>Save log</translation>
+ </message>
<message>
<source>PYTHON_FILES_FILTER</source>
<translation>PYTHON Files (*.py)</translation>
</message>
+ <message>
+ <source>LOG_FILES_FILTER</source>
+ <translation>Log files (*.log *.txt)</translation>
+ </message>
+ <message>
+ <source>ERR_FILE_NOT_WRITABLE</source>
+ <translation>File is not writable!</translation>
+ </message>
</context>
</TS>
<source>EDIT_DUMPCOMMANDS_CMD</source>
<translation>&Générer le script des commandes</translation>
</message>
+ <message>
+ <source>EDIT_STARTLOG_CMD</source>
+ <translation type="unfinished">Start &Log</translation>
+ </message>
+ <message>
+ <source>EDIT_STOPLOG_CMD</source>
+ <translation type="unfinished">Stop &Log</translation>
+ </message>
</context>
<context>
<name>PyConsole_Editor</name>
<source>TOT_DUMP_PYCOMMANDS</source>
<translation>&Générer le script des commandes</translation>
</message>
+ <message>
+ <source>TOT_SAVE_PYLOG</source>
+ <translation type="unfinished">Save log</translation>
+ </message>
<message>
<source>PYTHON_FILES_FILTER</source>
<translation>Fichiers PYTHON (*.py)</translation>
</message>
+ <message>
+ <source>LOG_FILES_FILTER</source>
+ <translation type="unfinished">Log files (*.log *.txt)</translation>
+ </message>
+ <message>
+ <source>ERR_FILE_NOT_WRITABLE</source>
+ <translation type="unfinished">File is not writable!</translation>
+ </message>
</context>
</TS>
<source>EDIT_DUMPCOMMANDS_CMD</source>
<translation>スクリプト コマンドを生成します。(&u)</translation>
</message>
+ <message>
+ <source>EDIT_STARTLOG_CMD</source>
+ <translation type="unfinished">Start &Log</translation>
+ </message>
+ <message>
+ <source>EDIT_STOPLOG_CMD</source>
+ <translation type="unfinished">Stop &Log</translation>
+ </message>
</context>
<context>
<name>PyConsole_Editor</name>
<source>TOT_DUMP_PYCOMMANDS</source>
<translation>スクリプト コマンドを生成します。</translation>
</message>
+ <message>
+ <source>TOT_SAVE_PYLOG</source>
+ <translation type="unfinished">Save log</translation>
+ </message>
<message>
<source>PYTHON_FILES_FILTER</source>
<translation>ファイル (*.py) PYTHON</translation>
</message>
+ <message>
+ <source>LOG_FILES_FILTER</source>
+ <translation type="unfinished">Log files (*.log *.txt)</translation>
+ </message>
+ <message>
+ <source>ERR_FILE_NOT_WRITABLE</source>
+ <translation type="unfinished">File is not writable!</translation>
+ </message>
</context>
</TS>
PyInterp_Event.h
PyInterp_Interp.h
PyInterp_Request.h
+ PyInterp_Utils.h
)
# header files / to install
PyInterp_Event.cxx
PyInterp_Interp.cxx
PyInterp_Request.cxx
+ PyInterp_Utils.cxx
)
# sources / to compile
PyInterp_Dispatcher* PyInterp_Dispatcher::myInstance = 0;
-void PyInterp_Request::process()
-{
- safeExecute();
-
- bool isSync = IsSync();
-
- if ( !isSync )
- myMutex.lock();
-
- if ( listener() )
- processEvent( listener() );
-
- if ( !isSync )
- myMutex.unlock();
-}
-
-void PyInterp_Request::safeExecute()
-{
- //ProcessVoidEvent( new PyInterp_ExecuteEvent( this ) );
- execute();
-}
-
-void PyInterp_Request::Destroy( PyInterp_Request* request )
-{
- // Lock and unlock the mutex to avoid errors on its deletion
- request->myMutex.lock();
- request->myMutex.unlock();
- delete request;
-}
-
-QEvent* PyInterp_Request::createEvent()
-{
- return new PyInterp_Event( PyInterp_Event::ES_NOTIFY, this );
-}
-
-void PyInterp_Request::processEvent( QObject* o )
-{
- if ( !o )
- return;
-
- QEvent* e = createEvent();
- if ( !e )
- return;
-
- if ( !IsSync() )
- QCoreApplication::postEvent( o, e );
- else
- {
- QCoreApplication::sendEvent( o, e );
- delete e;
- }
-}
-
-void PyInterp_Request::setListener( QObject* o )
-{
- myMutex.lock();
- myListener = o;
- myMutex.unlock();
-}
-
-void PyInterp_LockRequest::safeExecute()
-{
- //if ( getInterp() ){ // No need to have an interpreter now! we can simply run in a empty context
- PyLockWrapper aLock; // Acquire GIL
- //ProcessVoidEvent( new PyInterp_ExecuteEvent( this ) );
- execute();
- //}
-}
-
-PyInterp_Event::~PyInterp_Event()
-{
- PyInterp_Request::Destroy( myRequest );
- myRequest = 0;
-}
-
PyInterp_Dispatcher* PyInterp_Dispatcher::Get()
{
if ( !myInstance )
#include "PyInterp_Event.h"
#include "PyInterp_Request.h"
+PyInterp_Event::~PyInterp_Event()
+{
+ PyInterp_Request::Destroy( myRequest );
+ myRequest = 0;
+}
+
void PyInterp_ExecuteEvent::Execute()
{
myRequest->execute();
//
// File : PyInterp_Interp.cxx
-// Author : Christian CAREMOLI, Paul RASCLE, EDF
+// Author : Christian CAREMOLI, Paul RASCLE, Adrien BRUNETON
// Module : SALOME
//
#include "PyInterp_Interp.h" // !!! WARNING !!! THIS INCLUDE MUST BE THE VERY FIRST !!!
+#include "PyInterp_Utils.h"
#include <pythread.h>
#include <cStringIO.h>
#define TOP_HISTORY_PY "--- top of history ---"
#define BEGIN_HISTORY_PY "--- begin of history ---"
-/*!
- \class PyLockWrapper
- \brief Python GIL wrapper.
-*/
-
-/*!
- \brief Constructor. Automatically acquires GIL.
-*/
-PyLockWrapper::PyLockWrapper()
-{
- _gil_state = PyGILState_Ensure();
-}
-
-/*!
- \brief Destructor. Automatically releases GIL.
-*/
-PyLockWrapper::~PyLockWrapper()
-{
-// if (myThreadState->interp == PyInterp_Interp::_interp)
-// PyGILState_Release(_savestate);
-// else
-// PyEval_ReleaseThread(myThreadState);
-
- /* The destructor can never be called concurrently by two threads since it is called
- * when the GIL is held - the below test should never run concurrently in two threads.
- */
- PyGILState_Release(_gil_state);
-}
-
/*
The following functions are used to hook the Python
interpreter output.
int PyInterp_Interp::_argc = 1;
char* PyInterp_Interp::_argv[] = {(char*)""};
-//PyObject* PyInterp_Interp::builtinmodule = NULL;
-//PyThreadState* PyInterp_Interp::_gtstate = NULL;
-//PyInterpreterState* PyInterp_Interp::_interp = NULL;
/*!
\brief Basic constructor.
must call virtual method initalize().
*/
PyInterp_Interp::PyInterp_Interp():
- _vout(0), _verr(0), _context(0)
+ _vout(0), _verr(0), _local_context(0), _global_context(0)
{
}
*/
PyInterp_Interp::~PyInterp_Interp()
{
+ destroy();
}
/*!
This method shoud be called after construction of the interpreter.
The method initialize() calls virtuals methods
- initPython() to initialize global Python interpreter
- - initState() to initialize embedded interpreter state
- initContext() to initialize interpreter internal context
- initRun() to prepare interpreter for running commands
which should be implemented in the successor classes, according to the
PyObjWrapper m(PyImport_ImportModule("codeop"));
if(!m) {
PyErr_Print();
- PyEval_ReleaseLock();
return;
}
return true;
}
+/*!
+ * Initialize context dictionaries. GIL is held already.
+ * The code executed in an embedded interpreter is expected to be run at the module
+ * level, in which case local and global context have to be the same dictionary.
+ * See: http://stackoverflow.com/questions/12265756/c-python-running-python-code-within-a-context
+ * for an explanation.
+ */
+bool PyInterp_Interp::initContext()
+{
+ PyObject *m = PyImport_AddModule("__main__"); // interpreter main module (module context)
+ if(!m){
+ PyErr_Print();
+ return false;
+ }
+ _global_context = PyModule_GetDict(m); // get interpreter global variable context
+ Py_INCREF(_global_context);
+ _local_context = _global_context;
+ return true;
+}
+
+/*!
+ * Destroy context dictionaries. GIL is held already.
+ */
void PyInterp_Interp::closeContext()
{
+ Py_XDECREF(_global_context);
+ // both _global and _local point to the same Python object:
+ // Py_XDECREF(_local_context);
}
/*!
\brief Compile Python command and evaluate it in the
- python dictionary context if possible. This is not thread-safe.
+ python dictionary contexts if possible. This is not thread-safe.
This is the caller's responsability to make this thread-safe.
\internal
\param command Python command string
- \param context Python context (dictionary)
\return -1 on fatal error, 1 if command is incomplete and 0
if command is executed successfully
*/
-static int run_command(const char *command, PyObject *context)
+static int run_command(const char *command, PyObject * global_ctxt, PyObject * local_ctxt)
{
PyObject *m = PyImport_AddModule("codeop");
if(!m) { // Fatal error. No way to go on.
PyErr_Print();
return -1;
}
+
+// PyObjWrapper v(Py_CompileString(command, "<salome_input>", Py_file_input));
PyObjWrapper v(PyObject_CallMethod(m,(char*)"compile_command",(char*)"s",command));
if(!v) {
// Error encountered. It should be SyntaxError,
return 1;
}
else {
- PyObjWrapper r(PyEval_EvalCode((PyCodeObject *)(void *)v,context,context));
+ PyObjWrapper r(PyEval_EvalCode((PyCodeObject *)(void *)v,global_ctxt, local_ctxt));
if(!r) {
// Execution error. We return -1
PyErr_Print();
\return -1 on fatal error, 1 if command is incomplete and 0
if command is executed successfully
*/
-static int compile_command(const char *command, PyObject *context)
+static int compile_command(const char *command, PyObject * global_ctxt, PyObject * local_ctxt)
{
// First guess if command is execution of a script with args, or a simple Python command
std::string singleCommand = command;
if (commandArgs.empty()) {
// process command: expression
// process command: execfile(r"/absolute/path/to/script.py") (no args)
- return run_command(singleCommand.c_str(), context);
+ return run_command(singleCommand.c_str(), global_ctxt, local_ctxt);
}
else {
// process command: execfile(r"/absolute/path/to/script.py [args:arg1,...,argn]")
replaceAll(commandArgs, ",", "\",\"");
commandArgs = "\""+commandArgs+"\"";
std::string completeCommand = preCommandBegin+"\""+script+"\","+commandArgs+preCommandEnd+singleCommand+";sys.argv=save_argv";
- return run_command(completeCommand.c_str(), context);
+ return run_command(completeCommand.c_str(), global_ctxt, local_ctxt);
}
}
PySys_SetObject((char*)"stderr",_verr);
PySys_SetObject((char*)"stdout",_vout);
- int ier = compile_command(command,_context);
+ int ier = compile_command(command, _global_context, _local_context);
// Outputs are redirected to what they were before
PySys_SetObject((char*)"stdout",oldOut);
//
// File : PyInterp_Interp.h
-// Author : Christian CAREMOLI, Paul RASCLE, EDF
+// Author : Christian CAREMOLI, Paul RASCLE, Adrien BRUNETON
// Module : SALOME
//
#ifndef PYINTERP_INTERP_H
#define PYINTERP_INTERP_H
#include "PyInterp.h" // !!! WARNING !!! THIS INCLUDE MUST BE THE VERY FIRST !!!
+#include "PyInterp_Utils.h"
#include <list>
#include <string>
-/**
- * Utility class wrappin the Python GIL acquisition. This makes use of the high level
- * API (PyGILState_Ensure and PyGILState_Release), and is hence compatible with only
- * one running Python interpreter (no call to Py_NewInterpreter()).
- * When the class is instanciated the lock is acquired. It is released at destruction time.
- * Copy construction (and hence assignation) is forbidden.
- */
-class PYINTERP_EXPORT PyLockWrapper
-{
- PyGILState_STATE _gil_state;
-public:
- PyLockWrapper();
- ~PyLockWrapper();
-
-private:
- // "Rule of 3" - Forbid usage of copy operator and copy-constructor
- PyLockWrapper(const PyLockWrapper & another);
- const PyLockWrapper & operator=(const PyLockWrapper & another);
-};
-
typedef void PyOutChanged(void* data,char * c);
+typedef struct {
+ PyObject_HEAD
+ int softspace;
+ PyOutChanged* _cb;
+ void* _data;
+ bool _iscerr;
+} PyStdOut;
+
/**
* Main class representing a *virtual* Python interpreter. There is really only one true
* Python interpreter in the whole application (no call to Py_NewInterpreter),
void destroy();
virtual int run(const char *command);
+ virtual void initStudy(){};
// [ABN] - the PyLockWrapper is no more attached to the interpreter
// PyLockWrapper GetLockWrapper() const;
PyObject * _vout;
PyObject * _verr;
/** Execution context (local and global variables) */
- PyObject * _context;
- PyObject * _codeop;
+ PyObject * _global_context;
+ PyObject * _local_context;
+
std::list<std::string> _history;
std::list<std::string>::iterator _ith;
int simpleRun(const char* command, const bool addToHistory = true);
virtual void initPython();
- /** OBSOLETE - should'nt be called anymore */
- //virtual bool initState() = 0;
- /** Initialize execution context. Must set the member _context, and return True on success. */
- virtual bool initContext() = 0;
+ /** Initialize execution context. */
+ virtual bool initContext();
virtual bool initRun();
virtual void closeContext();
};
-/**
- * Utility class to properly handle the reference counting required on Python objects.
- */
-class PYINTERP_EXPORT PyObjWrapper
-{
- PyObject* myObject;
-public:
- PyObjWrapper(PyObject* theObject) : myObject(theObject) {}
- PyObjWrapper() : myObject(0) {}
- virtual ~PyObjWrapper() { Py_XDECREF(myObject); }
-
- operator PyObject*() { return myObject; }
- PyObject* operator->() { return myObject; }
- PyObject* get() { return myObject; }
- bool operator!() { return !myObject; }
- bool operator==(PyObject* theObject) { return myObject == theObject; }
- PyObject** operator&() { return &myObject; }
- PyObjWrapper& operator=(PyObjWrapper* theObjWrapper)
- {
- Py_XDECREF(myObject);
- myObject = theObjWrapper->myObject;
- return *this;
- }
-};
-
-typedef struct {
- PyObject_HEAD
- int softspace;
- PyOutChanged* _cb;
- void* _data;
- bool _iscerr;
-} PyStdOut;
-
#endif // PYINTERP_INTERP_H
// Module : GUI
#include "PyInterp_Request.h"
+#include "PyInterp_Utils.h"
+#include <QCoreApplication>
+void PyInterp_Request::process()
+{
+ safeExecute();
+
+ bool isSync = IsSync();
+
+ if ( !isSync )
+ myMutex.lock();
+
+ if ( listener() )
+ processEvent( listener() );
+
+ if ( !isSync )
+ myMutex.unlock();
+}
+
+void PyInterp_Request::safeExecute()
+{
+ //ProcessVoidEvent( new PyInterp_ExecuteEvent( this ) );
+ execute();
+}
+
+void PyInterp_Request::Destroy( PyInterp_Request* request )
+{
+ // Lock and unlock the mutex to avoid errors on its deletion
+ request->myMutex.lock();
+ request->myMutex.unlock();
+ delete request;
+}
+
+QEvent* PyInterp_Request::createEvent()
+{
+ return new PyInterp_Event( PyInterp_Event::ES_NOTIFY, this );
+}
+
+void PyInterp_Request::processEvent( QObject* o )
+{
+ if ( !o )
+ return;
+
+ QEvent* e = createEvent();
+ if ( !e )
+ return;
+
+ if ( !IsSync() )
+ QCoreApplication::postEvent( o, e );
+ else
+ {
+ QCoreApplication::sendEvent( o, e );
+ delete e;
+ }
+}
+
+void PyInterp_Request::setListener( QObject* o )
+{
+ myMutex.lock();
+ myListener = o;
+ myMutex.unlock();
+}
+
+void PyInterp_LockRequest::safeExecute()
+{
+ //if ( getInterp() ){ // No need to have an interpreter now! we can simply run in a empty context
+ PyLockWrapper aLock; // Acquire GIL
+ //ProcessVoidEvent( new PyInterp_ExecuteEvent( this ) );
+ execute();
+ //}
+}
friend class PyInterp_Dispatcher;
friend class PyInterp_ExecuteEvent;
+private:
PyInterp_Request();
PyInterp_Request( const PyInterp_Request& );
// protected destructor - to control deletion of requests
public:
- PyInterp_Request( QObject* listener, bool sync = false )
+ PyInterp_Request( QObject* listener, bool sync = true )
: myIsSync( sync ), myListener( listener ) {};
static void Destroy( PyInterp_Request* );
{
public:
- PyInterp_LockRequest( PyInterp_Interp* interp, QObject* listener=0, bool sync=false )
+ PyInterp_LockRequest( PyInterp_Interp* interp, QObject* listener=0, bool sync=true )
: PyInterp_Request( listener, sync ), myInterp( interp )
{}
--- /dev/null
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 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, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Adrien BRUNETON
+//
+
+#include "PyInterp_Utils.h"
+
+/*!
+ \class PyLockWrapper
+ \brief Python GIL wrapper.
+*/
+
+/*!
+ \brief Constructor. Automatically acquires GIL.
+*/
+PyLockWrapper::PyLockWrapper()
+{
+ _gil_state = PyGILState_Ensure();
+}
+
+/*!
+ \brief Destructor. Automatically releases GIL.
+*/
+PyLockWrapper::~PyLockWrapper()
+{
+ PyGILState_Release(_gil_state);
+}
+
--- /dev/null
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 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, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Author : Adrien BRUNETON
+//
+
+#ifndef PYINTERP_UTILS_H
+#define PYINTERP_UTILS_H
+
+#include "PyInterp.h"
+#include <Python.h>
+
+/**
+ * Utility class wrapping the Python GIL acquisition. This makes use of the high level
+ * API (PyGILState_Ensure and PyGILState_Release), and is hence compatible with only
+ * one running Python interpreter (no call to Py_NewInterpreter()).
+ * When the class is instanciated the lock is acquired. It is released at destruction time.
+ * Copy construction (and hence assignation) is forbidden.
+ */
+class PYINTERP_EXPORT PyLockWrapper
+{
+ PyGILState_STATE _gil_state;
+public:
+ PyLockWrapper();
+ ~PyLockWrapper();
+
+private:
+ // "Rule of 3" - Forbid usage of copy operator and copy-constructor
+ PyLockWrapper(const PyLockWrapper & another);
+ const PyLockWrapper & operator=(const PyLockWrapper & another);
+};
+
+
+/**
+ * Utility class to properly handle the reference counting required on Python objects.
+ */
+class PYINTERP_EXPORT PyObjWrapper
+{
+ PyObject* myObject;
+public:
+ PyObjWrapper(PyObject* theObject) : myObject(theObject) {}
+ PyObjWrapper() : myObject(0) {}
+ virtual ~PyObjWrapper() { Py_XDECREF(myObject); }
+
+ operator PyObject*() { return myObject; }
+ PyObject* operator->() { return myObject; }
+ PyObject* get() { return myObject; }
+ bool operator!() { return !myObject; }
+ bool operator==(PyObject* theObject) { return myObject == theObject; }
+ PyObject** operator&() { return &myObject; }
+ PyObjWrapper& operator=(PyObjWrapper* theObjWrapper)
+ {
+ Py_XDECREF(myObject);
+ myObject = theObjWrapper->myObject;
+ return *this;
+ }
+};
+
+#endif
+
myGradient = grad;
setMode( Qtx::CustomGradientBackground );
}
+
+/*!
+ \brief Convert string representation of version identifier to the numerical value.
+ Resulting value can be used for comparison of different versions (lower, higher, equal).
+
+ String representation of the version consists of zero or more components:
+
+ [major[.minor[.release[patchid]]]]
+
+ where
+ - major is version major number
+ - minor is version minor number
+ - release is version release number
+ - patchid is a version dev identifier which is one of the following
+ * 1 letter optionally followed by 1 or 2 digits, e.g. "a" for "alpha", "b1" for "beta 1"
+ * "rc" optionally followed by 1 or 2 digits, e.g. "rc1" for "release candidate 1"
+ * "dev" for development version (note: 7.4.0dev > 7.4.0, 7.4.0dev < 7.4.1, 7.4.0dev < 7.4.0a1)
+
+ If version string does not include any component or has invalid format, the function returns 0.
+
+ Examples:
+ 1.0 - version 1.0
+ 1.2.3a - version 1.2.3 alpha
+ 3.3.3b1 - version 3.3.3 beta 1
+ 7.4.0rc1 - version 7.4.0 release candidate 1
+ 7.4.0dev - dev version, i.e. future version 7.4.1 (or 7.5.0)
+
+ \param version string representation of version
+ \return numerical identifier of the version
+*/
+long Qtx::versionToId( const QString& version )
+{
+ long id = 0;
+
+ QRegExp vers_exp( "^([0-9]+)([A-Z]|RC|DEV)?([0-9]{0,2})$", Qt::CaseInsensitive );
+
+ QStringList vers = version.split( ".", QString::SkipEmptyParts );
+ int major=0, minor=0;
+ int release = 0, dev1 = 0, dev2 = 0;
+ if ( vers.count() > 0 ) major = vers[0].toInt();
+ if ( vers.count() > 1 ) minor = vers[1].toInt();
+ if ( vers.count() > 2 ) {
+ if ( vers_exp.indexIn( vers[2] ) != -1 ) {
+ release = vers_exp.cap( 1 ).toInt();
+ QString tag = vers_exp.cap( 2 ).toLower();
+ if ( !tag.isEmpty() ) {
+ // patchid is subtracted from version number
+ // a = 55 --> -(55 * 100) + patch number --> 4500..4599, e.g. 7.4.1a1 -> 704004501
+ // b = 54 --> -(54 * 100) + patch number --> 4600..4699, e.g. 7.4.1b1 -> 704004601
+ // c = 53 --> -(53 * 100) + patch number --> 4700..4799, e.g. 7.4.1c1 -> 704004701
+ // ...
+ // z = 30 --> -( 1 * 100) + patch number --> 7000..7099, e.g. 7.4.1z1 -> 704007001
+ // rc = 1 --> -( 1 * 100) + patch number --> 9900..9999, e.g. 7.4.1rc1 -> 704009901
+ // dev = -1 --> +( 1 * 100) + patch number --> 0100..0199, e.g. 7.4.1dev -> 704010100
+ // ---
+ // i.e. "a" < "b" < ... < "z" < "rc" < [stable] < "dev"
+ if ( tag == "rc" )
+ dev1 = 1;
+ else if ( tag == "dev" )
+ dev1 = -1;
+ else
+ dev1 = (int)( QChar('z').toLatin1() ) - (int)( tag[ 0 ].toLatin1() ) + 30;
+ }
+ if ( !vers_exp.cap( 3 ).isEmpty() )
+ dev2 = vers_exp.cap( 3 ).toInt();
+ }
+ }
+ int dev = dev1*100-dev2;
+ id = major;
+ id*=100; id+=minor;
+ id*=100; id+=release;
+ id*=10000;
+ id-=dev;
+
+ return id;
+}
#ifndef WIN32
static QString backgroundToString( const BackgroundData& );
static BackgroundData stringToBackground( const QString& );
+ static long versionToId( const QString& );
+
#ifndef WIN32
static void* getDisplay();
static Qt::HANDLE getVisual();
<file>images/qtx_split4_19.png</file>
<file>images/qtx_split4_20.png</file>
<file>images/qtx_split4_21.png</file>
+ <file>images/open.png</file>
+ <file>images/close.png</file>
+ <file>images/appicon.png</file>
</qresource>
</RCC>
If \a tid is less than 0, the identifier is generated automatically.
If toolbar with given \a tid is already registered, the toolbar will not be created.
+ The parameter \a name can be specified to give an unique string identifier to the toolbar.
+ This can be useful in the multi-language environment where identifier of the toolbar should
+ not be dependant on the language chosen (e.g. to store positions of toolbars of main menu
+ in the preferences).
+
\param title toolbar title
+ \param name toolbar name (identifier)
+ \param tid requested toolbar ID
+ \param mw parent main window; if it is null, the tool manager's main window is used
+ \param vis show toolbar visible immediately after creation (true by default)
+ \return id of created/found toolbar
+*/
+int QtxActionToolMgr::createToolBar( const QString& title, const QString& name, const int tid, QMainWindow* mw, bool vis )
+{
+ return createToolBar( title, name, true, Qt::AllToolBarAreas, tid, mw, vis );
+}
+
+/*!
+ \brief Create toolbar and assign \a id to it.
+
+ If \a tid is less than 0, the identifier is generated automatically.
+ If toolbar with given \a tid is already registered, the toolbar will not be created.
+
+ The parameter \a name can be specified to give an unique string identifier to the toolbar.
+ This can be useful in the multi-language environment where identifier of the toolbar should
+ not be dependant on the language chosen (e.g. to store positions of toolbars of main menu
+ in the preferences).
+
+ \param title toolbar title
+ \param name toolbar name (identifier)
\param floatable if \c true, new toolbar is made floatable
\param dockAreas dock areas of the main window where the new toolbar can be situated
\param tid requested toolbar ID
\param vis show toolbar visible immediately after creation (true by default)
\return id of created/found toolbar
*/
-int QtxActionToolMgr::createToolBar( const QString& title, bool floatable, Qt::ToolBarAreas dockAreas,
+int QtxActionToolMgr::createToolBar( const QString& title, const QString& name, bool floatable, Qt::ToolBarAreas dockAreas,
int tid, QMainWindow* mw, bool vis )
{
static int _toolBarId = -1;
tb->setMovable( dockAreas & Qt::AllToolBarAreas );
//mainWindow()->addToolBar( tb );
tb->setWindowTitle( title );
- tb->setObjectName( title );
+ tb->setObjectName( name.isEmpty() ? title : name );
tb->setToolTip( title );
if ( !vis )
QApplication::postEvent( tb, new QHideEvent());
return tbId;
}
+/*!
+ \brief Create toolbar and assign \a id to it.
+
+ If \a tid is less than 0, the identifier is generated automatically.
+ If toolbar with given \a tid is already registered, the toolbar will not be created.
+
+ \param title toolbar title
+ \param floatable if \c true, new toolbar is made floatable
+ \param dockAreas dock areas of the main window where the new toolbar can be situated
+ \param tid requested toolbar ID
+ \param mw parent main window; if it is null, the tool manager's main window is used
+ \param vis show toolbar visible immediately after creation (true by default)
+ \return id of created/found toolbar
+*/
+int QtxActionToolMgr::createToolBar( const QString& title, bool floatable, Qt::ToolBarAreas dockAreas,
+ int tid, QMainWindow* mw, bool vis )
+{
+ return createToolBar( title, QString(), floatable, dockAreas, tid, mw, vis );
+}
+
/*!
\brief Search toolbar with given \a title owned by main window \mw.
\param title toolbar title
}
}
- if ( changed )
+ if ( changed ) {
triggerUpdate( tid );
+ updateContent();
+ }
}
/*!
QMainWindow* mainWindow() const;
int createToolBar( const QString&, int = -1, QMainWindow* = 0, bool = true );
+ int createToolBar( const QString&, const QString&, int = -1, QMainWindow* = 0, bool = true );
int createToolBar( const QString&, bool, Qt::ToolBarAreas = Qt::AllToolBarAreas,
int = -1, QMainWindow* = 0, bool = true );
+ int createToolBar( const QString&, const QString&, bool, Qt::ToolBarAreas = Qt::AllToolBarAreas,
+ int = -1, QMainWindow* = 0, bool = true );
void removeToolBar( const QString& );
void removeToolBar( const int );
#ifndef QTXTRANSLATOR_H
#define QTXTRANSLATOR_H
+#include "Qtx.h"
+
#include <QTranslator>
-class QtxTranslator : public QTranslator
+class QTX_EXPORT QtxTranslator : public QTranslator
{
public:
QtxTranslator( QObject* parent = 0 );
#include <QToolBar>
#include <QVBoxLayout>
#include <QWebView>
+#include <QProcess>
+
+namespace
+{
+ bool isLocalFile( const QUrl& url )
+ {
+ QFileInfo fi( url.path() );
+ return fi.exists();
+ }
+}
/*!
\class QtxWebBrowser::Searcher
: QDialog( parent ), myProgram( program )
{
setModal( true );
- setWindowTitle( tr( "Open URL" ) );
+ setWindowTitle( QtxWebBrowser::tr( "Open URL" ) );
setSizeGripEnabled( true );
myFileName = new QLabel( this );
- QRadioButton* rbOpen = new QRadioButton( tr( "Open in" ), this );
- QRadioButton* rbSave = new QRadioButton( tr( "Save file" ), this );
- myBrowse = new QPushButton( tr( "&Browse..." ), this );
- myRepeat = new QCheckBox( tr( "Use this program for all files of this type" ), this );
+ QRadioButton* rbOpen = new QRadioButton( QtxWebBrowser::tr( "Open in" ), this );
+ QRadioButton* rbSave = new QRadioButton( QtxWebBrowser::tr( "Save file" ), this );
+ myBrowse = new QPushButton( QtxWebBrowser::tr( "&Browse..." ), this );
+ myRepeat = new QCheckBox( QtxWebBrowser::tr( "Use this program for all files of this type" ), this );
myAction = new QButtonGroup( this );
myAction->addButton( rbOpen, mOpen );
myAction->addButton( rbSave, mSave );
- QPushButton* btnOk = new QPushButton( tr( "&OK" ), this );
- QPushButton* btnCancel = new QPushButton( tr( "&Cancel" ), this );
+ QPushButton* btnOk = new QPushButton( QtxWebBrowser::tr( "&OK" ), this );
+ QPushButton* btnCancel = new QPushButton( QtxWebBrowser::tr( "&Cancel" ), this );
QFont f = myFileName->font(); f.setBold( true ); myFileName->setFont( f );
btnLayout->addWidget( btnCancel );
QGridLayout* l = new QGridLayout( this );
- l->addWidget( new QLabel( tr( "You are opening the file" ), this ),
+ l->addWidget( new QLabel( QtxWebBrowser::tr( "You are opening the file" ), this ),
0, 0, 1, 4 );
l->addWidget( myFileName, 1, 1, 1, 3 );
- l->addWidget( new QLabel( tr( "Please choose the action to be done" ), this ),
+ l->addWidget( new QLabel( QtxWebBrowser::tr( "Please choose the action to be done" ), this ),
3, 0, 1, 4 );
l->addWidget( rbOpen, 4, 1, 1, 1 );
l->addWidget( myBrowse, 4, 2, 1, 1 );
*/
void QtxWebBrowser::Downloader::browse()
{
- QString program = QFileDialog::getOpenFileName( this, tr( "Choose program" ), myProgram );
+ QString program = QFileDialog::getOpenFileName( this, QtxWebBrowser::tr( "Choose program" ), myProgram );
if ( !program.isEmpty() ) myProgram = program;
}
/*!
\class QtxWebBrowser
- \brief The QtxWebBrowser provides a window that can display html pages.
+ \brief The QtxWebBrowser provides a window that can display html pages from local file system.
Only one instance of the QtxWebBrowser class can be created. To access the browser
window, use static method QtxWebBrowser::webBrowser(), which creates an
closing of the browser window. To close window programmatically use
method close().
- To set visual properties of the browser use static method setData().
-
Optionally resource manager can be specified to automatically store
- action (open/save) and program to be used to download files to the
- user preferences.
+ action (open/save) and program to be used to download files in the
+ application preferences.
The following sample demonstrates how to use web browser.
In this code the browser window is created, /data/index.html file is opened
and scrolled to the "anchor1" anchor on this page.
\code
- int main(int argc, char *argv[])
- {
- QApplication app(argc, argv);
-
- // set resource manager
- QtxWebBrowser::setResourceManager(myResourceMgr);
- // set icon, title and menu items
- QtxWebBrowser::setData("browser:title", tr("Web Browser"));
- QtxWebBrowser::setData("browser:icon", QPixmap(":/icon.png"));
- QtxWebBrowser::setData("menu:file:title", tr("&File"));
- QtxWebBrowser::setData("action:close:title", tr("&Close"));
-
- // show HTML page
- QtxWebBrowser::loadUrl("file:///data/index.html", "anchor1");
-
- return app.exec();
- }
+ // initialize application
+ // - set resource manager
+ QtxWebBrowser::setResourceMgr(myResourceMgr);
+ // ...
+ // show HTML page
+ QtxWebBrowser::loadUrl("file:///data/index.html", "anchor1");
\endcode
-
*/
//! The only one instance of web browser
//! Resources manager
QtxResourceMgr* QtxWebBrowser::myResourceMgr = 0;
-//! Internal data map to store resources of the browser.
-QMap<QString, QVariant> QtxWebBrowser::myData;
-
/*!
\brief Constructor.
Construct the web browser.
*/
QtxWebBrowser::QtxWebBrowser( ) : QMainWindow( 0 )
{
+ Q_INIT_RESOURCE( Qtx );
+
setAttribute( Qt::WA_DeleteOnClose );
statusBar();
myWebView = new QWebView( frame );
- QAction *copyAction = myWebView->pageAction(QWebPage::Copy);
- copyAction->setShortcut(QKeySequence::Copy);
- myWebView->addAction(copyAction);
-
-
+ myWebView->pageAction( QWebPage::Copy )->setShortcut( QKeySequence::Copy );
+ myWebView->addAction( myWebView->pageAction( QWebPage::Copy ) );
+ myWebView->pageAction( QWebPage::OpenLinkInNewWindow )->setVisible( false );
+ myWebView->pageAction( QWebPage::Back )->setText( tr( "Go Back" ) );
+ myWebView->pageAction( QWebPage::Forward )->setText( tr( "Go Forward" ) );
myWebView->page()->setLinkDelegationPolicy( QWebPage::DelegateAllLinks );
+
myFindPanel = new QtxSearchTool( frame, myWebView,
QtxSearchTool::Basic | QtxSearchTool::Case | QtxSearchTool::Wrap,
Qt::Horizontal );
myFindPanel->setSearcher( new Searcher( myWebView ) );
myFindPanel->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
- myToolbar = addToolBar( tr( "Navigation" ) );
- myToolbar->addAction( myWebView->pageAction( QWebPage::Back ) );
- myToolbar->addAction( myWebView->pageAction( QWebPage::Forward ) );
-
- myMenus[ File ] = menuBar()->addMenu( tr( "&File" ) );
- myActions[ Find ] = myMenus[ File ]->addAction( tr( "&Find in text..." ), myFindPanel, SLOT( find() ), QKeySequence( QKeySequence::Find ) );
- myActions[ FindNext ] = myMenus[ File ]->addAction( tr( "&Find next" ), myFindPanel, SLOT( findNext() ), QKeySequence( QKeySequence::FindNext ) );
- myActions[ FindPrev ] = myMenus[ File ]->addAction( tr( "&Find previous" ), myFindPanel, SLOT( findPrevious() ), QKeySequence( QKeySequence::FindPrevious ) );
- myMenus[ File ]->addSeparator();
- myActions[ Close ] = myMenus[ File ]->addAction( tr( "&Close" ), this, SLOT( close() ) );
-
+ QToolBar* toolbar = addToolBar( tr( "Navigation" ) );
+ toolbar->addAction( myWebView->pageAction( QWebPage::Back ) );
+ toolbar->addAction( myWebView->pageAction( QWebPage::Forward ) );
+
+ QMenu* fileMenu = menuBar()->addMenu( tr( "&File" ) );
+ fileMenu->addAction( QPixmap( ":/images/open.png" ), tr( "&Open..." ),
+ this, SLOT( open() ),
+ QKeySequence( QKeySequence::Open ) );
+ fileMenu->addSeparator();
+ fileMenu->addAction( tr( "&Find in text..." ),
+ myFindPanel, SLOT( find() ),
+ QKeySequence( QKeySequence::Find ) );
+ fileMenu->addAction( tr( "&Find next" ),
+ myFindPanel, SLOT( findNext() ),
+ QKeySequence( QKeySequence::FindNext ) );
+ fileMenu->addAction( tr( "&Find previous" ),
+ myFindPanel, SLOT( findPrevious() ),
+ QKeySequence( QKeySequence::FindPrevious ) );
+ fileMenu->addSeparator();
+ fileMenu->addAction( QPixmap( ":/images/close.png" ), tr( "&Close" ),
+ this, SLOT( close() ) );
+
+ QMenu* helpMenu = menuBar()->addMenu( tr( "&Help" ) );
+ helpMenu->addAction( tr( "&About..." ),
+ this, SLOT( about() ) );
+
QVBoxLayout* main = new QVBoxLayout( frame );
main->addWidget( myWebView );
main->addWidget( myFindPanel );
connect( myWebView->pageAction( QWebPage::OpenLink ), SIGNAL( activated() ),
SLOT( linkAction() ) );
-
- myWebView->pageAction( QWebPage::OpenLinkInNewWindow )->setVisible( false );
-
setCentralWidget( frame );
setFocusProxy( myWebView );
- updateData();
- qAddPostRoutine( QtxWebBrowser::clearData );
+ setWindowIcon( QPixmap( ":/images/appicon.png" ) );
+ adjustTitle();
}
/*!
{
QString anUrl = url;
if( !anchor.isEmpty() ) anUrl += "#" + anchor;
- anUrl.replace('\\', '/');
Qtx::alignWidget( webBrowser(), (QWidget*)QApplication::desktop(), Qtx::AlignCenter );
QtxWebBrowser* browser = webBrowser();
browser->show();
- browser->myWebView->load( QUrl( anUrl ) );
+ browser->load( anUrl );
browser->setFocus();
browser->activateWindow();
browser->raise();
}
-/*!
- \brief Set browser settings from.
-
- This method can be used to setup the browser properties.
- - \c "browser:title" : title of the browser window
- - \c "browser:icon" : icon of the browser window
- - \c "toolbar:title" : title of the toolbar
- - \c "menu:file:title" : File menu of the browser
- - \c "action:close:title" : File/Close menu item title
- - \c "action:close:icon" : File/Close menu item icon
- - \c "action:back:title" : Navigation/Back menu item title
- - \c "action:back:icon" : Navigation/Back menu item icon
- - \c "action:forward:title" : Navigation/Forward menu item title
- - \c "action:forward:icon" : Navigation/Forward menu item icon
- - \c "action:find:title" : File/Find menu item title
- - \c "action:find:icon" : File/Find menu item icon
- - \c "action:findnext:title" : File/Find Next menu item title
- - \c "action:findnext:icon" : File/Find Next menu item icon
- - \c "action:findprev:title" : File/Find Previous menu item title
- - \c "action:findprev:icon" : File/Find Previous menu item icon
- - \c "preferences:section" : Preferences file section (base, used as prefix to the file extension)
- - \c "preferences:action" : Preferences file parameter name for action
- - \c "preferences:program" : Preferences file parameter name for program
- - \c "preferences:repeat" : Preferences file parameter name for repeat action flag
-
- \param key name of the property
- \param val value of the property
-
-*/
-void QtxWebBrowser::setData( const QString& key, const QVariant& val )
-{
- myData.insert( key, val );
- if ( myBrowser ) myBrowser->updateData();
-}
-
/*!
\brief Shutdown help browser
*/
}
/*!
- \brief Get string value by key from the internal data map
- \param key data key identifier
- \param def default value
- \return string value assigned to the key (null string if data is not assigned to the key)
- \internal
-*/
-QString QtxWebBrowser::getStringValue( const QString& key, const QString& def )
-{
- QString val = def;
- if ( myData.contains( key ) && myData[key].canConvert( QVariant::String ) )
- val = myData[key].toString();
- return val;
-}
-
-/*!
- \brief Get icon value by key from the internal data map
- \param key data key identifier
- \param def default value
- \return icon assigned to the key (null icon if data is not assigned to the key)
- \internal
-*/
-QIcon QtxWebBrowser::getIconValue( const QString& key, const QIcon& def )
-{
- QIcon val = def;
- if ( myData.contains( key ) ) {
- if ( myData[key].canConvert( QVariant::Pixmap ) )
- val = myData[key].value<QPixmap>();
- else if ( myData[key].canConvert( QVariant::Icon ) )
- val = myData[key].value<QIcon>();
- }
- return val;
-}
-
-/*!
- \brief Update web browser properties from internal data map
+ \brief Set resource manager
+ \param resMgr resource manager
*/
-void QtxWebBrowser::updateData()
+void QtxWebBrowser::setResourceMgr( QtxResourceMgr* resMgr )
{
- // main title
- adjustTitle();
-
- // window icon
- QIcon icon = getIconValue( "browser:icon" );
- if ( !icon.isNull() )
- setWindowIcon( icon );
-
- // toolbar title
- QString tbTitle = getStringValue( "toolbar:title" );
- if ( myToolbar && !tbTitle.isEmpty() )
- myToolbar->setWindowTitle( tbTitle );
-
- // File menu
- QString fmenu = getStringValue( "menu:file:title" );
- if ( myMenus.contains( File ) && !fmenu.isEmpty() )
- myMenus[ File ]->setTitle( fmenu );
-
- // File/Close menu
- QString closeTlt = getStringValue( "action:close:title" );
- QIcon closeIco = getIconValue( "action:close:icon" );
- if ( myActions.contains( Close ) ) {
- if ( !closeTlt.isEmpty() )
- myActions[ Close ]->setText( closeTlt );
- if ( !closeIco.isNull() )
- myActions[ Close ]->setIcon( closeIco );
- }
-
- // Navigation/Go Back menu
- QString backTlt = getStringValue( "action:back:title" );
- QIcon backIco = getIconValue( "action:back:icon" );
- if ( !backTlt.isEmpty() )
- myWebView->pageAction( QWebPage::Back )->setText( backTlt );
- if ( !backIco.isNull() )
- myWebView->pageAction( QWebPage::Back )->setIcon( backIco );
-
- // Navigation/Go Forward menu
- QString fwdTlt = getStringValue( "action:forward:title" );
- QIcon fwdIco = getIconValue( "action:forward:icon" );
- if ( !fwdTlt.isEmpty() )
- myWebView->pageAction( QWebPage::Forward )->setText( fwdTlt );
- if ( !fwdIco.isNull() )
- myWebView->pageAction( QWebPage::Forward )->setIcon( fwdIco );
-
- // File/Find menu
- QString findTlt = getStringValue( "action:find:title" );
- QIcon findIco = getIconValue( "action:find:icon" );
- if ( myActions.contains( Find ) ) {
- if ( !findTlt.isEmpty() )
- myActions[ Find ]->setText( findTlt );
- if ( !findIco.isNull() )
- myActions[ Find ]->setIcon( findIco );
- }
-
- // File/Find Next menu
- QString findNextTlt = getStringValue( "action:findnext:title" );
- QIcon findNextIco = getIconValue( "action:findnext:icon" );
- if ( myActions.contains( FindNext ) ) {
- if ( !findNextTlt.isEmpty() )
- myActions[ FindNext ]->setText( findNextTlt );
- if ( !findNextIco.isNull() )
- myActions[ FindNext ]->setIcon( findNextIco );
- }
-
- // File/Find Previous menu
- QString findPrevTlt = getStringValue( "action:findprev:title" );
- QIcon findPrevIco = getIconValue( "action:findprev:icon" );
- if ( myActions.contains( FindPrev ) ) {
- if ( !findPrevTlt.isEmpty() )
- myActions[ FindPrev ]->setText( findPrevTlt );
- if ( !findPrevIco.isNull() )
- myActions[ FindPrev ]->setIcon( findPrevIco );
- }
+ myResourceMgr = resMgr;
}
/*!
- \brief Clear internal data map
- \internal
+ \brief Get resource manager
+ \return resource manager
*/
-void QtxWebBrowser::clearData()
+QtxResourceMgr* QtxWebBrowser::resourceMgr() const
{
- myData.clear();
+ return myResourceMgr;
}
/*!
- \brief Set resource manager
+ Shows About dialog box
*/
-void QtxWebBrowser::setResourceManager( QtxResourceMgr* resMgr )
+void QtxWebBrowser::about()
{
- myResourceMgr = resMgr;
+ QMessageBox::about( this, tr( "About %1" ).arg( tr( "Help Browser" ) ),
+ QString( "SALOME %1" ).arg( tr( "Help Browser" ) ) );
}
/*!
void QtxWebBrowser::linkHovered( const QString& link, const QString& /*title*/, const QString& /*context*/ )
{
QUrl url = link;
- if ( !link.isEmpty() && url.scheme() == "file" ) myLastUrl = url;
+ if ( !link.isEmpty() && isLocalFile( url ) ) myLastUrl = url;
statusBar()->showMessage( link );
}
*/
void QtxWebBrowser::adjustTitle()
{
- QString title = getStringValue( "browser:title" );
- setWindowTitle( title.isEmpty() ? myWebView->title() : title + QString( " [%1]" ).arg( myWebView->title() ) );
+ QString title = tr( "Help Browser" );
+ if ( !myWebView->title().isEmpty() ) title += QString( " [%1]" ).arg( myWebView->title() );
+ setWindowTitle( title );
}
/*
void QtxWebBrowser::finished( bool ok )
{
if ( !ok && !myLastUrl.isEmpty() ) {
- if ( myLastUrl.scheme() == "file" ) {
- QString filename = myLastUrl.toLocalFile();
+ if ( isLocalFile( myLastUrl ) ) {
+ QString filename = myLastUrl.path();
QString extension = QFileInfo( filename ).suffix();
if ( extension == "html" || extension == "htm" ) return;
openLink( filename );
{
QObject* s = sender();
if ( s == myWebView->pageAction( QWebPage::DownloadLinkToDisk ) ) {
- saveLink( myLastUrl.toLocalFile() );
+ saveLink( myLastUrl.path() );
}
else if ( s == myWebView->pageAction( QWebPage::OpenLink ) ) {
- QString fileName = myLastUrl.toLocalFile();
+ QString fileName = myLastUrl.path();
QString extension = QFileInfo( fileName ).suffix();
if ( extension != "html" && extension != "htm" ) {
openLink( fileName, true );
int defAction = Downloader::mOpen;
bool defRepeat = false;
QString defProgram;
- QString resSection = QString( "%1:%2" ).arg( getStringValue( "preferences:section", "web_browser" ) ).arg( extension );
- QString actionParam = getStringValue( "preferences:action", "action" );
- QString programParam = getStringValue( "preferences:program", "program" );
- QString repeatParam = getStringValue( "preferences:repeat", "repeat" );
+ QString resSection = QString( "%1:%2" ).arg( "web_browser" ).arg( extension );
+ QString actionParam = "action";
+ QString programParam = "program";
+ QString repeatParam = "repeat";
if ( !extension.isEmpty() && myResourceMgr ) {
defAction = myResourceMgr->integerValue( resSection, actionParam, defAction );
switch( defAction ) {
case Downloader::mOpen:
if ( !defProgram.isEmpty() ) {
+ QStringList parameters;
#ifdef WIN32
- QString cmd = "";
+ QString cmd = defProgram;
#else
// If Salome Qt version is lower than the system one, on KDE an unresolved symbol is raised
// In this case, we can try to launch the pdf viewer after unsetting the LD_LIBRARY_PATH environnement variable
- QString cmd = "env LD_LIBRARY_PATH=/usr/lib:/usr/lib64";
+ QString cmd = "env";
+ parameters << "LD_LIBRARY_PATH=/usr/lib:/usr/lib64";
+ parameters << defProgram;
#endif
- int r = ::system( QString( "%1 %2 %3 &" ).arg( cmd ).arg( defProgram ).arg( myLastUrl.toLocalFile() ).toLatin1().constData() );
+ parameters << QFileInfo( myLastUrl.path() ).absoluteFilePath();
+ QProcess::startDetached( cmd, parameters );
}
break;
case Downloader::mSave:
}
}
+/*!
+ \brief Load URL
+ \param url path to the file to be opened in the browser
+*/
+void QtxWebBrowser::load( const QString& url )
+{
+ QString u = url;
+ if ( !u.isEmpty() )
+ myWebView->load( QUrl( u.replace('\\', '/') ) );
+}
+
/*!
\brief Save file
\param fileName link to the file being saved
*/
void QtxWebBrowser::saveLink( const QString& fileName )
{
- QString newFileName = QFileDialog::getSaveFileName( this, tr( "Save File" ), fileName,
+ QString newFileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), fileName,
QString( "*.%1" ).arg( QFileInfo( fileName ).suffix() ) );
if ( !newFileName.isEmpty() &&
QFileInfo( newFileName ).canonicalFilePath() != QFileInfo( fileName ).canonicalFilePath() ) {
QMessageBox::warning( this, tr( "Error"), tr( "Can't save file:\n%1" ).arg( newFileName ) );
}
}
+
+/*!
+ \brief Open file
+ Shows "Open file" standard dialog box to allow user to choose file to open.
+*/
+void QtxWebBrowser::open()
+{
+ QString url;
+ if ( isLocalFile( myWebView->url() ) ) url = myWebView->url().path();
+ url = QFileDialog::getOpenFileName( this, tr( "Open file" ), url, "HTML files (*.html *.htm);; All files (*)" );
+ if ( !url.isEmpty() ) load( url );
+}
#include <QDialog>
#include <QMainWindow>
-#include <QMap>
#include <QUrl>
-class QAction;
class QButtonGroup;
class QCheckBox;
class QLabel;
-class QMenu;
class QPushButton;
-class QToolBar;
class QWebView;
class QtxResourceMgr;
class QtxSearchTool;
{
Q_OBJECT
- enum { File };
- enum { Find, FindNext, FindPrev, Close };
-
class Downloader;
class Searcher;
-private:
- QtxWebBrowser();
-
public:
virtual ~QtxWebBrowser();
static QtxWebBrowser* webBrowser();
static void loadUrl( const QString&, const QString& = QString() );
- static void setData( const QString&, const QVariant& );
- static void setResourceManager( QtxResourceMgr* );
+ static void setResourceMgr( QtxResourceMgr* );
static void shutdown();
+protected:
+ QtxWebBrowser();
+ QtxResourceMgr* resourceMgr() const;
+
private:
- static QString getStringValue( const QString&, const QString& = QString() );
- static QIcon getIconValue( const QString&, const QIcon& = QIcon() );
- void updateData();
- static void clearData();
void saveLink( const QString& );
void openLink( const QString&, bool = false );
-protected slots:
+public Q_SLOTS:
+ virtual void load( const QString& );
+
+protected Q_SLOTS:
+ virtual void about();
virtual void linkClicked( const QUrl& );
virtual void linkHovered( const QString&, const QString&, const QString& );
-private slots:
+private Q_SLOTS:
+ void open();
void adjustTitle();
void finished( bool );
void linkAction();
private:
- static QMap<QString, QVariant> myData;
static QtxWebBrowser* myBrowser;
static QtxResourceMgr* myResourceMgr;
QWebView* myWebView;
- QToolBar* myToolbar;
- QMap<int, QMenu*> myMenus;
- QMap<int, QAction*> myActions;
QtxSearchTool* myFindPanel;
QUrl myLastUrl;
};
bool isRepeatAction() const;
QString program() const;
-private slots:
+private Q_SLOTS:
void setAction( int );
void browse();
<translation>&Fermer</translation>
</message>
</context>
+<context>
+ <name>QtxWebBrowser</name>
+ <message>
+ <source>Open URL</source>
+ <translation>Ouvrir le URL</translation>
+ </message>
+ <message>
+ <source>Open in</source>
+ <translation type="unfinished">Open in</translation>
+ </message>
+ <message>
+ <source>Save file</source>
+ <translation>Sauvegarder le fichier</translation>
+ </message>
+ <message>
+ <source>&Browse...</source>
+ <translation>&Parcourir...</translation>
+ </message>
+ <message>
+ <source>Use this program for all files of this type</source>
+ <translation type="unfinished">Use this program for all files of this type</translation>
+ </message>
+ <message>
+ <source>&OK</source>
+ <translation>&OK</translation>
+ </message>
+ <message>
+ <source>&Cancel</source>
+ <translation>&Annuler</translation>
+ </message>
+ <message>
+ <source>You are opening the file</source>
+ <translation type="unfinished">You are opening the file</translation>
+ </message>
+ <message>
+ <source>Please choose the action to be done</source>
+ <translation type="unfinished">Please choose the action to be done</translation>
+ </message>
+ <message>
+ <source>Choose program</source>
+ <translation type="unfinished">Choose program</translation>
+ </message>
+ <message>
+ <source>Go Back</source>
+ <translation>Reculer</translation>
+ </message>
+ <message>
+ <source>Go Forward</source>
+ <translation>Avancer</translation>
+ </message>
+ <message>
+ <source>Navigation</source>
+ <translation>Navigation</translation>
+ </message>
+ <message>
+ <source>&File</source>
+ <translation>&Fichier</translation>
+ </message>
+ <message>
+ <source>&Open...</source>
+ <translation>&Ouvrir...</translation>
+ </message>
+ <message>
+ <source>&Find in text...</source>
+ <translation>&Chercher...</translation>
+ </message>
+ <message>
+ <source>&Find next</source>
+ <translation>Chercher &suivant</translation>
+ </message>
+ <message>
+ <source>&Find previous</source>
+ <translation>Chercher &précédent</translation>
+ </message>
+ <message>
+ <source>&Close</source>
+ <translation>&Fermer</translation>
+ </message>
+ <message>
+ <source>&Help</source>
+ <translation>&Aide</translation>
+ </message>
+ <message>
+ <source>&About...</source>
+ <translation>&A propos de...</translation>
+ </message>
+ <message>
+ <source>About %1</source>
+ <translation>A propos de %1</translation>
+ </message>
+ <message>
+ <source>Help Browser</source>
+ <translation type="unfinished">Help Browser</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Erreur</translation>
+ </message>
+ <message>
+ <source>Can't save file:\n%1</source>
+ <translation>Impossible de sauvegarder le fichier:\n%1</translation>
+ </message>
+ <message>
+ <source>Open file</source>
+ <translation>Ouvrir le fichier</translation>
+ </message>
+ <message>
+ <source>%1 has been developed using %2</source>
+ <translation type="unfinished">%1 has been developed using %2</translation>
+ </message>
+</context>
</TS>
{
DEBTRACE("QxScene_ViewWindow::createToolBar");
QtxActionToolMgr* mgr = toolMgr();
- myToolBar = mgr->createToolBar( tr( "LBL_TOOLBAR_LABEL" ), false );
+ myToolBar = mgr->createToolBar( tr( "LBL_TOOLBAR_LABEL" ), // title (language-dependant)
+ QString( "QxSceneViewOperations" ), // name (language-independant)
+ false ); // disable floatable toolbar
mgr->append( ScaleOpId, myToolBar );
mgr->append( MoveOpId, myToolBar );
mgr->append( ResetId, myToolBar );
<source>DSC_RESET_VIEW</source>
<translation>Reset View Point</translation>
</message>
+</context>
+<context>
+ <name>QxScene_ViewWindow</name>
<message>
<source>LBL_TOOLBAR_LABEL</source>
<translation>View Operations</translation>
<source>DSC_RESET_VIEW</source>
<translation>Restaurer le point de vue</translation>
</message>
+</context>
+<context>
+ <name>QxScene_ViewWindow</name>
<message>
<source>LBL_TOOLBAR_LABEL</source>
<translation>Opérations de visualisation</translation>
<source>DSC_RESET_VIEW</source>
<translation>ビューのポイントを復元します。</translation>
</message>
+ </context>
+ <context>
+ <name>QxScene_ViewWindow</name>
<message>
<source>LBL_TOOLBAR_LABEL</source>
<translation>表示操作</translation>
MESSAGE("SALOME_PYQT_PyInterp::initPython - does nothing");
}
+/*!
+ * Override. Create a distinct context from the SALOME Python console.
+ * Especially the global context is not connected to __main__ as in PyInterp_Interp
+ */
bool SALOME_PYQT_PyInterp::initContext()
{
/*
* It is the caller responsability to acquire the GIL before calling initContext
* It will still be held on initContext exit
*/
- _context = PyDict_New(); // create interpreter dictionnary context
+ _local_context = PyDict_New();
+ _global_context = PyDict_New();
return true;
}
PyErr_Print();
return -1;
}
- PyObject *r = PyEval_EvalCode((PyCodeObject *)code,_context,_context);
+ PyObject *r = PyEval_EvalCode((PyCodeObject *)code,_global_context,_local_context);
Py_DECREF(code);
if(!r){
SALOME_PYQT_PyInterp();
~SALOME_PYQT_PyInterp();
- int run(const char *command);
+ virtual int run(const char *command);
protected:
virtual void initPython();
QDomElement parentElement = parentNode.toElement();
if ( !parentElement.isNull() ) {
QString aLabel = attribute( parentElement, "label-id" );
+ QString aName = attribute( parentElement, "name-id" );
if ( !aLabel.isEmpty() ) {
// create toolbar
- int tbId = module()->createTool( aLabel );
+ int tbId = module()->createTool( aLabel, aName );
QDomNode node = parentNode.firstChild();
while ( !node.isNull() ) {
if ( node.isElement() ) {
public:
StudyChangedReq( PyModuleHelper* _helper,
SUIT_Study* _study )
- : PyInterp_Request( 0, true ), // this request should be processed synchronously (sync == true)
+ : PyInterp_Request(0, true ), // this request should be processed synchronously (sync == true)
myHelper( _helper ),
myStudy ( _study )
{}
${PROJECT_SOURCE_DIR}/src/ObjBrowser
${PROJECT_SOURCE_DIR}/src/Plot2d
${PROJECT_SOURCE_DIR}/src/PyInterp
+ ${PROJECT_SOURCE_DIR}/src/PyConsole
${PROJECT_SOURCE_DIR}/src/Qtx
${PROJECT_SOURCE_DIR}/src/SALOME_PYQT/SALOME_PYQT_GUILight
${PROJECT_SOURCE_DIR}/src/STD
#include "SUIT_ResourceMgr.h"
#include "SUIT_Session.h"
#include "SUIT_Tools.h"
+#include "PyConsole_Console.h"
#include <QAction>
#include <QApplication>
class CrTool
{
public:
- CrTool( const QString& tBar )
- : myCase( 0 ), myTbName( tBar ) {}
+ CrTool( const QString& tBar, const QString& nBar )
+ : myCase( 0 ), myTbTitle( tBar ), myTbName( nBar) {}
CrTool( const int id, const int tBar, const int idx )
: myCase( 1 ), myId( id ), myTbId( tBar ), myIndex( idx ) {}
CrTool( const int id, const QString& tBar, const int idx )
- : myCase( 2 ), myId( id ), myTbName( tBar ), myIndex( idx ) {}
+ : myCase( 2 ), myId( id ), myTbTitle( tBar ), myIndex( idx ) {}
CrTool( QAction* action, const int tbId, const int id, const int idx )
: myCase( 3 ), myAction( action ), myTbId( tbId ), myId( id ), myIndex( idx ) {}
CrTool( QAction* action, const QString& tBar, const int id, const int idx )
- : myCase( 4 ), myAction( action ), myTbName( tBar ), myId( id ), myIndex( idx ) {}
+ : myCase( 4 ), myAction( action ), myTbTitle( tBar ), myId( id ), myIndex( idx ) {}
int execute( LightApp_Module* module ) const
{
if ( module ) {
switch ( myCase ) {
case 0:
- return module->createTool( myTbName );
+ return module->createTool( myTbTitle, myTbName );
case 1:
return module->createTool( myId, myTbId, myIndex );
case 2:
- return module->createTool( myId, myTbName, myIndex );
+ return module->createTool( myId, myTbTitle, myIndex );
case 3:
return module->createTool( myAction, myTbId, myId, myIndex );
case 4:
- return module->createTool( myAction, myTbName, myId, myIndex );
+ return module->createTool( myAction, myTbTitle, myId, myIndex );
}
}
return -1;
}
private:
int myCase;
+ QString myTbTitle;
QString myTbName;
int myTbId;
QAction* myAction;
/*!
\brief Create toolbar with specified name.
- \param tBar toolbar name
+ \param tBar toolbar title (language-dependent)
+ \param nBar toolbar name (language-independent) [optional]
\return toolbar ID or -1 if toolbar creation is failed
*/
-int SalomePyQt::createTool( const QString& tBar )
+int SalomePyQt::createTool( const QString& tBar, const QString& nBar )
{
- return ProcessEvent( new TCreateToolEvent( CrTool( tBar ) ) );
+ return ProcessEvent( new TCreateToolEvent( CrTool( tBar, nBar ) ) );
}
/*!
{
return ProcessEvent( new TGetObjectPositionEvent(theEntry) );
}
+
+void SalomePyQt::startPyLog(const QString& theFileName)
+{
+ class TEvent: public SALOME_Event
+ {
+ QString myFileName;
+ public:
+ TEvent( const QString& theFileName ):
+ myFileName( theFileName ) {}
+ virtual void Execute()
+ {
+ if ( getApplication() ) {
+ PyConsole_Console* pyConsole = getApplication()->pythonConsole( false );
+ if ( pyConsole ) pyConsole->startLog( myFileName );
+ }
+ }
+ };
+ ProcessVoidEvent( new TEvent( theFileName ) );
+}
+
+void SalomePyQt::stopPyLog()
+{
+ class TEvent: public SALOME_Event
+ {
+ public:
+ TEvent() {}
+ virtual void Execute()
+ {
+ if ( getApplication() ) {
+ PyConsole_Console* pyConsole = getApplication()->pythonConsole( false );
+ if ( pyConsole ) pyConsole->stopLog();
+ }
+ }
+ };
+ ProcessVoidEvent( new TEvent() );
+}
static int defaultMenuGroup();
- static int createTool( const QString& );
+ static int createTool( const QString&, const QString& = QString() );
static int createTool( const int, const int, const int = -1 );
static int createTool( const int, const QString&, const int = -1 );
static int createTool( QAction*, const int, const int = -1, const int = -1 );
static QString getSetting ( const QString& );
static void removeChild( const QString& = QString() );
+
+ static void startPyLog(const QString&);
+ static void stopPyLog();
};
#endif // SALOME_PYQT_H
static int defaultMenuGroup() /ReleaseGIL/ ;
- static int createTool( const QString& ) /ReleaseGIL/ ;
+ static int createTool( const QString&, const QString& = QString() ) /ReleaseGIL/ ;
static int createTool( const int, const int, const int = -1 ) /ReleaseGIL/ ;
static int createTool( const int, const QString&, const int = -1 ) /ReleaseGIL/ ;
static int createTool( QAction*, const int, const int = -1, const int = -1 ) /ReleaseGIL/ ;
static QList<double> getPlot2dFitRangeByCurves(const int) /ReleaseGIL/ ;
static QList<double> getPlot2dFitRangeCurrent(const int) /ReleaseGIL/ ;
static void setPlot2dFitRange(const int, const double XMin, const double XMax, const double YMin, const double YMax ) /ReleaseGIL/ ;
+
+ static void startPyLog(const QString&) /ReleaseGIL/ ;
+ static void stopPyLog() /ReleaseGIL/ ;
};
virtual void Execute()
{
if ( LightApp_Study* aStudy = getActiveStudy() ) {
- myResult = aStudy->id();
+ myResult = aStudy->studyName().toUtf8().constData();
}
}
};
{
AIS_ListOfInteractive List;
getAISContext()->DisplayedObjects(List);
-
-#if OCC_VERSION_LARGE <= 0x06060000
- if( !onlyInViewer ) {
- AIS_ListOfInteractive List1;
- getAISContext()->ObjectsInCollector(List1);
- List.Append(List1);
-}
-#endif
-
-
AIS_ListIteratorOfListOfInteractive ite(List);
for ( ; ite.More(); ite.Next() )
{
continue;
}
-#if OCC_VERSION_LARGE <= 0x06060000
- // then try to find presentation in the collector
- if(ic->IsInCollector(anAIS))
- {
- ic->DisplayFromCollector( anAIS, false );
- // Deactivate object if necessary
- if ( !anOCCPrs->ToActivate() )
- ic->Deactivate( anAIS );
-
- // Set visibility flag
- // Temporarily commented to avoid awful dependecy on SALOMEDS
- // TODO: better mechanism of storing display/erse status in a study
- // should be provided...
- //Handle(SALOME_InteractiveObject) anObj =
- // Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
- //if ( !anObj.IsNull() && anObj->hasEntry() )
- //{
- // if ( study )
- // ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
- //}
- continue;
- }
-#endif
// if object is not displayed and not found in the collector - display it
if ( anAIS->IsKind( STANDARD_TYPE(AIS_Trihedron) ) )
{
{
aSh->SetClippable (prs->IsClippable());
applyExistingClipPlanesToObject (anAIS);
-#if OCC_VERSION_LARGE > 0x06050200
bool top = (aSh->isTopLevel() && aSh->switchTopLevel());
ic->SetZLayer( aSh, top ? getTopLayerId() : 0 );
if(!aSh->toActivate())
{
ic->Deactivate( aSh );
}
-#endif
}
//Register anAIS (if it has an entry) in entry2aisobjects map
Handle(AIS_InteractiveObject) anAIS = aIter.Value();
if ( !anAIS.IsNull() ) {
// erase the object from context : move it to collector
-#if OCC_VERSION_LARGE <= 0x06060000
- ic->Erase( anAIS, false, forced ? false : true );
-#else
ic->Erase( anAIS, false );
-#endif
// Set visibility flag if necessary
// Temporarily commented to avoid awful dependecy on SALOMEDS
// TODO: better mechanism of storing display/erse status in a study
// erase an object
Handle(AIS_InteractiveObject) anIO = anIter.Value();
-#if OCC_VERSION_LARGE <= 0x06060000
- ic->Erase( anIO, false, forced ? false : true );
-#else
ic->Erase( anIO, false );
-#endif
// Set visibility flag if necessary
// Temporarily commented to avoid awful dependecy on SALOMEDS
for ( unsigned int ind = 0; ind < List.size(); ind++ )
{
Handle(AIS_InteractiveObject) anAIS=List[ind];
- if(ic->IsDisplayed(anAIS)
-#if OCC_VERSION_LARGE <= 0x06060000
- || ic->IsInCollector(anAIS)
-#endif
- )
+ if(ic->IsDisplayed(anAIS))
{
prs->AddObject( anAIS );
}
createMenu( FileNewId, fileMenu, 0 );
createMenu( FileOpenId, fileMenu, 0 );
createMenu( FileReopenId, fileMenu, 0 );
- createMenu( FileCloseId, fileMenu, 5 );
- createMenu( separator(), fileMenu, -1, 5 );
createMenu( FileSaveId, fileMenu, 5 );
createMenu( FileSaveAsId, fileMenu, 5 );
+ createMenu( FileCloseId, fileMenu, 5 );
createMenu( separator(), fileMenu, -1, 5 );
createMenu( separator(), fileMenu );
// Create tool bars
- int stdTBar = createTool( tr( "INF_DESK_TOOLBAR_STANDARD" ) );
+ int stdTBar = createTool( tr( "INF_DESK_TOOLBAR_STANDARD" ), // title (language-dependant)
+ QString( "SalomeStandard" ) ); // name (language-independant)
// Create tool items
if ( ask && !isPossibleToClose( closePermanently ) )
return false;
+ return closeActiveDoc( closePermanently );
+}
+
+/*!Close document.*/
+bool STD_Application::closeActiveDoc( bool permanently )
+{
SUIT_Study* study = activeStudy();
beforeCloseDoc( study );
if ( study )
- study->closeDocument( closePermanently );
+ study->closeDocument( permanently );
clearViewManagers();
int STD_Application::closeChoice( const QString& docName )
{
- int answer = SUIT_MessageBox::question( desktop(), tr( "CLOSE_STUDY" ), tr( "CLOSE_QUESTION" ).arg( docName ),
+ int answer = SUIT_MessageBox::question( desktop(), tr( "CLOSE_STUDY" ), tr( "CLOSE_QUESTION" ),
SUIT_MessageBox::Save | SUIT_MessageBox::Discard | SUIT_MessageBox::Cancel,
SUIT_MessageBox::Save );
virtual int closeChoice( const QString& );
virtual bool closeAction( const int, bool& );
virtual bool closeDoc( bool ask = true );
+ virtual bool closeActiveDoc( bool permanently = true );
private:
ViewManagerList myViewMgrs;
<source>TOT_DESK_FILE_EXIT</source>
<translation>Exit from application</translation>
</message>
- <message>
- <source>TOT_DESK_FILE_LOAD</source>
- <translation>Load document</translation>
- </message>
<message>
<source>TOT_DESK_FILE_OPEN</source>
<translation>Open document</translation>
<source>PRP_DESK_FILE_SAVE</source>
<translation>Saves the active document</translation>
</message>
- <message>
- <source>PRP_DESK_FILE_LOAD</source>
- <translation>Loads a document</translation>
- </message>
<message>
<source>PRP_DESK_WINDOW_HTILE</source>
<translation>Arranges the windows as nonoverlapping horizontal tiles</translation>
<source>MEN_DESK_FILE_REOPEN</source>
<translation>Reopen</translation>
</message>
- <message>
- <source>MEN_DESK_FILE_LOAD</source>
- <translation>Conn&ect...</translation>
- </message>
<message>
<source>MEN_DESK_FILE_SAVE</source>
<translation>&Save</translation>
<source>TOT_DESK_FILE_EXIT</source>
<translation>Quitter l'application</translation>
</message>
- <message>
- <source>TOT_DESK_FILE_LOAD</source>
- <translation>Charger le document</translation>
- </message>
<message>
<source>TOT_DESK_FILE_OPEN</source>
<translation>Ouvrir un document</translation>
<source>PRP_DESK_FILE_SAVE</source>
<translation>Sauvegarder le document actuel</translation>
</message>
- <message>
- <source>PRP_DESK_FILE_LOAD</source>
- <translation>Charge un document</translation>
- </message>
<message>
<source>PRP_DESK_WINDOW_HTILE</source>
<translation>Ranger les fenêtres en mosaïque horizontale</translation>
<source>MEN_DESK_FILE_REOPEN</source>
<translation>&Réouvrir</translation>
</message>
- <message>
- <source>MEN_DESK_FILE_LOAD</source>
- <translation>Connec&ter...</translation>
- </message>
<message>
<source>MEN_DESK_FILE_SAVE</source>
<translation>&Enregistrer</translation>
<source>TOT_DESK_FILE_EXIT</source>
<translation>アプリケーションを終了</translation>
</message>
- <message>
- <source>TOT_DESK_FILE_LOAD</source>
- <translation>ドキュメントを読み込む</translation>
- </message>
<message>
<source>TOT_DESK_FILE_OPEN</source>
<translation>文書を開く</translation>
<source>PRP_DESK_FILE_SAVE</source>
<translation>現在のドキュメントを保存</translation>
</message>
- <message>
- <source>PRP_DESK_FILE_LOAD</source>
- <translation>ドキュメントを読み込み</translation>
- </message>
<message>
<source>PRP_DESK_WINDOW_HTILE</source>
<translation>ウィンドウを左右に並べて表示</translation>
<source>MEN_DESK_FILE_REOPEN</source>
<translation>再読み込み</translation>
</message>
- <message>
- <source>MEN_DESK_FILE_LOAD</source>
- <translation>接続...(&e)</translation>
- </message>
<message>
<source>MEN_DESK_FILE_SAVE</source>
<translation>保存(&S)</translation>
/*!
Creates new toolbar
\return identificator of new toolbar in tool manager
- \param name - name of new toolbar
+ \param title - title of new toolbar
+ \param name - name (identifier) of new toolbar
*/
-int SUIT_Application::createTool( const QString& name )
+int SUIT_Application::createTool( const QString& title, const QString& name )
{
if ( !desktop() || !desktop()->toolMgr() )
return -1;
- return desktop()->toolMgr()->createToolBar( name );
+ return desktop()->toolMgr()->createToolBar( title, name );
}
/*!
virtual void setActiveStudy( SUIT_Study* );
/** @name Create tool functions*/ //@{
- int createTool( const QString& );
+ int createTool( const QString&, const QString& = QString() );
int createTool( const int, const int, const int = -1 );
int createTool( const int, const QString&, const int = -1 );
int createTool( QAction*, const int, const int = -1, const int = -1 );
defaultButton, escapeButton );
}
+/*!
+ \brief Show critical message box with arbitrary number of user-specified
+ buttons.
+
+ List of buttons to be shown is specified via \a buttons parameter.
+
+ The function returns clicked button id. The identifiers for the buttons
+ are assigned automatically. The first button is identified as 0, the
+ second one as 1, etc.
+
+ The \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c Escape key.
+ If these parameters are not specified (-1 by default), the first button
+ is set as default button and the last one is defined as escape button.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \param buttons list of buttons to be shown
+ \return button used button id
+*/
+int SUIT_MessageBox::critical( QWidget* parent, const QString& title, const QString& text,
+ const QStringList& buttons,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ Q_FOREACH( QString button, buttons )
+ lst.append( ButtonInfo( id++, button ) );
+ return messageBox( SUIT_MessageBox::Critical, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show warning message box with arbitrary number of user-specified
+ buttons.
+
+ List of buttons to be shown is specified via \a buttons parameter.
+
+ The function returns clicked button id. The identifiers for the buttons
+ are assigned automatically. The first button is identified as 0, the
+ second one as 1, etc.
+
+ The \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c Escape key.
+ If these parameters are not specified (-1 by default), the first button
+ is set as default button and the last one is defined as escape button.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \param buttons list of buttons to be shown
+ \return button used button id
+*/
+int SUIT_MessageBox::warning( QWidget* parent, const QString& title, const QString& text,
+ const QStringList& buttons,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ Q_FOREACH( QString button, buttons )
+ lst.append( ButtonInfo( id++, button ) );
+ return messageBox( SUIT_MessageBox::Warning, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show information message box with arbitrary number of user-specified
+ buttons.
+
+ List of buttons to be shown is specified via \a buttons parameter.
+
+ The function returns clicked button id. The identifiers for the buttons
+ are assigned automatically. The first button is identified as 0, the
+ second one as 1, etc.
+
+ The \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c Escape key.
+ If these parameters are not specified (-1 by default), the first button
+ is set as default button and the last one is defined as escape button.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \param buttons list of buttons to be shown
+ \return button used button id
+*/
+int SUIT_MessageBox::information( QWidget* parent, const QString& title, const QString& text,
+ const QStringList& buttons,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ Q_FOREACH( QString button, buttons )
+ lst.append( ButtonInfo( id++, button ) );
+ return messageBox( SUIT_MessageBox::Information, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
+/*!
+ \brief Show question message box with arbitrary number of user-specified
+ buttons.
+
+ List of buttons to be shown is specified via \a buttons parameter.
+
+ The function returns clicked button id. The identifiers for the buttons
+ are assigned automatically. The first button is identified as 0, the
+ second one as 1, etc.
+
+ The \a defaultButton parameter allows to specify the button which is assigned
+ for the \c Return or \c Enter key. Similarly, \a escapeButton parameter
+ allows specifing the button which is assigned for \c Escape key.
+ If these parameters are not specified (-1 by default), the first button
+ is set as default button and the last one is defined as escape button.
+
+ \param parent parent widget
+ \param title message box title
+ \param text message box text
+ \param defaultButton default button
+ \param escapeButton escape button
+ \param buttons list of buttons to be shown
+ \return button used button id
+*/
+int SUIT_MessageBox::question( QWidget* parent, const QString& title, const QString& text,
+ const QStringList& buttons,
+ const int defaultButton, const int escapeButton )
+{
+ ButtonInfos lst;
+ int id = 0;
+ Q_FOREACH( QString button, buttons )
+ lst.append( ButtonInfo( id++, button ) );
+ return messageBox( SUIT_MessageBox::Question, parent, title, text, lst,
+ defaultButton, escapeButton );
+}
+
/*!
\brief Show critical message box with arbitrary number of user-specified
buttons.
const int defaultButton = -1, const int escapeButton = -1 );
// message boxes with arbitrary number of buttons
+ static int critical( QWidget* parent, const QString& title, const QString& text,
+ const QStringList& buttons,
+ const int defaultButton = -1, const int escapeButton = -1 );
+ static int warning( QWidget* parent, const QString& title, const QString& text,
+ const QStringList& buttons,
+ const int defaultButton = -1, const int escapeButton = -1 );
+ static int information( QWidget* parent, const QString& title, const QString& text,
+ const QStringList& buttons,
+ const int defaultButton = -1, const int escapeButton = -1 );
+ static int question( QWidget* parent, const QString& title, const QString& text,
+ const QStringList& buttons,
+ const int defaultButton = -1, const int escapeButton = -1 );
+
static int critical( QWidget* parent, const QString& title, const QString& text,
const int defaultButton, const int escapeButton,
char*, ... );
// Try config file, given in arguments
for (int i = 1; i < arguments.count(); i++) {
QRegExp rx ("--resources=(.+)");
- if ( rx.indexIn( arguments[i] ) >= 0 && rx.numCaptures() > 1 ) {
+ if ( rx.indexIn( arguments[i] ) >= 0 && rx.numCaptures() > 0 ) {
QString file = rx.cap(1);
QFileInfo fi (file);
pathName = fi.absoluteFilePath();
int _argc = 1;
char* _argv[] = {(char*)""};
SUIT_PYTHON::init_python(_argc,_argv);
- PyEval_ReleaseLock();
#endif
SUIT_Application* theApp = aSession->startApplication( argList.first() );
Py_Initialize(); // Initialize the interpreter
PySys_SetArgv(argc, argv);
PyEval_InitThreads(); // Create (and acquire) the interpreter lock - can be called many times
+
+ // Py_InitThreads acquires the GIL
+ PyThreadState *pts = PyGILState_GetThisThreadState();
+ PyEval_ReleaseThread(pts);
SUIT_PYTHON::initialized = true;
}
*/
void
SALOME_Actor
-::SetNameActorOffset(int theOffset[2])
+::SetNameActorOffset(double theOffset[2])
{
myNameActor->SetOffset(theOffset);
}
*/
void
SALOME_Actor
-::GetNameActorSize(vtkRenderer* theRenderer, int theSize[2]) const
+::GetNameActorSize(vtkRenderer* theRenderer, double theSize[2]) const
{
myNameActor->GetSize(theRenderer, theSize);
}
{
if( vtkRenderer* aRenderer = GetRenderer() )
{
- int anOffset[2] = { 0, 0 };
+ double anOffset[2] = { 0, 0 };
VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
vtkActorCollection* aCollection = aCopy.GetActors();
for( int anIndex = 0, aNbItems = aCollection->GetNumberOfItems(); anIndex < aNbItems; anIndex++ )
anActor->SetNameActorOffset( anOffset );
if( anActor->GetVisibility() )
{
- int aSize[2];
+ double aSize[2];
anActor->GetNameActorSize( aRenderer, aSize );
anOffset[0] = anOffset[0] + aSize[0];
anOffset[1] = anOffset[1] + aSize[1];
//! To set offset of name actor
virtual
void
- SetNameActorOffset(int theOffset[2]);
+ SetNameActorOffset(double theOffset[2]);
//! To get size of name actor
virtual
void
- GetNameActorSize(vtkRenderer* theRenderer, int theSize[2]) const;
+ GetNameActorSize(vtkRenderer* theRenderer, double theSize[2]) const;
//! To update visibility of name actors
virtual
aRenderer->Delete();
aSelector->Delete();
- myToolBar = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL"), false, Qt::AllToolBarAreas, -1, this );
- myRecordingToolBar = toolMgr()->createToolBar( tr("LBL_TOOLBAR_RECORD_LABEL"), false, Qt::AllToolBarAreas, -1, this );
+ myToolBar = toolMgr()->createToolBar( tr("LBL_TOOLBAR_LABEL"), // title (language-dependant)
+ QString( "VTKViewerViewOperations" ), // name (language-independant)
+ false ); // disable floatable toolbar
+
+ myRecordingToolBar = toolMgr()->createToolBar( tr("LBL_TOOLBAR_RECORD_LABEL"), // title (language-dependant)
+ QString( "VTKRecordingOperations" ), // name (language-independant)
+ false ); // disable floatable toolbar
createActions( SUIT_Session::session()->resourceMgr() );
createToolBar();
<source>MNU_RIGHT_VIEW</source>
<translation>-OY</translation>
</message>
- <message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>View Operations</translation>
- </message>
<message>
<source>DSC_BACK_VIEW</source>
<translation>+OX View</translation>
<source>MNU_SVTK_RECORDING_STOP</source>
<translation>Stop recording</translation>
</message>
+ <message>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>View Operations</translation>
+ </message>
<message>
<source>LBL_TOOLBAR_RECORD_LABEL</source>
<translation>Recording Operations</translation>
<source>MNU_RIGHT_VIEW</source>
<translation>-OY</translation>
</message>
- <message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>Opérations de visualisation</translation>
- </message>
<message>
<source>DSC_BACK_VIEW</source>
<translation>Vue +OX</translation>
<source>MNU_SVTK_RECORDING_STOP</source>
<translation>Arrêter l'enregistrement</translation>
</message>
+ <message>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>Opérations de visualisation</translation>
+ </message>
<message>
<source>LBL_TOOLBAR_RECORD_LABEL</source>
<translation>Opérations d'enregistrement</translation>
<source>MNU_RIGHT_VIEW</source>
<translation>-OY</translation>
</message>
- <message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>表示操作</translation>
- </message>
<message>
<source>DSC_BACK_VIEW</source>
<translation>+OX View</translation>
<source>MNU_SVTK_RECORDING_STOP</source>
<translation>記録を停止します。</translation>
</message>
+ <message>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>表示操作</translation>
+ </message>
<message>
<source>LBL_TOOLBAR_RECORD_LABEL</source>
<translation>登録</translation>
/*!Constructor.*/
SalomeApp_Application::SalomeApp_Application()
- : LightApp_Application()
+ : LightApp_Application(),
+ myIsSiman( false ),
+ myIsCloseFromExit( false )
{
- connect( desktop(), SIGNAL( message( const QString& ) ),
- this, SLOT( onLoadDocMessage( const QString& ) ), Qt::UniqueConnection );
- myIsSiman = false; // default
}
/*!Destructor.
tr( "MEN_DESK_REGISTRY_DISPLAY" ), tr( "PRP_DESK_REGISTRY_DISPLAY" ),
/*Qt::SHIFT+Qt::Key_D*/0, desk, false, this, SLOT( onRegDisplay() ) );
- //rnv commented : implementation of the mono-study in GUI
- //
- //createAction( FileLoadId, tr( "TOT_DESK_FILE_LOAD" ),
- // resourceMgr()->loadPixmap( "STD", tr( "ICON_FILE_OPEN" ) ),
- // tr( "MEN_DESK_FILE_LOAD" ), tr( "PRP_DESK_FILE_LOAD" ),
- // Qt::CTRL+Qt::Key_L, desk, false, this, SLOT( onLoadDoc() ) );
+ createAction( ConnectId, tr( "TOT_DESK_CONNECT_STUDY" ), QIcon(),
+ tr( "MEN_DESK_CONNECT" ), tr( "PRP_DESK_CONNECT" ),
+ Qt::CTRL+Qt::Key_L, desk, false, this, SLOT( onLoadDoc() ) );
+
+ createAction( DisconnectId, tr( "TOT_DESK_DISCONNECT_STUDY" ), QIcon(),
+ tr( "MEN_DESK_DISCONNECT" ), tr( "PRP_DESK_DISCONNECT" ),
+ Qt::CTRL+Qt::Key_U, desk, false, this, SLOT( onUnloadDoc() ) );
#ifdef WITH_SIMANIO
// creation of menu item is moved to VISU
// createMenu( SaveGUIStateId, fileMenu, 10, -1 );
- // createMenu( FileLoadId, fileMenu, 0 );
+ createMenu( ConnectId, fileMenu, 5 );
+ createMenu( DisconnectId, fileMenu, 5 );
+ createMenu( separator(), fileMenu, -1, 5 );
#ifdef WITH_SIMANIO
if (myIsSiman) {
}
#endif
createMenu( DumpStudyId, fileMenu, 10, -1 );
- createMenu( separator(), fileMenu, -1, 10, -1 );
createMenu( LoadScriptId, fileMenu, 10, -1 );
createMenu( separator(), fileMenu, -1, 10, -1 );
createMenu( PropertiesId, fileMenu, 10, -1 );
}
-
-/*!Set desktop:*/
-void SalomeApp_Application::setDesktop( SUIT_Desktop* desk )
-{
- LightApp_Application::setDesktop( desk );
-
- if ( desk ) {
- connect( desk, SIGNAL( message( const QString& ) ),
- this, SLOT( onLoadDocMessage( const QString& ) ), Qt::UniqueConnection );
- }
-}
-
/*!
\brief Close application.
*/
killServers = dlg.isServersShutdown();
}
- if ( result )
+ if ( result ) {
+ if ( !killServers ) myIsCloseFromExit = true;
SUIT_Session::session()->closeSession( SUIT_Session::ASK, killServers );
+ myIsCloseFromExit = false;
+ }
}
/*!SLOT. Load document.*/
}
}
+/*!SLOT. Unload document.*/
+void SalomeApp_Application::onUnloadDoc( bool ask )
+{
+ if ( ask ) {
+ activeStudy()->abortAllOperations();
+ if ( activeStudy()->isModified() ) {
+ QString docName = activeStudy()->studyName().trimmed();
+ int answer = SUIT_MessageBox::question( desktop(), tr( "DISCONNECT_CAPTION" ),
+ tr( "DISCONNECT_DESCRIPTION" ),
+ tr( "DISCONNECT_SAVE" ),
+ tr( "DISCONNECT_WO_SAVE" ),
+ tr( "APPCLOSE_CANCEL" ), 0 );
+ if ( answer == 0 ) { // save before unload
+ if ( activeStudy()->isSaved() )
+ onSaveDoc();
+ else if ( !onSaveAsDoc() )
+ return;
+ }
+ else if ( answer == 2 ) // Cancel
+ return;
+ }
+ }
+ closeActiveDoc( false );
+}
+
/*!SLOT. Create new study and load script*/
void SalomeApp_Application::onNewWithScript()
{
return res;
}
-/*!SLOT. Load document with a name, specified in \a aMessage.*/
-void SalomeApp_Application::onLoadDocMessage(const QString& aMessage)
+/*!SLOT. Parse message for desktop.*/
+void SalomeApp_Application::onDesktopMessage( const QString& message )
{
- if (aMessage.indexOf("simanCheckoutDone ") == 0) {
+ if (message.indexOf("simanCheckoutDone ") == 0) {
#ifdef WITH_SIMANIO
- onLoadDoc(aMessage.section(' ', 1));
+ // Load document with a name, specified in aMessage.
+ onLoadDoc(message.section(' ', 1));
#else
printf( "****************************************************************\n" );
printf( "* Warning: SALOME is built without SIMAN support.\n" );
printf( "****************************************************************\n" );
#endif
}
+ else if (message.indexOf("studyCreated:") == 0) {
+ // Enable 'Connect' action
+ updateCommandsStatus();
+ }
+ else if (message.indexOf("studyClosed:") == 0) {
+ /* message also contains ID of the closed study,
+ but as soon as SALOME is mono-study application for the moment,
+ this ID is not needed now.*/
+ //long aStudyId = message.section(':', 1).toLong();
+ // Disconnect GUI from active study, because it was closed on DS side.
+ closeActiveDoc( false );
+ // Disable 'Connect' action
+ QAction* a = action( ConnectId );
+ if ( a )
+ a->setEnabled( false );
+ }
+ LightApp_Application::onDesktopMessage( message );
}
/*!SLOT. Copy objects to study maneger from selection maneger..*/
}
}
-
LightApp_Application::onCloseDoc( ask );
}
// Load script menu
a = action( LoadScriptId );
- if ( a )
- a->setEnabled( activeStudy() );
+ if( a )
+ a->setEnabled( pythonConsole() );
// Properties menu
a = action( PropertiesId );
if( a )
a->setEnabled( activeStudy() );
+ // Connect study menu
+ a = action( ConnectId );
+ if( a )
+ a->setEnabled( !activeStudy() && studyMgr()->GetOpenStudies().size() > 0 );
+
+ // Disconnect study menu
+ a = action( DisconnectId );
+ if( a )
+ a->setEnabled( activeStudy() );
+
// update state of Copy/Paste menu items
onSelectionChanged();
}
void SalomeApp_Application::onLoadScript( )
{
SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( activeStudy() );
- if ( !appStudy ) return;
- _PTR(Study) aStudy = appStudy->studyDS();
-
- if ( aStudy->GetProperties()->IsLocked() ) {
- SUIT_MessageBox::warning( desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED") );
- return;
+ if ( appStudy ) {
+ _PTR(Study) aStudy = appStudy->studyDS();
+ if ( aStudy->GetProperties()->IsLocked() ) {
+ SUIT_MessageBox::warning( desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED") );
+ return;
+ }
}
QStringList filtersList;
else if ( flag == WT_PyConsole )
{
PyConsole_Console* pyCons = new PyConsole_EnhConsole( desktop(), new SalomeApp_PyInterp() );
+ pyCons->setObjectName( "pythonConsole" );
pyCons->setWindowTitle( tr( "PYTHON_CONSOLE" ) );
pyCons->setFont(resourceMgr()->fontValue( "PyConsole", "font" ));
pyCons->setIsShowBanner(resourceMgr()->booleanValue( "PyConsole", "show_banner", true ));
getNoteBook(), SLOT( onVarUpdate( QString ) ) );
}
wid = getNoteBook();
+ wid->setObjectName( "noteBook" );
}
#endif
return wid;
int SalomeApp_Application::closeChoice( const QString& docName )
{
- int answer = SUIT_MessageBox::question( desktop(), tr( "APPCLOSE_CAPTION" ), tr( "APPCLOSE_DESCRIPTION" ).arg( docName ),
- tr ("APPCLOSE_SAVE"), tr ("APPCLOSE_CLOSE"),
- //tr ("APPCLOSE_UNLOAD"),
- tr ("APPCLOSE_CANCEL"), 0 );
-
- int res = CloseCancel;
- if ( answer == 0 )
- res = CloseSave;
- else if ( answer == 1 )
- res = CloseDiscard;
- // else if ( answer == 2 )
- // res = CloseUnload;
+ QStringList buttons;
+ QMap<int, int> choices;
+ int idx = 0;
+ buttons << tr ("APPCLOSE_SAVE"); // Save & Close
+ choices.insert( idx++, CloseSave ); // ...
+ buttons << tr ("APPCLOSE_CLOSE"); // Close w/o saving
+ choices.insert( idx++, CloseDiscard ); // ...
+ if ( myIsCloseFromExit ) {
+ buttons << tr ("APPCLOSE_UNLOAD_SAVE"); // Save & Disconnect
+ choices.insert( idx++, CloseDisconnectSave ); // ...
+ buttons << tr ("APPCLOSE_UNLOAD"); // Disconnect
+ choices.insert( idx++, CloseDisconnect ); // ...
+ }
+ buttons << tr ("APPCLOSE_CANCEL"); // Cancel
+ choices.insert( idx++, CloseCancel ); // ...
- return res;
+ int answer = SUIT_MessageBox::question( desktop(), tr( "APPCLOSE_CAPTION" ),
+ tr( "APPCLOSE_DESCRIPTION" ), buttons, 0 );
+ return choices[answer];
}
bool SalomeApp_Application::closeAction( const int choice, bool& closePermanently )
break;
case CloseDiscard:
break;
- case CloseUnload:
+ case CloseDisconnectSave:
+ if ( activeStudy()->isSaved() )
+ onSaveDoc();
+ else if ( !onSaveAsDoc() )
+ res = false;
+ case CloseDisconnect:
+ closeActiveDoc( false );
closePermanently = false;
break;
case CloseCancel:
default:
res = false;
}
-
return res;
}
{
QMap<int, QString> opmap = LightApp_Application::activateModuleActions();
- // rnv commented : implementation of the mono-study in GUI
- // opmap.insert( LoadStudyId, tr( "ACTIVATE_MODULE_OP_LOAD" ) );
+ opmap.insert( LoadStudyId, tr( "ACTIVATE_MODULE_OP_LOAD" ) );
opmap.insert( NewAndScriptId, tr( "ACTIVATE_MODULE_OP_SCRIPT" ) );
return opmap;
/*
Asks to close existing document.
*/
-bool SalomeApp_Application::checkExistingDoc() {
- bool result = true;
- if( activeStudy() ) {
- int answer = SUIT_MessageBox::question( desktop(),
- tr( "APPCLOSE_CAPTION" ),
- tr( "STUDYCLOSE_DESCRIPTION" ),
- tr( "APPCLOSE_SAVE" ),
- tr( "APPCLOSE_CLOSE" ),
- tr( "APPCLOSE_CANCEL" ), 0 );
- if(answer == 0) {
- if ( activeStudy()->isSaved() ) {
- onSaveDoc();
- closeDoc( false );
- } else if ( onSaveAsDoc() ) {
- if( !closeDoc( false ) ) {
- result = false;
- }
- } else {
- result = false;
- }
- }
- else if( answer == 1 ) {
- closeDoc( false );
- } else if( answer == 2 ) {
- result = false;
- }
- } else {
+bool SalomeApp_Application::checkExistingDoc()
+{
+ bool result = LightApp_Application::checkExistingDoc();
+ if ( result && !activeStudy() ) {
SALOMEDSClient_StudyManager* aMgr = studyMgr();
- if( aMgr ) {
+ if ( aMgr ) {
std::vector<std::string> List = studyMgr()->GetOpenStudies();
if( List.size() > 0 ) {
- int answer = SUIT_MessageBox::question( desktop(), tr( "WRN_WARNING" ), tr( "QUE_ACTIVEDOC_LOAD" ),
- SUIT_MessageBox::Yes | SUIT_MessageBox::No, SUIT_MessageBox::No );
- if ( answer == SUIT_MessageBox::Yes ) {
- onLoadDoc();
- }
+ SUIT_MessageBox::critical( desktop(), tr( "WRN_WARNING" ), tr( "ERR_ACTIVEDOC_LOAD" ));
result = false;
}
}
public:
enum { MenuToolsId = 5 };
enum { DumpStudyId = LightApp_Application::UserID, LoadScriptId, PropertiesId,
- CatalogGenId, RegDisplayId, SaveGUIStateId, FileLoadId, UserID,
- SimanCheckInId, SimanLocalCheckInId };
+ CatalogGenId, RegDisplayId, SaveGUIStateId, ConnectId, DisconnectId,
+ SimanCheckInId, SimanLocalCheckInId,
+ UserID };
typedef enum { WT_NoteBook = LightApp_Application::WT_User,
WT_User
protected:
enum { OpenRefresh = LightApp_Application::OpenReload + 1 };
- enum { CloseUnload = LightApp_Application::CloseDiscard + 1 };
+ enum { CloseDisconnectSave = LightApp_Application::CloseDiscard + 1, CloseDisconnect };
enum { LoadStudyId = LightApp_Application::OpenStudyId + 1, NewAndScriptId };
public:
virtual void contextMenuPopup( const QString&, QMenu*, QString& );
virtual bool checkDataObject(LightApp_DataObject* theObj);
-
- virtual void setDesktop( SUIT_Desktop* );
virtual bool checkExistingDoc();
virtual void onLoadDoc();
virtual void onNewWithScript();
virtual bool onLoadDoc( const QString& );
+ virtual void onUnloadDoc( bool ask = true);
virtual void onCloseDoc( bool ask = true);
- virtual void onLoadDocMessage(const QString&);
virtual void onExit();
virtual void onCopy();
protected slots:
void onStudyCreated( SUIT_Study* );
void onStudyOpened( SUIT_Study* );
+ void onDesktopMessage( const QString& );
protected:
virtual void createActions();
private:
#ifndef DISABLE_PYCONSOLE
- QPointer<SalomeApp_NoteBook> myNoteBook;
+ QPointer<SalomeApp_NoteBook> myNoteBook; // Notebook instance
#endif
- QMap<QString, QAction*> myExtActions; // Map <AttributeUserID, QAction>
- bool myIsSiman; // application corresponds to the siman study flag
+ QMap<QString, QAction*> myExtActions; // Map <AttributeUserID, QAction>
+ bool myIsSiman; // application corresponds to the siman study flag
+ bool myIsCloseFromExit; // "Close from Exit" flag
signals:
void dumpedStudyClosed( const QString& theDumpScript,
{
QString str;
if ( myObject )
- str = myObject->GetName().c_str();
+ str = QString::fromUtf8( myObject->GetName().c_str() );
if ( str.isEmpty() ) {
_PTR(SObject) refObj = referencedObject();
if ( refObj )
- str = refObj->GetName().c_str();
+ str = QString::fromUtf8( refObj->GetName().c_str() );
}
if ( isReference() ) {
_PTR(AttributePixMap) aPixAttr ( anAttr );
if ( aPixAttr->HasPixMap() ) {
QString componentType = componentDataType();
- QString pixmapID = aPixAttr->GetPixMap().c_str();
+ QString pixmapID = QString::fromUtf8(aPixAttr->GetPixMap().c_str());
// select a plugin within a component
QStringList plugin_pixmap = pixmapID.split( "::", QString::KeepEmptyParts );
if ( plugin_pixmap.size() == 2 ) {
{
_PTR(AttributeString) strAttr = attr;
std::string str = strAttr->Value();
- QString aStrings = QString( str.c_str() );
+ QString aStrings = QString::fromUtf8( str.c_str() );
//Special case to show NoteBook variables in the "Value" column of the OB
if ( LightApp_RootObject* aRoot = dynamic_cast<LightApp_RootObject*>( root() ) )
{
_PTR(AttributeComment) comm = attr;
std::string str = comm->Value();
- val = QString( str.c_str() );
+ val = QString::fromUtf8( str.c_str() );
}
return val;
*/
void SalomeApp_DoubleSpinBox::setShowTipOnValidate( const bool flag )
{
- myShowTip = myShowTip;
+ myShowTip = flag;
}
/*!
#include <QString>
-#if OCC_VERSION_LARGE > 0x06010000
- #include <Standard_ErrorHandler.hxx>
- #include <Standard_Failure.hxx>
-#else
- #include "CASCatch.hxx"
-#endif
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_Failure.hxx>
+
/*!Constructor. Initialize by \a floatSignal.*/
SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
/*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/
bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e )
{
-#if OCC_VERSION_LARGE > 0x06010000
try {
OCC_CATCH_SIGNALS;
-#else
- CASCatch_TRY {
-#endif
SUIT_ExceptionHandler::internalHandle( o, e );
}
-#if OCC_VERSION_LARGE > 0x06010000
catch(Standard_Failure) {
-#else
- CASCatch_CATCH(Standard_Failure) {
-#endif
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
throw Standard_Failure( aFail->GetMessageString() );
}
*/
void SalomeApp_IntSpinBox::setShowTipOnValidate( const bool flag )
{
- myShowTip = myShowTip;
+ myShowTip = flag;
}
/*!
// Author : Roman NIKOLAEV, Open CASCADE S.A.S.
// Module : GUI
//
-#include <PyConsole_Interp.h> // this include must be first (see PyInterp_base.h)!
-#include <PyConsole_Console.h>
+#include "PyConsole_Interp.h" // this include must be first (see PyInterp_base.h)!
+#include "PyConsole_Console.h"
#include "SalomeApp_NoteBook.h"
#include "SalomeApp_Application.h"
* initstate & initcontext redefined here.
*/
SalomeApp_PyInterp::SalomeApp_PyInterp():
- PyConsole_EnhInterp(), myFirstRun( true )
+ PyConsole_EnhInterp(), myFirstRun( true ), myFirstInitStudy( false )
{
}
int ret = simpleRun( "from Help import *", false );
if ( ret )
return ret;
- ret = simpleRun( "import salome", false );
+ }
+ if( myFirstInitStudy ) {
+ myFirstInitStudy = false;
+ int ret = simpleRun( "import salome", false );
if (ret)
return ret;
ret = simpleRun( "salome.salome_init(0,1)", false );
return true;
}
+void SalomeApp_PyInterp::initStudy()
+{
+ myFirstInitStudy = true;
+}
+
void SalomeApp_PyInterp::closeContext()
{
- simpleRun( "import salome", false );
- simpleRun( "salome.salome_close()", false );
+ myFirstInitStudy = false;
+ simpleRun( "import salome", false );
+ simpleRun( "salome.salome_close()", false );
}
virtual ~SalomeApp_PyInterp();
virtual void initPython();
+ virtual void initStudy();
virtual void closeContext();
protected:
private:
bool myFirstRun;
+ bool myFirstInitStudy;
};
#endif
#include <LightApp_Displayer.h>
+#ifndef DISABLE_PYCONSOLE
+ #include "SalomeApp_PyInterp.h" // WARNING! This include must be the first!
+ #include <PyConsole_Console.h>
+#endif
+
#include "utilities.h"
#include "SALOMEDS_Tool.hxx"
if ( myObserver )
myStudyDS->detach( myObserver->_this() );
if ( permanently ) {
+ SUIT_Desktop* desk = SUIT_Session::session()->activeApplication()->desktop();
+ bool isBlocked = desk->signalsBlocked();
+ desk->blockSignals( true );
SalomeApp_Application::studyMgr()->Close( studyPtr );
+ desk->blockSignals( isBlocked );
+#ifndef DISABLE_PYCONSOLE
+ SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( application() );
+ if( app->pythonConsole() )
+ app->pythonConsole()->getInterp()->destroy();
+#endif
}
SALOMEDSClient_Study* aStudy = 0;
setStudyDS( _PTR(Study)(aStudy) );
<parameter name="multi_file_dump" value="false" />
<parameter name="pydump_save_gui" value="false" />
</section>
- <section name="windows_geometry">
- <parameter value="#00 #00 #00 #FF #00 #00 #00 #00 #FD #00 #00 #00 #02 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #02 #88 #FC #02 #00 #00 #00 #01 #FC #00 #00 #00 #37 #00 #00 #02 #88 #00 #00 #00 #97 #01 #00 #00 #14 #FA #00 #00 #00 #00 #01 #00 #00 #00 #02 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #46 #00 #FF #FF #FF #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01 #00 #00 #00 #00 #00 #00 #01 #00 #00 #00 #00 #C0 #00 #FF #FF #FF #00 #00 #00 #03 #00 #00 #05 #40 #00 #00 #00 #53 #FC #01 #00 #00 #00 #01 #FB #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #00 #00 #00 #05 #40 #00 #00 #00 #46 #00 #FF #FF #FF #00 #00 #04 #38 #00 #00 #02 #88 #00 #00 #00 #04 #00 #00 #00 #04 #00 #00 #00 #08 #00 #00 #00 #08 #FC #00 #00 #00 #01 #00 #00 #00 #02 #00 #00 #00 #02 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #00 #00 #00 #00 #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #CE #FF #FF #FF #FF #00 #00 #00 #00 #00 #00 #00 #00" name=""/>
- </section>
- <section name="windows_visibility">
- <parameter value="#00 #00 #00 #00 #02 #00 #00 #00 #0E #00 #4D #00 #6F #00 #64 #00 #75 #00 #6C #00 #65 #00 #73 #01 #00 #00 #00 #10 #00 #53 #00 #74 #00 #61 #00 #6E #00 #64 #00 #61 #00 #72 #00 #64 #01 #01 #00 #00 #00 #03 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #30 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #31 #01 #00 #00 #00 #10 #00 #77 #00 #69 #00 #6E #00 #64 #00 #6F #00 #77 #00 #5F #00 #33 #01" name=""/>
- </section>
</document>
<translation>The file %1 does not exist.</translation>
</message>
<message>
- <source>QUE_ACTIVEDOC_LOAD</source>
- <translation>There is an active study in the session.
-Do you want to load it?
-</translation>
- </message>
- <message>
- <source>STUDYCLOSE_DESCRIPTION</source>
- <translation>You should close an existing study before.
-Do you want to close it?
-</translation>
+ <source>ERR_ACTIVEDOC_LOAD</source>
+ <translation>A study is already active in your session, but you are not connected to it. Use the Connect button to load it in the interface.</translation>
</message>
<message>
<source>WRN_STUDY_LOCKED</source>
<source>CREATE_DOCUMENT_PROBLEM</source>
<translation>Unknown problem during creation of the document</translation>
</message>
+ <message>
+ <source>TOT_DESK_CONNECT_STUDY</source>
+ <translation>Connect study</translation>
+ </message>
+ <message>
+ <source>TOT_DESK_DISCONNECT_STUDY</source>
+ <translation>Disconnect study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_CONNECT</source>
+ <translation>Connect active study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_DISCONNECT</source>
+ <translation>Disconnect the current study</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_CONNECT</source>
+ <translation>Conn&ect</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_DISCONNECT</source>
+ <translation>D&isconnect</translation>
+ </message>
</context>
<context>
<name>SalomeApp_Application</name>
</message>
<message>
<source>APPCLOSE_UNLOAD</source>
- <translation>&Unload</translation>
+ <translation>&Disconnect w/o saving</translation>
</message>
<message>
- <source>APPCLOSE_CLOSE</source>
- <translation>&Close w/o saving</translation>
+ <source>APPCLOSE_UNLOAD_SAVE</source>
+ <translation>S&ave && Disconnect</translation>
</message>
<message>
<source>MEN_WINDOWS_NEW</source>
<source>MEN_DESK_REGISTRY_DISPLAY</source>
<translation>Registry &Display</translation>
</message>
- <message>
- <source>APPCLOSE_SAVE</source>
- <translation>&Save && Close</translation>
- </message>
<message>
<source>TOT_DESK_FILE_LOAD_SCRIPT</source>
<translation>Load python script</translation>
<source>STUDY_LOCKED</source>
<translation>LOCKED</translation>
</message>
- <message>
- <source>APPCLOSE_CANCEL</source>
- <translation>&Cancel</translation>
- </message>
<message>
<source>OBJ_BROWSER_NAME</source>
<translation>Object</translation>
<source>MEN_DESK_ADD_VARS_TO_NOTEBOOK</source>
<translation>Add vars to NoteBook</translation>
</message>
- <message>
- <source>APPCLOSE_CAPTION</source>
- <translation>Close active study</translation>
- </message>
<message>
<source>MEN_DESK_MRU</source>
<translation>Most Recently Used</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_LOAD</source>
- <translation>&Load...</translation>
+ <translation>&Connect</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_SCRIPT</source>
<source>PRP_SIMAN_LOCAL_CHECK_IN</source>
<translation>Check In for module</translation>
</message>
+ <message>
+ <source>DISCONNECT_CAPTION</source>
+ <translation>Disconnect active study</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_DESCRIPTION</source>
+ <translation>Do you want to save study before disconnect?</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_SAVE</source>
+ <translation>&Save && Disconnect</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_WO_SAVE</source>
+ <translation>&Disconnect w/o saving</translation>
+ </message>
</context>
<context>
<name>SalomeApp_StudyPropertiesDlg</name>
<source>WRN_FILE_NOT_EXIST</source>
<translation>Le fichier %1 n'existe pas.</translation>
</message>
+ <message>
+ <source>ERR_ACTIVEDOC_LOAD</source>
+ <translation type="unfinished">A study is already active in your session, but you are not connected to it. Use the Connect button to load it in the interface.</translation>
+ </message>
<message>
<source>WRN_STUDY_LOCKED</source>
<translation>L'étude est verrouillée</translation>
<translation>Impossible d'ouvrir l'étude car il y en a déjà une d'active.
Lancez une nouvelle session ou fermez l'étude en cours.</translation>
</message>
+ <message>
+ <source>TOT_DESK_CONNECT_STUDY</source>
+ <translation type="unfinished">Connect study</translation>
+ </message>
+ <message>
+ <source>TOT_DESK_DISCONNECT_STUDY</source>
+ <translation type="unfinished">Disconnect study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_CONNECT</source>
+ <translation type="unfinished">Connect active study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_DISCONNECT</source>
+ <translation type="unfinished">Disconnect the current study</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_CONNECT</source>
+ <translation type="unfinished">Conn&ect</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_DISCONNECT</source>
+ <translation type="unfinished">D&isconnect</translation>
+ </message>
</context>
<context>
<name>SalomeApp_Application</name>
</message>
<message>
<source>APPCLOSE_UNLOAD</source>
- <translation>&Déconnecter</translation>
+ <translation>&Déconnecter sans sauvegarder</translation>
</message>
<message>
- <source>APPCLOSE_CLOSE</source>
- <translation>&Fermer sans sauvegarder</translation>
+ <source>APPCLOSE_UNLOAD_SAVE</source>
+ <translation>Sauvegarder && D&éconnecter</translation>
</message>
<message>
<source>MEN_WINDOWS_NEW</source>
<source>MEN_DESK_REGISTRY_DISPLAY</source>
<translation>Affichage du registre CORBA</translation>
</message>
- <message>
- <source>APPCLOSE_SAVE</source>
- <translation>&Sauvegarder && Fermer</translation>
- </message>
<message>
<source>TOT_DESK_FILE_LOAD_SCRIPT</source>
<translation>Exécuter un script python</translation>
<source>STUDY_LOCKED</source>
<translation>VERROUILLEE</translation>
</message>
- <message>
- <source>APPCLOSE_CANCEL</source>
- <translation>&Annuler</translation>
- </message>
<message>
<source>OBJ_BROWSER_NAME</source>
<translation>Objet</translation>
<source>MEN_DESK_ADD_VARS_TO_NOTEBOOK</source>
<translation>Ajouter les variables au registre</translation>
</message>
- <message>
- <source>APPCLOSE_CAPTION</source>
- <translation>Fermer l'étude actuelle</translation>
- </message>
<message>
<source>MEN_DESK_MRU</source>
<translation>Dernières études ouvertes</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_LOAD</source>
- <translation>&Charger...</translation>
+ <translation type="unfinished">&Connect</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_SCRIPT</source>
<source>PRP_SIMAN_LOCAL_CHECK_IN</source>
<translation>Check In pour la module"</translation>
</message>
+ <message>
+ <source>DISCONNECT_CAPTION</source>
+ <translation type="unfinished">Disconnect active study</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_DESCRIPTION</source>
+ <translation type="unfinished">Do you want to save study before disconnect?</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_SAVE</source>
+ <translation type="unfinished">&Save && Disconnect</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_WO_SAVE</source>
+ <translation type="unfinished">&Disconnect w/o saving</translation>
+ </message>
</context>
<context>
<name>SalomeApp_StudyPropertiesDlg</name>
<translation>ファイル %1 は存在しません。</translation>
</message>
<message>
- <source>QUE_ACTIVEDOC_LOAD</source>
- <translation>セッションにスタディがあります。読み込みますか?</translation>
- </message>
- <message>
- <source>STUDYCLOSE_DESCRIPTION</source>
- <translation>既存のスタディを閉じる必要があります。閉じますか?
-</translation>
+ <source>ERR_ACTIVEDOC_LOAD</source>
+ <translation type="unfinished">A study is already active in your session, but you are not connected to it. Use the Connect button to load it in the interface.</translation>
</message>
<message>
<source>WRN_STUDY_LOCKED</source>
<source>CREATE_DOCUMENT_PROBLEM</source>
<translation>ドキュメント作成中に不明な問題が発生しました</translation>
</message>
+ <message>
+ <source>TOT_DESK_CONNECT_STUDY</source>
+ <translation type="unfinished">Connect study</translation>
+ </message>
+ <message>
+ <source>TOT_DESK_DISCONNECT_STUDY</source>
+ <translation type="unfinished">Disconnect study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_CONNECT</source>
+ <translation type="unfinished">Connect active study</translation>
+ </message>
+ <message>
+ <source>PRP_DESK_DISCONNECT</source>
+ <translation type="unfinished">Disconnect the current study</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_CONNECT</source>
+ <translation type="unfinished">Conn&ect</translation>
+ </message>
+ <message>
+ <source>MEN_DESK_DISCONNECT</source>
+ <translation type="unfinished">D&isconnect</translation>
+ </message>
</context>
<context>
<name>SalomeApp_Application</name>
<translation>すべてのファイル (*. *)</translation>
</message>
<message>
- <source>APPCLOSE_UNLOAD</source>
- <translation>アンロード(&U)</translation>
+ <source>APPCLOSE_UNLOAD</source>
+ <translation type="unfinished">&Disconnect w/o saving</translation>
</message>
<message>
- <source>APPCLOSE_CLOSE</source>
- <translation>保存せずに閉じる(&C)</translation>
+ <source>APPCLOSE_UNLOAD_SAVE</source>
+ <translation type="unfinished">S&ave && Disconnect</translation>
</message>
<message>
<source>MEN_WINDOWS_NEW</source>
<source>MEN_DESK_REGISTRY_DISPLAY</source>
<translation>レジストリの表示(&D)</translation>
</message>
- <message>
- <source>APPCLOSE_SAVE</source>
- <translation>保存して閉じる(&S)</translation>
- </message>
<message>
<source>TOT_DESK_FILE_LOAD_SCRIPT</source>
<translation>Python スクリプトを実行</translation>
<source>STUDY_LOCKED</source>
<translation>ロック</translation>
</message>
- <message>
- <source>APPCLOSE_CANCEL</source>
- <translation>キャンセル(&C)</translation>
- </message>
<message>
<source>OBJ_BROWSER_NAME</source>
<translation>オブジェクト</translation>
<source>MEN_DESK_ADD_VARS_TO_NOTEBOOK</source>
<translation>変数をレジストリに追加します。</translation>
</message>
- <message>
- <source>APPCLOSE_CAPTION</source>
- <translation>現在のスタディを閉じる</translation>
- </message>
<message>
<source>MEN_DESK_MRU</source>
<translation>最近のスタディ</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_LOAD</source>
- <translation>読込み(&L)</translation>
+ <translation type="unfinished">&Connect</translation>
</message>
<message>
<source>ACTIVATE_MODULE_OP_SCRIPT</source>
<source>PRP_SIMAN_LOCAL_CHECK_IN</source>
<translation>モジュールにチェックイン</translation>
</message>
+ <message>
+ <source>DISCONNECT_CAPTION</source>
+ <translation type="unfinished">Disconnect active study</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_DESCRIPTION</source>
+ <translation type="unfinished">Do you want to save study before disconnect?</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_SAVE</source>
+ <translation type="unfinished">&Save && Disconnect</translation>
+ </message>
+ <message>
+ <source>DISCONNECT_WO_SAVE</source>
+ <translation type="unfinished">&Disconnect w/o saving</translation>
+ </message>
</context>
<context>
<name>SalomeApp_StudyPropertiesDlg</name>
else:
plugins[name]=[]
if module:
- studyId=sg.getActiveStudyId()
- if plugins[name].has_key(studyId):return
- plugins[name][studyId]=PluginsManager(module,name,basemenuname,menuname)
+ d=sgPyQt.getDesktop()
+ if plugins[name].has_key(d):return
+ plugins[name][d]=PluginsManager(module,name,basemenuname,menuname)
else:
plugins[name].append(PluginsManager(module,name,basemenuname,menuname))
// for backward compatibility we also check files prepended with "." with lower priority
QRegExp exp( QString( "\\.?%1rc\\.([a-zA-Z0-9.]+)" ).arg( myExtAppName ) );
#endif
- QRegExp vers_exp( "^([0-9]+)([A-Z]|RC)?([0-9]*)", Qt::CaseInsensitive );
-
QString fname = QFileInfo( _fname ).fileName();
- if( exp.exactMatch( fname ) ) {
- QStringList vers = exp.cap( 1 ).split( ".", QString::SkipEmptyParts );
- int major=0, minor=0;
- int release = 0, dev1 = 0, dev2 = 0;
- if ( vers.count() > 0 ) major = vers[0].toInt();
- if ( vers.count() > 1 ) minor = vers[1].toInt();
- if ( vers.count() > 2 ) {
- if ( vers_exp.indexIn( vers[2] ) != -1 ) {
- release = vers_exp.cap( 1 ).toInt();
- QString tag = vers_exp.cap( 2 ).toLower();
- if ( !tag.isEmpty() ) {
- if ( tag == "rc" ) // release candidate
- dev1 = 49; // 'rc'=49
- else // a, b, c, ...
- dev1 = (int)( tag[ 0 ].toLatin1() ) - (int)( QChar('a').toLatin1() ) + 1; // 'a'=1, 'b'=2, ..., 'z'=26
- }
- if ( !vers_exp.cap( 3 ).isEmpty() )
- dev2 = vers_exp.cap( 3 ).toInt();
- }
- }
-
- int dev = dev1*100+dev2;
- id = major;
- id*=100; id+=minor;
- id*=100; id+=release;
- id*=10000;
- if ( dev > 0 ) id-=dev;
+ if ( exp.exactMatch( fname ) ) {
+ long fid = Qtx::versionToId( exp.cap( 1 ) );
+ if ( fid > 0 ) id = fid;
}
}
return id;
virtual bool notify( QObject* receiver, QEvent* e )
{
-#if OCC_VERSION_LARGE < 0x06010100
- // Disable GUI user actions while python command is executed
- if (SUIT_Session::IsPythonExecuted()) {
- // Disable mouse and keyboard events
- QEvent::Type aType = e->type();
- if (aType == QEvent::MouseButtonPress || aType == QEvent::MouseButtonRelease ||
- aType == QEvent::MouseButtonDblClick || aType == QEvent::MouseMove ||
- aType == QEvent::Wheel || aType == QEvent::ContextMenu ||
- aType == QEvent::KeyPress || aType == QEvent::KeyRelease ||
- aType == QEvent::Accel || aType == QEvent::AccelOverride)
- return false;
- }
-#endif
#ifdef ENABLE_TESTRECORDER
return myHandler ? myHandler->handle( receiver, e ) :
abort(); //abort program to avoid deadlock in destructors or atexit when shutdown has been interrupted
}
- PyGILState_Ensure();
- //Destroy orb from python (for chasing memory leaks)
+ //Destroy orb from python (for chasing memory leaks)
//PyRun_SimpleString("from omniORB import CORBA");
//PyRun_SimpleString("orb=CORBA.ORB_init([''], CORBA.ORB_ID)");
//PyRun_SimpleString("orb.destroy()");
- Py_Finalize();
+
+ // Destroy the ORB:
+ MESSAGE("Explicitely destroying the ORB (hoping to kill omniORB threads ...)");
+ ORB_INIT * init = SINGLETON_<ORB_INIT>::Instance();
+ if (init)
+ init->explicit_destroy();
+
+ // After ORB destruction
+ PyGILState_Ensure();
+ if(Py_IsInitialized())
+ Py_Finalize();
if ( shutdownAll )
killOmniNames();
#include <SUIT_DataBrowser.h>
#include <QtxTreeView.h>
+namespace
+{
+ QString toObjectName( const QString& s )
+ {
+ QStringList words = s.split( QRegExp("\\s+") );
+ QStringList result;
+ if ( words.count() > 0 )
+ result.append( words[0].left(1).toLower() + words[0].mid(1) );
+ for ( int i = 1; i < words.count(); i++ )
+ result.append( words[i].left(1).toUpper() + words[i].mid(1) );
+ return result.join( "" );
+ }
+}
+
/*!
* This create a gui container to hold widgets dedicated to the XCAD
* data model. By default, the dock widgets are not visible. Use the
_dwDataPanel = new QDockWidget(parent);
_dwDataPanel->setVisible(false);
_dwDataPanel->setWindowTitle(title);
- _dwDataPanel->setObjectName(title);
+ _dwDataPanel->setObjectName(toObjectName(title)+"Dock");
parent->addDockWidget(Qt::LeftDockWidgetArea, _dwDataPanel);
//
// At this step, the _dwDataPanel is located side by side with the object
void DockWidgets::setPropertiesView(QTreeView * propertiesView) {
// Not implemented yet
}
+
+/*!
+ * This function returns dock widget
+ */
+QDockWidget * DockWidgets::getDockWidget() {
+ return _dwDataPanel;
+}
void setDataView(QTreeView * dataView);
void setPropertiesView(QTreeView * propertyView);
+ QDockWidget * getDockWidget();
+
private:
SalomeApp_Application* _salomeApp;
QDockWidget * _dwDataPanel;
return _dataTreeView;
}
+/*!
+ * This returns the dock widgets manager
+ */
+DockWidgets * TreeGuiManager::getDockWidgets() {
+ return _dockWidgets;
+}
/*!
* This function specifies the data model to be used by the
TreeModel * getDataTreeModel();
TreeView * getDataTreeView();
+ DockWidgets * getDockWidgets();
void setDataModel(DataModel * dataModel);
DataModel * getDataModel();
myTextProperty->SetItalic(0);
myTextProperty->SetShadow(1);
myTextProperty->SetFontFamilyToArial();
-
- myTextMapper=vtkTextMapper::New();
- myTextMapper->SetInput("");
- myTextMapper->GetTextProperty()->ShallowCopy(myTextProperty);
- myTextActor=vtkActor2D::New();
- myTextActor->SetMapper(myTextMapper);
+
+ myTextActor=vtkTextActor::New();
+ myTextActor->SetTextProperty(myTextProperty);
myBarActor->SetVisibility(1);
myTextActor->SetVisibility(1);
VTKViewer_FramedTextActor::~VTKViewer_FramedTextActor()
{
myTextActor->Delete();
- myTextMapper->Delete();
myTextProperty->Delete();
myBarActor->Delete();
myBarMapper->Delete();
// function : GetSize
// purpose :
//==================================================================
-void VTKViewer_FramedTextActor::GetSize(vtkRenderer* theRenderer, int theSize[2]) const
+void VTKViewer_FramedTextActor::GetSize(vtkRenderer* vport, double theSize[2]) const
{
- myTextMapper->GetSize(theRenderer, theSize);
+ myTextActor->GetSize(vport, theSize);
theSize[0] = theSize[0] + 2 * GetTextMargin() + OFFSET_SPACING;
theSize[1] = theSize[1] + 2 * GetTextMargin() + OFFSET_SPACING;
}
const double b)
{
myTextProperty->SetColor(r, g, b);
- myTextMapper->GetTextProperty()->ShallowCopy(myTextProperty);
+ myTextActor->GetTextProperty()->ShallowCopy(myTextProperty);
Modified();
}
// function : SetOffset
// purpose :
//==================================================================
-void VTKViewer_FramedTextActor::SetOffset(const int theOffset[2])
+void VTKViewer_FramedTextActor::SetOffset(const double theOffset[2])
{
myHorizontalOffset = theOffset[0];
myVerticalOffset = theOffset[1];
{
// remove whitespaces from from the start and the end
// additionally, consider a case of multi-string text
- QString aString(theText);
+ QString aString(QString::fromUtf8(theText));
QStringList aTrimmedStringList;
QStringList aStringList = aString.split("\n");
while(anIter.hasNext())
aTrimmedStringList.append(anIter.next().trimmed());
- myTextMapper->SetInput(aTrimmedStringList.join("\n").toLatin1().constData());
+ myTextActor->SetInput(aTrimmedStringList.join("\n").toUtf8().constData());
Modified();
}
//==================================================================
char* VTKViewer_FramedTextActor::GetText()
{
- return myTextMapper->GetInput();
+ return myTextActor->GetInput();
}
//==================================================================
int VTKViewer_FramedTextActor::RenderOverlay(vtkViewport *viewport)
{
int renderedSomething = 0;
- myBarActor->RenderOverlay(viewport);
renderedSomething +=myTextActor->RenderOverlay(viewport);
+ renderedSomething +=myBarActor->RenderOverlay(viewport);
return renderedSomething;
}
if(aViewPortWidth == 1 || aViewPortHeight == 1)
return anIsRenderedSomething;
- if(!myTextMapper->GetInput())
+ if(!myTextActor->GetInput())
return anIsRenderedSomething;
myBar->Initialize();
myBar->SetPolys(aPolys);
aPolys->Delete();
- int aTextSize[2];
- myTextMapper->GetSize(theViewport, aTextSize);
+ double aTextSize[2];
+ myTextActor->GetSize(theViewport, aTextSize);
int aBarWidth = aTextSize[0];
int aBarHeight = aTextSize[1];
y / (double)aViewPortHeight);
}
+
aPoints->SetPoint(0, xMin, yMax, 0.0);
aPoints->SetPoint(1, xMin, yMin, 0.0);
aPoints->SetPoint(2, xMax, yMax, 0.0);
myTextProperty->SetVerticalJustificationToCentered();
- myTextMapper->GetTextProperty()->ShallowCopy(myTextProperty);
myBarActor ->GetPositionCoordinate()->SetReferenceCoordinate(PositionCoordinate);
myTextActor->GetPositionCoordinate()->SetReferenceCoordinate(PositionCoordinate);
class vtkTextProperty;
class vtkViewport;
class vtkWindow;
+class vtkTextActor;
class VTKVIEWER_EXPORT VTKViewer_FramedTextActor : public vtkActor2D
{
virtual void SetPickable(int);
virtual int GetPickable();
- virtual void GetSize(vtkRenderer* theRenderer, int theSize[2]) const;
+ virtual void GetSize(vtkRenderer* vport, double theSize[2]) const;
void SetText(const char* theText);
char* GetText();
void SetTextMargin(const int theMargin);
int GetTextMargin() const;
- void SetOffset(const int theOffset[2]);
+ void SetOffset(const double theOffset[2]);
protected:
VTKViewer_FramedTextActor();
vtkActor2D* myBarActor;
vtkTextProperty* myTextProperty;
- vtkTextMapper* myTextMapper;
- vtkActor2D* myTextActor;
+ vtkTextActor* myTextActor;
vtkTimeStamp myBuildTime;
if( !this->ImageData.GetPointer() )
return;
+ glEnable( GL_TEXTURE_2D );
+ if( this->PointSpriteTexture == 0 ) {
+ glGenTextures( 1, &this->PointSpriteTexture );
+ }
+ glBindTexture( GL_TEXTURE_2D, this->PointSpriteTexture );
+ glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
-
+
if(this->BallEnabled) {
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
unsigned char* dataPtr = (unsigned char*)this->ImageData->GetScalarPointer();
glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, aSize[0], aSize[1], 0,
GL_RGBA, GL_UNSIGNED_BYTE, dataPtr );
-
- //glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
- glEnable( GL_TEXTURE_2D );
- glTexEnvf( GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE );
- glBindTexture( GL_TEXTURE_2D, this->PointSpriteTexture );
}
//-----------------------------------------------------------------------------
MAPPER_SUPERCLASS::RenderPiece( ren, act );
if( isUsePointSprites )
this->CleanupPointSprites();
+ glBindTexture( GL_TEXTURE_2D, 0 );
} else {
vtkIdType numPts;
vtkPolyData *input= this->GetInput();
this->TimeToDraw = 0.0001;
vglUseProgramObjectARB( 0 );
-
this->CleanupPointSprites();
+ glBindTexture( GL_TEXTURE_2D, 0 );
}
}
setCentralWidget( myRenderWindow );
myToolBar = new QtxToolBar( true, tr("LBL_TOOLBAR_LABEL"), this );
+ myToolBar->setObjectName( "VTKViewerViewOperations" );
myToolBar->setFloatable( false );
createActions();
<source>MNU_RIGHT_VIEW</source>
<translation>Right</translation>
</message>
- <message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>View Operations</translation>
- </message>
<message>
<source>DSC_BACK_VIEW</source>
<translation>Back View</translation>
</message>
</context>
+<context>
+ <name>VTKViewer_ViewWindow</name>
+ <message>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>View Operations</translation>
+ </message>
+</context>
<context>
<name>VTKViewer_MarkerDlg</name>
<message>
<source>MNU_RIGHT_VIEW</source>
<translation>Droite</translation>
</message>
- <message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>Opérations de visualisation</translation>
- </message>
<message>
<source>DSC_BACK_VIEW</source>
<translation>Vue de derrière</translation>
</message>
</context>
+<context>
+ <name>VTKViewer_ViewWindow</name>
+ <message>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>Opérations de visualisation</translation>
+ </message>
+</context>
<context>
<name>VTKViewer_MarkerDlg</name>
<message>
<source>MNU_RIGHT_VIEW</source>
<translation>法律</translation>
</message>
- <message>
- <source>LBL_TOOLBAR_LABEL</source>
- <translation>表示操作</translation>
- </message>
<message>
<source>DSC_BACK_VIEW</source>
<translation>後側のビュー</translation>
</message>
</context>
+ <context>
+ <name>VTKViewer_ViewWindow</name>
+ <message>
+ <source>LBL_TOOLBAR_LABEL</source>
+ <translation>表示操作</translation>
+ </message>
+ </context>
<context>
<name>VTKViewer_MarkerDlg</name>
<message>