From 10b37dd7682b80461572726837d430f86b890cb8 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 14 Mar 2016 09:33:45 +0100 Subject: [PATCH] According to cotech80 PyConsoleBase->PyConsole and PyConsole->SalomePyConsole --- CMakeLists.txt | 2 +- SalomeGUIConfig.cmake.in | 2 +- adm_local/cmake_files/FindGUI.cmake | 2 +- .../cmake_files/deprecated/FindGUI.cmake | 2 +- src/CMakeLists.txt | 2 +- src/LightApp/CMakeLists.txt | 4 +- src/LightApp/LightApp_Application.cxx | 8 +-- src/LightApp/LightApp_Application.h | 4 +- src/LightApp/resources/LightApp.xml | 2 +- src/PyConsole/CMakeLists.txt | 31 ++++---- .../PyConsole_ConsoleBase.cxx | 0 .../PyConsole_ConsoleBase.h | 6 +- .../PyConsole_EditorBase.cxx | 0 .../PyConsole_EditorBase.h | 4 +- .../PyConsole_EnhEditorBase.cxx | 2 +- .../PyConsole_EnhEditorBase.h | 4 +- .../PyConsole_EnhInterp.cxx | 2 +- .../PyConsole_EnhInterp.h | 4 +- .../PyConsole_Event.cxx | 0 .../PyConsole_Event.h | 2 +- .../PyConsole_Interp.cxx | 0 .../PyConsole_Interp.h | 4 +- .../PyConsole_Request.cxx | 0 .../PyConsole_Request.h | 0 src/PyConsole/resources/PyConsole_msg_en.ts | 65 ++++++++++++++--- src/PyConsole/resources/PyConsole_msg_fr.ts | 63 ++++++++++++++--- src/PyConsole/resources/PyConsole_msg_ja.ts | 65 ++++++++++++++--- .../resources/PyConsoleBase_msg_en.ts | 70 ------------------- .../resources/PyConsoleBase_msg_fr.ts | 70 ------------------- .../resources/PyConsoleBase_msg_ja.ts | 70 ------------------- src/SALOME_PYQT/SalomePyQt/CMakeLists.txt | 2 +- src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx | 6 +- src/SalomeApp/CMakeLists.txt | 4 +- src/SalomeApp/SalomeApp_Application.cxx | 12 ++-- src/SalomeApp/SalomeApp_NoteBook.cxx | 6 +- .../CMakeLists.txt | 51 ++++++-------- .../SalomePyConsole.h} | 16 ++--- .../SalomePyConsole_Console.cxx} | 36 +++++----- .../SalomePyConsole_Console.h} | 30 ++++---- .../SalomePyConsole_Editor.cxx} | 18 ++--- .../SalomePyConsole_Editor.h} | 14 ++-- .../SalomePyConsole_EnhEditor.cxx} | 16 ++--- .../SalomePyConsole_EnhEditor.h} | 12 ++-- .../resources/SalomePyConsole_msg_en.ts | 27 +++++++ .../resources/SalomePyConsole_msg_fr.ts | 27 +++++++ .../resources/SalomePyConsole_msg_ja.ts | 27 +++++++ 46 files changed, 397 insertions(+), 397 deletions(-) rename src/{PyConsoleBase => PyConsole}/PyConsole_ConsoleBase.cxx (100%) rename src/{PyConsoleBase => PyConsole}/PyConsole_ConsoleBase.h (95%) rename src/{PyConsoleBase => PyConsole}/PyConsole_EditorBase.cxx (100%) rename src/{PyConsoleBase => PyConsole}/PyConsole_EditorBase.h (97%) rename src/{PyConsoleBase => PyConsole}/PyConsole_EnhEditorBase.cxx (99%) rename src/{PyConsoleBase => PyConsole}/PyConsole_EnhEditorBase.h (96%) rename src/{PyConsoleBase => PyConsole}/PyConsole_EnhInterp.cxx (99%) rename src/{PyConsoleBase => PyConsole}/PyConsole_EnhInterp.h (95%) rename src/{PyConsoleBase => PyConsole}/PyConsole_Event.cxx (100%) rename src/{PyConsoleBase => PyConsole}/PyConsole_Event.h (98%) rename src/{PyConsoleBase => PyConsole}/PyConsole_Interp.cxx (100%) rename src/{PyConsoleBase => PyConsole}/PyConsole_Interp.h (94%) rename src/{PyConsoleBase => PyConsole}/PyConsole_Request.cxx (100%) rename src/{PyConsoleBase => PyConsole}/PyConsole_Request.h (100%) delete mode 100644 src/PyConsoleBase/resources/PyConsoleBase_msg_en.ts delete mode 100644 src/PyConsoleBase/resources/PyConsoleBase_msg_fr.ts delete mode 100644 src/PyConsoleBase/resources/PyConsoleBase_msg_ja.ts rename src/{PyConsoleBase => SalomePyConsole}/CMakeLists.txt (63%) rename src/{PyConsoleBase/PyConsoleBase.h => SalomePyConsole/SalomePyConsole.h} (81%) rename src/{PyConsole/PyConsole_Console.cxx => SalomePyConsole/SalomePyConsole_Console.cxx} (66%) rename src/{PyConsole/PyConsole_Console.h => SalomePyConsole/SalomePyConsole_Console.h} (70%) rename src/{PyConsole/PyConsole_Editor.cxx => SalomePyConsole/SalomePyConsole_Editor.cxx} (93%) rename src/{PyConsole/PyConsole_Editor.h => SalomePyConsole/SalomePyConsole_Editor.h} (82%) rename src/{PyConsole/PyConsole_EnhEditor.cxx => SalomePyConsole/SalomePyConsole_EnhEditor.cxx} (76%) rename src/{PyConsole/PyConsole_EnhEditor.h => SalomePyConsole/SalomePyConsole_EnhEditor.h} (80%) create mode 100644 src/SalomePyConsole/resources/SalomePyConsole_msg_en.ts create mode 100644 src/SalomePyConsole/resources/SalomePyConsole_msg_fr.ts create mode 100644 src/SalomePyConsole/resources/SalomePyConsole_msg_ja.ts diff --git a/CMakeLists.txt b/CMakeLists.txt index ea19bc0a7..8b95bc52e 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -389,7 +389,7 @@ ENDIF() # Python-based packages specific targets: IF(SALOME_USE_PYCONSOLE) LIST(APPEND _${PROJECT_NAME}_exposed_targets - PyInterp PyConsoleBase PyConsole SalomePyQtGUILight) + PyInterp PyConsole SalomePyConsole SalomePyQtGUILight) IF(SALOME_USE_PLOT2DVIEWER) LIST(APPEND _${PROJECT_NAME}_exposed_targets SalomePyQt) ENDIF() diff --git a/SalomeGUIConfig.cmake.in b/SalomeGUIConfig.cmake.in index d52f42693..505132255 100644 --- a/SalomeGUIConfig.cmake.in +++ b/SalomeGUIConfig.cmake.in @@ -198,8 +198,8 @@ SET(GUI_ObjBrowser ObjBrowser) SET(GUI_OCCViewer OCCViewer) SET(GUI_OpenGLUtils OpenGLUtils) SET(GUI_Plot2d Plot2d) -SET(GUI_PyConsoleBase PyConsoleBase) SET(GUI_PyConsole PyConsole) +SET(GUI_SalomePyConsole SalomePyConsole) SET(GUI_PyInterp PyInterp) SET(GUI_PyEditor PyEditor) SET(GUI_PyViewer PyViewer) diff --git a/adm_local/cmake_files/FindGUI.cmake b/adm_local/cmake_files/FindGUI.cmake index ef6ffa9c4..f93a2b9fb 100644 --- a/adm_local/cmake_files/FindGUI.cmake +++ b/adm_local/cmake_files/FindGUI.cmake @@ -36,7 +36,7 @@ FIND_LIBRARY(OCCViewer OCCViewer ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(OpenGLUtils OpenGLUtils ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(Plot2d Plot2d ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(PyConsole PyConsole ${GUI_ROOT_DIR}/lib/salome) -FIND_LIBRARY(PyConsoleBase PyConsoleBase ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomePyConsole SalomePyConsole ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(PyInterp PyInterp ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(QDS QDS ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(qtx qtx ${GUI_ROOT_DIR}/lib/salome) diff --git a/adm_local/cmake_files/deprecated/FindGUI.cmake b/adm_local/cmake_files/deprecated/FindGUI.cmake index ff29e7b16..1e8609535 100644 --- a/adm_local/cmake_files/deprecated/FindGUI.cmake +++ b/adm_local/cmake_files/deprecated/FindGUI.cmake @@ -32,7 +32,7 @@ FIND_LIBRARY(OCCViewer OCCViewer ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(OpenGLUtils OpenGLUtils ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(Plot2d Plot2d ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(PyConsole PyConsole ${GUI_ROOT_DIR}/lib/salome) -FIND_LIBRARY(PyConsoleBase PyConsoleBase ${GUI_ROOT_DIR}/lib/salome) +FIND_LIBRARY(SalomePyConsole SalomePyConsole ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(PyInterp PyInterp ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(QDS QDS ${GUI_ROOT_DIR}/lib/salome) FIND_LIBRARY(qtx qtx ${GUI_ROOT_DIR}/lib/salome) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ba919fa87..77ee814c1 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -124,8 +124,8 @@ ENDIF(SALOME_USE_PYVIEWER) ## IF(SALOME_USE_PYCONSOLE) ADD_SUBDIRECTORY(PyInterp) - ADD_SUBDIRECTORY(PyConsoleBase) ADD_SUBDIRECTORY(PyConsole) + ADD_SUBDIRECTORY(SalomePyConsole) ADD_SUBDIRECTORY(SALOME_PYQT) ENDIF(SALOME_USE_PYCONSOLE) diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index 3171c6c93..e66cae398 100755 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -81,8 +81,8 @@ ENDIF() IF(SALOME_USE_PYCONSOLE) INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} + ${PROJECT_SOURCE_DIR}/src/SalomePyConsole ${PROJECT_SOURCE_DIR}/src/PyConsole - ${PROJECT_SOURCE_DIR}/src/PyConsoleBase ${PROJECT_SOURCE_DIR}/src/PyInterp ${PROJECT_SOURCE_DIR}/src/SUITApp ) @@ -142,7 +142,7 @@ IF(SALOME_USE_PVVIEWER) LIST(APPEND _link_LIBRARIES PVViewer) ENDIF() IF(SALOME_USE_PYCONSOLE) - LIST(APPEND _link_LIBRARIES PyInterp PyConsole SUITApp) + LIST(APPEND _link_LIBRARIES PyInterp SalomePyConsole SUITApp) ENDIF() # --- headers --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 35410d5ea..9f7adbf5c 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -36,7 +36,7 @@ #ifndef DISABLE_PYCONSOLE #include "LightApp_PyInterp.h" // WARNING! This include must be the first! - #include + #include #endif #include "LightApp_Application.h" @@ -1372,13 +1372,13 @@ LogWindow* LightApp_Application::logWindow() \param force - if true, the pythonConsole is created if it does not exist yet \return Python Console */ -PyConsole_Console* LightApp_Application::pythonConsole(const bool force) +SalomePyConsole_Console* LightApp_Application::pythonConsole(const bool force) { QWidget* wid = dockWindow( WT_PyConsole ); if ( !wid && force==true) { wid = getWindow(WT_PyConsole); } - return qobject_cast( wid ); + return qobject_cast( wid ); } #endif @@ -2035,7 +2035,7 @@ QWidget* LightApp_Application::createWindow( const int flag ) #ifndef DISABLE_PYCONSOLE else if ( flag == WT_PyConsole ) { - PyConsole_Console* pyCons = new PyConsole_EnhConsole( desktop(), getPyInterp() ); + SalomePyConsole_Console* pyCons = new SalomePyConsole_EnhConsole( desktop(), getPyInterp() ); pyCons->setObjectName( "pythonConsole" ); pyCons->setWindowTitle( tr( "PYTHON_CONSOLE" ) ); pyCons->setFont(resourceMgr()->fontValue( "PyConsole", "font" )); diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index 3d7080d6b..eec1b15fa 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -41,7 +41,7 @@ class LogWindow; #ifndef DISABLE_PYCONSOLE -class PyConsole_Console; +class SalomePyConsole_Console; class PyConsole_Interp; #endif class LightApp_WidgetContainer; @@ -111,7 +111,7 @@ public: LogWindow* logWindow(); SUIT_DataBrowser* objectBrowser(); #ifndef DISABLE_PYCONSOLE - PyConsole_Console* pythonConsole(const bool force = false); + SalomePyConsole_Console* pythonConsole(const bool force = false); #endif virtual void updateObjectBrowser( const bool = true ); diff --git a/src/LightApp/resources/LightApp.xml b/src/LightApp/resources/LightApp.xml index 892c453e2..6d6e9c8dc 100644 --- a/src/LightApp/resources/LightApp.xml +++ b/src/LightApp/resources/LightApp.xml @@ -73,7 +73,7 @@ - + diff --git a/src/PyConsole/CMakeLists.txt b/src/PyConsole/CMakeLists.txt index 0bf638f98..a2f3b4636 100755 --- a/src/PyConsole/CMakeLists.txt +++ b/src/PyConsole/CMakeLists.txt @@ -25,10 +25,8 @@ INCLUDE(UseQtExt) INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} - ${PROJECT_SOURCE_DIR}/src/PyConsole - ${PROJECT_SOURCE_DIR}/src/PyConsoleBase ${PROJECT_SOURCE_DIR}/src/Qtx - ${PROJECT_SOURCE_DIR}/src/SUIT + ${PROJECT_SOURCE_DIR}/src/PyConsole ${PROJECT_SOURCE_DIR}/src/Event ${PROJECT_SOURCE_DIR}/src/PyInterp ) @@ -37,20 +35,24 @@ INCLUDE_DIRECTORIES( ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} qtx suit PyConsoleBase) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} PyInterp Event qtx) # --- headers --- # header files / to be processed by moc SET(_moc_HEADERS - PyConsole_Console.h - PyConsole_Editor.h - PyConsole_EnhEditor.h + PyConsole_ConsoleBase.h + PyConsole_EditorBase.h + PyConsole_EnhEditorBase.h ) # header files / no moc processing SET(_other_HEADERS PyConsole.h + PyConsole_EnhInterp.h + PyConsole_Event.h + PyConsole_Interp.h + PyConsole_Request.h ) # header files / to install @@ -58,23 +60,27 @@ SET(PyConsole_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) # --- resources --- -# --- sources --- # resource files / to be processed by lrelease - SET(_ts_RESOURCES resources/PyConsole_msg_en.ts resources/PyConsole_msg_fr.ts resources/PyConsole_msg_ja.ts ) +# --- sources --- + # sources / moc wrappings QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES - PyConsole_Console.cxx - PyConsole_EnhEditor.cxx - PyConsole_Editor.cxx + PyConsole_ConsoleBase.cxx + PyConsole_EnhInterp.cxx + PyConsole_Event.cxx + PyConsole_Interp.cxx + PyConsole_Request.cxx + PyConsole_EditorBase.cxx + PyConsole_EnhEditorBase.cxx ) # sources / to compile @@ -88,3 +94,4 @@ INSTALL(TARGETS PyConsole EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME INSTALL(FILES ${PyConsole_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") + diff --git a/src/PyConsoleBase/PyConsole_ConsoleBase.cxx b/src/PyConsole/PyConsole_ConsoleBase.cxx similarity index 100% rename from src/PyConsoleBase/PyConsole_ConsoleBase.cxx rename to src/PyConsole/PyConsole_ConsoleBase.cxx diff --git a/src/PyConsoleBase/PyConsole_ConsoleBase.h b/src/PyConsole/PyConsole_ConsoleBase.h similarity index 95% rename from src/PyConsoleBase/PyConsole_ConsoleBase.h rename to src/PyConsole/PyConsole_ConsoleBase.h index b0a07273d..010034787 100644 --- a/src/PyConsoleBase/PyConsole_ConsoleBase.h +++ b/src/PyConsole/PyConsole_ConsoleBase.h @@ -26,7 +26,7 @@ #ifndef PYCONSOLE_CONSOLEBASE_H #define PYCONSOLE_CONSOLEBASE_H -#include "PyConsoleBase.h" +#include "PyConsole.h" #include #include @@ -35,7 +35,7 @@ class PyConsole_Interp; class PyConsole_EditorBase; -class PYCONSOLEBASE_EXPORT PyConsole_ConsoleBase : public QWidget +class PYCONSOLE_EXPORT PyConsole_ConsoleBase : public QWidget { Q_OBJECT @@ -106,7 +106,7 @@ protected: * Similar to PyConsole_Console except that an enhanced interpreter and enhanced editor * are encapsulated. */ -class PYCONSOLEBASE_EXPORT PyConsole_EnhConsoleBase : public PyConsole_ConsoleBase +class PYCONSOLE_EXPORT PyConsole_EnhConsoleBase : public PyConsole_ConsoleBase { Q_OBJECT public: diff --git a/src/PyConsoleBase/PyConsole_EditorBase.cxx b/src/PyConsole/PyConsole_EditorBase.cxx similarity index 100% rename from src/PyConsoleBase/PyConsole_EditorBase.cxx rename to src/PyConsole/PyConsole_EditorBase.cxx diff --git a/src/PyConsoleBase/PyConsole_EditorBase.h b/src/PyConsole/PyConsole_EditorBase.h similarity index 97% rename from src/PyConsoleBase/PyConsole_EditorBase.h rename to src/PyConsole/PyConsole_EditorBase.h index c875e7684..793a8eb56 100644 --- a/src/PyConsoleBase/PyConsole_EditorBase.h +++ b/src/PyConsole/PyConsole_EditorBase.h @@ -27,7 +27,7 @@ #ifndef PYCONSOLE_EDITORBASE_H #define PYCONSOLE_EDITORBASE_H -#include "PyConsoleBase.h" +#include "PyConsole.h" #include @@ -35,7 +35,7 @@ class PyConsole_Interp; class PyInterp_Request; class QEventLoop; -class PYCONSOLEBASE_EXPORT PyConsole_EditorBase : public QTextEdit +class PYCONSOLE_EXPORT PyConsole_EditorBase : public QTextEdit { Q_OBJECT; diff --git a/src/PyConsoleBase/PyConsole_EnhEditorBase.cxx b/src/PyConsole/PyConsole_EnhEditorBase.cxx similarity index 99% rename from src/PyConsoleBase/PyConsole_EnhEditorBase.cxx rename to src/PyConsole/PyConsole_EnhEditorBase.cxx index 54bf7fd23..811a6db06 100644 --- a/src/PyConsoleBase/PyConsole_EnhEditorBase.cxx +++ b/src/PyConsole/PyConsole_EnhEditorBase.cxx @@ -19,7 +19,7 @@ // Author : Adrien Bruneton (CEA/DEN) // Created on: 4 avr. 2013 -#include "PyConsoleBase.h" +#include "PyConsole.h" #include #include diff --git a/src/PyConsoleBase/PyConsole_EnhEditorBase.h b/src/PyConsole/PyConsole_EnhEditorBase.h similarity index 96% rename from src/PyConsoleBase/PyConsole_EnhEditorBase.h rename to src/PyConsole/PyConsole_EnhEditorBase.h index 6c91a3d8e..66be9a75d 100644 --- a/src/PyConsoleBase/PyConsole_EnhEditorBase.h +++ b/src/PyConsole/PyConsole_EnhEditorBase.h @@ -22,7 +22,7 @@ #ifndef PYCONSOLE_ENHEDITORBASE_H_ #define PYCONSOLE_ENHEDITORBASE_H_ -#include "PyConsoleBase.h" +#include "PyConsole.h" #include "PyConsole_EditorBase.h" #include @@ -31,7 +31,7 @@ /** * Enhanced Python editor handling tab completion. */ -class PYCONSOLEBASE_EXPORT PyConsole_EnhEditorBase : public PyConsole_EditorBase +class PYCONSOLE_EXPORT PyConsole_EnhEditorBase : public PyConsole_EditorBase { Q_OBJECT; diff --git a/src/PyConsoleBase/PyConsole_EnhInterp.cxx b/src/PyConsole/PyConsole_EnhInterp.cxx similarity index 99% rename from src/PyConsoleBase/PyConsole_EnhInterp.cxx rename to src/PyConsole/PyConsole_EnhInterp.cxx index eab44af6f..bb3230466 100644 --- a/src/PyConsoleBase/PyConsole_EnhInterp.cxx +++ b/src/PyConsole/PyConsole_EnhInterp.cxx @@ -20,7 +20,7 @@ // Created on: 4 avr. 2013 -#include "PyConsoleBase.h" +#include "PyConsole.h" #include "PyConsole_EnhInterp.h" diff --git a/src/PyConsoleBase/PyConsole_EnhInterp.h b/src/PyConsole/PyConsole_EnhInterp.h similarity index 95% rename from src/PyConsoleBase/PyConsole_EnhInterp.h rename to src/PyConsole/PyConsole_EnhInterp.h index 57a483b34..b8fb04a77 100644 --- a/src/PyConsoleBase/PyConsole_EnhInterp.h +++ b/src/PyConsole/PyConsole_EnhInterp.h @@ -23,7 +23,7 @@ #ifndef PYCONSOLE_ENHINTERP_H_ #define PYCONSOLE_ENHINTERP_H_ -#include "PyConsoleBase.h" +#include "PyConsole.h" #include #include "PyConsole_Interp.h" @@ -35,7 +35,7 @@ * Enhanced Python interpreter used for auto-completion. * This extends PyConsole_Interp with an API wrapping the Python dir() command nicely. */ -class PYCONSOLEBASE_EXPORT PyConsole_EnhInterp: public PyConsole_Interp +class PYCONSOLE_EXPORT PyConsole_EnhInterp: public PyConsole_Interp { public: PyConsole_EnhInterp(); diff --git a/src/PyConsoleBase/PyConsole_Event.cxx b/src/PyConsole/PyConsole_Event.cxx similarity index 100% rename from src/PyConsoleBase/PyConsole_Event.cxx rename to src/PyConsole/PyConsole_Event.cxx diff --git a/src/PyConsoleBase/PyConsole_Event.h b/src/PyConsole/PyConsole_Event.h similarity index 98% rename from src/PyConsoleBase/PyConsole_Event.h rename to src/PyConsole/PyConsole_Event.h index 28db82430..6ec1d51bb 100644 --- a/src/PyConsoleBase/PyConsole_Event.h +++ b/src/PyConsole/PyConsole_Event.h @@ -24,7 +24,7 @@ #ifndef PYCONSOLE_EVENT_H #define PYCONSOLE_EVENT_H -#include "PyConsoleBase.h" +#include "PyConsole.h" #include #include diff --git a/src/PyConsoleBase/PyConsole_Interp.cxx b/src/PyConsole/PyConsole_Interp.cxx similarity index 100% rename from src/PyConsoleBase/PyConsole_Interp.cxx rename to src/PyConsole/PyConsole_Interp.cxx diff --git a/src/PyConsoleBase/PyConsole_Interp.h b/src/PyConsole/PyConsole_Interp.h similarity index 94% rename from src/PyConsoleBase/PyConsole_Interp.h rename to src/PyConsole/PyConsole_Interp.h index 34f251d26..1aac73683 100644 --- a/src/PyConsoleBase/PyConsole_Interp.h +++ b/src/PyConsole/PyConsole_Interp.h @@ -25,12 +25,12 @@ #ifndef PYCONSOLE_INTERP_H #define PYCONSOLE_INTERP_H -#include "PyConsoleBase.h" +#include "PyConsole.h" #include "PyInterp_Interp.h" /// !!! WARNING !!! THIS INCLUDE MUST BE VERY FIRST !!! #include -class PYCONSOLEBASE_EXPORT PyConsole_Interp : public PyInterp_Interp +class PYCONSOLE_EXPORT PyConsole_Interp : public PyInterp_Interp { public: PyConsole_Interp(); diff --git a/src/PyConsoleBase/PyConsole_Request.cxx b/src/PyConsole/PyConsole_Request.cxx similarity index 100% rename from src/PyConsoleBase/PyConsole_Request.cxx rename to src/PyConsole/PyConsole_Request.cxx diff --git a/src/PyConsoleBase/PyConsole_Request.h b/src/PyConsole/PyConsole_Request.h similarity index 100% rename from src/PyConsoleBase/PyConsole_Request.h rename to src/PyConsole/PyConsole_Request.h diff --git a/src/PyConsole/resources/PyConsole_msg_en.ts b/src/PyConsole/resources/PyConsole_msg_en.ts index a2d4aae39..1586df266 100644 --- a/src/PyConsole/resources/PyConsole_msg_en.ts +++ b/src/PyConsole/resources/PyConsole_msg_en.ts @@ -2,26 +2,69 @@ - PyConsole_Editor + PyConsole_ConsoleBase - TOT_DUMP_PYCOMMANDS - Dump commands + + EDIT_COPY_CMD + &Copy - TOT_SAVE_PYLOG - Save log + + EDIT_PASTE_CMD + &Paste - PYTHON_FILES_FILTER - PYTHON Files (*.py) + + EDIT_CLEAR_CMD + Clea&r - LOG_FILES_FILTER - Log files (*.log *.txt) + + EDIT_SELECTALL_CMD + Select &All - ERR_FILE_NOT_WRITABLE - File is not writable! + EDIT_DUMPCOMMANDS_CMD + D&ump Commands + + + EDIT_STARTLOG_CMD + Start &Log + + + EDIT_STOPLOG_CMD + Stop &Log + + + + PyConsole_EditorBase + + Choose python file where to store + Choose python file where to store dump + + + Python scripts ext (*.py) + Python scripts (*.py) + + + WARNING + WARNING ! + + + Python file has not been written + Python file has not been written ! + + + Choose python file where to store log + Choose python file where to store log + + + Log files ext (*.log *.txt) + Log files extension (*.log *.txt) + + + Log file is not writable + Log file is not writable ! diff --git a/src/PyConsole/resources/PyConsole_msg_fr.ts b/src/PyConsole/resources/PyConsole_msg_fr.ts index 905d68f7c..ff40a32c5 100644 --- a/src/PyConsole/resources/PyConsole_msg_fr.ts +++ b/src/PyConsole/resources/PyConsole_msg_fr.ts @@ -2,26 +2,69 @@ - PyConsole_Editor + PyConsole_ConsoleBase - TOT_DUMP_PYCOMMANDS + + EDIT_COPY_CMD + &Copier + + + + EDIT_PASTE_CMD + C&oller + + + + EDIT_CLEAR_CMD + &Effacer + + + + EDIT_SELECTALL_CMD + &Tout sélectionner + + + EDIT_DUMPCOMMANDS_CMD &Générer le script des commandes - TOT_SAVE_PYLOG - Sauver la trace + EDIT_STARTLOG_CMD + Démarrer une &trace + + + EDIT_STOPLOG_CMD + Arrêter la &trace + + + + PyConsole_EditorBase + + Choose python file where to store + Choisissez un fichier python où sauver le dump + + + Python scripts ext (*.py) + Scripts Python (*.py) + + + WARNING + Attention ! + + + Python file has not been written + Le fichier Python n'a pas été écrit ! - PYTHON_FILES_FILTER - Fichiers PYTHON (*.py) + Choose python file where to store log + Choisissez un fichier python où sauver le log - LOG_FILES_FILTER - Fichiers de trace (*.log *.txt) + Log files ext (*.log *.txt) + Extensions possible des fichiers log (*.log *.txt) - ERR_FILE_NOT_WRITABLE - Le fichier n'est pas accessible en écriture! + Log file is not writable + Le fichier log sélectionné n'est pas writable ! diff --git a/src/PyConsole/resources/PyConsole_msg_ja.ts b/src/PyConsole/resources/PyConsole_msg_ja.ts index dd8b48e3e..ca1aacee3 100644 --- a/src/PyConsole/resources/PyConsole_msg_ja.ts +++ b/src/PyConsole/resources/PyConsole_msg_ja.ts @@ -2,26 +2,69 @@ - PyConsole_Editor + PyConsole_ConsoleBase - TOT_DUMP_PYCOMMANDS - スクリプト コマンドを生成します。 + + EDIT_COPY_CMD + コピー(&C) - TOT_SAVE_PYLOG - ログの保存 + + EDIT_PASTE_CMD + 貼り付け(&P) - PYTHON_FILES_FILTER - ファイル (*.py) PYTHON + + EDIT_CLEAR_CMD + 削除(&r) - LOG_FILES_FILTER - ログファイル (*.log *.txt) + + EDIT_SELECTALL_CMD + すべて選択します。(&A) - ERR_FILE_NOT_WRITABLE - ファイルが書き込み禁止です! + EDIT_DUMPCOMMANDS_CMD + スクリプト コマンドを生成します。(&u) + + + EDIT_STARTLOG_CMD + ログの開始 (&L) + + + EDIT_STOPLOG_CMD + ログの停止 (&L) + + PyConsole_EditorBase + + Choose python file where to store + Choose python file where to store dump + + + Python scripts ext (*.py) + Python scripts (*.py) + + + WARNING + WARNING ! + + + Python file has not been written + Python file has not been written ! + + + Choose python file where to store log + Choose python file where to store log + + + Log files ext (*.log *.txt) + Log files extension (*.log *.txt) + + + Log file is not writable + Log file is not writable ! + + diff --git a/src/PyConsoleBase/resources/PyConsoleBase_msg_en.ts b/src/PyConsoleBase/resources/PyConsoleBase_msg_en.ts deleted file mode 100644 index 1586df266..000000000 --- a/src/PyConsoleBase/resources/PyConsoleBase_msg_en.ts +++ /dev/null @@ -1,70 +0,0 @@ - - - - - PyConsole_ConsoleBase - - - EDIT_COPY_CMD - &Copy - - - - EDIT_PASTE_CMD - &Paste - - - - EDIT_CLEAR_CMD - Clea&r - - - - EDIT_SELECTALL_CMD - Select &All - - - EDIT_DUMPCOMMANDS_CMD - D&ump Commands - - - EDIT_STARTLOG_CMD - Start &Log - - - EDIT_STOPLOG_CMD - Stop &Log - - - - PyConsole_EditorBase - - Choose python file where to store - Choose python file where to store dump - - - Python scripts ext (*.py) - Python scripts (*.py) - - - WARNING - WARNING ! - - - Python file has not been written - Python file has not been written ! - - - Choose python file where to store log - Choose python file where to store log - - - Log files ext (*.log *.txt) - Log files extension (*.log *.txt) - - - Log file is not writable - Log file is not writable ! - - - diff --git a/src/PyConsoleBase/resources/PyConsoleBase_msg_fr.ts b/src/PyConsoleBase/resources/PyConsoleBase_msg_fr.ts deleted file mode 100644 index ff40a32c5..000000000 --- a/src/PyConsoleBase/resources/PyConsoleBase_msg_fr.ts +++ /dev/null @@ -1,70 +0,0 @@ - - - - - PyConsole_ConsoleBase - - - EDIT_COPY_CMD - &Copier - - - - EDIT_PASTE_CMD - C&oller - - - - EDIT_CLEAR_CMD - &Effacer - - - - EDIT_SELECTALL_CMD - &Tout sélectionner - - - EDIT_DUMPCOMMANDS_CMD - &Générer le script des commandes - - - EDIT_STARTLOG_CMD - Démarrer une &trace - - - EDIT_STOPLOG_CMD - Arrêter la &trace - - - - PyConsole_EditorBase - - Choose python file where to store - Choisissez un fichier python où sauver le dump - - - Python scripts ext (*.py) - Scripts Python (*.py) - - - WARNING - Attention ! - - - Python file has not been written - Le fichier Python n'a pas été écrit ! - - - Choose python file where to store log - Choisissez un fichier python où sauver le log - - - Log files ext (*.log *.txt) - Extensions possible des fichiers log (*.log *.txt) - - - Log file is not writable - Le fichier log sélectionné n'est pas writable ! - - - diff --git a/src/PyConsoleBase/resources/PyConsoleBase_msg_ja.ts b/src/PyConsoleBase/resources/PyConsoleBase_msg_ja.ts deleted file mode 100644 index ca1aacee3..000000000 --- a/src/PyConsoleBase/resources/PyConsoleBase_msg_ja.ts +++ /dev/null @@ -1,70 +0,0 @@ - - - - - PyConsole_ConsoleBase - - - EDIT_COPY_CMD - コピー(&C) - - - - EDIT_PASTE_CMD - 貼り付け(&P) - - - - EDIT_CLEAR_CMD - 削除(&r) - - - - EDIT_SELECTALL_CMD - すべて選択します。(&A) - - - EDIT_DUMPCOMMANDS_CMD - スクリプト コマンドを生成します。(&u) - - - EDIT_STARTLOG_CMD - ログの開始 (&L) - - - EDIT_STOPLOG_CMD - ログの停止 (&L) - - - - PyConsole_EditorBase - - Choose python file where to store - Choose python file where to store dump - - - Python scripts ext (*.py) - Python scripts (*.py) - - - WARNING - WARNING ! - - - Python file has not been written - Python file has not been written ! - - - Choose python file where to store log - Choose python file where to store log - - - Log files ext (*.log *.txt) - Log files extension (*.log *.txt) - - - Log file is not writable - Log file is not writable ! - - - diff --git a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt index ee6a6feae..2e6e62bb5 100755 --- a/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt +++ b/src/SALOME_PYQT/SalomePyQt/CMakeLists.txt @@ -41,8 +41,8 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/OBJECT ${PROJECT_SOURCE_DIR}/src/ObjBrowser ${PROJECT_SOURCE_DIR}/src/PyInterp - ${PROJECT_SOURCE_DIR}/src/PyConsoleBase ${PROJECT_SOURCE_DIR}/src/PyConsole + ${PROJECT_SOURCE_DIR}/src/SalomePyConsole ${PROJECT_SOURCE_DIR}/src/Qtx ${PROJECT_SOURCE_DIR}/src/SALOME_PYQT/SALOME_PYQT_GUILight ${PROJECT_SOURCE_DIR}/src/STD diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx index 4cd4ff3ae..9eecbc264 100644 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx @@ -61,7 +61,7 @@ #include "SUIT_Tools.h" #include "SUIT_ViewManager.h" #include "SUIT_ViewWindow.h" -#include "PyConsole_Console.h" +#include "SalomePyConsole_Console.h" #include #include @@ -4001,7 +4001,7 @@ void SalomePyQt::startPyLog( const QString& theFileName ) virtual void Execute() { if ( getApplication() ) { - PyConsole_Console* pyConsole = getApplication()->pythonConsole( false ); + SalomePyConsole_Console* pyConsole = getApplication()->pythonConsole( false ); if ( pyConsole ) pyConsole->startLog( myFileName ); } } @@ -4021,7 +4021,7 @@ void SalomePyQt::stopPyLog() virtual void Execute() { if ( getApplication() ) { - PyConsole_Console* pyConsole = getApplication()->pythonConsole( false ); + SalomePyConsole_Console* pyConsole = getApplication()->pythonConsole( false ); if ( pyConsole ) pyConsole->stopLog(); } } diff --git a/src/SalomeApp/CMakeLists.txt b/src/SalomeApp/CMakeLists.txt index 5e8ff2e0b..3ee894217 100755 --- a/src/SalomeApp/CMakeLists.txt +++ b/src/SalomeApp/CMakeLists.txt @@ -56,8 +56,8 @@ INCLUDE_DIRECTORIES( IF(SALOME_USE_PYCONSOLE) INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} + ${PROJECT_SOURCE_DIR}/src/SalomePyConsole ${PROJECT_SOURCE_DIR}/src/PyConsole - ${PROJECT_SOURCE_DIR}/src/PyConsoleBase ${PROJECT_SOURCE_DIR}/src/PyInterp ) ENDIF() @@ -90,7 +90,7 @@ IF(SALOME_USE_VTKVIEWER) ENDIF() IF(SALOME_USE_PYCONSOLE) - LIST(APPEND _link_LIBRARIES PyInterp PyConsole) + LIST(APPEND _link_LIBRARIES PyInterp SalomePyConsole) ENDIF() IF(SALOME_USE_GLVIEWER) diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index b867e857c..bc48245f3 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -36,7 +36,7 @@ #ifndef DISABLE_PYCONSOLE #include "SalomeApp_PyInterp.h" // WARNING! This include must be the first! - #include + #include #include "SalomeApp_NoteBook.h" #endif #include "SalomeApp_Application.h" @@ -253,7 +253,7 @@ void SalomeApp_Application::start() // import/execute python scripts if ( pyfiles.count() > 0 && activeStudy() ) { SalomeApp_Study* appStudy = dynamic_cast( activeStudy() ); - PyConsole_Console* pyConsole = pythonConsole(); + SalomePyConsole_Console* pyConsole = pythonConsole(); if ( appStudy && pyConsole ) { _PTR(Study) aStudy = appStudy->studyDS(); if ( !aStudy->GetProperties()->IsLocked() ) { @@ -505,7 +505,7 @@ void SalomeApp_Application::onNewWithScript() QString command = QString("execfile(r\"%1\")").arg(aFile); #ifndef DISABLE_PYCONSOLE - PyConsole_Console* pyConsole = pythonConsole(); + SalomePyConsole_Console* pyConsole = pythonConsole(); if ( pyConsole ) pyConsole->exec( command ); @@ -956,7 +956,7 @@ void SalomeApp_Application::onLoadScript( ) QString command = QString("execfile(r\"%1\")").arg(aFile); #ifndef DISABLE_PYCONSOLE - PyConsole_Console* pyConsole = pythonConsole(); + SalomePyConsole_Console* pyConsole = pythonConsole(); if ( pyConsole ) pyConsole->exec( command ); @@ -1076,7 +1076,7 @@ QWidget* SalomeApp_Application::createWindow( const int flag ) #ifndef DISABLE_PYCONSOLE else if ( flag == WT_PyConsole ) { - PyConsole_Console* pyCons = new PyConsole_EnhConsole( desktop(), getPyInterp() ); + SalomePyConsole_Console* pyCons = new SalomePyConsole_EnhConsole( desktop(), getPyInterp() ); pyCons->setObjectName( "pythonConsole" ); pyCons->setWindowTitle( tr( "PYTHON_CONSOLE" ) ); pyCons->setFont(resourceMgr()->fontValue( "PyConsole", "font" )); @@ -2028,7 +2028,7 @@ bool SalomeApp_Application::onRestoreStudy( const QString& theDumpScript, QString command = QString( "execfile(r\"%1\")" ).arg( theDumpScript ); #ifndef DISABLE_PYCONSOLE - PyConsole_Console* pyConsole = app->pythonConsole(); + SalomePyConsole_Console* pyConsole = app->pythonConsole(); if ( pyConsole ) pyConsole->execAndWait( command ); #endif diff --git a/src/SalomeApp/SalomeApp_NoteBook.cxx b/src/SalomeApp/SalomeApp_NoteBook.cxx index 6874aacd8..23efce3a8 100644 --- a/src/SalomeApp/SalomeApp_NoteBook.cxx +++ b/src/SalomeApp/SalomeApp_NoteBook.cxx @@ -22,7 +22,7 @@ // Module : GUI // #include "PyConsole_Interp.h" // this include must be first (see PyInterp_base.h)! -#include "PyConsole_Console.h" +#include "SalomePyConsole_Console.h" #include "SalomeApp_NoteBook.h" #include "SalomeApp_Application.h" @@ -284,7 +284,7 @@ bool NoteBook_TableRow::IsValidStringValue(const QString theValue) myParentTable->myRows[ aNumRows - 1 ]->GetValue().isEmpty(); SalomeApp_Application* app = dynamic_cast( SUIT_Session::session()->activeApplication() ); - PyConsole_Console* pyConsole = app->pythonConsole(); + SalomePyConsole_Console* pyConsole = app->pythonConsole(); PyConsole_Interp* pyInterp = app->getPyInterp(); PyLockWrapper aLock; // Acquire GIL std::string command = "import salome_notebook ; "; @@ -458,7 +458,7 @@ bool NoteBook_Table::IsValid() const return false; SalomeApp_Application* app = dynamic_cast( SUIT_Session::session()->activeApplication() ); - PyConsole_Console* pyConsole = app->pythonConsole(); + SalomePyConsole_Console* pyConsole = app->pythonConsole(); PyConsole_Interp* pyInterp = app->getPyInterp(); PyLockWrapper aLock; // Acquire GIL std::string command = "import salome_notebook ; "; diff --git a/src/PyConsoleBase/CMakeLists.txt b/src/SalomePyConsole/CMakeLists.txt similarity index 63% rename from src/PyConsoleBase/CMakeLists.txt rename to src/SalomePyConsole/CMakeLists.txt index 3e06a3fee..cc0e4d94d 100755 --- a/src/PyConsoleBase/CMakeLists.txt +++ b/src/SalomePyConsole/CMakeLists.txt @@ -25,8 +25,10 @@ INCLUDE(UseQtExt) INCLUDE_DIRECTORIES( ${QT_INCLUDES} ${PYTHON_INCLUDE_DIRS} + ${PROJECT_SOURCE_DIR}/src/SalomePyConsole + ${PROJECT_SOURCE_DIR}/src/PyConsole ${PROJECT_SOURCE_DIR}/src/Qtx - ${PROJECT_SOURCE_DIR}/src/PyConsoleBase + ${PROJECT_SOURCE_DIR}/src/SUIT ${PROJECT_SOURCE_DIR}/src/Event ${PROJECT_SOURCE_DIR}/src/PyInterp ) @@ -35,63 +37,54 @@ INCLUDE_DIRECTORIES( ADD_DEFINITIONS(${QT_DEFINITIONS} ${PYTHON_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} PyInterp Event qtx) +SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} qtx suit PyConsole) # --- headers --- # header files / to be processed by moc SET(_moc_HEADERS - PyConsole_ConsoleBase.h - PyConsole_EditorBase.h - PyConsole_EnhEditorBase.h + SalomePyConsole_Console.h + SalomePyConsole_Editor.h + SalomePyConsole_EnhEditor.h ) # header files / no moc processing SET(_other_HEADERS - PyConsoleBase.h - PyConsole_EnhInterp.h - PyConsole_Event.h - PyConsole_Interp.h - PyConsole_Request.h + SalomePyConsole.h ) # header files / to install -SET(PyConsoleBase_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) +SET(SalomePyConsole_HEADERS ${_moc_HEADERS} ${_other_HEADERS}) # --- resources --- +# --- sources --- # resource files / to be processed by lrelease + SET(_ts_RESOURCES - resources/PyConsoleBase_msg_en.ts - resources/PyConsoleBase_msg_fr.ts - resources/PyConsoleBase_msg_ja.ts + resources/SalomePyConsole_msg_en.ts + resources/SalomePyConsole_msg_fr.ts + resources/SalomePyConsole_msg_ja.ts ) -# --- sources --- - # sources / moc wrappings QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) # sources / static SET(_other_SOURCES - PyConsole_ConsoleBase.cxx - PyConsole_EnhInterp.cxx - PyConsole_Event.cxx - PyConsole_Interp.cxx - PyConsole_Request.cxx - PyConsole_EditorBase.cxx - PyConsole_EnhEditorBase.cxx + SalomePyConsole_Console.cxx + SalomePyConsole_EnhEditor.cxx + SalomePyConsole_Editor.cxx ) # sources / to compile -SET(PyConsoleBase_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) +SET(PyConsole_SOURCES ${_other_SOURCES} ${_moc_SOURCES}) # --- rules --- -ADD_LIBRARY(PyConsoleBase ${PyConsoleBase_SOURCES}) -TARGET_LINK_LIBRARIES(PyConsoleBase ${_link_LIBRARIES}) -INSTALL(TARGETS PyConsoleBase EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) +ADD_LIBRARY(SalomePyConsole ${PyConsole_SOURCES}) +TARGET_LINK_LIBRARIES(SalomePyConsole ${_link_LIBRARIES}) +INSTALL(TARGETS SalomePyConsole EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) -INSTALL(FILES ${PyConsoleBase_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) +INSTALL(FILES ${SalomePyConsole_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_GUI_INSTALL_RES_DATA}") - diff --git a/src/PyConsoleBase/PyConsoleBase.h b/src/SalomePyConsole/SalomePyConsole.h similarity index 81% rename from src/PyConsoleBase/PyConsoleBase.h rename to src/SalomePyConsole/SalomePyConsole.h index fcef126cc..dfa02b3db 100644 --- a/src/PyConsoleBase/PyConsoleBase.h +++ b/src/SalomePyConsole/SalomePyConsole.h @@ -20,22 +20,22 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File : PyConsoleBase.h +// File : PyConsole.h // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // -#if !defined ( PYCONSOLEBASE_H ) -#define PYCONSOLEBASE_H +#if !defined ( SALOMEPYCONSOLE_H ) +#define SALOMEPYCONSOLE_H // ======================================================== // set dllexport type for Win platform #ifdef WIN32 -# if defined PYCONSOLEBASE_EXPORTS || defined PyConsoleBase_EXPORTS -# define PYCONSOLEBASE_EXPORT __declspec(dllexport) +# if defined SALOMEPYCONSOLE_EXPORTS || defined SalomePyConsole_EXPORTS +# define SALOMEPYCONSOLE_EXPORT __declspec(dllexport) # else -# define PYCONSOLEBASE_EXPORT __declspec(dllimport) +# define SALOMEPYCONSOLE_EXPORT __declspec(dllimport) # endif #else // WIN32 -# define PYCONSOLEBASE_EXPORT +# define SALOMEPYCONSOLE_EXPORT #endif // WIN32 // ======================================================== @@ -45,4 +45,4 @@ #pragma warning (disable : 4251) #endif -#endif // PYCONSOLEBASE_H +#endif // SALOMEPYCONSOLE_H diff --git a/src/PyConsole/PyConsole_Console.cxx b/src/SalomePyConsole/SalomePyConsole_Console.cxx similarity index 66% rename from src/PyConsole/PyConsole_Console.cxx rename to src/SalomePyConsole/SalomePyConsole_Console.cxx index 43e9cb6a4..c42817c38 100644 --- a/src/PyConsole/PyConsole_Console.cxx +++ b/src/SalomePyConsole/SalomePyConsole_Console.cxx @@ -29,9 +29,9 @@ */ #include "PyConsole_Interp.h" /// !!! WARNING !!! THIS INCLUDE MUST BE VERY FIRST !!! -#include "PyConsole_Console.h" -#include "PyConsole_Editor.h" -#include "PyConsole_EnhEditor.h" +#include "SalomePyConsole_Console.h" +#include "SalomePyConsole_Editor.h" +#include "SalomePyConsole_EnhEditor.h" #include "PyConsole_EnhInterp.h" #include @@ -43,10 +43,10 @@ #include #include -PyConsole_EditorBase *PyConsole_Console::PyConsole_Interp_Creator::createEditor( PyConsole_Interp *interp, PyConsole_ConsoleBase *console ) const -{ return new PyConsole_Editor(interp,console); } +PyConsole_EditorBase *SalomePyConsole_Console::SalomePyConsole_Interp_Creator::createEditor( PyConsole_Interp *interp, PyConsole_ConsoleBase *console ) const +{ return new SalomePyConsole_Editor(interp,console); } -PyConsole_Interp *PyConsole_Console::PyConsole_Interp_Creator::createInterp( ) const +PyConsole_Interp *SalomePyConsole_Console::SalomePyConsole_Interp_Creator::createInterp( ) const { return new PyConsole_Interp; } /*! @@ -56,17 +56,17 @@ PyConsole_Interp *PyConsole_Console::PyConsole_Interp_Creator::createInterp( ) c \param parent parent widget \param interp python interpreter */ -PyConsole_Console::PyConsole_Console( QWidget* parent, PyConsole_Interp* interp ) +SalomePyConsole_Console::SalomePyConsole_Console( QWidget* parent, PyConsole_Interp* interp ) : PyConsole_ConsoleBase( parent, interp, 0 ) { - PyConsole_Interp_Creator crea; + SalomePyConsole_Interp_Creator crea; defaultConstructor(interp,crea); } /** * Protected constructor. */ -PyConsole_Console::PyConsole_Console( QWidget* parent, PyConsole_Interp* i, PyConsole_Editor* e ) +SalomePyConsole_Console::SalomePyConsole_Console( QWidget* parent, PyConsole_Interp* i, SalomePyConsole_Editor* e ) : PyConsole_ConsoleBase(parent,i,e) { } @@ -76,7 +76,7 @@ PyConsole_Console::PyConsole_Console( QWidget* parent, PyConsole_Interp* i, PyC Does nothing for the moment. */ -PyConsole_Console::~PyConsole_Console() +SalomePyConsole_Console::~SalomePyConsole_Console() { } @@ -87,7 +87,7 @@ PyConsole_Console::~PyConsole_Console() \param menu context popup menu */ -void PyConsole_Console::contextMenuPopup( QMenu *menu ) +void SalomePyConsole_Console::contextMenuPopup( QMenu *menu ) { PyConsole_ConsoleBase::contextMenuPopup(menu); } @@ -101,7 +101,7 @@ void PyConsole_Console::contextMenuPopup( QMenu *menu ) \param e event \return True if the event is processed and further processing should be stopped */ -bool PyConsole_Console::eventFilter( QObject* o, QEvent* e ) +bool SalomePyConsole_Console::eventFilter( QObject* o, QEvent* e ) { if ( o == myEditor->viewport() && e->type() == QEvent::ContextMenu ) { @@ -111,10 +111,10 @@ bool PyConsole_Console::eventFilter( QObject* o, QEvent* e ) return QWidget::eventFilter( o, e ); } -PyConsole_EditorBase *PyConsole_EnhConsole::PyConsole_Interp_EnhCreator::createEditor( PyConsole_Interp *interp, PyConsole_ConsoleBase *console ) const -{ return new PyConsole_EnhEditor(interp,console); } +PyConsole_EditorBase *SalomePyConsole_EnhConsole::SalomePyConsole_Interp_EnhCreator::createEditor( PyConsole_Interp *interp, PyConsole_ConsoleBase *console ) const +{ return new SalomePyConsole_EnhEditor(interp,console); } -PyConsole_Interp *PyConsole_EnhConsole::PyConsole_Interp_EnhCreator::createInterp( ) const +PyConsole_Interp *SalomePyConsole_EnhConsole::SalomePyConsole_Interp_EnhCreator::createInterp( ) const { return new PyConsole_EnhInterp; } /** @@ -123,9 +123,9 @@ PyConsole_Interp *PyConsole_EnhConsole::PyConsole_Interp_EnhCreator::createInter * @param parent * @param interp */ -PyConsole_EnhConsole::PyConsole_EnhConsole( QWidget* parent, PyConsole_Interp* interp ) - : PyConsole_Console( parent, interp, 0 ) +SalomePyConsole_EnhConsole::SalomePyConsole_EnhConsole( QWidget* parent, PyConsole_Interp* interp ) + : SalomePyConsole_Console( parent, interp, 0 ) { - PyConsole_Interp_EnhCreator crea; + SalomePyConsole_Interp_EnhCreator crea; defaultConstructor(interp,crea); } diff --git a/src/PyConsole/PyConsole_Console.h b/src/SalomePyConsole/SalomePyConsole_Console.h similarity index 70% rename from src/PyConsole/PyConsole_Console.h rename to src/SalomePyConsole/SalomePyConsole_Console.h index 1aa68a4d6..5815beab1 100644 --- a/src/PyConsole/PyConsole_Console.h +++ b/src/SalomePyConsole/SalomePyConsole_Console.h @@ -23,38 +23,38 @@ // File : PyConsole_Console.h // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // -#ifndef PYCONSOLE_CONSOLE_H -#define PYCONSOLE_CONSOLE_H +#ifndef SALOMEPYCONSOLE_CONSOLE_H +#define SALOMEPYCONSOLE_CONSOLE_H -#include "PyConsole.h" +#include "SalomePyConsole.h" #include #include #include #include -class PyConsole_Interp; -class PyConsole_Editor; +class SalomePyConsole_Interp; +class SalomePyConsole_Editor; -class PYCONSOLE_EXPORT PyConsole_Console : public PyConsole_ConsoleBase, public SUIT_PopupClient +class SALOMEPYCONSOLE_EXPORT SalomePyConsole_Console : public PyConsole_ConsoleBase, public SUIT_PopupClient { Q_OBJECT public: - struct PyConsole_Interp_Creator : public PyConsole_Interp_CreatorBase + struct SalomePyConsole_Interp_Creator : public PyConsole_Interp_CreatorBase { virtual PyConsole_EditorBase *createEditor( PyConsole_Interp *interp, PyConsole_ConsoleBase *console ) const; virtual PyConsole_Interp *createInterp( ) const; }; public: - PyConsole_Console( QWidget* parent, PyConsole_Interp* interp = 0 ); - virtual ~PyConsole_Console(); + SalomePyConsole_Console( QWidget* parent, PyConsole_Interp* interp = 0 ); + virtual ~SalomePyConsole_Console(); //! \brief Get popup client symbolic name virtual QString popupClientType() const { return QString( "PyConsole" ); } virtual void contextMenuPopup( QMenu* ); virtual bool eventFilter( QObject*, QEvent* ); protected: - PyConsole_Console( QWidget* parent, PyConsole_Interp*, PyConsole_Editor*); + SalomePyConsole_Console( QWidget* parent, PyConsole_Interp*, SalomePyConsole_Editor*); }; /** @@ -62,20 +62,20 @@ protected: * Similar to PyConsole_Console except that an enhanced interpreter and enhanced editor * are encapsulated. */ -class PYCONSOLE_EXPORT PyConsole_EnhConsole : public PyConsole_Console +class PYCONSOLE_EXPORT SalomePyConsole_EnhConsole : public SalomePyConsole_Console { Q_OBJECT public: - struct PyConsole_Interp_EnhCreator : public PyConsole_Interp_CreatorBase + struct SalomePyConsole_Interp_EnhCreator : public PyConsole_Interp_CreatorBase { virtual PyConsole_EditorBase *createEditor( PyConsole_Interp *interp, PyConsole_ConsoleBase *console ) const; virtual PyConsole_Interp *createInterp( ) const; }; public: - PyConsole_EnhConsole( QWidget* parent, PyConsole_Interp* interp = 0 ); - virtual ~PyConsole_EnhConsole() {} + SalomePyConsole_EnhConsole( QWidget* parent, PyConsole_Interp* interp = 0 ); + virtual ~SalomePyConsole_EnhConsole() {} }; -#endif // PYCONSOLE_CONSOLE_H +#endif // SALOMEPYCONSOLE_CONSOLE_H diff --git a/src/PyConsole/PyConsole_Editor.cxx b/src/SalomePyConsole/SalomePyConsole_Editor.cxx similarity index 93% rename from src/PyConsole/PyConsole_Editor.cxx rename to src/SalomePyConsole/SalomePyConsole_Editor.cxx index 2371eecae..e1a7441fe 100644 --- a/src/PyConsole/PyConsole_Editor.cxx +++ b/src/SalomePyConsole/SalomePyConsole_Editor.cxx @@ -89,7 +89,7 @@ */ #include "PyConsole_Interp.h" // !!! WARNING !!! THIS INCLUDE MUST BE THE VERY FIRST !!! -#include "PyConsole_Editor.h" +#include "SalomePyConsole_Editor.h" #include "PyConsole_Event.h" #include "PyInterp_Event.h" #include "PyInterp_Dispatcher.h" @@ -140,8 +140,8 @@ bool DumpCommandsFileValidator::canSave(const QString& file, bool permissions) \param theInterp python interper \param theParent parent widget */ -PyConsole_Editor::PyConsole_Editor( PyConsole_Interp* theInterp, - QWidget* theParent ) +SalomePyConsole_Editor::SalomePyConsole_Editor( PyConsole_Interp* theInterp, + QWidget* theParent ) : PyConsole_EditorBase(theInterp,theParent) { } @@ -149,12 +149,12 @@ PyConsole_Editor::PyConsole_Editor( PyConsole_Interp* theInterp, /*! \brief Destructor. */ -PyConsole_Editor::~PyConsole_Editor() +SalomePyConsole_Editor::~SalomePyConsole_Editor() { } -void PyConsole_Editor::StaticDumpSlot(PyConsole_EditorBase *base) +void SalomePyConsole_Editor::StaticDumpSlot(PyConsole_EditorBase *base) { QStringList aFilters; aFilters.append( tr( "PYTHON_FILES_FILTER" ) ); @@ -168,12 +168,12 @@ void PyConsole_Editor::StaticDumpSlot(PyConsole_EditorBase *base) /*! \brief "Dump commands" operation. */ -void PyConsole_Editor::dumpSlot() +void SalomePyConsole_Editor::dumpSlot() { - PyConsole_Editor::StaticDumpSlot(this); + SalomePyConsole_Editor::StaticDumpSlot(this); } -void PyConsole_Editor::StaticStartLogSlot(PyConsole_EditorBase *base) +void SalomePyConsole_Editor::StaticStartLogSlot(PyConsole_EditorBase *base) { QStringList aFilters; aFilters.append( tr( "LOG_FILES_FILTER" ) ); @@ -201,7 +201,7 @@ void PyConsole_Editor::StaticStartLogSlot(PyConsole_EditorBase *base) /*! \brief "Start log" operation. */ -void PyConsole_Editor::startLogSlot() +void SalomePyConsole_Editor::startLogSlot() { StaticStartLogSlot(this); } diff --git a/src/PyConsole/PyConsole_Editor.h b/src/SalomePyConsole/SalomePyConsole_Editor.h similarity index 82% rename from src/PyConsole/PyConsole_Editor.h rename to src/SalomePyConsole/SalomePyConsole_Editor.h index a8821992e..243fb2012 100644 --- a/src/PyConsole/PyConsole_Editor.h +++ b/src/SalomePyConsole/SalomePyConsole_Editor.h @@ -24,10 +24,10 @@ // File : PyConsole_Editor.h // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // -#ifndef PYCONSOLE_EDITOR_H -#define PYCONSOLE_EDITOR_H +#ifndef SALOMEPYCONSOLE_EDITOR_H +#define SALOMEPYCONSOLE_EDITOR_H -#include "PyConsole.h" +#include "SalomePyConsole.h" #include "PyConsole_EditorBase.h" #include @@ -36,12 +36,12 @@ class PyConsole_Interp; class PyInterp_Request; class QEventLoop; -class PYCONSOLE_EXPORT PyConsole_Editor : public PyConsole_EditorBase +class PYCONSOLE_EXPORT SalomePyConsole_Editor : public PyConsole_EditorBase { Q_OBJECT; public: - PyConsole_Editor( PyConsole_Interp* theInterp, QWidget *theParent = 0 ); - ~PyConsole_Editor(); + SalomePyConsole_Editor( PyConsole_Interp* theInterp, QWidget *theParent = 0 ); + ~SalomePyConsole_Editor(); static void StaticDumpSlot(PyConsole_EditorBase *base); static void StaticStartLogSlot(PyConsole_EditorBase *base); protected: @@ -49,4 +49,4 @@ protected: virtual void startLogSlot(); }; -#endif // PYCONSOLE_EDITOR_H +#endif // SALOMEPYCONSOLE_EDITOR_H diff --git a/src/PyConsole/PyConsole_EnhEditor.cxx b/src/SalomePyConsole/SalomePyConsole_EnhEditor.cxx similarity index 76% rename from src/PyConsole/PyConsole_EnhEditor.cxx rename to src/SalomePyConsole/SalomePyConsole_EnhEditor.cxx index dd4619b1e..3be8d5dd7 100644 --- a/src/PyConsole/PyConsole_EnhEditor.cxx +++ b/src/SalomePyConsole/SalomePyConsole_EnhEditor.cxx @@ -19,7 +19,7 @@ // Author : Adrien Bruneton (CEA/DEN) // Created on: 4 avr. 2013 -#include "PyConsole.h" +#include "SalomePyConsole.h" #include #include @@ -29,25 +29,25 @@ #include #include -#include "PyConsole_EnhEditor.h" -#include "PyConsole_Editor.h" +#include "SalomePyConsole_EnhEditor.h" +#include "SalomePyConsole_Editor.h" /** * Constructor. * @param interp the interpreter linked to the editor * @param parent parent widget */ -PyConsole_EnhEditor::PyConsole_EnhEditor(PyConsole_Interp* interp, QWidget* parent) : +SalomePyConsole_EnhEditor::SalomePyConsole_EnhEditor(PyConsole_Interp* interp, QWidget* parent) : PyConsole_EnhEditorBase(interp, parent) { } -void PyConsole_EnhEditor::dumpSlot() +void SalomePyConsole_EnhEditor::dumpSlot() { - PyConsole_Editor::StaticDumpSlot(this); + SalomePyConsole_Editor::StaticDumpSlot(this); } -void PyConsole_EnhEditor::startLogSlot() +void SalomePyConsole_EnhEditor::startLogSlot() { - PyConsole_Editor::StaticStartLogSlot(this); + SalomePyConsole_Editor::StaticStartLogSlot(this); } diff --git a/src/PyConsole/PyConsole_EnhEditor.h b/src/SalomePyConsole/SalomePyConsole_EnhEditor.h similarity index 80% rename from src/PyConsole/PyConsole_EnhEditor.h rename to src/SalomePyConsole/SalomePyConsole_EnhEditor.h index f14402e3b..0be5a4017 100644 --- a/src/PyConsole/PyConsole_EnhEditor.h +++ b/src/SalomePyConsole/SalomePyConsole_EnhEditor.h @@ -19,10 +19,10 @@ // Author : Adrien Bruneton (CEA/DEN) // Created on: 4 avr. 2013 -#ifndef PYCONSOLE_ENHEDITOR_H_ -#define PYCONSOLE_ENHEDITOR_H_ +#ifndef SALOMEPYCONSOLE_ENHEDITOR_H_ +#define SALOMEPYCONSOLE_ENHEDITOR_H_ -#include "PyConsole.h" +#include "SalomePyConsole.h" #include "PyConsole_EnhEditorBase.h" #include @@ -31,12 +31,12 @@ /** * Enhanced Python editor handling tab completion. */ -class PYCONSOLE_EXPORT PyConsole_EnhEditor : public PyConsole_EnhEditorBase +class PYCONSOLE_EXPORT SalomePyConsole_EnhEditor : public PyConsole_EnhEditorBase { Q_OBJECT; public: - PyConsole_EnhEditor(PyConsole_Interp* interp, QWidget* parent = 0); - virtual ~PyConsole_EnhEditor() {} + SalomePyConsole_EnhEditor(PyConsole_Interp* interp, QWidget* parent = 0); + virtual ~SalomePyConsole_EnhEditor() {} protected: virtual void dumpSlot(); virtual void startLogSlot(); diff --git a/src/SalomePyConsole/resources/SalomePyConsole_msg_en.ts b/src/SalomePyConsole/resources/SalomePyConsole_msg_en.ts new file mode 100644 index 000000000..7fcc5bc60 --- /dev/null +++ b/src/SalomePyConsole/resources/SalomePyConsole_msg_en.ts @@ -0,0 +1,27 @@ + + + + + SalomePyConsole_Editor + + TOT_DUMP_PYCOMMANDS + Dump commands + + + TOT_SAVE_PYLOG + Save log + + + PYTHON_FILES_FILTER + PYTHON Files (*.py) + + + LOG_FILES_FILTER + Log files (*.log *.txt) + + + ERR_FILE_NOT_WRITABLE + File is not writable! + + + diff --git a/src/SalomePyConsole/resources/SalomePyConsole_msg_fr.ts b/src/SalomePyConsole/resources/SalomePyConsole_msg_fr.ts new file mode 100644 index 000000000..3626118fa --- /dev/null +++ b/src/SalomePyConsole/resources/SalomePyConsole_msg_fr.ts @@ -0,0 +1,27 @@ + + + + + SalomePyConsole_Editor + + TOT_DUMP_PYCOMMANDS + &Générer le script des commandes + + + TOT_SAVE_PYLOG + Sauver la trace + + + PYTHON_FILES_FILTER + Fichiers PYTHON (*.py) + + + LOG_FILES_FILTER + Fichiers de trace (*.log *.txt) + + + ERR_FILE_NOT_WRITABLE + Le fichier n'est pas accessible en écriture! + + + diff --git a/src/SalomePyConsole/resources/SalomePyConsole_msg_ja.ts b/src/SalomePyConsole/resources/SalomePyConsole_msg_ja.ts new file mode 100644 index 000000000..3f579c626 --- /dev/null +++ b/src/SalomePyConsole/resources/SalomePyConsole_msg_ja.ts @@ -0,0 +1,27 @@ + + + + + SalomePyConsole_Editor + + TOT_DUMP_PYCOMMANDS + スクリプト コマンドを生成します。 + + + TOT_SAVE_PYLOG + ログの保存 + + + PYTHON_FILES_FILTER + ファイル (*.py) PYTHON + + + LOG_FILES_FILTER + ログファイル (*.log *.txt) + + + ERR_FILE_NOT_WRITABLE + ファイルが書き込み禁止です! + + + -- 2.39.2