mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
*** empty log message ***
This commit is contained in:
parent
70c382acbd
commit
a2f0f70d59
@ -33,7 +33,9 @@
|
|||||||
#include "SMESH_ControlsDef.hxx"
|
#include "SMESH_ControlsDef.hxx"
|
||||||
#include <VTKViewer_ExtractUnstructuredGrid.h>
|
#include <VTKViewer_ExtractUnstructuredGrid.h>
|
||||||
|
|
||||||
//#include "QAD_Config.h"
|
#include "SUIT_Session.h"
|
||||||
|
#include "SUIT_ResourceMgr.h"
|
||||||
|
|
||||||
#include <qstringlist.h>
|
#include <qstringlist.h>
|
||||||
|
|
||||||
#include <vtkTimeStamp.h>
|
#include <vtkTimeStamp.h>
|
||||||
@ -288,38 +290,38 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
|
|
||||||
vtkTextProperty* aScalarBarTitleProp = vtkTextProperty::New();
|
vtkTextProperty* aScalarBarTitleProp = vtkTextProperty::New();
|
||||||
|
|
||||||
/* if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarTitleColor" ) ) {
|
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
||||||
QStringList aTColor = QStringList::split( ":", QAD_CONFIG->getSetting( "SMESH:ScalarBarTitleColor" ), false );
|
if( !mgr )
|
||||||
aScalarBarTitleProp->SetColor( ( aTColor.count() > 0 ? aTColor[0].toInt()/255. : 1.0 ),
|
return;
|
||||||
( aTColor.count() > 1 ? aTColor[1].toInt()/255. : 1.0 ),
|
|
||||||
( aTColor.count() > 2 ? aTColor[2].toInt()/255. : 1.0 ) );
|
QColor aTColor = mgr->colorValue( "ScalarBarTitleColor", "SMESH", QColor( 255, 255, 255 ) );
|
||||||
}
|
aScalarBarTitleProp->SetColor( aTColor.red()/255., aTColor.green()/255., aTColor.blue()/255. );
|
||||||
else*/
|
|
||||||
aScalarBarTitleProp->SetColor( 1.0, 1.0, 1.0 );
|
|
||||||
|
|
||||||
aScalarBarTitleProp->SetFontFamilyToArial();
|
aScalarBarTitleProp->SetFontFamilyToArial();
|
||||||
/*if( QAD_CONFIG->hasSetting( "SMESH:ScalarBarTitleFont" ) ){
|
|
||||||
if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarTitleFont" ) == "Arial" )
|
if( mgr->hasValue( "ScalarBarTitleFont", "SMESH" ) ){
|
||||||
|
QString str = mgr->stringValue( "ScalarBarTitleFont", "SMESH" );
|
||||||
|
if ( str == "Arial" )
|
||||||
aScalarBarTitleProp->SetFontFamilyToArial();
|
aScalarBarTitleProp->SetFontFamilyToArial();
|
||||||
else if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarTitleFont" ) == "Courier" )
|
else if ( str == "Courier" )
|
||||||
aScalarBarTitleProp->SetFontFamilyToCourier();
|
aScalarBarTitleProp->SetFontFamilyToCourier();
|
||||||
else if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarTitleFont" ) == "Times" )
|
else if ( str == "Times" )
|
||||||
aScalarBarTitleProp->SetFontFamilyToTimes();
|
aScalarBarTitleProp->SetFontFamilyToTimes();
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/*if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarTitleBold" ) == "true" )
|
if ( mgr->stringValue( "ScalarBarTitleBold", "SMESH" ) == "true" )
|
||||||
aScalarBarTitleProp->BoldOn();
|
aScalarBarTitleProp->BoldOn();
|
||||||
else*/
|
else
|
||||||
aScalarBarTitleProp->BoldOff();
|
aScalarBarTitleProp->BoldOff();
|
||||||
|
|
||||||
/*if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarTitleItalic" ) == "true" )
|
if ( mgr->stringValue( "ScalarBarTitleItalic", "SMESH" ) == "true" )
|
||||||
aScalarBarTitleProp->ItalicOn();
|
aScalarBarTitleProp->ItalicOn();
|
||||||
else*/
|
else
|
||||||
aScalarBarTitleProp->ItalicOff();
|
aScalarBarTitleProp->ItalicOff();
|
||||||
|
|
||||||
/*if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarTitleShadow" ) == "true" )
|
if ( mgr->stringValue( "ScalarBarTitleShadow", "SMESH" ) == "true" )
|
||||||
aScalarBarTitleProp->ShadowOn();
|
aScalarBarTitleProp->ShadowOn();
|
||||||
else*/
|
else
|
||||||
aScalarBarTitleProp->ShadowOff();
|
aScalarBarTitleProp->ShadowOff();
|
||||||
|
|
||||||
myScalarBarActor->SetTitleTextProperty( aScalarBarTitleProp );
|
myScalarBarActor->SetTitleTextProperty( aScalarBarTitleProp );
|
||||||
@ -327,75 +329,71 @@ SMESH_ActorDef::SMESH_ActorDef()
|
|||||||
|
|
||||||
vtkTextProperty* aScalarBarLabelProp = vtkTextProperty::New();
|
vtkTextProperty* aScalarBarLabelProp = vtkTextProperty::New();
|
||||||
|
|
||||||
/*if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarLabelColor" ) ) {
|
aTColor = mgr->colorValue( "ScalarBarLabelColor", "SMESH", QColor( 255, 255, 255 ) );
|
||||||
QStringList aTColor = QStringList::split( ":", QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelColor" ), false );
|
aScalarBarLabelProp->SetColor( aTColor.red()/255., aTColor.green()/255., aTColor.blue()/255. );
|
||||||
aScalarBarLabelProp->SetColor( ( aTColor.count() > 0 ? aTColor[0].toInt()/255. : 1.0 ),
|
|
||||||
( aTColor.count() > 1 ? aTColor[1].toInt()/255. : 1.0 ),
|
|
||||||
( aTColor.count() > 2 ? aTColor[2].toInt()/255. : 1.0 ) );
|
|
||||||
}
|
|
||||||
else*/
|
|
||||||
aScalarBarLabelProp->SetColor( 1.0, 1.0, 1.0 );
|
|
||||||
|
|
||||||
aScalarBarLabelProp->SetFontFamilyToArial();
|
aScalarBarLabelProp->SetFontFamilyToArial();
|
||||||
/*if( QAD_CONFIG->hasSetting( "SMESH:ScalarBarLabelFont" ) ){
|
if( mgr->hasValue( "ScalarBarLabelFont", "SMESH" ) )
|
||||||
if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelFont" ) == "Arial" )
|
{
|
||||||
|
QString str = mgr->stringValue( "ScalarBarLabelFont", "SMESH" );
|
||||||
|
if( str == "Arial" )
|
||||||
aScalarBarLabelProp->SetFontFamilyToArial();
|
aScalarBarLabelProp->SetFontFamilyToArial();
|
||||||
else if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelFont" ) == "Courier" )
|
else if( str == "Courier" )
|
||||||
aScalarBarLabelProp->SetFontFamilyToCourier();
|
aScalarBarLabelProp->SetFontFamilyToCourier();
|
||||||
else if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelFont" ) == "Times" )
|
else if( str == "Times" )
|
||||||
aScalarBarLabelProp->SetFontFamilyToTimes();
|
aScalarBarLabelProp->SetFontFamilyToTimes();
|
||||||
}*/
|
}
|
||||||
|
|
||||||
/*if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelBold" ) == "true" )
|
if( mgr->stringValue( "ScalarBarLabelBold", "SMESH" ) == "true" )
|
||||||
aScalarBarLabelProp->BoldOn();
|
aScalarBarLabelProp->BoldOn();
|
||||||
else*/
|
else
|
||||||
aScalarBarLabelProp->BoldOff();
|
aScalarBarLabelProp->BoldOff();
|
||||||
|
|
||||||
/*if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelItalic" ) == "true" )
|
if ( mgr->stringValue( "ScalarBarLabelItalic", "SMESH" ) == "true" )
|
||||||
aScalarBarLabelProp->ItalicOn();
|
aScalarBarLabelProp->ItalicOn();
|
||||||
else*/
|
else
|
||||||
aScalarBarLabelProp->ItalicOff();
|
aScalarBarLabelProp->ItalicOff();
|
||||||
|
|
||||||
/*if ( QAD_CONFIG->getSetting( "SMESH:ScalarBarLabelShadow" ) == "true" )
|
if( mgr->stringValue( "ScalarBarLabelShadow", "SMESH" ) == "true" )
|
||||||
aScalarBarLabelProp->ShadowOn();
|
aScalarBarLabelProp->ShadowOn();
|
||||||
else*/
|
else
|
||||||
aScalarBarLabelProp->ShadowOff();
|
aScalarBarLabelProp->ShadowOff();
|
||||||
|
|
||||||
myScalarBarActor->SetLabelTextProperty( aScalarBarLabelProp );
|
myScalarBarActor->SetLabelTextProperty( aScalarBarLabelProp );
|
||||||
aScalarBarLabelProp->Delete();
|
aScalarBarLabelProp->Delete();
|
||||||
|
|
||||||
/*if ( QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" )
|
if( mgr->stringValue( "ScalarBarOrientation", "SMESH" ) == "Horizontal" )
|
||||||
myScalarBarActor->SetOrientationToHorizontal();
|
myScalarBarActor->SetOrientationToHorizontal();
|
||||||
else*/
|
else
|
||||||
myScalarBarActor->SetOrientationToVertical();
|
myScalarBarActor->SetOrientationToVertical();
|
||||||
|
|
||||||
float aXVal = 0.01; //QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" ? 0.20 : 0.01;
|
float aXVal = mgr->stringValue( "ScalarBarOrientation", "SMESH" ) == "Horizontal" ? 0.20 : 0.01;
|
||||||
//if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarXPosition" ) )
|
if( mgr->hasValue( "ScalarBarXPosition", "SMESH" ) )
|
||||||
// aXVal = QAD_CONFIG->getSetting( "SMESH:ScalarBarXPosition" ).toFloat();
|
aXVal = mgr->doubleValue( "ScalarBarXPosition", "SMESH", aXVal );
|
||||||
float aYVal = 0.1; //QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" ? 0.01 : 0.1;
|
float aYVal = mgr->stringValue( "ScalarBarOrientation", "SMESH" ) == "Horizontal" ? 0.01 : 0.1;
|
||||||
//if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarYPosition" ) )
|
if( mgr->hasValue( "ScalarBarYPosition", "SMESH" ) )
|
||||||
// aYVal = QAD_CONFIG->getSetting( "SMESH:ScalarBarYPosition" ).toFloat();
|
aYVal = mgr->doubleValue( "ScalarBarYPosition", "SMESH", aYVal );
|
||||||
myScalarBarActor->SetPosition( aXVal, aYVal );
|
myScalarBarActor->SetPosition( aXVal, aYVal );
|
||||||
|
|
||||||
float aWVal = 0.1; //QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" ? 0.60 : 0.10;
|
float aWVal = mgr->stringValue( "ScalarBarOrientation", "SMESH" ) == "Horizontal" ? 0.60 : 0.10;
|
||||||
//if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarWidth" ) )
|
if( mgr->hasValue( "ScalarBarWidth", "SMESH" ) )
|
||||||
// aWVal = QAD_CONFIG->getSetting( "SMESH:ScalarBarWidth" ).toFloat();
|
aWVal = mgr->doubleValue( "ScalarBarWidth", "SMESH", aWVal );
|
||||||
myScalarBarActor->SetWidth( aWVal );
|
myScalarBarActor->SetWidth( aWVal );
|
||||||
|
|
||||||
float aHVal = 0.8; //QAD_CONFIG->getSetting("SMESH:ScalarBarOrientation") == "Horizontal" ? 0.12 : 0.80;
|
float aHVal = mgr->stringValue( "ScalarBarOrientation", "SMESH" ) == "Horizontal" ? 0.12 : 0.80;
|
||||||
//if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarHeight" ) )
|
if( mgr->hasValue( "ScalarBarHeight", "SMESH" ) )
|
||||||
// aHVal = QAD_CONFIG->getSetting( "SMESH:ScalarBarHeight" ).toFloat();
|
aHVal = mgr->doubleValue( "ScalarBarHeight", "SMESH", aHVal );
|
||||||
myScalarBarActor->SetHeight( aHVal );
|
myScalarBarActor->SetHeight( aHVal );
|
||||||
|
|
||||||
int anIntVal = 5;
|
int anIntVal = 5;
|
||||||
//if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarNbOfLabels" ) )
|
if( mgr->hasValue( "ScalarBarNbOfLabels", "SMESH" ) )
|
||||||
// anIntVal = QAD_CONFIG->getSetting("SMESH:ScalarBarNbOfLabels").toInt();
|
anIntVal = mgr->integerValue( "ScalarBarNbOfLabels", "SMESH", anIntVal );
|
||||||
myScalarBarActor->SetNumberOfLabels(anIntVal == 0? 5: anIntVal);
|
myScalarBarActor->SetNumberOfLabels( anIntVal == 0 ? 5: anIntVal );
|
||||||
|
|
||||||
anIntVal = 64;
|
anIntVal = 64;
|
||||||
//if ( QAD_CONFIG->hasSetting( "SMESH:ScalarBarNbOfColors" ) )
|
if( mgr->hasValue( "ScalarBarNbOfColors", "SMESH" ) )
|
||||||
// anIntVal = QAD_CONFIG->getSetting("SMESH:ScalarBarNbOfColors").toInt();
|
anIntVal = mgr->integerValue( "ScalarBarNbOfColors", "SMESH", anIntVal );
|
||||||
myScalarBarActor->SetMaximumNumberOfColors(anIntVal == 0? 64: anIntVal);
|
myScalarBarActor->SetMaximumNumberOfColors( anIntVal == 0 ? 64 : anIntVal );
|
||||||
|
|
||||||
|
|
||||||
//Definition of points numbering pipeline
|
//Definition of points numbering pipeline
|
||||||
@ -622,8 +620,12 @@ SMESH_ActorDef::
|
|||||||
SetControlMode(eControl theMode,
|
SetControlMode(eControl theMode,
|
||||||
bool theCheckEntityMode)
|
bool theCheckEntityMode)
|
||||||
{
|
{
|
||||||
|
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
if( !mgr )
|
||||||
|
return;
|
||||||
|
|
||||||
myControlMode = eNone;
|
myControlMode = eNone;
|
||||||
//theCheckEntityMode &= QAD_CONFIG->getSetting("SMESH:DispayEntity") == "true";
|
theCheckEntityMode &= mgr->stringValue( "DispayEntity", "SMESH" ) == "true";
|
||||||
|
|
||||||
my1DActor->GetMapper()->SetScalarVisibility(false);
|
my1DActor->GetMapper()->SetScalarVisibility(false);
|
||||||
my2DActor->GetMapper()->SetScalarVisibility(false);
|
my2DActor->GetMapper()->SetScalarVisibility(false);
|
||||||
@ -851,9 +853,13 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
|
|||||||
//SetIsShrunkable(theGrid->GetNumberOfCells() > 10);
|
//SetIsShrunkable(theGrid->GetNumberOfCells() > 10);
|
||||||
SetIsShrunkable(true);
|
SetIsShrunkable(true);
|
||||||
|
|
||||||
//QString aMode = QAD_CONFIG->getSetting("SMESH:DisplayMode");
|
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
if( !mgr )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
QString aMode = mgr->stringValue( "DisplayMode", "SMESH" );
|
||||||
SetRepresentation(-1);
|
SetRepresentation(-1);
|
||||||
/*
|
|
||||||
if(aMode.compare("Wireframe") == 0){
|
if(aMode.compare("Wireframe") == 0){
|
||||||
SetRepresentation(eEdge);
|
SetRepresentation(eEdge);
|
||||||
}else if(aMode.compare("Shading") == 0){
|
}else if(aMode.compare("Shading") == 0){
|
||||||
@ -861,11 +867,11 @@ bool SMESH_ActorDef::Init(TVisualObjPtr theVisualObj,
|
|||||||
}else if(aMode.compare("Nodes") == 0){
|
}else if(aMode.compare("Nodes") == 0){
|
||||||
SetRepresentation(ePoint);
|
SetRepresentation(ePoint);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
/*aMode = QAD_CONFIG->getSetting("SMESH:Shrink");
|
aMode = mgr->stringValue( "Shrink", "SMESH" );
|
||||||
if(aMode == "yes"){
|
if(aMode == "yes"){
|
||||||
SetShrink();
|
SetShrink();
|
||||||
}*/
|
}
|
||||||
|
|
||||||
myTimeStamp->Modified();
|
myTimeStamp->Modified();
|
||||||
Modified();
|
Modified();
|
||||||
|
@ -20,7 +20,9 @@
|
|||||||
|
|
||||||
#include "SMESH_ActorUtils.h"
|
#include "SMESH_ActorUtils.h"
|
||||||
|
|
||||||
//#include "QAD_Config.h"
|
#include "SUIT_ResourceMgr.h"
|
||||||
|
#include "SUIT_Session.h"
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
#include <vtkUnstructuredGrid.h>
|
#include <vtkUnstructuredGrid.h>
|
||||||
@ -34,12 +36,28 @@ static int MYDEBUG = 0;
|
|||||||
|
|
||||||
namespace SMESH{
|
namespace SMESH{
|
||||||
|
|
||||||
float GetFloat(const QString& theValue, float theDefault){
|
float GetFloat( const QString& theValue, float theDefault )
|
||||||
if(theValue.isEmpty()) return theDefault;
|
{
|
||||||
//QString aValue = QAD_CONFIG->getSetting(theValue);
|
int pos = theValue.find( ":" );
|
||||||
//if(aValue.isEmpty())
|
float val = theDefault;
|
||||||
return theDefault;
|
if( pos>=0 )
|
||||||
//return aValue.toFloat();
|
{
|
||||||
|
QString val = theValue.right( theValue.length()-pos-1 ),
|
||||||
|
sect = theValue.left( pos );
|
||||||
|
if( !val.isEmpty() && !sect.isEmpty() )
|
||||||
|
val = GetFloat( val, sect, theDefault );
|
||||||
|
}
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
float GetFloat( const QString& theValue, const QString& theSection, float theDefault )
|
||||||
|
{
|
||||||
|
float val = theDefault;
|
||||||
|
SUIT_ResourceMgr* mgr = SUIT_Session::session()->resourceMgr();
|
||||||
|
if( mgr )
|
||||||
|
val = (float) mgr->doubleValue( theValue, theSection, theDefault );
|
||||||
|
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName){
|
void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName){
|
||||||
|
@ -26,7 +26,8 @@ class vtkUnstructuredGrid;
|
|||||||
|
|
||||||
namespace SMESH{
|
namespace SMESH{
|
||||||
|
|
||||||
float GetFloat(const QString& theValue, float theDefault = 0);
|
float GetFloat( const QString& theValue, float theDefault = 0 );
|
||||||
|
float GetFloat( const QString& theName, const QString& theSection, float theDefault = 0 );
|
||||||
|
|
||||||
void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName);
|
void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName);
|
||||||
|
|
||||||
|
@ -395,7 +395,7 @@ namespace{
|
|||||||
}
|
}
|
||||||
case 1133:{
|
case 1133:{
|
||||||
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
||||||
new SMESHGUI_TransparencyDlg( SMESHGUI::desktop(), "", false );
|
new SMESHGUI_TransparencyDlg( SMESHGUI::GetSMESHGUI(), "", false );
|
||||||
return;
|
return;
|
||||||
}}
|
}}
|
||||||
SALOME_ListIteratorOfListIO It( selected );
|
SALOME_ListIteratorOfListIO It( selected );
|
||||||
@ -455,7 +455,7 @@ namespace{
|
|||||||
float Shrink = anActor->GetShrinkFactor();
|
float Shrink = anActor->GetShrinkFactor();
|
||||||
|
|
||||||
SMESHGUI_Preferences_ColorDlg *aDlg =
|
SMESHGUI_Preferences_ColorDlg *aDlg =
|
||||||
new SMESHGUI_Preferences_ColorDlg(SMESHGUI::desktop(),"");
|
new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI(), "" );
|
||||||
aDlg->SetColor(1, c);
|
aDlg->SetColor(1, c);
|
||||||
aDlg->SetColor(2, e);
|
aDlg->SetColor(2, e);
|
||||||
aDlg->SetColor(3, n);
|
aDlg->SetColor(3, n);
|
||||||
@ -511,7 +511,7 @@ namespace{
|
|||||||
|
|
||||||
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
||||||
SMESHGUI_Preferences_ColorDlg *aDlg =
|
SMESHGUI_Preferences_ColorDlg *aDlg =
|
||||||
new SMESHGUI_Preferences_ColorDlg(SMESHGUI::desktop(), "");
|
new SMESHGUI_Preferences_ColorDlg( SMESHGUI::GetSMESHGUI(), "" );
|
||||||
|
|
||||||
QColor color = mgr->colorValue( "SMESH", "SettingsFillColor", QColor(0, 170, 255) );
|
QColor color = mgr->colorValue( "SMESH", "SettingsFillColor", QColor(0, 170, 255) );
|
||||||
aDlg->SetColor(1, color);
|
aDlg->SetColor(1, color);
|
||||||
@ -793,8 +793,7 @@ namespace{
|
|||||||
aStudyBuilder->CommitCommand();
|
aStudyBuilder->CommitCommand();
|
||||||
|
|
||||||
/* Clear any previous selection */
|
/* Clear any previous selection */
|
||||||
SALOME_ListIO selected1;
|
aSel->setSelectedObjects( SALOME_ListIO() );
|
||||||
aSel->setSelectedObjects( selected1 );
|
|
||||||
|
|
||||||
SMESHGUI::GetSMESHGUI()->updateObjBrowser();
|
SMESHGUI::GetSMESHGUI()->updateObjBrowser();
|
||||||
}
|
}
|
||||||
@ -1149,12 +1148,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
}
|
}
|
||||||
case 201:
|
case 201:
|
||||||
{
|
{
|
||||||
SalomeApp_SelectionMgr *aSel = SMESHGUI::selectionMgr();
|
SMESHGUI_Preferences_ScalarBarDlg::ScalarBarProperties( this );
|
||||||
SALOME_ListIO selected;
|
|
||||||
if( aSel )
|
|
||||||
aSel->selectedObjects( selected );
|
|
||||||
|
|
||||||
SMESHGUI_Preferences_ScalarBarDlg::ScalarBarProperties( desktop(), aSel );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1210,8 +1204,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SALOME_ListIO selected1;
|
aSel->setSelectedObjects( SALOME_ListIO() );
|
||||||
aSel->setSelectedObjects( selected1 );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1674,7 +1667,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
else if ( theCommandID == 811 ) aMode = SMESHGUI_GroupOpDlg::INTERSECT;
|
else if ( theCommandID == 811 ) aMode = SMESHGUI_GroupOpDlg::INTERSECT;
|
||||||
else aMode = SMESHGUI_GroupOpDlg::CUT;
|
else aMode = SMESHGUI_GroupOpDlg::CUT;
|
||||||
|
|
||||||
( new SMESHGUI_GroupOpDlg( desktop(), SMESHGUI::selectionMgr(), aMode ) )->show();
|
( new SMESHGUI_GroupOpDlg( this, aMode ) )->show();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1685,7 +1678,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
|
|
||||||
EmitSignalDeactivateDialog();
|
EmitSignalDeactivateDialog();
|
||||||
|
|
||||||
new SMESHGUI_DeleteGroupDlg(this);
|
new SMESHGUI_DeleteGroupDlg( this );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1728,13 +1721,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
IOs.Clear();
|
IOs.Clear();
|
||||||
IOs.Append( It.Value() );
|
IOs.Append( It.Value() );
|
||||||
aSel->setSelectedObjects( IOs );
|
aSel->setSelectedObjects( IOs );
|
||||||
new SMESHGUI_StandardMeshInfosDlg(desktop(), "", false);
|
new SMESHGUI_StandardMeshInfosDlg( this, "", false);
|
||||||
}
|
}
|
||||||
// restore selection
|
// restore selection
|
||||||
aSel->setSelectedObjects( selected );
|
aSel->setSelectedObjects( selected );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
new SMESHGUI_StandardMeshInfosDlg(desktop(), "", false);
|
new SMESHGUI_StandardMeshInfosDlg( this, "", false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1759,13 +1752,13 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
|
|
||||||
case 1005:
|
case 1005:
|
||||||
{
|
{
|
||||||
SMESHGUI_Preferences_ScalarBarDlg::ScalarBarPreferences( desktop() );
|
SMESHGUI_Preferences_ScalarBarDlg::ScalarBarPreferences( this );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 10070:
|
case 10070:
|
||||||
{
|
{
|
||||||
( new SMESHGUI_PrecisionDlg( desktop() ) )->exec();
|
( new SMESHGUI_PrecisionDlg( this ) )->exec();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1782,7 +1775,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
case 1006:
|
case 1006:
|
||||||
{
|
{
|
||||||
SMESHGUI_Preferences_SelectionDlg* aDlg =
|
SMESHGUI_Preferences_SelectionDlg* aDlg =
|
||||||
new SMESHGUI_Preferences_SelectionDlg(desktop());
|
new SMESHGUI_Preferences_SelectionDlg( this );
|
||||||
|
|
||||||
QColor aColor = mgr->colorValue( "SMESH", "SettingsPreSelectColor", Qt::cyan );
|
QColor aColor = mgr->colorValue( "SMESH", "SettingsPreSelectColor", Qt::cyan );
|
||||||
aDlg->SetColor(1, aColor);
|
aDlg->SetColor(1, aColor);
|
||||||
@ -1944,8 +1937,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
Handle(SALOME_InteractiveObject) IObject = It.Value();
|
Handle(SALOME_InteractiveObject) IObject = It.Value();
|
||||||
SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject);
|
SMESH::RemoveHypothesisOrAlgorithmOnMesh(IObject);
|
||||||
}
|
}
|
||||||
SALOME_ListIO selected1;
|
aSel->setSelectedObjects( SALOME_ListIO() );
|
||||||
aSel->setSelectedObjects( selected1 );
|
|
||||||
updateObjBrowser();
|
updateObjBrowser();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2034,7 +2026,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
if(checkLock(aStudy)) break;
|
if(checkLock(aStudy)) break;
|
||||||
if( vtkwnd ) {
|
if( vtkwnd ) {
|
||||||
EmitSignalDeactivateDialog();
|
EmitSignalDeactivateDialog();
|
||||||
new SMESHGUI_RenumberingDlg(desktop(), "", selectionMgr(), 0);
|
new SMESHGUI_RenumberingDlg( this, "", 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2049,7 +2041,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
if(checkLock(aStudy)) break;
|
if(checkLock(aStudy)) break;
|
||||||
if ( vtkwnd ) {
|
if ( vtkwnd ) {
|
||||||
EmitSignalDeactivateDialog();
|
EmitSignalDeactivateDialog();
|
||||||
new SMESHGUI_RenumberingDlg(desktop(), "", selectionMgr(), 1);
|
new SMESHGUI_RenumberingDlg( this, "", 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -268,8 +268,8 @@ SMESHGUI_AddMeshElementDlg::SMESHGUI_AddMeshElementDlg( SMESHGUI* theModule,
|
|||||||
QString caption = tr(QString("SMESH_ADD_%1_TITLE").arg(elemName));
|
QString caption = tr(QString("SMESH_ADD_%1_TITLE").arg(elemName));
|
||||||
QString grBoxTitle = tr(QString("SMESH_ADD_%1").arg(elemName));
|
QString grBoxTitle = tr(QString("SMESH_ADD_%1").arg(elemName));
|
||||||
|
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", iconName));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", iconName));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_AddMeshElementDlg");
|
setName("SMESHGUI_AddMeshElementDlg");
|
||||||
|
@ -94,7 +94,7 @@ SMESHGUI_AddSubMeshDlg::SMESHGUI_AddSubMeshDlg( SMESHGUI* theModule, const char*
|
|||||||
mySMESHGUI( theModule ),
|
mySMESHGUI( theModule ),
|
||||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_AddSubMeshDlg");
|
setName("SMESHGUI_AddSubMeshDlg");
|
||||||
setCaption(tr("SMESH_ADD_SUBMESH"));
|
setCaption(tr("SMESH_ADD_SUBMESH"));
|
||||||
|
@ -287,7 +287,7 @@ void SMESHGUI_CreateHypothesesDlg::InitAlgoDefinition()
|
|||||||
parentItem = new QListViewItem(ListAlgoDefinition, aHypData->PluginName);
|
parentItem = new QListViewItem(ListAlgoDefinition, aHypData->PluginName);
|
||||||
parentItem->setOpen(true);
|
parentItem->setOpen(true);
|
||||||
QListViewItem* aItem = new QListViewItem(parentItem, aHypData->Label, HypList[i]);
|
QListViewItem* aItem = new QListViewItem(parentItem, aHypData->Label, HypList[i]);
|
||||||
QPixmap aPixMap (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr(aHypData->IconId)));
|
QPixmap aPixMap (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr(aHypData->IconId)));
|
||||||
if (!aPixMap.isNull())
|
if (!aPixMap.isNull())
|
||||||
aItem->setPixmap(0, aPixMap);
|
aItem->setPixmap(0, aPixMap);
|
||||||
}
|
}
|
||||||
|
@ -113,10 +113,10 @@ SMESHGUI_CreatePatternDlg::SMESHGUI_CreatePatternDlg( SMESHGUI* theModule,
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
QFrame* SMESHGUI_CreatePatternDlg::createMainFrame (QWidget* theParent)
|
QFrame* SMESHGUI_CreatePatternDlg::createMainFrame (QWidget* theParent)
|
||||||
{
|
{
|
||||||
QPixmap iconSlct (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap iconSlct (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
QPixmap icon2d (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_PATTERN_2d")));
|
QPixmap icon2d (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_PATTERN_2d")));
|
||||||
QPixmap icon3d (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_PATTERN_3d")));
|
QPixmap icon3d (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_PATTERN_3d")));
|
||||||
QPixmap iconSample2d (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_PATTERN_SAMPLE_2D")));
|
QPixmap iconSample2d (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_PATTERN_SAMPLE_2D")));
|
||||||
|
|
||||||
QGroupBox* aMainGrp = new QGroupBox(1, Qt::Horizontal, theParent);
|
QGroupBox* aMainGrp = new QGroupBox(1, Qt::Horizontal, theParent);
|
||||||
aMainGrp->setFrameStyle(QFrame::NoFrame);
|
aMainGrp->setFrameStyle(QFrame::NoFrame);
|
||||||
|
@ -52,7 +52,7 @@ class SMESHGUI_DeleteGroupDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_DeleteGroupDlg (SMESHGUI* theModule);
|
SMESHGUI_DeleteGroupDlg( SMESHGUI* );
|
||||||
virtual ~SMESHGUI_DeleteGroupDlg();
|
virtual ~SMESHGUI_DeleteGroupDlg();
|
||||||
|
|
||||||
void Init ();
|
void Init ();
|
||||||
|
@ -115,7 +115,7 @@ SMESHGUI_EditHypothesesDlg::SMESHGUI_EditHypothesesDlg (SMESHGUI* theModule, con
|
|||||||
mySMESHGUI( theModule ),
|
mySMESHGUI( theModule ),
|
||||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_EditHypothesesDlg");
|
setName("SMESHGUI_EditHypothesesDlg");
|
||||||
setCaption(tr("SMESH_EDIT_HYPOTHESES"));
|
setCaption(tr("SMESH_EDIT_HYPOTHESES"));
|
||||||
|
@ -101,11 +101,12 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap edgeImage (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
QPixmap faceImage (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
|
QPixmap edgeImage ( mgr->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
|
||||||
QPixmap selectImage (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap faceImage ( mgr->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
|
||||||
QPixmap addImage (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_APPEND")));
|
QPixmap selectImage ( mgr->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
QPixmap removeImage (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_REMOVE")));
|
QPixmap addImage ( mgr->loadPixmap("SMESH", tr("ICON_APPEND")));
|
||||||
|
QPixmap removeImage ( mgr->loadPixmap("SMESH", tr("ICON_REMOVE")));
|
||||||
|
|
||||||
myType = -1;
|
myType = -1;
|
||||||
|
|
||||||
|
@ -92,9 +92,9 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule,
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
|
||||||
QPixmap image2 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image2 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
resize(303, 185);
|
resize(303, 185);
|
||||||
setCaption(tr("EXTRUSION_ALONG_LINE"));
|
setCaption(tr("EXTRUSION_ALONG_LINE"));
|
||||||
|
@ -2190,7 +2190,7 @@ bool SMESHGUI_FilterDlg::createFilter (const int theType)
|
|||||||
aCriteria->length(n);
|
aCriteria->length(n);
|
||||||
|
|
||||||
long aPrecision = -1;
|
long aPrecision = -1;
|
||||||
SUIT_ResourceMgr* mgr = SMESHGUI::resourceMgr();
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
|
|
||||||
if (mgr && mgr->hasValue("SMESH", "ControlsPrecision")) {
|
if (mgr && mgr->hasValue("SMESH", "ControlsPrecision")) {
|
||||||
QString aStr = mgr->stringValue("SMESH", "ControlsPrecision");
|
QString aStr = mgr->stringValue("SMESH", "ControlsPrecision");
|
||||||
|
@ -149,7 +149,7 @@ void SMESHGUI_GroupDlg::initDialog(bool create)
|
|||||||
myCreate = create;
|
myCreate = create;
|
||||||
myCurrentLineEdit = 0;
|
myCurrentLineEdit = 0;
|
||||||
|
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (create)
|
if (create)
|
||||||
setCaption(tr("SMESH_CREATE_GROUP_TITLE"));
|
setCaption(tr("SMESH_CREATE_GROUP_TITLE"));
|
||||||
@ -744,7 +744,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
|
|||||||
|
|
||||||
myElements->clear();
|
myElements->clear();
|
||||||
|
|
||||||
if (aNbSel == 0 ) {
|
if (aNbSel != 1 ) {
|
||||||
myGroup = SMESH::SMESH_Group::_nil();
|
myGroup = SMESH::SMESH_Group::_nil();
|
||||||
myMesh = SMESH::SMESH_Mesh::_nil();
|
myMesh = SMESH::SMESH_Mesh::_nil();
|
||||||
myIsBusy = false;
|
myIsBusy = false;
|
||||||
@ -805,7 +805,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
} else if (myCurrentLineEdit == myGeomGroupLine) {
|
} else if (myCurrentLineEdit == myGeomGroupLine) {
|
||||||
if (aNbSel == 0) {
|
if (aNbSel != 1) {
|
||||||
myGeomGroup = GEOM::GEOM_Object::_nil();
|
myGeomGroup = GEOM::GEOM_Object::_nil();
|
||||||
myIsBusy = false;
|
myIsBusy = false;
|
||||||
return;
|
return;
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_Utils.h"
|
#include "SMESHGUI_Utils.h"
|
||||||
|
#include "SMESHGUI_VTKUtils.h"
|
||||||
|
|
||||||
#include "SMESH_TypeFilter.hxx"
|
#include "SMESH_TypeFilter.hxx"
|
||||||
|
|
||||||
@ -37,6 +38,8 @@
|
|||||||
|
|
||||||
#include "SalomeApp_SelectionMgr.h"
|
#include "SalomeApp_SelectionMgr.h"
|
||||||
#include "SVTK_Selection.h"
|
#include "SVTK_Selection.h"
|
||||||
|
#include "SVTK_ViewWindow.h"
|
||||||
|
#include "SVTK_Selector.h"
|
||||||
#include "SALOME_ListIO.hxx"
|
#include "SALOME_ListIO.hxx"
|
||||||
|
|
||||||
// QT Includes
|
// QT Includes
|
||||||
@ -61,11 +64,13 @@
|
|||||||
// name : SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg
|
// name : SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg
|
||||||
// Purpose : Constructor
|
// Purpose : Constructor
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg (QWidget* theParent,
|
SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg( SMESHGUI* theModule, const int theMode )
|
||||||
SalomeApp_SelectionMgr* theSelection,
|
: QDialog( SMESH::GetDesktop( theModule ), "SMESHGUI_GroupOpDlg", false,
|
||||||
const int theMode)
|
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
|
||||||
: QDialog(theParent, "SMESHGUI_GroupOpDlg", false,
|
mySMESHGUI( theModule ),
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
||||||
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
myMode = theMode;
|
myMode = theMode;
|
||||||
|
|
||||||
@ -83,7 +88,7 @@ SMESHGUI_GroupOpDlg::SMESHGUI_GroupOpDlg (QWidget* theParent,
|
|||||||
|
|
||||||
aDlgLay->setStretchFactor(aMainFrame, 1);
|
aDlgLay->setStretchFactor(aMainFrame, 1);
|
||||||
|
|
||||||
Init(theSelection);
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -115,7 +120,7 @@ QFrame* SMESHGUI_GroupOpDlg::createMainFrame (QWidget* theParent)
|
|||||||
myEdit1->setReadOnly(true);
|
myEdit1->setReadOnly(true);
|
||||||
myEdit2->setReadOnly(true);
|
myEdit2->setReadOnly(true);
|
||||||
|
|
||||||
QPixmap aPix (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap aPix (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
myBtn1->setPixmap(aPix);
|
myBtn1->setPixmap(aPix);
|
||||||
myBtn2->setPixmap(aPix);
|
myBtn2->setPixmap(aPix);
|
||||||
|
|
||||||
@ -164,11 +169,9 @@ SMESHGUI_GroupOpDlg::~SMESHGUI_GroupOpDlg()
|
|||||||
// name : SMESHGUI_GroupOpDlg::Init
|
// name : SMESHGUI_GroupOpDlg::Init
|
||||||
// Purpose : Init dialog fields, connect signals and slots, show dialog
|
// Purpose : Init dialog fields, connect signals and slots, show dialog
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_GroupOpDlg::Init (SalomeApp_SelectionMgr* theSelection)
|
void SMESHGUI_GroupOpDlg::Init()
|
||||||
{
|
{
|
||||||
mySelectionMgr = theSelection;
|
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
||||||
SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI();
|
|
||||||
aSMESHGUI->SetActiveDialogBox((QDialog*)this);
|
|
||||||
myFocusWg = myEdit1;
|
myFocusWg = myEdit1;
|
||||||
|
|
||||||
myGroup1 = SMESH::SMESH_GroupBase::_nil();
|
myGroup1 = SMESH::SMESH_GroupBase::_nil();
|
||||||
@ -176,23 +179,19 @@ void SMESHGUI_GroupOpDlg::Init (SalomeApp_SelectionMgr* theSelection)
|
|||||||
|
|
||||||
// selection and SMESHGUI
|
// selection and SMESHGUI
|
||||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
|
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
|
||||||
connect(aSMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
|
||||||
connect(aSMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnClose()));
|
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(ClickOnClose()));
|
||||||
|
|
||||||
connect(myBtn1, SIGNAL(clicked()), this, SLOT(onFocusChanged()));
|
connect(myBtn1, SIGNAL(clicked()), this, SLOT(onFocusChanged()));
|
||||||
connect(myBtn2, SIGNAL(clicked()), this, SLOT(onFocusChanged()));
|
connect(myBtn2, SIGNAL(clicked()), this, SLOT(onFocusChanged()));
|
||||||
|
|
||||||
int x, y;
|
int x, y;
|
||||||
aSMESHGUI->DefineDlgPosition(this, x, y);
|
mySMESHGUI->DefineDlgPosition(this, x, y);
|
||||||
this->move(x, y);
|
this->move(x, y);
|
||||||
this->show();
|
this->show();
|
||||||
|
|
||||||
// set selection mode
|
// set selection mode
|
||||||
#ifdef NEW_GUI
|
myViewWindow->SetSelectionMode(ActorSelection);
|
||||||
mySelectionMgr->setSelectionModes(ActorSelection, true);
|
|
||||||
#else
|
|
||||||
mySelectionMgr->setSelectionModes(ActorSelection);
|
|
||||||
#endif
|
|
||||||
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
|
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -247,7 +246,7 @@ bool SMESHGUI_GroupOpDlg::isValid()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
bool SMESHGUI_GroupOpDlg::onApply()
|
bool SMESHGUI_GroupOpDlg::onApply()
|
||||||
{
|
{
|
||||||
if (!isValid() || SMESHGUI::GetSMESHGUI()->isActiveStudyLocked())
|
if (!isValid() || mySMESHGUI->isActiveStudyLocked())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
SMESH::SMESH_Mesh_ptr aMesh = myGroup1->GetMesh();
|
SMESH::SMESH_Mesh_ptr aMesh = myGroup1->GetMesh();
|
||||||
@ -259,7 +258,7 @@ bool SMESHGUI_GroupOpDlg::onApply()
|
|||||||
else aNewGrp = aMesh->CutGroups(myGroup1, myGroup2, aName.latin1());
|
else aNewGrp = aMesh->CutGroups(myGroup1, myGroup2, aName.latin1());
|
||||||
|
|
||||||
if (!aNewGrp->_is_nil()) {
|
if (!aNewGrp->_is_nil()) {
|
||||||
SMESHGUI::GetSMESHGUI()->updateObjBrowser(true);
|
mySMESHGUI->updateObjBrowser(true);
|
||||||
reset();
|
reset();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
@ -285,10 +284,10 @@ void SMESHGUI_GroupOpDlg::onOk()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_GroupOpDlg::onClose()
|
void SMESHGUI_GroupOpDlg::onClose()
|
||||||
{
|
{
|
||||||
mySelectionMgr->setSelectionModes(ActorSelection);
|
myViewWindow->SetSelectionMode(ActorSelection);
|
||||||
disconnect(mySelectionMgr, 0, this, 0);
|
disconnect(mySelectionMgr, 0, this, 0);
|
||||||
disconnect(SMESHGUI::GetSMESHGUI(), 0, this, 0);
|
disconnect(mySMESHGUI, 0, this, 0);
|
||||||
SMESHGUI::GetSMESHGUI()->ResetState();
|
mySMESHGUI->ResetState();
|
||||||
mySelectionMgr->clearFilters();
|
mySelectionMgr->clearFilters();
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
@ -342,13 +341,9 @@ void SMESHGUI_GroupOpDlg::onDeactivate()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_GroupOpDlg::enterEvent (QEvent*)
|
void SMESHGUI_GroupOpDlg::enterEvent (QEvent*)
|
||||||
{
|
{
|
||||||
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
mySMESHGUI->EmitSignalDeactivateDialog();
|
||||||
setEnabled(true);
|
setEnabled(true);
|
||||||
#ifdef NEW_GUI
|
myViewWindow->SetSelectionMode(ActorSelection);
|
||||||
mySelectionMgr->setSelectionModes(ActorSelection, true);
|
|
||||||
#else
|
|
||||||
mySelectionMgr->setSelectionModes(ActorSelection);
|
|
||||||
#endif
|
|
||||||
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
|
mySelectionMgr->installFilter(new SMESH_TypeFilter (GROUP));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,9 @@ class QFrame;
|
|||||||
class QPushButton;
|
class QPushButton;
|
||||||
class SalomeApp_SelectionMgr;
|
class SalomeApp_SelectionMgr;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
|
class SMESHGUI;
|
||||||
|
class SVTK_ViewWindow;
|
||||||
|
class SVTK_Selector;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : SMESHGUI_GroupOpDlg
|
Class : SMESHGUI_GroupOpDlg
|
||||||
@ -52,10 +55,10 @@ public:
|
|||||||
enum { UNION, INTERSECT, CUT };
|
enum { UNION, INTERSECT, CUT };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_GroupOpDlg( QWidget*, SalomeApp_SelectionMgr*, const int );
|
SMESHGUI_GroupOpDlg( SMESHGUI*, const int );
|
||||||
virtual ~SMESHGUI_GroupOpDlg();
|
virtual ~SMESHGUI_GroupOpDlg();
|
||||||
|
|
||||||
void Init( SalomeApp_SelectionMgr* ) ;
|
void Init();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
@ -91,8 +94,11 @@ private:
|
|||||||
QPushButton* myBtn1;
|
QPushButton* myBtn1;
|
||||||
QPushButton* myBtn2;
|
QPushButton* myBtn2;
|
||||||
|
|
||||||
|
SMESHGUI* mySMESHGUI;
|
||||||
SalomeApp_SelectionMgr* mySelectionMgr;
|
SalomeApp_SelectionMgr* mySelectionMgr;
|
||||||
int myMode;
|
int myMode;
|
||||||
|
SVTK_ViewWindow* myViewWindow;
|
||||||
|
SVTK_Selector* mySelector;
|
||||||
|
|
||||||
QLineEdit* myFocusWg;
|
QLineEdit* myFocusWg;
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ SMESHGUI_InitMeshDlg::SMESHGUI_InitMeshDlg (SMESHGUI* theModule, const char* nam
|
|||||||
mySMESHGUI( theModule ),
|
mySMESHGUI( theModule ),
|
||||||
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_InitMeshDlg");
|
setName("SMESHGUI_InitMeshDlg");
|
||||||
|
|
||||||
|
@ -83,8 +83,8 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char*
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_MERGE_NODES")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_MERGE_NODES")));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_MergeNodesDlg");
|
setName("SMESHGUI_MergeNodesDlg");
|
||||||
@ -247,7 +247,6 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char*
|
|||||||
|
|
||||||
myActor = 0;
|
myActor = 0;
|
||||||
|
|
||||||
mySMESHGUI = SMESHGUI::GetSMESHGUI();
|
|
||||||
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
||||||
|
|
||||||
myMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
|
myMeshOrSubMeshFilter = new SMESH_TypeFilter (MESHorSUBMESH);
|
||||||
|
@ -86,7 +86,7 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg (SMESHGUI* theModule,
|
|||||||
aTopLayout->setSpacing(6); aTopLayout->setMargin(11);
|
aTopLayout->setSpacing(6); aTopLayout->setMargin(11);
|
||||||
|
|
||||||
// select button & label
|
// select button & label
|
||||||
QPixmap image0(SMESHGUI::resourceMgr()->loadPixmap("SMESH",tr("ICON_SELECT")));
|
QPixmap image0(SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH",tr("ICON_SELECT")));
|
||||||
mySelectBtn = new QPushButton(this, "mySelectBtn");
|
mySelectBtn = new QPushButton(this, "mySelectBtn");
|
||||||
mySelectBtn->setPixmap(image0);
|
mySelectBtn->setPixmap(image0);
|
||||||
mySelectBtn->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
|
mySelectBtn->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
|
||||||
|
@ -136,13 +136,14 @@ SMESHGUI_MeshPatternDlg::SMESHGUI_MeshPatternDlg( SMESHGUI* theModule,
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
QFrame* SMESHGUI_MeshPatternDlg::createMainFrame (QWidget* theParent)
|
QFrame* SMESHGUI_MeshPatternDlg::createMainFrame (QWidget* theParent)
|
||||||
{
|
{
|
||||||
QPixmap iconSlct (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
QPixmap icon2d (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_PATTERN_2d")));
|
QPixmap iconSlct ( mgr->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
QPixmap icon3d (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_PATTERN_3d")));
|
QPixmap icon2d ( mgr->loadPixmap("SMESH", tr("ICON_PATTERN_2d")));
|
||||||
QPixmap iconOpen (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_FILE_OPEN")));
|
QPixmap icon3d ( mgr->loadPixmap("SMESH", tr("ICON_PATTERN_3d")));
|
||||||
|
QPixmap iconOpen ( mgr->loadPixmap("SMESH", tr("ICON_FILE_OPEN")));
|
||||||
|
|
||||||
QPixmap iconSample2d (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_PATTERN_SAMPLE_2D")));
|
QPixmap iconSample2d ( mgr->loadPixmap("SMESH", tr("ICON_PATTERN_SAMPLE_2D")));
|
||||||
QPixmap iconSample3d (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_PATTERN_SAMPLE_3D")));
|
QPixmap iconSample3d ( mgr->loadPixmap("SMESH", tr("ICON_PATTERN_SAMPLE_3D")));
|
||||||
|
|
||||||
QGroupBox* aMainGrp = new QGroupBox (1, Qt::Horizontal, theParent);
|
QGroupBox* aMainGrp = new QGroupBox (1, Qt::Horizontal, theParent);
|
||||||
aMainGrp->setFrameStyle(QFrame::NoFrame);
|
aMainGrp->setFrameStyle(QFrame::NoFrame);
|
||||||
@ -413,7 +414,7 @@ bool SMESHGUI_MeshPatternDlg::onApply()
|
|||||||
bool toCreatePolyedrs = myCreatePolyedrsChk->isChecked();
|
bool toCreatePolyedrs = myCreatePolyedrsChk->isChecked();
|
||||||
if ( myPattern->MakeMesh( myMesh, toCreatePolygons, toCreatePolyedrs ) ) {
|
if ( myPattern->MakeMesh( myMesh, toCreatePolygons, toCreatePolyedrs ) ) {
|
||||||
mySelectionMgr->clearSelected();
|
mySelectionMgr->clearSelected();
|
||||||
SUIT_ResourceMgr* mgr = SMESHGUI::resourceMgr();
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
bool autoUpdate = false;
|
bool autoUpdate = false;
|
||||||
if (mgr && mgr->stringValue("SMESH", "AutomaticUpdate").compare("true") == 0)
|
if (mgr && mgr->stringValue("SMESH", "AutomaticUpdate").compare("true") == 0)
|
||||||
autoUpdate = true;
|
autoUpdate = true;
|
||||||
|
@ -153,8 +153,8 @@ QFrame* SMESHGUI_MoveNodesDlg::createMainFrame (QWidget* theParent)
|
|||||||
{
|
{
|
||||||
QFrame* aFrame = new QFrame(theParent);
|
QFrame* aFrame = new QFrame(theParent);
|
||||||
|
|
||||||
QPixmap iconMoveNode (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
|
QPixmap iconMoveNode (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
|
||||||
QPixmap iconSelect (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap iconSelect (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
QButtonGroup* aPixGrp = new QButtonGroup(1, Qt::Vertical, tr("MESH_NODE"), aFrame);
|
QButtonGroup* aPixGrp = new QButtonGroup(1, Qt::Vertical, tr("MESH_NODE"), aFrame);
|
||||||
aPixGrp->setExclusive(TRUE);
|
aPixGrp->setExclusive(TRUE);
|
||||||
|
@ -141,7 +141,7 @@ QFrame* SMESHGUI_MultiEditDlg::createMainFrame (QWidget* theParent, const bool t
|
|||||||
aMainGrp->setFrameStyle(QFrame::NoFrame);
|
aMainGrp->setFrameStyle(QFrame::NoFrame);
|
||||||
aMainGrp->setInsideMargin(0);
|
aMainGrp->setInsideMargin(0);
|
||||||
|
|
||||||
QPixmap aPix (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap aPix (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
// "Selected cells" group
|
// "Selected cells" group
|
||||||
mySelGrp = new QGroupBox(1, Qt::Horizontal, aMainGrp);
|
mySelGrp = new QGroupBox(1, Qt::Horizontal, aMainGrp);
|
||||||
|
@ -237,7 +237,7 @@ SMESHGUI_NodesDlg::SMESHGUI_NodesDlg (SMESHGUI* theModule,
|
|||||||
{
|
{
|
||||||
mySimulation = new SMESH::TNodeSimulation(myViewWindow);
|
mySimulation = new SMESH::TNodeSimulation(myViewWindow);
|
||||||
|
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_NODE")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_NODE")));
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_NodesDlg");
|
setName("SMESHGUI_NodesDlg");
|
||||||
resize(303, 185);
|
resize(303, 185);
|
||||||
|
@ -29,7 +29,9 @@
|
|||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_VTKUtils.h"
|
#include "SMESHGUI_VTKUtils.h"
|
||||||
|
#include "SMESHGUI_Utils.h"
|
||||||
|
|
||||||
|
#include "SUIT_Desktop.h"
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include "SUIT_ResourceMgr.h"
|
||||||
|
|
||||||
#include <qgroupbox.h>
|
#include <qgroupbox.h>
|
||||||
@ -53,9 +55,10 @@
|
|||||||
// name : SMESHGUI_PrecisionDlg::SMESHGUI_PrecisionDlg
|
// name : SMESHGUI_PrecisionDlg::SMESHGUI_PrecisionDlg
|
||||||
// Purpose : Constructor
|
// Purpose : Constructor
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
SMESHGUI_PrecisionDlg::SMESHGUI_PrecisionDlg (QWidget* theParent)
|
SMESHGUI_PrecisionDlg::SMESHGUI_PrecisionDlg ( SMESHGUI* theModule )
|
||||||
: QDialog(theParent, "SMESHGUI_PrecisionDlg", true,
|
: QDialog( SMESH::GetDesktop( theModule ), "SMESHGUI_PrecisionDlg", true,
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
|
||||||
|
mySMESHGUI( theModule )
|
||||||
{
|
{
|
||||||
setCaption(tr("CAPTION"));
|
setCaption(tr("CAPTION"));
|
||||||
|
|
||||||
@ -129,7 +132,7 @@ void SMESHGUI_PrecisionDlg::Init()
|
|||||||
{
|
{
|
||||||
bool isOk = false;
|
bool isOk = false;
|
||||||
int aVal = DEFAULT_VAL;
|
int aVal = DEFAULT_VAL;
|
||||||
SUIT_ResourceMgr* mgr = SMESHGUI::resourceMgr();
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
if (mgr && mgr->hasValue("SMESH", "ControlsPrecision")) {
|
if (mgr && mgr->hasValue("SMESH", "ControlsPrecision")) {
|
||||||
QString aStr = mgr->stringValue("SMESH", "ControlsPrecision");
|
QString aStr = mgr->stringValue("SMESH", "ControlsPrecision");
|
||||||
aVal = aStr.toInt(&isOk);
|
aVal = aStr.toInt(&isOk);
|
||||||
@ -140,9 +143,8 @@ void SMESHGUI_PrecisionDlg::Init()
|
|||||||
|
|
||||||
onNotUse();
|
onNotUse();
|
||||||
|
|
||||||
SMESHGUI* aSMESHGUI = SMESHGUI::GetSMESHGUI();
|
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
||||||
aSMESHGUI->SetActiveDialogBox((QDialog*)this);
|
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
|
||||||
connect(aSMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -151,7 +153,7 @@ void SMESHGUI_PrecisionDlg::Init()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_PrecisionDlg::onOk()
|
void SMESHGUI_PrecisionDlg::onOk()
|
||||||
{
|
{
|
||||||
SUIT_ResourceMgr* mgr = SMESHGUI::resourceMgr();
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
if (myNotUseChk->isChecked()) {
|
if (myNotUseChk->isChecked()) {
|
||||||
if (mgr) {
|
if (mgr) {
|
||||||
mgr->remove("SMESH", "ControlsPrecision");
|
mgr->remove("SMESH", "ControlsPrecision");
|
||||||
@ -166,8 +168,8 @@ void SMESHGUI_PrecisionDlg::onOk()
|
|||||||
SMESH::SetControlsPrecision(aVal);
|
SMESH::SetControlsPrecision(aVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect(SMESHGUI::GetSMESHGUI(), 0, this, 0);
|
disconnect(mySMESHGUI, 0, this, 0);
|
||||||
SMESHGUI::GetSMESHGUI()->ResetState() ;
|
mySMESHGUI->ResetState() ;
|
||||||
accept();
|
accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -177,7 +179,7 @@ void SMESHGUI_PrecisionDlg::onOk()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_PrecisionDlg::onClose()
|
void SMESHGUI_PrecisionDlg::onClose()
|
||||||
{
|
{
|
||||||
disconnect(SMESHGUI::GetSMESHGUI(), 0, this, 0);
|
disconnect( mySMESHGUI, 0, this, 0);
|
||||||
reject();
|
reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ class QSpinBox;
|
|||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
class QFrame;
|
class QFrame;
|
||||||
|
class SMESHGUI;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Class : SMESHGUI_PrecisionDlg
|
Class : SMESHGUI_PrecisionDlg
|
||||||
@ -46,7 +47,7 @@ class SMESHGUI_PrecisionDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_PrecisionDlg( QWidget* parent );
|
SMESHGUI_PrecisionDlg( SMESHGUI* );
|
||||||
|
|
||||||
virtual ~SMESHGUI_PrecisionDlg();
|
virtual ~SMESHGUI_PrecisionDlg();
|
||||||
|
|
||||||
@ -65,7 +66,7 @@ private:
|
|||||||
void closeEvent( QCloseEvent* );
|
void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
SMESHGUI* mySMESHGUI;
|
||||||
QSpinBox* mySpinBox;
|
QSpinBox* mySpinBox;
|
||||||
QPushButton* myOKBtn;
|
QPushButton* myOKBtn;
|
||||||
QPushButton* myCancelBtn;
|
QPushButton* myCancelBtn;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include "SMESHGUI_Preferences_ColorDlg.h"
|
#include "SMESHGUI_Preferences_ColorDlg.h"
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
|
#include "SMESHGUI_Utils.h"
|
||||||
|
|
||||||
#include "utilities.h"
|
#include "utilities.h"
|
||||||
|
|
||||||
@ -44,6 +45,8 @@
|
|||||||
#include <qspinbox.h>
|
#include <qspinbox.h>
|
||||||
#include <qcolor.h>
|
#include <qcolor.h>
|
||||||
|
|
||||||
|
#include "SUIT_Desktop.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -53,10 +56,10 @@ using namespace std;
|
|||||||
// The dialog will by default be modeless, unless you
|
// The dialog will by default be modeless, unless you
|
||||||
// set'modal' to TRUE to construct a modal dialog.
|
// set'modal' to TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_Preferences_ColorDlg::SMESHGUI_Preferences_ColorDlg (QWidget* parent,
|
SMESHGUI_Preferences_ColorDlg::SMESHGUI_Preferences_ColorDlg( SMESHGUI* theModule, const char* name)
|
||||||
const char* name)
|
: QDialog( SMESH::GetDesktop( theModule ), name, true, WStyle_Customize |
|
||||||
: QDialog(parent, name, true, WStyle_Customize |
|
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
|
||||||
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
mySMESHGUI( theModule )
|
||||||
{
|
{
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_Preferences_ColorDlg");
|
setName("SMESHGUI_Preferences_ColorDlg");
|
||||||
@ -182,7 +185,6 @@ SMESHGUI_Preferences_ColorDlg::~SMESHGUI_Preferences_ColorDlg()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_Preferences_ColorDlg::Init()
|
void SMESHGUI_Preferences_ColorDlg::Init()
|
||||||
{
|
{
|
||||||
mySMESHGUI = SMESHGUI::GetSMESHGUI();
|
|
||||||
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
|
@ -53,7 +53,7 @@ class SMESHGUI_Preferences_ColorDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_Preferences_ColorDlg( QWidget* parent = 0, const char* name = 0 );
|
SMESHGUI_Preferences_ColorDlg( SMESHGUI*, const char* name = 0 );
|
||||||
~SMESHGUI_Preferences_ColorDlg();
|
~SMESHGUI_Preferences_ColorDlg();
|
||||||
|
|
||||||
void SetColor(int type, QColor color);
|
void SetColor(int type, QColor color);
|
||||||
|
@ -30,9 +30,11 @@
|
|||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_VTKUtils.h"
|
#include "SMESHGUI_VTKUtils.h"
|
||||||
|
#include "SMESHGUI_Utils.h"
|
||||||
|
|
||||||
#include "SMESH_Actor.h"
|
#include "SMESH_Actor.h"
|
||||||
|
|
||||||
|
#include "SUIT_Desktop.h"
|
||||||
#include "SUIT_ResourceMgr.h"
|
#include "SUIT_ResourceMgr.h"
|
||||||
|
|
||||||
#include "SalomeApp_SelectionMgr.h"
|
#include "SalomeApp_SelectionMgr.h"
|
||||||
@ -83,11 +85,10 @@ SMESHGUI_Preferences_ScalarBarDlg* SMESHGUI_Preferences_ScalarBarDlg::myDlg = 0;
|
|||||||
* Gets the only instance of "Scalar Bar Properties" dialog box
|
* Gets the only instance of "Scalar Bar Properties" dialog box
|
||||||
*/
|
*/
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
void SMESHGUI_Preferences_ScalarBarDlg::ScalarBarProperties (QWidget* parent,
|
void SMESHGUI_Preferences_ScalarBarDlg::ScalarBarProperties( SMESHGUI* theModule )
|
||||||
SalomeApp_SelectionMgr* Sel)
|
|
||||||
{
|
{
|
||||||
if (!myDlg) {
|
if (!myDlg) {
|
||||||
myDlg = new SMESHGUI_Preferences_ScalarBarDlg (parent, Sel, false);
|
myDlg = new SMESHGUI_Preferences_ScalarBarDlg( theModule, false);
|
||||||
myDlg->show();
|
myDlg->show();
|
||||||
} else {
|
} else {
|
||||||
myDlg->show();
|
myDlg->show();
|
||||||
@ -104,10 +105,10 @@ void SMESHGUI_Preferences_ScalarBarDlg::ScalarBarProperties (QWidget* parent,
|
|||||||
* Opens "Scalar Bar Preferences" dialog box
|
* Opens "Scalar Bar Preferences" dialog box
|
||||||
*/
|
*/
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
void SMESHGUI_Preferences_ScalarBarDlg::ScalarBarPreferences (QWidget* parent)
|
void SMESHGUI_Preferences_ScalarBarDlg::ScalarBarPreferences( SMESHGUI* theModule )
|
||||||
{
|
{
|
||||||
SMESHGUI_Preferences_ScalarBarDlg* aDlg =
|
SMESHGUI_Preferences_ScalarBarDlg* aDlg =
|
||||||
new SMESHGUI_Preferences_ScalarBarDlg (parent, 0, true);
|
new SMESHGUI_Preferences_ScalarBarDlg( theModule, true);
|
||||||
aDlg->exec();
|
aDlg->exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,17 +119,16 @@ void SMESHGUI_Preferences_ScalarBarDlg::ScalarBarPreferences (QWidget* parent)
|
|||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg (QWidget* parent,
|
SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI* theModule, bool property, bool modal )
|
||||||
SalomeApp_SelectionMgr* Sel,
|
: QDialog( SMESH::GetDesktop( theModule ), 0, modal, WStyle_Customize | WStyle_NormalBorder |
|
||||||
bool modal)
|
WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
||||||
: QDialog(parent, 0, modal, WStyle_Customize | WStyle_NormalBorder |
|
mySMESHGUI( theModule ),
|
||||||
WStyle_Title | WStyle_SysMenu | WDestructiveClose)
|
mySelectionMgr( property ? SMESH::GetSelectionMgr( theModule ) : 0 )
|
||||||
{
|
{
|
||||||
setName("SMESHGUI_Preferences_ScalarBarDlg");
|
setName("SMESHGUI_Preferences_ScalarBarDlg");
|
||||||
setCaption(Sel ? tr("SMESH_PROPERTIES_SCALARBAR") : tr("SMESH_PREFERENCES_SCALARBAR"));
|
setCaption( property ? tr("SMESH_PROPERTIES_SCALARBAR") : tr("SMESH_PREFERENCES_SCALARBAR"));
|
||||||
setSizeGripEnabled(TRUE);
|
setSizeGripEnabled(TRUE);
|
||||||
|
|
||||||
mySelectionMgr = Sel;
|
|
||||||
myActor = 0;
|
myActor = 0;
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
@ -326,7 +326,7 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg (QWidget* p
|
|||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
// Init
|
// Init
|
||||||
// --> first init from preferences
|
// --> first init from preferences
|
||||||
SUIT_ResourceMgr* mgr = SMESHGUI::resourceMgr();
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
|
|
||||||
QColor titleColor (255, 255, 255);
|
QColor titleColor (255, 255, 255);
|
||||||
if (mgr && mgr->hasValue("SMESH", "ScalarBarTitleColor")) {
|
if (mgr && mgr->hasValue("SMESH", "ScalarBarTitleColor")) {
|
||||||
@ -429,7 +429,7 @@ SMESHGUI_Preferences_ScalarBarDlg::SMESHGUI_Preferences_ScalarBarDlg (QWidget* p
|
|||||||
connect( myApplyBtn, SIGNAL( clicked() ), this, SLOT( onApply() ) );
|
connect( myApplyBtn, SIGNAL( clicked() ), this, SLOT( onApply() ) );
|
||||||
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
|
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
|
||||||
}
|
}
|
||||||
connect( SMESHGUI::GetSMESHGUI(), SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onCancel() ) ) ;
|
connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onCancel() ) ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================================
|
//=================================================================================================
|
||||||
@ -517,7 +517,7 @@ bool SMESHGUI_Preferences_ScalarBarDlg::onApply()
|
|||||||
SMESH::RepaintCurrentView();
|
SMESH::RepaintCurrentView();
|
||||||
} else {
|
} else {
|
||||||
// Scalar Bar preferences
|
// Scalar Bar preferences
|
||||||
SUIT_ResourceMgr* mgr = SMESHGUI::resourceMgr();
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
if (!mgr) return false;
|
if (!mgr) return false;
|
||||||
|
|
||||||
QColor titleColor = myTitleColorBtn->paletteBackgroundColor();
|
QColor titleColor = myTitleColorBtn->paletteBackgroundColor();
|
||||||
|
@ -41,6 +41,7 @@ class QPushButton;
|
|||||||
class QToolButton;
|
class QToolButton;
|
||||||
class QRadioButton;
|
class QRadioButton;
|
||||||
class QSpinBox;
|
class QSpinBox;
|
||||||
|
class SMESHGUI;
|
||||||
|
|
||||||
class QtxDblSpinBox;
|
class QtxDblSpinBox;
|
||||||
|
|
||||||
@ -54,11 +55,11 @@ class SMESHGUI_Preferences_ScalarBarDlg : public QDialog
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
~SMESHGUI_Preferences_ScalarBarDlg();
|
~SMESHGUI_Preferences_ScalarBarDlg();
|
||||||
static void ScalarBarPreferences( QWidget* parent );
|
static void ScalarBarPreferences( SMESHGUI* );
|
||||||
static void ScalarBarProperties ( QWidget* parent, SalomeApp_SelectionMgr* Sel );
|
static void ScalarBarProperties ( SMESHGUI* );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SMESHGUI_Preferences_ScalarBarDlg( QWidget* parent = 0, SalomeApp_SelectionMgr* Sel = 0, bool modal = FALSE );
|
SMESHGUI_Preferences_ScalarBarDlg( SMESHGUI*, bool, bool modal = FALSE );
|
||||||
static SMESHGUI_Preferences_ScalarBarDlg* myDlg;
|
static SMESHGUI_Preferences_ScalarBarDlg* myDlg;
|
||||||
void closeEvent( QCloseEvent* e );
|
void closeEvent( QCloseEvent* e );
|
||||||
void setOriginAndSize( const double x, const double y, const double w, const double h );
|
void setOriginAndSize( const double x, const double y, const double w, const double h );
|
||||||
@ -74,6 +75,7 @@ protected slots:
|
|||||||
void onOrientationChanged();
|
void onOrientationChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
SMESHGUI* mySMESHGUI;
|
||||||
SalomeApp_SelectionMgr* mySelectionMgr;
|
SalomeApp_SelectionMgr* mySelectionMgr;
|
||||||
SMESH_Actor* myActor;
|
SMESH_Actor* myActor;
|
||||||
double myIniX, myIniY, myIniW, myIniH;
|
double myIniX, myIniY, myIniW, myIniH;
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
#include "SMESHGUI_Preferences_SelectionDlg.h"
|
#include "SMESHGUI_Preferences_SelectionDlg.h"
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
|
|
||||||
|
#include "SMESHGUI_Utils.h"
|
||||||
|
|
||||||
|
#include "SUIT_Desktop.h"
|
||||||
|
|
||||||
#include <qgroupbox.h>
|
#include <qgroupbox.h>
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
@ -105,8 +109,9 @@ void SMESHGUI_DoubleValidator::fixup(QString& theText) const
|
|||||||
// class : SMESHGUI_Preferences_SelectionDlg()
|
// class : SMESHGUI_Preferences_SelectionDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_Preferences_SelectionDlg::SMESHGUI_Preferences_SelectionDlg( QWidget* parent, const char* name )
|
SMESHGUI_Preferences_SelectionDlg::SMESHGUI_Preferences_SelectionDlg( SMESHGUI* theModule, const char* name )
|
||||||
: QDialog( parent, name, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu )
|
: QDialog( SMESH::GetDesktop( theModule ), name, true, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu ),
|
||||||
|
mySMESHGUI( theModule )
|
||||||
{
|
{
|
||||||
if ( !name ) setName( "SMESHGUI_Preferences_SelectionDlg" );
|
if ( !name ) setName( "SMESHGUI_Preferences_SelectionDlg" );
|
||||||
setCaption( tr( "SMESH_PREF_SELECTION" ) );
|
setCaption( tr( "SMESH_PREF_SELECTION" ) );
|
||||||
@ -203,7 +208,7 @@ SMESHGUI_Preferences_SelectionDlg::SMESHGUI_Preferences_SelectionDlg( QWidget* p
|
|||||||
|
|
||||||
/* Move widget on the botton right corner of main widget */
|
/* Move widget on the botton right corner of main widget */
|
||||||
int x, y ;
|
int x, y ;
|
||||||
SMESHGUI::GetSMESHGUI()->DefineDlgPosition(this, x, y);
|
mySMESHGUI->DefineDlgPosition(this, x, y);
|
||||||
this->move(x, y);
|
this->move(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QSpinBox;
|
class QSpinBox;
|
||||||
class QColor;
|
class QColor;
|
||||||
|
class SMESHGUI;
|
||||||
|
|
||||||
class SMESHGUI_LineEdit : public QLineEdit
|
class SMESHGUI_LineEdit : public QLineEdit
|
||||||
{
|
{
|
||||||
@ -72,7 +73,7 @@ class SMESHGUI_Preferences_SelectionDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_Preferences_SelectionDlg( QWidget* parent = 0, const char* name = 0 );
|
SMESHGUI_Preferences_SelectionDlg( SMESHGUI*, const char* name = 0 );
|
||||||
~SMESHGUI_Preferences_SelectionDlg();
|
~SMESHGUI_Preferences_SelectionDlg();
|
||||||
|
|
||||||
void SetColor(int type, QColor color);
|
void SetColor(int type, QColor color);
|
||||||
@ -89,6 +90,7 @@ private slots:
|
|||||||
void onSelectColor();
|
void onSelectColor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
SMESHGUI* mySMESHGUI;
|
||||||
QPushButton* myColor[3];
|
QPushButton* myColor[3];
|
||||||
QSpinBox* myWidth[2];
|
QSpinBox* myWidth[2];
|
||||||
QLineEdit* myPrecision[2];
|
QLineEdit* myPrecision[2];
|
||||||
|
@ -86,8 +86,8 @@ SMESHGUI_RemoveElementsDlg
|
|||||||
mySMESHGUI(theModule),
|
mySMESHGUI(theModule),
|
||||||
myBusy(false)
|
myBusy(false)
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_REM_ELEMENT")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_REM_ELEMENT")));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_RemoveElementsDlg");
|
setName("SMESHGUI_RemoveElementsDlg");
|
||||||
|
@ -86,8 +86,8 @@ SMESHGUI_RemoveNodesDlg
|
|||||||
mySMESHGUI(theModule),
|
mySMESHGUI(theModule),
|
||||||
myBusy(false)
|
myBusy(false)
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_REM_NODE")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_REM_NODE")));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_RemoveNodesDlg");
|
setName("SMESHGUI_RemoveNodesDlg");
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "SMESH_TypeFilter.hxx"
|
#include "SMESH_TypeFilter.hxx"
|
||||||
#include "SMDS_Mesh.hxx"
|
#include "SMDS_Mesh.hxx"
|
||||||
|
|
||||||
|
#include "SUIT_Desktop.h"
|
||||||
#include "SUIT_Session.h"
|
#include "SUIT_Session.h"
|
||||||
|
|
||||||
#include "SALOME_ListIO.hxx"
|
#include "SALOME_ListIO.hxx"
|
||||||
@ -59,11 +60,12 @@ using namespace std;
|
|||||||
// class : SMESHGUI_RenumberingDlg()
|
// class : SMESHGUI_RenumberingDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_RenumberingDlg::SMESHGUI_RenumberingDlg (QWidget* parent, const char* name,
|
SMESHGUI_RenumberingDlg::SMESHGUI_RenumberingDlg( SMESHGUI* theModule, const char* name,
|
||||||
SalomeApp_SelectionMgr* Sel,
|
|
||||||
const int unit, bool modal, WFlags fl)
|
const int unit, bool modal, WFlags fl)
|
||||||
: QDialog(parent, name, modal, WStyle_Customize | WStyle_NormalBorder |
|
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
|
||||||
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose)
|
WStyle_Title | WStyle_SysMenu | Qt::WDestructiveClose),
|
||||||
|
mySMESHGUI( theModule ),
|
||||||
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
||||||
{
|
{
|
||||||
myUnit = unit;
|
myUnit = unit;
|
||||||
|
|
||||||
@ -170,7 +172,7 @@ SMESHGUI_RenumberingDlg::SMESHGUI_RenumberingDlg (QWidget* parent, const char* n
|
|||||||
GroupMeshLayout->addWidget(LineEditMesh, 0, 2);
|
GroupMeshLayout->addWidget(LineEditMesh, 0, 2);
|
||||||
SMESHGUI_RenumberingDlgLayout->addWidget(GroupMesh, 1, 0);
|
SMESHGUI_RenumberingDlgLayout->addWidget(GroupMesh, 1, 0);
|
||||||
|
|
||||||
Init(Sel); /* Initialisations */
|
Init(); /* Initialisations */
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -186,13 +188,11 @@ SMESHGUI_RenumberingDlg::~SMESHGUI_RenumberingDlg()
|
|||||||
// function : Init()
|
// function : Init()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_RenumberingDlg::Init (SalomeApp_SelectionMgr* Sel)
|
void SMESHGUI_RenumberingDlg::Init()
|
||||||
{
|
{
|
||||||
GroupMesh->show();
|
GroupMesh->show();
|
||||||
myConstructorId = 0;
|
myConstructorId = 0;
|
||||||
Constructor1->setChecked(TRUE);
|
Constructor1->setChecked(TRUE);
|
||||||
mySelectionMgr = Sel;
|
|
||||||
mySMESHGUI = SMESHGUI::GetSMESHGUI();
|
|
||||||
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
||||||
|
|
||||||
myMesh = SMESH::SMESH_Mesh::_nil();
|
myMesh = SMESH::SMESH_Mesh::_nil();
|
||||||
|
@ -60,17 +60,15 @@ class SMESHGUI_RenumberingDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_RenumberingDlg (QWidget* parent = 0,
|
SMESHGUI_RenumberingDlg( SMESHGUI*,
|
||||||
const char* name = 0,
|
const char* name = 0,
|
||||||
SalomeApp_SelectionMgr* Sel = 0,
|
|
||||||
const int unit = 0,
|
const int unit = 0,
|
||||||
bool modal = FALSE,
|
bool modal = FALSE,
|
||||||
WFlags fl = 0);
|
WFlags fl = 0);
|
||||||
~SMESHGUI_RenumberingDlg();
|
~SMESHGUI_RenumberingDlg();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void Init();
|
||||||
void Init( SalomeApp_SelectionMgr* Sel ) ;
|
|
||||||
void closeEvent( QCloseEvent* e ) ;
|
void closeEvent( QCloseEvent* e ) ;
|
||||||
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
|
void enterEvent ( QEvent * ) ; /* mouse enter the QWidget */
|
||||||
void hideEvent ( QHideEvent * ); /* ESC key */
|
void hideEvent ( QHideEvent * ); /* ESC key */
|
||||||
|
@ -87,9 +87,10 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char*
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
|
QPixmap image0 ( mgr->loadPixmap("SMESH", tr("ICON_DLG_EDGE")));
|
||||||
QPixmap image2 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image1 ( mgr->loadPixmap("SMESH", tr("ICON_DLG_TRIANGLE")));
|
||||||
|
QPixmap image2 ( mgr->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_RevolutionDlg");
|
setName("SMESHGUI_RevolutionDlg");
|
||||||
|
@ -86,8 +86,8 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_ROTATION")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_ROTATION")));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_RotationDlg");
|
setName("SMESHGUI_RotationDlg");
|
||||||
|
@ -79,11 +79,12 @@ SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule, const char* name,
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_FREEBORDERS")));
|
SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI );
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_CONFORM_FREEBORDERS")));
|
QPixmap image0 (mgr->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_FREEBORDERS")));
|
||||||
QPixmap image2 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_BORDERTOSIDE")));
|
QPixmap image1 (mgr->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_CONFORM_FREEBORDERS")));
|
||||||
QPixmap image3 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_SIDEELEMENTS")));
|
QPixmap image2 (mgr->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_BORDERTOSIDE")));
|
||||||
QPixmap image4 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image3 (mgr->loadPixmap("SMESH", tr("ICON_SMESH_SEWING_SIDEELEMENTS")));
|
||||||
|
QPixmap image4 (mgr->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_SewingDlg");
|
setName("SMESHGUI_SewingDlg");
|
||||||
|
@ -137,7 +137,7 @@ QFrame* SMESHGUI_SingleEditDlg::createMainFrame (QWidget* theParent)
|
|||||||
{
|
{
|
||||||
QGroupBox* aMainGrp = new QGroupBox(1, Qt::Vertical, tr("EDGE_BETWEEN"), theParent);
|
QGroupBox* aMainGrp = new QGroupBox(1, Qt::Vertical, tr("EDGE_BETWEEN"), theParent);
|
||||||
|
|
||||||
QPixmap aPix (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap aPix (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
new QLabel(tr("SMESH_EDGE"), aMainGrp);
|
new QLabel(tr("SMESH_EDGE"), aMainGrp);
|
||||||
(new QPushButton(aMainGrp))->setPixmap(aPix);
|
(new QPushButton(aMainGrp))->setPixmap(aPix);
|
||||||
|
@ -93,8 +93,8 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule, const char* n
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_SMOOTHING")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_SMOOTHING")));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_SmoothingDlg");
|
setName("SMESHGUI_SmoothingDlg");
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "SALOMEDSClient_Study.hxx"
|
#include "SALOMEDSClient_Study.hxx"
|
||||||
#include "SALOMEDSClient_SObject.hxx"
|
#include "SALOMEDSClient_SObject.hxx"
|
||||||
|
|
||||||
|
#include "SUIT_Desktop.h"
|
||||||
#include "SUIT_Session.h"
|
#include "SUIT_Session.h"
|
||||||
#include "SUIT_OverrideCursor.h"
|
#include "SUIT_OverrideCursor.h"
|
||||||
|
|
||||||
@ -71,10 +72,12 @@ using namespace std;
|
|||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg (QWidget* parent, const char* name,
|
SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg( SMESHGUI* theModule, const char* name,
|
||||||
bool modal, WFlags fl)
|
bool modal, WFlags fl)
|
||||||
: QDialog(parent, name, modal, WStyle_Customize | WStyle_NormalBorder |
|
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
|
||||||
WStyle_Title | WStyle_SysMenu | WDestructiveClose)
|
WStyle_Title | WStyle_SysMenu | WDestructiveClose),
|
||||||
|
mySMESHGUI( theModule ),
|
||||||
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) )
|
||||||
{
|
{
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_StandardMeshInfosDlg");
|
setName("SMESHGUI_StandardMeshInfosDlg");
|
||||||
@ -150,20 +153,19 @@ SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg (QWidget* parent, c
|
|||||||
|
|
||||||
aDlgLayout->addWidget(myButtonsGroup, 2, 0);
|
aDlgLayout->addWidget(myButtonsGroup, 2, 0);
|
||||||
|
|
||||||
mySelectionMgr = SMESHGUI::selectionMgr();
|
mySMESHGUI->SetActiveDialogBox(this);
|
||||||
SMESHGUI::GetSMESHGUI()->SetActiveDialogBox(this);
|
|
||||||
|
|
||||||
// connect signals
|
// connect signals
|
||||||
connect(myOkBtn, SIGNAL(clicked()), this, SLOT(close()));
|
connect( myOkBtn, SIGNAL(clicked()), this, SLOT(close()));
|
||||||
connect(mySelectBtn, SIGNAL(clicked()), this, SLOT(onStartSelection()));
|
connect( mySelectBtn, SIGNAL(clicked()), this, SLOT(onStartSelection()));
|
||||||
connect(SMESHGUI::GetSMESHGUI(), SIGNAL(SignalCloseAllDialogs()), this, SLOT(close()));
|
connect( mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(close()));
|
||||||
connect(SMESHGUI::GetSMESHGUI(), SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
connect( mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
|
||||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
|
connect( mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
|
||||||
|
|
||||||
// resize and move dialog, then show
|
// resize and move dialog, then show
|
||||||
this->setMinimumSize(270, 428);
|
this->setMinimumSize(270, 428);
|
||||||
int x, y;
|
int x, y;
|
||||||
SMESHGUI::GetSMESHGUI()->DefineDlgPosition(this, x, y);
|
mySMESHGUI->DefineDlgPosition(this, x, y);
|
||||||
this->move(x, y);
|
this->move(x, y);
|
||||||
this->show();
|
this->show();
|
||||||
|
|
||||||
@ -394,7 +396,7 @@ void SMESHGUI_StandardMeshInfosDlg::onSelectionChanged()
|
|||||||
void SMESHGUI_StandardMeshInfosDlg::closeEvent (QCloseEvent* e)
|
void SMESHGUI_StandardMeshInfosDlg::closeEvent (QCloseEvent* e)
|
||||||
{
|
{
|
||||||
mySelectionMgr->clearFilters();
|
mySelectionMgr->clearFilters();
|
||||||
SMESHGUI::GetSMESHGUI()->ResetState();
|
mySMESHGUI->ResetState();
|
||||||
QDialog::closeEvent(e);
|
QDialog::closeEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,7 +428,7 @@ void SMESHGUI_StandardMeshInfosDlg::DeactivateActiveDialog()
|
|||||||
void SMESHGUI_StandardMeshInfosDlg::ActivateThisDialog()
|
void SMESHGUI_StandardMeshInfosDlg::ActivateThisDialog()
|
||||||
{
|
{
|
||||||
/* Emit a signal to deactivate any active dialog */
|
/* Emit a signal to deactivate any active dialog */
|
||||||
SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
|
mySMESHGUI->EmitSignalDeactivateDialog();
|
||||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
|
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,13 +41,15 @@ class QPushButton;
|
|||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
class QTextBrowser;
|
class QTextBrowser;
|
||||||
class SalomeApp_SelectionMgr;
|
class SalomeApp_SelectionMgr;
|
||||||
|
class SMESHGUI;
|
||||||
|
|
||||||
|
|
||||||
class SMESHGUI_StandardMeshInfosDlg : public QDialog
|
class SMESHGUI_StandardMeshInfosDlg : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_StandardMeshInfosDlg( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
SMESHGUI_StandardMeshInfosDlg( SMESHGUI*, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||||
~SMESHGUI_StandardMeshInfosDlg();
|
~SMESHGUI_StandardMeshInfosDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -62,6 +64,7 @@ private slots:
|
|||||||
void onStartSelection();
|
void onStartSelection();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
SMESHGUI* mySMESHGUI;
|
||||||
SalomeApp_SelectionMgr* mySelectionMgr;
|
SalomeApp_SelectionMgr* mySelectionMgr;
|
||||||
bool myStartSelection;
|
bool myStartSelection;
|
||||||
bool myIsActiveWindow;
|
bool myIsActiveWindow;
|
||||||
|
@ -86,10 +86,10 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_POINT")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_POINT")));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_AXIS")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_AXIS")));
|
||||||
QPixmap image2 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_PLANE")));
|
QPixmap image2 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_SYMMETRY_PLANE")));
|
||||||
QPixmap image3 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image3 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_SymmetryDlg");
|
setName("SMESHGUI_SymmetryDlg");
|
||||||
|
@ -87,9 +87,9 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha
|
|||||||
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
myViewWindow( SMESH::GetViewWindow( theModule ) ),
|
||||||
mySelector( myViewWindow->GetSelector() )
|
mySelector( myViewWindow->GetSelector() )
|
||||||
{
|
{
|
||||||
QPixmap image0 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_TRANSLATION_POINTS")));
|
QPixmap image0 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_TRANSLATION_POINTS")));
|
||||||
QPixmap image1 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SMESH_TRANSLATION_VECTOR")));
|
QPixmap image1 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SMESH_TRANSLATION_VECTOR")));
|
||||||
QPixmap image2 (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
|
QPixmap image2 (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
|
||||||
|
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_TranslationDlg");
|
setName("SMESHGUI_TranslationDlg");
|
||||||
|
@ -30,9 +30,10 @@
|
|||||||
|
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_VTKUtils.h"
|
#include "SMESHGUI_VTKUtils.h"
|
||||||
|
#include "SMESHGUI_Utils.h"
|
||||||
#include "SMESH_Actor.h"
|
#include "SMESH_Actor.h"
|
||||||
|
|
||||||
|
#include "SUIT_Desktop.h"
|
||||||
#include "SUIT_OverrideCursor.h"
|
#include "SUIT_OverrideCursor.h"
|
||||||
|
|
||||||
#include "SALOME_ListIO.hxx"
|
#include "SALOME_ListIO.hxx"
|
||||||
@ -58,12 +59,15 @@ using namespace std;
|
|||||||
// purpose :
|
// purpose :
|
||||||
//
|
//
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg (QWidget* parent,
|
SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule,
|
||||||
const char* name,
|
const char* name,
|
||||||
bool modal,
|
bool modal,
|
||||||
WFlags fl)
|
WFlags fl)
|
||||||
: QDialog(parent, name, modal, WStyle_Customize | WStyle_NormalBorder |
|
: QDialog( SMESH::GetDesktop( theModule ), name, modal, WStyle_Customize | WStyle_NormalBorder |
|
||||||
WStyle_Title | WStyle_SysMenu | WDestructiveClose)
|
WStyle_Title | WStyle_SysMenu | WDestructiveClose ),
|
||||||
|
mySMESHGUI( theModule ),
|
||||||
|
mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ),
|
||||||
|
myViewWindow( SMESH::GetViewWindow( theModule ) )
|
||||||
{
|
{
|
||||||
if (!name)
|
if (!name)
|
||||||
setName("SMESHGUI_TransparencyDlg");
|
setName("SMESHGUI_TransparencyDlg");
|
||||||
@ -132,8 +136,6 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg (QWidget* parent,
|
|||||||
SMESHGUI_TransparencyDlgLayout->addWidget(GroupC1, 0, 0);
|
SMESHGUI_TransparencyDlgLayout->addWidget(GroupC1, 0, 0);
|
||||||
SMESHGUI_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
|
SMESHGUI_TransparencyDlgLayout->addWidget(GroupButtons, 1, 0);
|
||||||
|
|
||||||
mySelectionMgr = SMESHGUI::selectionMgr();
|
|
||||||
|
|
||||||
// Initial state
|
// Initial state
|
||||||
this->onSelectionChanged();
|
this->onSelectionChanged();
|
||||||
|
|
||||||
@ -141,12 +143,12 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg (QWidget* parent,
|
|||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||||
connect(Slider1, SIGNAL(valueChanged(int)), this, SLOT(SetTransparency()));
|
connect(Slider1, SIGNAL(valueChanged(int)), this, SLOT(SetTransparency()));
|
||||||
connect(Slider1, SIGNAL(sliderMoved(int)), this, SLOT(ValueHasChanged()));
|
connect(Slider1, SIGNAL(sliderMoved(int)), this, SLOT(ValueHasChanged()));
|
||||||
connect(SMESHGUI::GetSMESHGUI(), SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnOk()));
|
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnOk()));
|
||||||
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
|
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
|
||||||
|
|
||||||
/* Move widget on the botton right corner of main widget */
|
/* Move widget on the botton right corner of main widget */
|
||||||
int x, y;
|
int x, y;
|
||||||
SMESHGUI::GetSMESHGUI()->DefineDlgPosition(this, x, y);
|
mySMESHGUI->DefineDlgPosition(this, x, y);
|
||||||
this->move(x, y);
|
this->move(x, y);
|
||||||
this->show();
|
this->show();
|
||||||
}
|
}
|
||||||
@ -176,7 +178,7 @@ void SMESHGUI_TransparencyDlg::ClickOnOk()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_TransparencyDlg::SetTransparency()
|
void SMESHGUI_TransparencyDlg::SetTransparency()
|
||||||
{
|
{
|
||||||
if (SVTK_ViewWindow* aVTKViewWindow = SMESH::GetCurrentVtkView()) {
|
if( myViewWindow ) {
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
float opacity = this->Slider1->value() / 100.;
|
float opacity = this->Slider1->value() / 100.;
|
||||||
|
|
||||||
@ -190,7 +192,7 @@ void SMESHGUI_TransparencyDlg::SetTransparency()
|
|||||||
if (anActor)
|
if (anActor)
|
||||||
anActor->SetOpacity(opacity);
|
anActor->SetOpacity(opacity);
|
||||||
}
|
}
|
||||||
aVTKViewWindow->Repaint();
|
myViewWindow->Repaint();
|
||||||
}
|
}
|
||||||
ValueHasChanged();
|
ValueHasChanged();
|
||||||
}
|
}
|
||||||
@ -210,7 +212,7 @@ void SMESHGUI_TransparencyDlg::ValueHasChanged()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void SMESHGUI_TransparencyDlg::onSelectionChanged()
|
void SMESHGUI_TransparencyDlg::onSelectionChanged()
|
||||||
{
|
{
|
||||||
if (SVTK_ViewWindow* aVTKViewWindow = SMESH::GetCurrentVtkView()) {
|
if( myViewWindow ) {
|
||||||
int opacity = 100;
|
int opacity = 100;
|
||||||
|
|
||||||
SALOME_ListIO aList;
|
SALOME_ListIO aList;
|
||||||
|
@ -36,6 +36,9 @@ class QLabel;
|
|||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QSlider;
|
class QSlider;
|
||||||
class SalomeApp_SelectionMgr;
|
class SalomeApp_SelectionMgr;
|
||||||
|
class SVTK_Selector;
|
||||||
|
class SVTK_ViewWindow;
|
||||||
|
class SMESHGUI;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : SMESHGUI_TransparencyDlg
|
// class : SMESHGUI_TransparencyDlg
|
||||||
@ -46,7 +49,7 @@ class SMESHGUI_TransparencyDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_TransparencyDlg( QWidget* parent = 0,
|
SMESHGUI_TransparencyDlg( SMESHGUI*,
|
||||||
const char* name = 0,
|
const char* name = 0,
|
||||||
bool modal = false,
|
bool modal = false,
|
||||||
WFlags fl = 0 );
|
WFlags fl = 0 );
|
||||||
@ -55,7 +58,9 @@ public:
|
|||||||
|
|
||||||
private :
|
private :
|
||||||
|
|
||||||
|
SMESHGUI* mySMESHGUI;
|
||||||
SalomeApp_SelectionMgr* mySelectionMgr;
|
SalomeApp_SelectionMgr* mySelectionMgr;
|
||||||
|
SVTK_ViewWindow* myViewWindow;
|
||||||
|
|
||||||
QPushButton* buttonOk;
|
QPushButton* buttonOk;
|
||||||
QLabel* TextLabelOpaque;
|
QLabel* TextLabelOpaque;
|
||||||
|
@ -56,6 +56,11 @@ namespace SMESH{
|
|||||||
return theModule->getApp()->selectionMgr();
|
return theModule->getApp()->selectionMgr();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SUIT_ResourceMgr*
|
||||||
|
GetResourceMgr( const SalomeApp_Module* )
|
||||||
|
{
|
||||||
|
return SUIT_Session::session()->resourceMgr();
|
||||||
|
}
|
||||||
|
|
||||||
_PTR(Study)
|
_PTR(Study)
|
||||||
GetCStudy(const SalomeApp_Study* theStudy)
|
GetCStudy(const SalomeApp_Study* theStudy)
|
||||||
|
@ -31,6 +31,7 @@ class QString;
|
|||||||
class SUIT_ViewWindow;
|
class SUIT_ViewWindow;
|
||||||
class SUIT_Desktop;
|
class SUIT_Desktop;
|
||||||
class SUIT_Study;
|
class SUIT_Study;
|
||||||
|
class SUIT_ResourceMgr;
|
||||||
|
|
||||||
class CAM_Module;
|
class CAM_Module;
|
||||||
|
|
||||||
@ -52,6 +53,9 @@ namespace SMESH {
|
|||||||
SalomeApp_Study*
|
SalomeApp_Study*
|
||||||
GetAppStudy(const CAM_Module* theModule);
|
GetAppStudy(const CAM_Module* theModule);
|
||||||
|
|
||||||
|
SUIT_ResourceMgr*
|
||||||
|
GetResourceMgr( const SalomeApp_Module* );
|
||||||
|
|
||||||
_PTR(Study)
|
_PTR(Study)
|
||||||
GetCStudy(const SalomeApp_Study* theStudy);
|
GetCStudy(const SalomeApp_Study* theStudy);
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "SMESHGUI_aParameter.h"
|
#include "SMESHGUI_aParameter.h"
|
||||||
#include "SMESHGUI.h"
|
#include "SMESHGUI.h"
|
||||||
#include "SMESHGUI_SpinBox.h"
|
#include "SMESHGUI_SpinBox.h"
|
||||||
|
#include "SMESHGUI_Utils.h"
|
||||||
|
|
||||||
#include "SUIT_Tools.h"
|
#include "SUIT_Tools.h"
|
||||||
#include "SUIT_Desktop.h"
|
#include "SUIT_Desktop.h"
|
||||||
@ -53,13 +54,14 @@ using namespace std;
|
|||||||
//
|
//
|
||||||
//======================================================================================
|
//======================================================================================
|
||||||
SMESHGUI_aParameterDlg::SMESHGUI_aParameterDlg
|
SMESHGUI_aParameterDlg::SMESHGUI_aParameterDlg
|
||||||
(std::list<SMESHGUI_aParameterPtr> params,
|
( SMESHGUI* theModule,
|
||||||
QWidget* parent,
|
std::list<SMESHGUI_aParameterPtr> params,
|
||||||
QString title,
|
QString title,
|
||||||
bool modal)
|
bool modal)
|
||||||
: QDialog(parent, "MyParameterDialog", modal, WStyle_Customize |
|
: QDialog( SMESH::GetDesktop( theModule ), "MyParameterDialog", modal, WStyle_Customize |
|
||||||
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
|
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu),
|
||||||
myParamList(params)
|
myParamList(params),
|
||||||
|
mySMESHGUI(theModule)
|
||||||
{
|
{
|
||||||
/* creating widgets */
|
/* creating widgets */
|
||||||
init();
|
init();
|
||||||
@ -67,7 +69,7 @@ SMESHGUI_aParameterDlg::SMESHGUI_aParameterDlg
|
|||||||
setCaption(title);
|
setCaption(title);
|
||||||
|
|
||||||
/* Move widget on the botton right corner of main widget */
|
/* Move widget on the botton right corner of main widget */
|
||||||
SUIT_Tools::centerWidget(this, parent);
|
SUIT_Tools::centerWidget(this, SMESH::GetDesktop( theModule ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//======================================================================================
|
//======================================================================================
|
||||||
@ -159,9 +161,6 @@ void SMESHGUI_aParameterDlg::init()
|
|||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(myButtonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect(myButtonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
||||||
connect(myButtonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
connect(myButtonCancel, SIGNAL(clicked()), this, SLOT(reject()));
|
||||||
|
|
||||||
/* Retrieve SMESHGUI */
|
|
||||||
mySMESHGUI = SMESHGUI::GetSMESHGUI();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//======================================================================================
|
//======================================================================================
|
||||||
@ -194,12 +193,13 @@ void SMESHGUI_aParameterDlg::ClickOnOk()
|
|||||||
// function : Parameters()
|
// function : Parameters()
|
||||||
// purpose : return a list of parameters from a dialog box
|
// purpose : return a list of parameters from a dialog box
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
bool SMESHGUI_aParameterDlg::Parameters (list<SMESHGUI_aParameterPtr> params,
|
bool SMESHGUI_aParameterDlg::Parameters( SMESHGUI* theModule,
|
||||||
|
list<SMESHGUI_aParameterPtr> params,
|
||||||
const char *aTitle)
|
const char *aTitle)
|
||||||
{
|
{
|
||||||
if (!params.empty()) {
|
if (!params.empty()) {
|
||||||
SMESHGUI_aParameterDlg *Dialog =
|
SMESHGUI_aParameterDlg *Dialog =
|
||||||
new SMESHGUI_aParameterDlg(params, SMESHGUI::desktop(), aTitle, TRUE);
|
new SMESHGUI_aParameterDlg( theModule, params, aTitle, TRUE);
|
||||||
return (Dialog->exec() == QDialog::Accepted);
|
return (Dialog->exec() == QDialog::Accepted);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -49,15 +49,15 @@ class SMESHGUI_aParameterDlg : public QDialog
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SMESHGUI_aParameterDlg (std::list<SMESHGUI_aParameterPtr> params,
|
SMESHGUI_aParameterDlg( SMESHGUI*,
|
||||||
QWidget* parent = 0,
|
std::list<SMESHGUI_aParameterPtr> params,
|
||||||
QString title = QString::null,
|
QString title = QString::null,
|
||||||
bool modal = TRUE);
|
bool modal = TRUE);
|
||||||
|
|
||||||
~SMESHGUI_aParameterDlg();
|
~SMESHGUI_aParameterDlg();
|
||||||
|
|
||||||
/* Parameter function */
|
/* Parameter function */
|
||||||
static bool Parameters (std::list<SMESHGUI_aParameterPtr> params, const char *aTitle);
|
static bool Parameters( SMESHGUI*, std::list<SMESHGUI_aParameterPtr> params, const char *aTitle);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void init();
|
void init();
|
||||||
|
@ -121,7 +121,7 @@ void StdMeshersGUI_HypothesisCreator::EditHypothesis
|
|||||||
StdMeshersGUI_Parameters::GetParameters( theHyp, paramList );
|
StdMeshersGUI_Parameters::GetParameters( theHyp, paramList );
|
||||||
|
|
||||||
bool modified = false;
|
bool modified = false;
|
||||||
if ( SMESHGUI_aParameterDlg::Parameters( paramList, QObject::tr("SMESH_VALUE")) )
|
if ( SMESHGUI_aParameterDlg::Parameters( SMESHGUI::GetSMESHGUI(), paramList, QObject::tr("SMESH_VALUE")) )
|
||||||
modified = StdMeshersGUI_Parameters::SetParameters( theHyp, paramList );
|
modified = StdMeshersGUI_Parameters::SetParameters( theHyp, paramList );
|
||||||
|
|
||||||
if ( modified ) {
|
if ( modified ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user