From 647ee32676370444cdd03c3fd7e6f9736f279f3a Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 10 Jul 2007 11:54:16 +0000 Subject: [PATCH] *** empty log message *** --- .../SALOME_PYQT_GUI/SALOME_PYQT_GUI.h | 2 +- .../SALOME_PYQT_GUI/SALOME_PYQT_GUI.sip | 22 ++++++++ .../SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx | 2 +- .../SALOME_PYQT_GUI/SALOME_PYQT_Module.h | 2 +- .../SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.cxx | 2 +- .../SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.h | 2 +- src/SVTK/SVTK_MainWindow.cxx | 27 +++++----- src/Session/Session_ServerCheck.cxx | 5 +- src/Session/Session_ServerCheck.hxx | 5 +- src/TOOLSGUI/ToolsGUI_RegWidget.cxx | 54 +++++++++---------- src/TOOLSGUI/ToolsGUI_RegWidget.h | 34 ++++++------ src/VTKViewer/VTKViewer_ViewWindow.cxx | 10 ++-- 12 files changed, 96 insertions(+), 71 deletions(-) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.h b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.h index 2931f1faa..38fffc899 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.h @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_PYQT_GUI.h -// Author : Vadim SANDLER, Open CASCADE SAS, vadim.sandler@opencascade.com +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // #if !defined ( SALOME_PYQT_GUI_H ) diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.sip b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.sip index 36f59f752..3731b4c54 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.sip +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_GUI.sip @@ -1,3 +1,25 @@ +// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D +// +// 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 : SALOME_PYQT_GUI.sip +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// + %Module SalomePyQtGUI %Import QtGuimod.sip diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx index 30889c47a..9460c968a 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_PYQT_Module.cxx -// Author : Vadim SANDLER, Open CASCADE SAS, vadim.sandler@opencascade.com +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // #include "SALOME_PYQT_Module.h" diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h index 594de1038..ff9f9076b 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.h @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_PYQT_Module.h -// Author : Vadim SANDLER, Open CASCADE SAS, vadim.sandler@opencascade.com +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // #ifndef SALOME_PYQT_MODULE_H diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.cxx b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.cxx index 24d4977d0..b086ba7b1 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.cxx +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_PYQT_PyInterp.cxx -// Author : Vadim SANDLER, Open CASCADE SAS, vadim.sandler@opencascade.com +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // #include "SALOME_PYQT_PyInterp.h" // this include must be first (see PyInterp_base.h)! diff --git a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.h b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.h index c9ce18128..0d104b546 100644 --- a/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.h +++ b/src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.h @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File : SALOME_PYQT_PyInterp.h -// Author : Vadim SANDLER, Open CASCADE SAS, vadim.sandler@opencascade.com +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) // #ifndef SALOME_PYQT_PYINTERP_H diff --git a/src/SVTK/SVTK_MainWindow.cxx b/src/SVTK/SVTK_MainWindow.cxx index 0dd655d31..ba988183e 100644 --- a/src/SVTK/SVTK_MainWindow.cxx +++ b/src/SVTK/SVTK_MainWindow.cxx @@ -28,33 +28,31 @@ #include "SALOME_Actor.h" +#include + #include #include -#include "QtxAction.h" +#include +#include -#include "SUIT_ToolButton.h" -#include "SUIT_MessageBox.h" -#include "SUIT_ViewWindow.h" +#include +#include +#include +#include +#include -#include "SUIT_Tools.h" -#include "SUIT_ResourceMgr.h" #include "SVTK_NonIsometricDlg.h" #include "SVTK_UpdateRateDlg.h" #include "SVTK_CubeAxesDlg.h" #include "SVTK_SetRotationPointDlg.h" - #include "SVTK_MainWindow.h" #include "SVTK_Event.h" #include "SVTK_Renderer.h" #include "SVTK_RenderWindowInteractor.h" #include "SVTK_InteractorStyle.h" - #include "SVTK_Selector.h" -#include -#include - /*! Constructor */ @@ -68,9 +66,7 @@ SVTK_MainWindow { setObjectName(theName); - myToolBar = new QToolBar(this); - //myToolBar->setCloseMode(QDockWindow::Undocked); - myToolBar->setWindowTitle(tr("LBL_TOOLBAR_LABEL")); + myToolBar = new QtxToolBar( true, tr("LBL_TOOLBAR_LABEL"), this ); createActions(theResourceMgr); createToolBar(); @@ -594,10 +590,12 @@ SVTK_MainWindow aScaleBtn->AddAction(myActionsMap[FitAllId]); aScaleBtn->AddAction(myActionsMap[FitRectId]); aScaleBtn->AddAction(myActionsMap[ZoomId]); + myToolBar->addWidget( aScaleBtn ); SUIT_ToolButton* aPanningBtn = new SUIT_ToolButton(myToolBar); aPanningBtn->AddAction(myActionsMap[PanId]); aPanningBtn->AddAction(myActionsMap[GlobalPanId]); + myToolBar->addWidget( aPanningBtn ); myToolBar->addAction( myActionsMap[ChangeRotationPointId] ); @@ -610,6 +608,7 @@ SVTK_MainWindow aViewsBtn->AddAction(myActionsMap[BottomId]); aViewsBtn->AddAction(myActionsMap[LeftId]); aViewsBtn->AddAction(myActionsMap[RightId]); + myToolBar->addWidget( aViewsBtn ); myToolBar->addAction( myActionsMap[ResetId] ); diff --git a/src/Session/Session_ServerCheck.cxx b/src/Session/Session_ServerCheck.cxx index 887751279..3661b8714 100644 --- a/src/Session/Session_ServerCheck.cxx +++ b/src/Session/Session_ServerCheck.cxx @@ -16,8 +16,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: Session_ServerCheck.cxx -// Author: Vadim SANDLER +// File : Session_ServerCheck.cxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// #include "Session_ServerCheck.hxx" #include diff --git a/src/Session/Session_ServerCheck.hxx b/src/Session/Session_ServerCheck.hxx index 9a65f436c..35faf4d38 100644 --- a/src/Session/Session_ServerCheck.hxx +++ b/src/Session/Session_ServerCheck.hxx @@ -16,8 +16,9 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// File: Session_ServerCheck.hxx -// Author: Vadim SANDLER +// File : Session_ServerCheck.hxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// #if !defined(SESSION_SERVERCHECK_HXX) #define SESSION_SERVERCHECK_HXX diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.cxx b/src/TOOLSGUI/ToolsGUI_RegWidget.cxx index 1cef542cd..b39d1094e 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.cxx +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.cxx @@ -300,15 +300,15 @@ static Registry::Components_var MakeRegistry( CORBA::ORB_var& orb ) } /*! - \class ToolsGUI_RegWidget::ToolsGUI_InfoWindow + \class ToolsGUI_RegWidget::InfoWindow \brief Information window. \internal */ -class ToolsGUI_RegWidget::ToolsGUI_InfoWindow : public QMainWindow +class ToolsGUI_RegWidget::InfoWindow : public QMainWindow { public: - ToolsGUI_InfoWindow( QWidget* parent ); + InfoWindow( QWidget* parent ); void setText( const QString& text ); @@ -324,7 +324,7 @@ private: \internal \param parent parent widget */ -ToolsGUI_RegWidget::ToolsGUI_InfoWindow::ToolsGUI_InfoWindow( QWidget* parent ) +ToolsGUI_RegWidget::InfoWindow::InfoWindow( QWidget* parent ) : QMainWindow( parent ) { setAttribute( Qt::WA_DeleteOnClose ); @@ -340,7 +340,7 @@ ToolsGUI_RegWidget::ToolsGUI_InfoWindow::ToolsGUI_InfoWindow( QWidget* parent ) \internal \param text ionfo text */ -void ToolsGUI_RegWidget::ToolsGUI_InfoWindow::setText( const QString& text ) +void ToolsGUI_RegWidget::InfoWindow::setText( const QString& text ) { myTextView->setText( text ); } @@ -350,7 +350,7 @@ void ToolsGUI_RegWidget::ToolsGUI_InfoWindow::setText( const QString& text ) \internal \param e key press event */ -void ToolsGUI_RegWidget::ToolsGUI_InfoWindow::keyPressEvent( QKeyEvent * e ) +void ToolsGUI_RegWidget::InfoWindow::keyPressEvent( QKeyEvent * e ) { QMainWindow::keyPressEvent( e ); if ( e->key() == Qt::Key_Escape ) @@ -358,16 +358,16 @@ void ToolsGUI_RegWidget::ToolsGUI_InfoWindow::keyPressEvent( QKeyEvent * e ) } /*! - \class ToolsGUI_RegWidget::ToolsGUI_HelpWindow + \class ToolsGUI_RegWidget::HelpWindow \brief Help window. \internal */ -class ToolsGUI_RegWidget::ToolsGUI_HelpWindow : public QMainWindow +class ToolsGUI_RegWidget::HelpWindow : public QMainWindow { public: - ToolsGUI_HelpWindow( QWidget* parent ); - ~ToolsGUI_HelpWindow(); + HelpWindow( QWidget* parent ); + ~HelpWindow(); void setText( const QString& text ); @@ -380,7 +380,7 @@ private: \internal \param parent parent widget */ -ToolsGUI_RegWidget::ToolsGUI_HelpWindow::ToolsGUI_HelpWindow( QWidget* parent ) +ToolsGUI_RegWidget::HelpWindow::HelpWindow( QWidget* parent ) : QMainWindow( parent ) { setAttribute( Qt::WA_DeleteOnClose ); @@ -424,7 +424,7 @@ ToolsGUI_RegWidget::ToolsGUI_HelpWindow::ToolsGUI_HelpWindow( QWidget* parent ) \brief Destructor. \internal */ -ToolsGUI_RegWidget::ToolsGUI_HelpWindow::~ToolsGUI_HelpWindow() +ToolsGUI_RegWidget::HelpWindow::~HelpWindow() { }; @@ -433,22 +433,22 @@ ToolsGUI_RegWidget::ToolsGUI_HelpWindow::~ToolsGUI_HelpWindow() \internal \param text help text */ -void ToolsGUI_RegWidget::ToolsGUI_HelpWindow::setText( const QString& text ) +void ToolsGUI_RegWidget::HelpWindow::setText( const QString& text ) { myTextView->setText( text ); } /*! - \class ToolsGUI_RegWidget::ToolsGUI_IntervalWindow + \class ToolsGUI_RegWidget::IntervalWindow \brief Dialog box to enter time delay between registry window updates \internal */ -class ToolsGUI_RegWidget::ToolsGUI_IntervalWindow : public QDialog +class ToolsGUI_RegWidget::IntervalWindow : public QDialog { public: - ToolsGUI_IntervalWindow( QWidget* parent ); - ~ToolsGUI_IntervalWindow(); + IntervalWindow( QWidget* parent ); + ~IntervalWindow(); QPushButton* Ok(); QPushButton* Cancel(); @@ -467,7 +467,7 @@ private: \internal \param parent parent widget */ -ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::ToolsGUI_IntervalWindow ( QWidget* parent ) +ToolsGUI_RegWidget::IntervalWindow::IntervalWindow ( QWidget* parent ) : QDialog( parent ) { setModal( true ); @@ -530,7 +530,7 @@ ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::ToolsGUI_IntervalWindow ( QWidget* \brief Destructor \internal */ -ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::~ToolsGUI_IntervalWindow() +ToolsGUI_RegWidget::IntervalWindow::~IntervalWindow() { } @@ -539,7 +539,7 @@ ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::~ToolsGUI_IntervalWindow() \internal \param size interval value */ -void ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::setValue( const int size ) +void ToolsGUI_RegWidget::IntervalWindow::setValue( const int size ) { mySpinBox->setValue(size); } @@ -549,7 +549,7 @@ void ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::setValue( const int size ) \internal \return interval value */ -int ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::getValue() +int ToolsGUI_RegWidget::IntervalWindow::getValue() { return mySpinBox->value(); } @@ -559,7 +559,7 @@ int ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::getValue() \internal \return a pointer to \c OK button */ -QPushButton* ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::Ok() +QPushButton* ToolsGUI_RegWidget::IntervalWindow::Ok() { return myButtonOk; } @@ -569,7 +569,7 @@ QPushButton* ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::Ok() \internal \return a pointer to \c Cancel button */ -QPushButton* ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::Cancel() +QPushButton* ToolsGUI_RegWidget::IntervalWindow::Cancel() { return myButtonCancel; } @@ -976,7 +976,7 @@ void ToolsGUI_RegWidget::slotListeSelect() */ void ToolsGUI_RegWidget::slotSelectRefresh() { - myIntervalWindow = new ToolsGUI_RegWidget::ToolsGUI_IntervalWindow(this); + myIntervalWindow = new ToolsGUI_RegWidget::IntervalWindow(this); myIntervalWindow->installEventFilter( this ); myIntervalWindow->setValue(myRefreshInterval); myIntervalWindow->show(); @@ -1000,7 +1000,7 @@ void ToolsGUI_RegWidget::slotIntervalOk() void ToolsGUI_RegWidget::slotHelp() { if ( !myHelpWindow ) { - myHelpWindow = new ToolsGUI_RegWidget::ToolsGUI_HelpWindow( this ); + myHelpWindow = new ToolsGUI_RegWidget::HelpWindow( this ); myHelpWindow->installEventFilter( this ); } myHelpWindow->show(); @@ -1029,7 +1029,7 @@ void ToolsGUI_RegWidget::slotClientChanged( QTreeWidgetItem* item ) ASSERT( c_info.name!=NULL); if ( !myInfoWindow ) { - myInfoWindow = new ToolsGUI_RegWidget::ToolsGUI_InfoWindow( this ); + myInfoWindow = new ToolsGUI_RegWidget::InfoWindow( this ); myInfoWindow->installEventFilter( this ); } QString a = tr( "More about" ) + QString( " " ) + QString( c_info.name ); @@ -1063,7 +1063,7 @@ void ToolsGUI_RegWidget::slotHistoryChanged( QTreeWidgetItem* item ) ASSERT( c_info.name!=NULL); if ( !myInfoWindow ) { - myInfoWindow = new ToolsGUI_RegWidget::ToolsGUI_InfoWindow( this ); + myInfoWindow = new ToolsGUI_RegWidget::InfoWindow( this ); myInfoWindow->installEventFilter( this ); } QString a = tr( "More about" ) + QString( " " ) + QString( c_info.name ); diff --git a/src/TOOLSGUI/ToolsGUI_RegWidget.h b/src/TOOLSGUI/ToolsGUI_RegWidget.h index 560a09a77..d91417df9 100755 --- a/src/TOOLSGUI/ToolsGUI_RegWidget.h +++ b/src/TOOLSGUI/ToolsGUI_RegWidget.h @@ -45,9 +45,9 @@ class TOOLSGUI_EXPORT ToolsGUI_RegWidget : public QMainWindow { Q_OBJECT - class ToolsGUI_HelpWindow; - class ToolsGUI_IntervalWindow; - class ToolsGUI_InfoWindow; + class HelpWindow; + class IntervalWindow; + class InfoWindow; ToolsGUI_RegWidget( CORBA::ORB_var& orb, QWidget* parent = 0 ); @@ -83,20 +83,20 @@ protected: void closeEvent( QCloseEvent* e ); protected : - QTreeWidget* _clients; - QTreeWidget* _history; - QWidget* _parent; - QTabWidget* _tabWidget; - QAction* _refresh; - QAction* _interval; - QAction* _close; - QTimer* _counter; - Registry::AllInfos* _serverhistory; - Registry::AllInfos* _serverclients; - ToolsGUI_InfoWindow* myInfoWindow; - ToolsGUI_HelpWindow* myHelpWindow; - ToolsGUI_IntervalWindow* myIntervalWindow; - int myRefreshInterval; + QTreeWidget* _clients; + QTreeWidget* _history; + QWidget* _parent; + QTabWidget* _tabWidget; + QAction* _refresh; + QAction* _interval; + QAction* _close; + QTimer* _counter; + Registry::AllInfos* _serverhistory; + Registry::AllInfos* _serverclients; + InfoWindow* myInfoWindow; + HelpWindow* myHelpWindow; + IntervalWindow* myIntervalWindow; + int myRefreshInterval; private: const Registry::Components_var _VarComponents; diff --git a/src/VTKViewer/VTKViewer_ViewWindow.cxx b/src/VTKViewer/VTKViewer_ViewWindow.cxx index c04e58115..daa1de6eb 100755 --- a/src/VTKViewer/VTKViewer_ViewWindow.cxx +++ b/src/VTKViewer/VTKViewer_ViewWindow.cxx @@ -33,11 +33,12 @@ #include "SUIT_ResourceMgr.h" #include -#include #include #include +#include + /*! Construction*/ VTKViewer_ViewWindow::VTKViewer_ViewWindow( SUIT_Desktop* theDesktop, VTKViewer_Viewer* theModel, @@ -88,9 +89,7 @@ VTKViewer_ViewWindow::VTKViewer_ViewWindow( SUIT_Desktop* theDesktop, setCentralWidget( myRenderWindow ); - myToolBar = new QToolBar(this); - //myToolBar->setCloseMode(QDockWindow::Undocked); - myToolBar->setWindowTitle(tr("LBL_TOOLBAR_LABEL")); + myToolBar = new QtxToolBar( true, tr("LBL_TOOLBAR_LABEL"), this ); createActions(); createToolBar(); @@ -297,10 +296,12 @@ void VTKViewer_ViewWindow::createToolBar() aScaleBtn->AddAction(myActionsMap[FitAllId]); aScaleBtn->AddAction(myActionsMap[FitRectId]); aScaleBtn->AddAction(myActionsMap[ZoomId]); + myToolBar->addWidget( aScaleBtn ); SUIT_ToolButton* aPanningBtn = new SUIT_ToolButton(myToolBar); aPanningBtn->AddAction(myActionsMap[PanId]); aPanningBtn->AddAction(myActionsMap[GlobalPanId]); + myToolBar->addWidget( aPanningBtn ); myToolBar->addAction( myActionsMap[RotationId] ); @@ -311,6 +312,7 @@ void VTKViewer_ViewWindow::createToolBar() aViewsBtn->AddAction(myActionsMap[BottomId]); aViewsBtn->AddAction(myActionsMap[LeftId]); aViewsBtn->AddAction(myActionsMap[RightId]); + myToolBar->addWidget( aViewsBtn ); myToolBar->addAction( myActionsMap[ResetId] ); } -- 2.39.2