-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// VISU VISUGUI : GUI of VISU component
// File : VisuGUI_GaussPointsSelectionPane.cxx
// Author : Oleg Uvarov
SVTK_RenderWindowInteractor* anInteractor = NULL;
if( SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>( myModule ) )
- //if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() )
- anInteractor = aViewWindow->GetInteractor();
+ //if( SVTK_MainWindow* aMainWindow = aViewWindow->getMainWindow() )
+ anInteractor = aViewWindow->GetInteractor();
if ( !anInteractor )
- return aResult;
+ return aResult;
mySelector = anInteractor->GetSelector();
if ( !mySelector )
- return aResult;
+ return aResult;
const SALOME_ListIO& aListIO = mySelector->StoredIObjects();
if ( aListIO.Extent() != 1 )
- return aResult;
+ return aResult;
myIO = aListIO.First();
if ( mySelector->HasIndex( myIO ) )
- mySelector->GetIndex(myIO, myMapIndex);
-
+ mySelector->GetIndex(myIO, myMapIndex);
+
VTK::ActorCollectionCopy aCopy(anInteractor->getRenderer()->GetActors());
myActor = SVTK::Find<VISU_GaussPtsAct>(aCopy.GetActors(),
- SVTK::TIsSameIObject<VISU_GaussPtsAct>( myIO ));
+ SVTK::TIsSameIObject<VISU_GaussPtsAct>( myIO ));
if ( !myActor )
- return aResult;
+ return aResult;
myPipeLine = myActor->GetGaussPointsPL();
{
public:
GaussPtsIDValidator( const SalomeApp_Module* theModule,
- QObject * theParent ):
+ QObject * theParent ):
QIntValidator( 0, VTK_LARGE_ID, theParent ),
myHelper(theModule)
{}
validate ( QString & theInput, int & thePos ) const
{
if ( QIntValidator::validate( theInput, thePos ) == QValidator::Invalid)
- return QValidator::Invalid;
+ return QValidator::Invalid;
if ( !myHelper.get() )
- return QValidator::Invalid;
+ return QValidator::Invalid;
return QValidator::Acceptable;
}
{
public:
GaussCellIDValidator( QLineEdit* theLocalPointLabel,
- const SalomeApp_Module* theModule,
- QObject * theParent ):
+ const SalomeApp_Module* theModule,
+ QObject * theParent ):
GaussPtsIDValidator( theModule, theParent ),
myLocalPointLineEdit( theLocalPointLabel )
{}
validate ( QString & theInput, int & thePos ) const
{
if( theInput.isEmpty() )
- return QValidator::Acceptable;
+ return QValidator::Acceptable;
if ( GaussPtsIDValidator::validate( theInput, thePos ) == QValidator::Invalid)
- return QValidator::Invalid;
+ return QValidator::Invalid;
VISU::TCellID aCellID = theInput.toInt();
VISU::TLocalPntID aLocalPntID = myLocalPointLineEdit->text().toInt();
VISU::PGaussPtsIDMapper anIDMapper = myHelper.myPipeLine->GetGaussPtsIDMapper();
if ( anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) ) < 0 )
- return QValidator::Intermediate;
+ return QValidator::Intermediate;
return QValidator::Acceptable;
}
{
public:
GaussLocalPointIDValidator( QLineEdit* theParentElementLineEdit,
- const SalomeApp_Module* theModule,
- QObject * theParent ):
+ const SalomeApp_Module* theModule,
+ QObject * theParent ):
GaussPtsIDValidator( theModule, theParent ),
myParentElementLineEdit( theParentElementLineEdit )
{}
validate ( QString & theInput, int & thePos ) const
{
if( theInput.isEmpty() )
- return QValidator::Acceptable;
+ return QValidator::Acceptable;
if ( GaussPtsIDValidator::validate( theInput, thePos ) == QValidator::Invalid)
- return QValidator::Invalid;
+ return QValidator::Invalid;
VISU::TLocalPntID aLocalPntID = theInput.toInt();
VISU::TCellID aCellID = myParentElementLineEdit->text().toInt();
VISU::PGaussPtsIDMapper anIDMapper = myHelper.myPipeLine->GetGaussPtsIDMapper();
if ( anIDMapper->GetVTKID( VISU::TGaussPointID( aCellID, aLocalPntID ) ) < 0 )
- return QValidator::Intermediate;
+ return QValidator::Intermediate;
return QValidator::Acceptable;
}
//---------------------------------------------------------------------------------
VisuGUI_GaussPointsSelectionPane::VisuGUI_GaussPointsSelectionPane( const SalomeApp_Module* theModule,
- QWidget* theParent ) :
+ QWidget* theParent ) :
QWidget( theParent ),
myModule( theModule ),
myEventCallbackCommand( vtkCallbackCommand::New() )
//printf( "AddObserver(vtkCommand::KeyPressEvent)\n" );
aDevice->AddObserver(vtkCommand::KeyPressEvent,
- myEventCallbackCommand.GetPointer(),
- myPriority);
+ myEventCallbackCommand.GetPointer(),
+ myPriority);
if( aDevice->HasObserver(vtkCommand::EndPickEvent) )
aDevice->RemoveObservers(vtkCommand::EndPickEvent);
//printf( "AddObserver(vtkCommand::EndPickEvent)\n" );
aDevice->AddObserver(vtkCommand::EndPickEvent,
- myEventCallbackCommand.GetPointer(),
- myPriority);
+ myEventCallbackCommand.GetPointer(),
+ myPriority);
}
SVTK_RenderWindowInteractor* VisuGUI_GaussPointsSelectionPane::getInteractor()
}
void VisuGUI_GaussPointsSelectionPane::ProcessEvents(vtkObject* vtkNotUsed(theObject),
- unsigned long theEvent,
- void* theClientData,
- void* vtkNotUsed(theCallData))
+ unsigned long theEvent,
+ void* theClientData,
+ void* vtkNotUsed(theCallData))
{
VisuGUI_GaussPointsSelectionPane* self = reinterpret_cast<VisuGUI_GaussPointsSelectionPane*>(theClientData);
platform = "application";
#endif
SUIT_MessageBox::warning( 0,
- QObject::tr("WRN_WARNING"),
- QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
- QObject::tr("BUT_OK"));
+ QObject::tr("WRN_WARNING"),
+ QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(aHelpFileName),
+ QObject::tr("BUT_OK"));
}
}