// 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 )
+// 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
// 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"
// 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
// 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)!
// 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
#include "SALOME_Actor.h"
+#include <QImage>
+
#include <vtkGenericRenderWindowInteractor.h>
#include <vtkRenderer.h>
-#include "QtxAction.h"
+#include <QtxAction.h>
+#include <QtxToolBar.h>
-#include "SUIT_ToolButton.h"
-#include "SUIT_MessageBox.h"
-#include "SUIT_ViewWindow.h"
+#include <SUIT_ToolButton.h>
+#include <SUIT_MessageBox.h>
+#include <SUIT_ViewWindow.h>
+#include <SUIT_Tools.h>
+#include <SUIT_ResourceMgr.h>
-#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 <QImage>
-#include <QToolBar>
-
/*!
Constructor
*/
{
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();
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] );
aViewsBtn->AddAction(myActionsMap[BottomId]);
aViewsBtn->AddAction(myActionsMap[LeftId]);
aViewsBtn->AddAction(myActionsMap[RightId]);
+ myToolBar->addWidget( aViewsBtn );
myToolBar->addAction( myActionsMap[ResetId] );
//
// 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 <QtxSplash.h>
//
// 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
}
/*!
- \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 );
\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 );
\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 );
}
\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 )
}
/*!
- \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 );
\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 );
\brief Destructor.
\internal
*/
-ToolsGUI_RegWidget::ToolsGUI_HelpWindow::~ToolsGUI_HelpWindow()
+ToolsGUI_RegWidget::HelpWindow::~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();
\internal
\param parent parent widget
*/
-ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::ToolsGUI_IntervalWindow ( QWidget* parent )
+ToolsGUI_RegWidget::IntervalWindow::IntervalWindow ( QWidget* parent )
: QDialog( parent )
{
setModal( true );
\brief Destructor
\internal
*/
-ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::~ToolsGUI_IntervalWindow()
+ToolsGUI_RegWidget::IntervalWindow::~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);
}
\internal
\return interval value
*/
-int ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::getValue()
+int ToolsGUI_RegWidget::IntervalWindow::getValue()
{
return mySpinBox->value();
}
\internal
\return a pointer to \c OK button
*/
-QPushButton* ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::Ok()
+QPushButton* ToolsGUI_RegWidget::IntervalWindow::Ok()
{
return myButtonOk;
}
\internal
\return a pointer to \c Cancel button
*/
-QPushButton* ToolsGUI_RegWidget::ToolsGUI_IntervalWindow::Cancel()
+QPushButton* ToolsGUI_RegWidget::IntervalWindow::Cancel()
{
return myButtonCancel;
}
*/
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();
void ToolsGUI_RegWidget::slotHelp()
{
if ( !myHelpWindow ) {
- myHelpWindow = new ToolsGUI_RegWidget::ToolsGUI_HelpWindow( this );
+ myHelpWindow = new ToolsGUI_RegWidget::HelpWindow( this );
myHelpWindow->installEventFilter( this );
}
myHelpWindow->show();
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 );
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 );
{
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 );
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;
#include "SUIT_ResourceMgr.h"
#include <QImage>
-#include <QToolBar>
#include <vtkRenderer.h>
#include <vtkCamera.h>
+#include <QtxToolBar.h>
+
/*! Construction*/
VTKViewer_ViewWindow::VTKViewer_ViewWindow( SUIT_Desktop* theDesktop,
VTKViewer_Viewer* theModel,
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();
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] );
aViewsBtn->AddAction(myActionsMap[BottomId]);
aViewsBtn->AddAction(myActionsMap[LeftId]);
aViewsBtn->AddAction(myActionsMap[RightId]);
+ myToolBar->addWidget( aViewsBtn );
myToolBar->addAction( myActionsMap[ResetId] );
}