#include "GEOMToolsGUI.h"
#include "GeometryGUI.h"
-#include "GEOM_Actor.h"
#include "GEOMBase.h"
#include "GEOM_Operation.h"
#include "GEOM_Displayer.h"
#include <SUIT_Session.h>
-#include <SUIT_Application.h>
+//#include <SUIT_Application.h>
#include <SUIT_OverrideCursor.h>
#include <SUIT_MessageBox.h>
#include <SUIT_Tools.h>
#include <SUIT_FileDlg.h>
#include <SUIT_Desktop.h>
#include <SUIT_ViewModel.h>
+#include <SUIT_ViewManager.h>
#include <SalomeApp_Application.h>
#include <SalomeApp_Study.h>
#include <LightApp_SelectionMgr.h>
#include <GEOMImpl_Types.hxx>
+#include <SALOME_ListIO.hxx>
#include <SALOME_ListIteratorOfListIO.hxx>
#include <SALOME_Prs.h>
-#include "utilities.h"
-
// QT Includes
-#include <qapplication.h>
-#include <qmap.h>
+#include <QApplication>
+#include <QMap>
// OCCT Includes
#include <TCollection_AsciiString.hxx>
SUIT_FileDlg* fd = new SUIT_FileDlg( parent, open, true, true );
if ( !caption.isEmpty() )
- fd->setCaption( caption );
+ fd->setWindowTitle( caption );
if ( !initial.isEmpty() )
- fd->setSelection( initial );
+ fd->selectFile( initial );
if ( !lastUsedFilter.isEmpty() && filterMap.contains( lastUsedFilter ) )
- fd->setSelectedFilter( lastUsedFilter );
+ fd->selectFilter( lastUsedFilter );
fd->setFilters( filters );
bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked();
if ( aLocked ) {
- SUIT_MessageBox::warn1 ( app->desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::warning ( app->desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED"),
+ QObject::tr("BUT_OK") );
return;
}
QString geomComp = getParentComponent( aStudy->FindObjectIOR( geomIOR.in() ) );
if ( parentComp != geomComp ) {
- SUIT_MessageBox::warn1 ( app->desktop(),
- QObject::tr("ERR_ERROR"),
- QObject::tr("NON_GEOM_OBJECTS_SELECTED").arg( getGeometryGUI()->moduleName() ),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::warning ( app->desktop(),
+ QObject::tr("ERR_ERROR"),
+ QObject::tr("NON_GEOM_OBJECTS_SELECTED").arg( getGeometryGUI()->moduleName() ),
+ QObject::tr("BUT_OK") );
return;
}
// VSR 17/11/04: check if all objects selected belong to GEOM component <-- finish
- if ( SUIT_MessageBox::warn2( app->desktop(),
- QObject::tr( "GEOM_WRN_WARNING" ),
- QObject::tr( "GEOM_REALLY_DELETE" ),
- QObject::tr( "GEOM_BUT_YES" ),
- QObject::tr( "GEOM_BUT_NO" ), 1, 0, 0 ) != 1 )
+ if ( SUIT_MessageBox::warning( app->desktop(),
+ QObject::tr( "GEOM_WRN_WARNING" ),
+ QObject::tr( "GEOM_REALLY_DELETE" ),
+ QObject::tr( "GEOM_BUT_YES" ),
+ QObject::tr( "GEOM_BUT_NO" ), 1 ) != 0 )
return;
// QAD_Operation* op = new SALOMEGUI_ImportOperation(.....);
// op->start();
// prepare list of SALOME_Views
- QPtrList<SALOME_View> views;
+ QList<SALOME_View*> views;
SALOME_View* view;
// fill the list
ViewManagerList vmans = app->viewManagers();
SUIT_ViewManager* vman;
- for ( vman = vmans.first(); vman; vman = vmans.next() ) {
+ QListIterator<SUIT_ViewManager*> it( vmans );
+ while ( it.hasNext() && (vman = it.next()) ) {
SUIT_ViewModel* vmod = vman->getViewModel();
view = dynamic_cast<SALOME_View*> ( vmod ); // must work for OCC and VTK views
if ( view )
bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked();
if ( aLocked ) {
- SUIT_MessageBox::warn1 ( app->desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::warning ( app->desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED"),
+ QObject::tr("BUT_OK") );
return false;
}
GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen();
if ( CORBA::is_nil( eng ) ) {
- SUIT_MessageBox::error1( app->desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr( "GEOM Engine is not started" ),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::critical( app->desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr( "GEOM Engine is not started" ),
+ QObject::tr("BUT_OK") );
return false;
}
{
// Trying to detect file type
QFileInfo aFileInfo( fileName );
- QString aPossibleType = (aFileInfo.extension(false)).upper() ;
+ QString aPossibleType = (aFileInfo.suffix()).toUpper() ;
if ( (aMap.values()).contains(aPossibleType) )
fileType = aPossibleType;
anOp->start();
- CORBA::String_var fileN = fileName.latin1();
- CORBA::String_var fileT = fileType.latin1();
+ CORBA::String_var fileN = fileName.toLatin1().data();
+ CORBA::String_var fileT = fileType.toLatin1().data();
anObj = aInsOp->Import(fileN, fileT);
if ( !anObj->_is_nil() && aInsOp->IsDone() ) {
GeometryGUI::GetGeomGen()->PublishInStudy(aDSStudy,
SALOMEDS::SObject::_nil(),
anObj,
- aPublishObjName);
+ aPublishObjName.toStdString().c_str());
GEOM_Displayer( stud ).Display( anObj.in() );
else {
anOp->abort();
wc.suspend();
- SUIT_MessageBox::error1( app->desktop(),
- QObject::tr( "GEOM_ERROR" ),
- QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::critical( app->desktop(),
+ QObject::tr( "GEOM_ERROR" ),
+ QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ),
+ QObject::tr("BUT_OK") );
}
}
catch( const SALOME::SALOME_Exception& S_ex ) {
GEOM::GEOM_Gen_var eng = GeometryGUI::GetGeomGen();
if ( CORBA::is_nil( eng ) ) {
- SUIT_MessageBox::error1( app->desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr( "GEOM Engine is not started" ),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::critical( app->desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr( "GEOM Engine is not started" ),
+ QObject::tr("BUT_OK") );
return false;
}
anOp->start();
- aInsOp->Export( anObj, file, fileType.latin1() );
+ aInsOp->Export( anObj, file.toStdString().c_str(), fileType.toLatin1().constData() );
if ( aInsOp->IsDone() )
anOp->commit();
{
anOp->abort();
wc.suspend();
- SUIT_MessageBox::error1( app->desktop(),
- QObject::tr( "GEOM_ERROR" ),
- QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::critical( app->desktop(),
+ QObject::tr( "GEOM_ERROR" ),
+ QObject::tr("GEOM_PRP_ABORT") + "\n" + QString( aInsOp->GetErrorCode() ),
+ QObject::tr("BUT_OK") );
return false;
}
}
//=====================================================================================
void GEOMToolsGUI::RemoveObjectWithChildren(_PTR(SObject) obj,
_PTR(Study) aStudy,
- QPtrList<SALOME_View> views,
+ QList<SALOME_View*> views,
GEOM_Displayer* disp)
{
// iterate through all children of obj
GEOM::GEOM_Object_var geomObj = GEOM::GEOM_Object::_narrow( corbaObj );
if (!CORBA::is_nil(geomObj)) {
// Erase graphical object
- SALOME_View* view = views.first();
- for (; view; view = views.next()) {
- disp->Erase(geomObj, true, view);
- }
-
+ QListIterator<SALOME_View*> it( views );
+ while ( it.hasNext() )
+ if ( SALOME_View* view = it.next() )
+ disp->Erase(geomObj, true, view);
+
// Remove object from Engine
GeometryGUI::GetGeomGen()->RemoveObject( geomObj );
}
SalomeApp_Application* app =
dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
- SUIT_MessageBox::warn1 ( app->desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("DEP_OBJECT"),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::warning ( app->desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("DEP_OBJECT"),
+ QObject::tr("BUT_OK") );
return true;
}
}
#include "GEOM_ToolsGUI.hxx"
#include "GEOMGUI.h"
-#include "GEOM_Displayer.h"
-
-#include <SALOME_Prs.h>
#include <SALOMEDSClient.hxx>
-#include <SALOME_ListIO.hxx>
-#include <CORBA.h>
+class GEOM_Displayer;
+class SALOME_View;
+class SALOME_ListIO;
-#include <qptrlist.h>
+#include <QList>
//=================================================================================
// class : GEOMToolsGUI
// Recursive deletion of object with children
void RemoveObjectWithChildren(_PTR(SObject) obj,
_PTR(Study) aStudy,
- QPtrList<SALOME_View> views,
+ QList<SALOME_View*> views,
GEOM_Displayer* disp);
//checks if the object passed as the first argument depends on the second arguments
--- /dev/null
+TEMPLATE = lib
+TARGET = GEOMToolsGUI
+DESTDIR = ../../lib
+MOC_DIR = ../../moc
+OBJECTS_DIR = ../../obj/$$TARGET
+
+QT_INCLUDES = $$(QTDIR)/include $$(QTDIR)/include/QtCore $$(QTDIR)/include/QtGui $$(QTDIR)/include/QtOpenGL $$(QTDIR)/include/QtXml
+
+VTK_INCLUDES = $$(VTKHOME)/include/vtk
+
+CASROOT = $$(CASROOT)
+CAS_CPPFLAGS = $${CASROOT}/inc
+
+PYTHON_INCLUDES = $$(PYTHONHOME)/include/python2.4
+
+BOOST_CPPFLAGS = $$(BOOSTDIR)/include
+
+KERNEL_CXXFLAGS = $$(KERNEL_ROOT_DIR)/include/salome
+
+GUI_CXXFLAGS = $$(GUI_ROOT_DIR)/include/salome
+
+CORBA_INCLUDES = $$(OMNIORBDIR)/include $$(OMNIORBDIR)/include/omniORB4 $$(OMNIORBDIR)/include/COS
+
+GUI_LDFLAGS = -L$$(GUI_ROOT_DIR)/lib/salome
+
+INCLUDEPATH += $${QT_INCLUDES} $${VTK_INCLUDES} $${CAS_CPPFLAGS} $${PYTHON_INCLUDES} $${BOOST_CPPFLAGS} $${KERNEL_CXXFLAGS} $${GUI_CXXFLAGS} $${CORBA_INCLUDES} ../OBJECT ../GEOMBase ../GEOMClient ../GEOMImpl ../GEOMGUI $$(GEOM_ROOT_DIR)/idl $$(GEOM_ROOT_DIR)/salome_adm/unix
+
+LIBS += -L$$(GEOM_ROOT_DIR)/lib -lGEOMBase -lGEOM $${GUI_LDFLAGS} -lVTKViewer -lOCCViewer -lsuit -lSalomeApp
+
+CONFIG -= debug release debug_and_release
+CONFIG += qt thread debug dll shared
+
+win32:DEFINES += WIN32
+DEFINES += GEOMTOOLSGUI_EXPORTS OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS OMNIORB_VERSION=4 __x86__ __linux__ COMP_CORBA_DOUBLE COMP_CORBA_LONG
+
+SOURCES = GEOMToolsGUI.cxx
+SOURCES += GEOMToolsGUI_1.cxx
+SOURCES += GEOMToolsGUI_TransparencyDlg.cxx
+SOURCES += GEOMToolsGUI_NbIsosDlg.cxx
+
+includes.files = $$HEADERS
+includes.path = ../../include
+
+INSTALLS += includes
// Module : GEOM
// $Header$
-#include <PythonConsole_PyConsole.h>
+#include <PyConsole_Console.h>
#include "GEOMToolsGUI.h"
#include "GeometryGUI.h"
+#include "GEOM_Displayer.h"
#include "GEOMToolsGUI_TransparencyDlg.h"
#include "GEOMToolsGUI_NbIsosDlg.h" // Method ISOS adjustement
-#include "GEOM_Actor.h"
#include "GEOMBase.h"
#include "SALOME_ListIO.hxx"
#include <SVTK_View.h>
#include <OCCViewer_ViewModel.h>
-#include <OCCViewer_ViewWindow.h>
#include <SUIT_ViewManager.h>
-#include <SUIT_Application.h>
#include <SUIT_Desktop.h>
#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <LightApp_SelectionMgr.h>
#include <LightApp_NameDlg.h>
-#include "SALOMEDSClient.hxx"
-
#include "utilities.h"
// OCCT Includes
#include <AIS_Drawer.hxx>
-#include <AIS_ListOfInteractive.hxx>
-#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_PointAspect.hxx>
#include <Graphic3d_AspectMarker3d.hxx>
-// VTK Includes
-#include <vtkBMPReader.h>
-#include <vtkTexture.h>
-#include <vtkTextureMapToPlane.h>
-#include <vtkTransformTextureCoords.h>
-#include <vtkDataSetMapper.h>
-#include <vtkRenderer.h>
-
// QT Includes
-#include <qfileinfo.h>
-#include <qcolordialog.h>
-#include <qspinbox.h>
-#include <qapplication.h>
+#include <QColorDialog>
using namespace std;
double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100. );
Standard_Boolean res = false;
- double dd = GEOMBase::Parameter( res, QString("%1").arg(step), tr("GEOM_MEN_STEP_LABEL"), tr("GEOM_STEP_TITLE"), 0.001, 10000.0, 3);
+ double dd = GEOMBase::Parameter( res, QString("%1").arg(step).toStdString().c_str(),
+ tr("GEOM_MEN_STEP_LABEL").toStdString().c_str(),
+ tr("GEOM_STEP_TITLE").toStdString().c_str(), 0.001, 10000.0, 3);
if(res) {
resMgr->setValue( "Geometry", "SettingsGeomStep", dd );
bool aLocked = (_PTR(AttributeStudyProperties)(aStudy->GetProperties()))->IsLocked();
if ( aLocked ) {
- SUIT_MessageBox::warn1 ( app->desktop(),
- QObject::tr("WRN_WARNING"),
- QObject::tr("WRN_STUDY_LOCKED"),
- QObject::tr("BUT_OK") );
+ SUIT_MessageBox::warning ( app->desktop(),
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("WRN_STUDY_LOCKED"),
+ QObject::tr("BUT_OK") );
return;
}
QString newName = LightApp_NameDlg::getName( app->desktop(), aName->Value().c_str() );
if ( !newName.isEmpty() ) {
- aName->SetValue( newName.latin1() ); // rename the SObject
- IObject->setName( newName.latin1() );// rename the InteractiveObject
+ aName->SetValue( newName.toLatin1().constData() ); // rename the SObject
+ IObject->setName( newName.toLatin1() );// rename the InteractiveObject
// Rename the corresponding GEOM_Object
GEOM::GEOM_Object_var anObj = GEOM::GEOM_Object::_narrow(GeometryGUI::ClientSObjectToObject(obj));
if (!CORBA::is_nil( anObj ))
- anObj->SetName( newName.latin1() );
+ anObj->SetName( newName.toLatin1() );
(dynamic_cast<SalomeApp_Module*>(app->activeModule()))->updateObjBrowser( false );
}
} // if ( name attribute )
void GEOMToolsGUI::OnCheckGeometry()
{
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
- PythonConsole* pyConsole = app->pythonConsole();
+ PyConsole_Console* pyConsole = app->pythonConsole();
if(pyConsole)
pyConsole->exec("from GEOM_usinggeom import *");
#include "GeometryGUI.h"
#include <LightApp_Application.h>
#include <SUIT_MessageBox.h>
+#include <SUIT_ResourceMgr.h>
#include <SUIT_Session.h>
#include <SUIT_Tools.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <QLabel>
+#include <QPushButton>
+#include <QGroupBox>
+#include <QGridLayout>
+#include <QSpinBox>
+#include <QKeyEvent>
//using namespace std;
//=================================================================================
// TRUE to construct a modal dialog.
//=================================================================================
GEOMToolsGUI_NbIsosDlg::GEOMToolsGUI_NbIsosDlg(QWidget* parent )
- :QDialog( parent, "GEOMToolsGUI_NbIsosDlg", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+ :QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
{
- setCaption( tr( "GEOM_MEN_ISOS" ) );
+ setObjectName( "GEOMToolsGUI_NbIsosDlg" );
+ setModal( true );
+
+ setWindowTitle( tr( "GEOM_MEN_ISOS" ) );
setSizeGripEnabled(TRUE);
QGridLayout* MyDialogLayout = new QGridLayout(this);
MyDialogLayout->setSpacing(6);
MyDialogLayout->setMargin(11);
/***************************************************************/
- QGroupBox* GroupC1 = new QGroupBox( this, "GroupC1" );
- GroupC1->setColumnLayout(0, Qt::Vertical );
- GroupC1->layout()->setSpacing( 0 );
- GroupC1->layout()->setMargin( 0 );
- QGridLayout* GroupC1Layout = new QGridLayout( GroupC1->layout() );
+ QGroupBox* GroupC1 = new QGroupBox( this );
+ GroupC1->setObjectName( "GroupC1" );
+ QGridLayout* GroupC1Layout = new QGridLayout( GroupC1 );
GroupC1Layout->setAlignment( Qt::AlignTop );
GroupC1Layout->setSpacing( 6 );
GroupC1Layout->setMargin( 11 );
- QLabel* TextLabel1 = new QLabel( GroupC1, "TextLabel1" );
+ QLabel* TextLabel1 = new QLabel( GroupC1 );
+ TextLabel1->setObjectName( "TextLabel1" );
TextLabel1->setText( tr( "GEOM_MEN_ISOU") );
GroupC1Layout->addWidget( TextLabel1, 0, 0 );
- SpinBoxU = new QSpinBox( GroupC1, "SpinBoxU" );
+ SpinBoxU = new QSpinBox( GroupC1 );
+ SpinBoxU->setObjectName( "SpinBoxU" );
SpinBoxU->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- SpinBoxU->setMinValue( 0 );
+ SpinBoxU->setMinimum( 0 );
SpinBoxU->setValue( 1 );
GroupC1Layout->addWidget( SpinBoxU, 0, 1 );
- QLabel* TextLabel2 = new QLabel( GroupC1, "TextLabel2" );
+ QLabel* TextLabel2 = new QLabel( GroupC1 );
+ TextLabel2->setObjectName( "TextLabel2" );
TextLabel2->setText( tr( "GEOM_MEN_ISOV") ) ;
GroupC1Layout->addWidget( TextLabel2, 0, 2 );
- SpinBoxV = new QSpinBox( GroupC1, "SpinBoxV");
+ SpinBoxV = new QSpinBox( GroupC1 );
+ SpinBoxV->setObjectName( "SpinBoxV");
SpinBoxV->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
SpinBoxV->setValue( 1 );
- SpinBoxV->setMinValue( 0 );
+ SpinBoxV->setMinimum( 0 );
GroupC1Layout->addWidget( SpinBoxV, 0, 3 );
/***************************************************************/
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ GroupButtons->setObjectName( "GroupButtons" );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonOk = new QPushButton( GroupButtons, "buttonOk" );
+ QPushButton* buttonOk = new QPushButton( GroupButtons );
+ buttonOk->setObjectName( "buttonOk" );
buttonOk->setText( tr( "GEOM_BUT_OK" ) ) ;
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
GroupButtonsLayout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QPushButton* buttonCancel = new QPushButton( GroupButtons, "buttonCancel" );
+ QPushButton* buttonCancel = new QPushButton( GroupButtons );
+ buttonCancel->setObjectName( "buttonCancel" );
buttonCancel->setText( tr( "GEOM_BUT_CANCEL" ) ) ;
buttonCancel->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonCancel, 0, 1 );
- QPushButton* buttonHelp = new QPushButton( GroupButtons, "buttonHelp" );
+ QPushButton* buttonHelp = new QPushButton( GroupButtons );
+ buttonHelp->setObjectName( "buttonHelp" );
buttonHelp->setText( tr( "GEOM_BUT_HELP" ) ) ;
buttonHelp->setAutoDefault( TRUE );
GroupButtonsLayout->addWidget( buttonHelp, 0, 2 );
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
ClickOnHelp();
#include "GEOM_ToolsGUI.hxx"
-#include <qdialog.h>
+#include <QDialog>
class QSpinBox;
#include <SVTK_View.h>
#include <OCCViewer_ViewModel.h>
-#include <OCCViewer_ViewWindow.h>
#include <SUIT_ViewManager.h>
-#include <SUIT_Application.h>
#include <SUIT_Desktop.h>
#include <SUIT_MessageBox.h>
#include <SUIT_ResourceMgr.h>
#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qapplication.h>
-#include <qgroupbox.h>
+#include <QLabel>
+#include <QPushButton>
+#include <QSlider>
+#include <QGridLayout>
+#include <QGroupBox>
+#include <QKeyEvent>
#include <AIS_InteractiveContext.hxx>
using namespace std;
//
//=================================================================================
GEOMToolsGUI_TransparencyDlg::GEOMToolsGUI_TransparencyDlg( QWidget* parent )
- :QDialog( parent, "GEOMBase_TransparencyDlg", true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
+ :QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
{
+ setObjectName( "GEOMBase_TransparencyDlg" );
+ setModal( true );
+
resize(152, 107);
- setCaption(tr("GEOM_TRANSPARENCY_TITLE"));
+ setWindowTitle(tr("GEOM_TRANSPARENCY_TITLE"));
setSizeGripEnabled(TRUE);
QGridLayout* lay = new QGridLayout(this);
lay->setSpacing(6);
lay->setMargin(11);
-
+
/*************************************************************************/
- QGroupBox* GroupButtons = new QGroupBox( this, "GroupButtons" );
- GroupButtons->setColumnLayout(0, Qt::Vertical );
- GroupButtons->layout()->setSpacing( 0 );
- GroupButtons->layout()->setMargin( 0 );
- QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons->layout() );
+ QGroupBox* GroupButtons = new QGroupBox( this );
+ GroupButtons->setObjectName( "GroupButtons" );
+ QGridLayout* GroupButtonsLayout = new QGridLayout( GroupButtons );
GroupButtonsLayout->setAlignment( Qt::AlignTop );
GroupButtonsLayout->setSpacing( 6 );
GroupButtonsLayout->setMargin( 11 );
- QPushButton* buttonOk = new QPushButton( GroupButtons, "buttonOk" );
+ QPushButton* buttonOk = new QPushButton( GroupButtons );
+ buttonOk->setObjectName( "buttonOk" );
buttonOk->setText( tr( "GEOM_BUT_OK" ) );
buttonOk->setAutoDefault( TRUE );
buttonOk->setDefault( TRUE );
-
- QPushButton* buttonHelp = new QPushButton( GroupButtons, "buttonHelp" );
+
+ QPushButton* buttonHelp = new QPushButton( GroupButtons );
+ buttonHelp->setObjectName( "buttonHelp" );
buttonHelp->setText( tr( "GEOM_BUT_HELP" ) );
buttonHelp->setAutoDefault( TRUE );
buttonHelp->setDefault( TRUE );
GroupButtonsLayout->addWidget( buttonOk, 0, 0 );
GroupButtonsLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1 );
GroupButtonsLayout->addWidget( buttonHelp, 0, 2 );
-
+
/*************************************************************************/
- QGroupBox* GroupC1 = new QGroupBox( this, "GroupC1" );
- GroupC1->setColumnLayout(0, Qt::Vertical );
- GroupC1->layout()->setSpacing( 0 );
- GroupC1->layout()->setMargin( 0 );
- QGridLayout* GroupC1Layout = new QGridLayout( GroupC1->layout() );
+ QGroupBox* GroupC1 = new QGroupBox( this );
+ GroupC1->setObjectName( "GroupC1" );
+ QGridLayout* GroupC1Layout = new QGridLayout( GroupC1 );
GroupC1Layout->setAlignment( Qt::AlignTop );
GroupC1Layout->setSpacing( 6 );
GroupC1Layout->setMargin( 11 );
- QLabel* TextLabelOpaque = new QLabel( GroupC1, "TextLabelOpaque" );
+ QLabel* TextLabelOpaque = new QLabel( GroupC1 );
+ TextLabelOpaque->setObjectName( "TextLabelOpaque" );
TextLabelOpaque->setText( tr( "GEOM_TRANSPARENCY_OPAQUE" ) );
- TextLabelOpaque->setAlignment( int( QLabel::AlignLeft ) );
+ TextLabelOpaque->setAlignment( Qt::AlignLeft );
GroupC1Layout->addWidget( TextLabelOpaque, 0, 0 );
GroupC1Layout->addItem( new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 1 );
- QLabel* TextLabelTransparent = new QLabel( GroupC1, "TextLabelTransparent" );
+ QLabel* TextLabelTransparent = new QLabel( GroupC1 );
+ TextLabelTransparent->setObjectName( "TextLabelTransparent" );
TextLabelTransparent->setText( tr( "GEOM_TRANSPARENCY_TRANSPARENT" ) );
- TextLabelTransparent->setAlignment( int( QLabel::AlignRight ) );
+ TextLabelTransparent->setAlignment( Qt::AlignRight );
GroupC1Layout->addWidget( TextLabelTransparent, 0, 2 );
- mySlider = new QSlider( 0, 10, 1, 5, Horizontal, GroupC1, "mySlider" );
+ mySlider = new QSlider( Qt::Horizontal, GroupC1 );
+ mySlider->setObjectName( "mySlider" );
+ mySlider->setMinimum( 0 );
+ mySlider->setMaximum( 10 );
+ mySlider->setPageStep( 1 );
+ mySlider->setValue( 5 );
mySlider->setMinimumSize( 300, 0 );
- mySlider->setTickmarks( QSlider::Left );
- GroupC1Layout->addMultiCellWidget( mySlider, 1, 1, 0, 2 );
+ mySlider->setTickPosition( QSlider::TicksLeft );
+ GroupC1Layout->addWidget( mySlider, 1, 0, 1, 3 );
/*************************************************************************/
lay->addWidget(GroupC1, 0, 0);
#else
platform = "application";
#endif
- SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
- QObject::tr("BUT_OK"));
+ SUIT_MessageBox::warning(0, QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName),
+ QObject::tr("BUT_OK"));
}
}
if ( e->isAccepted() )
return;
- if ( e->key() == Key_F1 )
+ if ( e->key() == Qt::Key_F1 )
{
e->accept();
ClickOnHelp();
#include "GEOM_ToolsGUI.hxx"
-#include <qdialog.h>
+#include <QDialog>
class QSlider;
SUBDIRS += GEOMFiltersSelection
SUBDIRS += GEOMGUI
SUBDIRS += GEOMBase
-#SUBDIRS += GEOMToolsGUI
+SUBDIRS += GEOMToolsGUI
#SUBDIRS += DisplayGUI
#SUBDIRS += BasicGUI
#SUBDIRS += PrimitiveGUI