#include <SALOME_Event.h>
+#include <SUIT_Desktop.h>
#include <SUIT_Study.h>
#include <SUIT_ViewManager.h>
{
bool aRes = LightApp_Module::activateModule( theStudy );
+ LightApp_Application* anApp = getApp();
+ SUIT_Desktop* aDesktop = anApp->desktop();
+
setMenuShown( true );
setToolShown( true );
+#ifndef DISABLE_PYCONSOLE
+ aDesktop->tabifyDockWidget( HYDROGUI_Tool::WindowDock( anApp->getWindow( LightApp_Application::WT_PyConsole ) ),
+ HYDROGUI_Tool::WindowDock( anApp->getWindow( LightApp_Application::WT_LogWindow ) ) );
+#endif
+
update( UF_All );
updateCommandsStatus();
{
theMap.clear();
theMap.insert( LightApp_Application::WT_LogWindow, Qt::BottomDockWidgetArea );
+#ifndef DISABLE_PYCONSOLE
+ theMap.insert( LightApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
+#endif
theMap.insert( LightApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
}
#include <SUIT_ViewWindow.h>
#include <QTextCodec>
+#include <QDockWidget>
// Definition of this id allows to use 'latin1' (Qt alias for 'ISO-8859-1')
// encoding instead of default 'System'
}
}
}
+
+
+QDockWidget* HYDROGUI_Tool::WindowDock( QWidget* wid )
+{
+ if ( !wid )
+ return 0;
+
+ QDockWidget* dock = 0;
+ QWidget* w = wid->parentWidget();
+ while ( w && !dock )
+ {
+ dock = ::qobject_cast<QDockWidget*>( w );
+ w = w->parentWidget();
+ }
+ return dock;
+}
class HYDROGUI_Module;
class HYDROGUI_Prs;
+class QDockWidget;
+
/**
* \class HYDROGUI_Tool
* \brief This class contains several useful methods.
const Handle(HYDROData_Object)& theObj,
HYDROData_SequenceOfObjects& theBackRefObjects,
QStringList& theBackRefNames );
+
+ /**
+ * \brief Get father dock window for widget
+ * \param wid widget
+ * \return dock window
+ */
+ static QDockWidget* WindowDock( QWidget* wid );
+
};
#endif