1) by default, 'NoteBook' dockable window is enable only in the GEOM and SMESH modules now.
2) added a possibility to enable/disable 'NoteBook' window via Python API (windows() function).
${PROJECT_SOURCE_DIR}/src/SUIT
)
+IF(SALOME_LIGHT_ONLY)
+ #disable 'ENABLE_CORBA' feature
+ SET(PYQT_SIPFLAGS ${PYQT_SIPFLAGS} "-xENABLE_CORBA;")
+ELSE(SALOME_LIGHT_ONLY)
+ INCLUDE_DIRECTORIES(
+ ${PROJECT_SOURCE_DIR}/src/SalomeApp
+ )
+ENDIF(SALOME_LIGHT_ONLY)
+
# additional preprocessor / compiler flags
ADD_DEFINITIONS(
${QWT_DEFINITIONS}
#include <QColor>
#include <LightApp_Application.h>
+#ifndef GUI_DISABLE_CORBA
+#include <SalomeApp_Application.h>
+#endif
#include <LightApp_Preferences.h>
#include <Plot2d_ViewFrame.h>
enum {
WT_ObjectBrowser = LightApp_Application::WT_ObjectBrowser,
+#ifndef GUI_DISABLE_CORBA
+ WT_NoteBook = SalomeApp_Application::WT_NoteBook,
+#endif
WT_PyConsole = LightApp_Application::WT_PyConsole,
WT_LogWindow = LightApp_Application::WT_LogWindow,
WT_User = LightApp_Application::WT_User
%Module SalomePyQt
+%Feature ENABLE_CORBA
+
%Import QtGuimod.sip
%Import QtXmlmod.sip
enum WindowType {
WT_ObjectBrowser,
+%If (ENABLE_CORBA)
+ WT_NoteBook,
+%End
WT_PyConsole,
WT_LogWindow,
WT_User
return false;
}
-/*!
- \return default windows( Object Browser, Python Console )
- Adds to map \a aMap.
-*/
-void SalomeApp_Application::defaultWindows( QMap<int, int>& aMap ) const
-{
- LightApp_Application::defaultWindows(aMap);
-#ifndef DISABLE_PYCONSOLE
- if ( !aMap.contains( WT_NoteBook ) ) {
- if ( !myNoteBook ) {
- aMap.insert( WT_NoteBook, Qt::LeftDockWidgetArea );
- }
- }
-#endif
-}
-
-/*!
- Gets current windows.
- \param winMap - output current windows map.
-*/
-void SalomeApp_Application::currentWindows(QMap<int, int>& aMap) const
-{
- LightApp_Application::currentWindows( aMap );
-#ifndef DISABLE_PYCONSOLE
- if ( !aMap.contains( WT_NoteBook) && myNoteBook )
- aMap.insert( WT_NoteBook, Qt::LeftDockWidgetArea );
-#endif
-}
-
#ifndef DISABLE_PYCONSOLE
//============================================================================
/*! Function : onUpdateStudy
virtual bool useStudy( const QString& );
virtual void updateDesktopTitle();
- virtual void currentWindows( QMap<int, int>& ) const;
#ifndef DISABLE_PYCONSOLE
virtual void setNoteBook(SalomeApp_NoteBook* theNoteBook);
virtual QMap<int, QString> activateModuleActions() const;
virtual void moduleActionSelected( const int );
- virtual void defaultWindows( QMap<int, int>& ) const;
-
void objectBrowserColumnsVisibility();
#ifndef DISABLE_PYCONSOLE