msgid "VisuGUI_Module::MEN_GAUSS_NEW_VIEWER"
msgstr "Points view"
-msgid "VisuGUI_Module::VISU_GAUSS_PREF_TAB_TLT"
+
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_TAB_TTL"
msgstr "Gauss Points"
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL"
+msgstr "Primitive"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_CLAMP"
+msgstr "Maximum Size (Clamp)"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_MAIN_TEXTURE"
+msgstr "Main Texture (16x16)"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_ALPHA_TEXTURE"
+msgstr "Alpha Channel Texture (16x16)"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_ALPHA_THRESHOLD"
+msgstr "Alpha Channel Threshold"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_SIZE_GROUP_TTL"
+msgstr "Size"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_MIN_SIZE"
+msgstr "Range value for min size (%)"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_MAX_SIZE"
+msgstr "Range value for max size (%)"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_MAGNIFICATION"
+msgstr "Magnification (%)"
+
+msgid "VisuGUI_Module::VISU_GAUSS_PREF_INCREMENT"
+msgstr "Increment"
+
+
+
+
+msgid "VisuGUI_Module::VISU_MOUSE_PREF_TAB_TLT"
+msgstr "Spacemouse"
+
msgid "VisuGUI_Module::VISU_MOUSE_PREF_GROUP_TLT"
msgstr "Mouse"
QLabel* aClampLabel = new QLabel( tr( "MAXIMUM_SIZE" ), PrimitiveGroup );
myClampSpinBox = new QtxDblSpinBox( 1.0, 512.0, 1.0, PrimitiveGroup );
myClampSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myClampSpinBox->setValue( 200.0 );
PrimitiveGroupLayout->addWidget( aClampLabel, 1, 0 );
PrimitiveGroupLayout->addMultiCellWidget( myClampSpinBox, 1, 1, 1, 2 );
QLabel* aAlphaThresholdLabel = new QLabel( tr( "ALPHA_THRESHOLD" ), PrimitiveGroup );
myAlphaThresholdSpinBox = new QtxDblSpinBox( 0.0, 1.0, 0.1, PrimitiveGroup );
myAlphaThresholdSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myAlphaThresholdSpinBox->setValue( 0.0 );
PrimitiveGroupLayout->addWidget( aAlphaThresholdLabel, 4, 0 );
PrimitiveGroupLayout->addMultiCellWidget( myAlphaThresholdSpinBox, 4, 4, 1, 2 );
mySizeLabel = new QLabel( tr( "SIZE" ), SizeGroup );
mySizeSpinBox = new QtxDblSpinBox( 0, 100, 1, SizeGroup );
mySizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- //mySizeSpinBox->setValue( 10 );
SizeGroupLayout->addWidget( mySizeLabel, 0, 0 );
SizeGroupLayout->addWidget( mySizeSpinBox, 0, 1 );
myMinSizeLabel = new QLabel( tr( "MIN_SIZE" ), SizeGroup );
myMinSizeSpinBox = new QtxDblSpinBox( 0, 100, 1, SizeGroup );
myMinSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- //myMinSizeSpinBox->setValue( 10 );
SizeGroupLayout->addWidget( myMinSizeLabel, 1, 0 );
SizeGroupLayout->addWidget( myMinSizeSpinBox, 1, 1 );
myMaxSizeLabel = new QLabel( tr( "MAX_SIZE" ), SizeGroup );
myMaxSizeSpinBox = new QtxDblSpinBox( 0, 100, 1, SizeGroup );
myMaxSizeSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- //myMaxSizeSpinBox->setValue( 33 );
SizeGroupLayout->addWidget( myMaxSizeLabel, 1, 2 );
SizeGroupLayout->addWidget( myMaxSizeSpinBox, 1, 3 );
QLabel* aMagnificationLabel = new QLabel( tr( "MAGNIFICATION" ), SizeGroup );
myMagnificationSpinBox = new QtxDblSpinBox( 10, 1000, 10, SizeGroup );
myMagnificationSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- //myMagnificationSpinBox->setValue( 100 );
SizeGroupLayout->addWidget( aMagnificationLabel, 2, 0 );
SizeGroupLayout->addWidget( myMagnificationSpinBox, 2, 1 );
QLabel* aIncrementLabel = new QLabel( tr( "INCREMENT" ), SizeGroup );
myIncrementSpinBox = new QtxDblSpinBox( 5, 50, 5, SizeGroup );
myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- //myIncrementSpinBox->setValue( 10 );
SizeGroupLayout->addWidget( aIncrementLabel, 2, 2 );
SizeGroupLayout->addWidget( myIncrementSpinBox, 2, 3 );
myColorLabel = new QLabel( tr( "COLOR" ), ColorGroup );
myColorButton = new QPushButton( ColorGroup );
- myColorButton->setPaletteBackgroundColor( Qt::blue );
- myColorButton->setPaletteForegroundColor( Qt::blue );
ColorGroupLayout->addWidget( myColorLabel, 0, 0 );
ColorGroupLayout->addWidget( myColorButton, 0, 1 );
void VisuGUI_GaussPointsDlg::initFromPrsObject( VISU::GaussPoints_i* thePrs )
{
- bool isResults = thePrs->IsColored();
+ bool isResults = thePrs->GetIsColored();
myResultsButton->setChecked( isResults );
myGeometryButton->setChecked( !isResults );
myColorButton->setPaletteBackgroundColor( thePrs->GetColor() );
- myClampSpinBox->setMaxValue( thePrs->GetGaussPointsPL()->GetMaximumSupportedSize() );
- myClampSpinBox->setValue( thePrs->GetGaussPointsPL()->GetClamp() );
+ myClampSpinBox->setMaxValue( thePrs->GetMaximumSupportedSize() );
+ myClampSpinBox->setValue( thePrs->GetClamp() );
- mySizeSpinBox->setValue( thePrs->GetGaussPointsPL()->GetRelativeSize() * 100.0 );
- myMinSizeSpinBox->setValue( thePrs->GetGaussPointsPL()->GetRelativeMinSize() * 100.0 );
- myMaxSizeSpinBox->setValue( thePrs->GetGaussPointsPL()->GetRelativeMaxSize() * 100.0 );
+ mySizeSpinBox->setValue( thePrs->GetConstSize() );
+ myMinSizeSpinBox->setValue( thePrs->GetMinSize() );
+ myMaxSizeSpinBox->setValue( thePrs->GetMaxSize() );
- myMagnificationSpinBox->setValue( thePrs->GetGaussPointsPL()->GetMagnification() * 100.0 );
- myIncrementSpinBox->setValue( thePrs->GetGaussPointsPL()->GetMagnificationIncrement() * 100.0 );
+ myMagnificationSpinBox->setValue( thePrs->GetMagnification() );
+ myIncrementSpinBox->setValue( thePrs->GetMagnificationIncrement() );
myMainTextureLineEdit->setText( thePrs->GetMainTexture().section( '/', -1 ) );
myAlphaTextureLineEdit->setText( thePrs->GetAlphaTexture().section( '/', -1 ) );
- myAlphaThresholdSpinBox->setValue( thePrs->GetGaussPointsPL()->GetAlphaThreshold() );
+ myAlphaThresholdSpinBox->setValue( thePrs->GetAlphaThreshold() );
myScalarPane->initFromPrsObject(thePrs);
}
int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::GaussPoints_i* thePrs )
{
- thePrs->GetGaussPointsPL()->SetClamp( myClampSpinBox->value() );
+ thePrs->SetClamp( myClampSpinBox->value() );
bool isResults = myResultsButton->isChecked();
if( isResults )
{
- thePrs->GetGaussPointsPL()->SetRelativeMinSize( myMinSizeSpinBox->value() / 100.0 );
- thePrs->GetGaussPointsPL()->SetRelativeMaxSize( myMaxSizeSpinBox->value() / 100.0 );
+ thePrs->SetMinSize( myMinSizeSpinBox->value() );
+ thePrs->SetMaxSize( myMaxSizeSpinBox->value() );
}
else
{
- thePrs->GetGaussPointsPL()->SetRelativeSize( mySizeSpinBox->value() / 100.0 );
+ thePrs->SetConstSize( mySizeSpinBox->value() );
thePrs->SetColor( myColorButton->paletteBackgroundColor() );
}
- thePrs->ShowColored( isResults );
+ thePrs->SetIsColored( isResults );
- thePrs->GetGaussPointsPL()->SetMagnification( myMagnificationSpinBox->value() / 100.0 );
- thePrs->GetGaussPointsPL()->SetMagnificationIncrement( myIncrementSpinBox->value() / 100.0 );
+ thePrs->SetMagnification( myMagnificationSpinBox->value() );
+ thePrs->SetMagnificationIncrement( myIncrementSpinBox->value() );
myMainTexture = myMainTexture.isNull() ? thePrs->GetMainTexture() : myMainTexture;
myAlphaTexture = myAlphaTexture.isNull() ? thePrs->GetAlphaTexture() : myAlphaTexture;
thePrs->SetTextures( myMainTexture, myAlphaTexture );
- thePrs->GetGaussPointsPL()->SetAlphaThreshold( myAlphaThresholdSpinBox->value() );
+ thePrs->SetAlphaThreshold( myAlphaThresholdSpinBox->value() );
return myScalarPane->storeToPrsObject(thePrs);
}
VisuGUI_GaussPointsDlg (SalomeApp_Module* theModule, bool SetPref = FALSE);
~VisuGUI_GaussPointsDlg() {};
- void initFromPrsObject(VISU::GaussPoints_i* thePrs);
- int storeToPrsObject(VISU::GaussPoints_i* thePrs);
+ void initFromPrsObject(VISU::GaussPoints_i* thePrs);
+ int storeToPrsObject(VISU::GaussPoints_i* thePrs);
protected slots:
void accept();
void onColorButtonPressed();
private:
- VisuGUI_GaussScalarBarPane* myScalarPane;
+ VisuGUI_GaussScalarBarPane* myScalarPane;
- QString myMainTexture;
- QString myAlphaTexture;
+ QString myMainTexture;
+ QString myAlphaTexture;
QtxDblSpinBox* myClampSpinBox;
myViewerMap.erase(theViewManager);
}
+
+//---------------------------------------------------------------
void
VisuGUI_Module
::createPreferences()
{
VisuGUI::createPreferences();
- int gaussTab = addPreference( tr( "VISU_GAUSS_PREF_TAB_TLT" ) );
+ createGaussPointsPreferences();
+ createSpaceMousePreferences();
+}
+
+
+//---------------------------------------------------------------
+void
+VisuGUI_Module
+::createGaussPointsPreferences()
+{
+ int resultsTab = addPreference( tr( "VISU_GAUSS_PREF_TAB_TTL" ) );
+ int primitiveGr = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL" ), resultsTab );
+ setPreferenceProperty( primitiveGr, "columns", 1 );
+
+ int clampPref = addPreference( tr( "VISU_GAUSS_PREF_CLAMP" ), primitiveGr,
+ SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_clamp" );
+ setPreferenceProperty( clampPref, "min", 1 );
+ setPreferenceProperty( clampPref, "max", 512 );
+
+ int mainTexturePref = addPreference( tr( "VISU_GAUSS_PREF_MAIN_TEXTURE" ), primitiveGr,
+ SalomeApp_Preferences::File, "VISU", "point_sprite_main_texture" );
+
+ int alphaTexturePref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_TEXTURE" ), primitiveGr,
+ SalomeApp_Preferences::File, "VISU", "point_sprite_alpha_texture" );
+
+ int alphaThresholdPref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_THRESHOLD" ), primitiveGr,
+ SalomeApp_Preferences::DblSpin, "VISU", "point_sprite_alpha_threshold" );
+ setPreferenceProperty( alphaThresholdPref, "min", 0.0 );
+ setPreferenceProperty( alphaThresholdPref, "max", 1.0 );
+ setPreferenceProperty( alphaThresholdPref, "step", 0.1 );
+
+ int sizeGr = addPreference( tr( "VISU_GAUSS_PREF_SIZE_GROUP_TTL" ), resultsTab );
+ setPreferenceProperty( sizeGr, "columns", 2 );
+
+ int minSizePref = addPreference( tr( "VISU_GAUSS_PREF_MIN_SIZE" ), sizeGr,
+ SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_min_size" );
+ setPreferenceProperty( minSizePref, "min", 1 );
+ setPreferenceProperty( minSizePref, "max", 100 );
+
+ int maxSizePref = addPreference( tr( "VISU_GAUSS_PREF_MAX_SIZE" ), sizeGr,
+ SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_max_size" );
+ setPreferenceProperty( maxSizePref, "min", 1 );
+ setPreferenceProperty( maxSizePref, "max", 100 );
+
+ int magnificationPref = addPreference( tr( "VISU_GAUSS_PREF_MAGNIFICATION" ), sizeGr,
+ SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_magnification" );
+ setPreferenceProperty( magnificationPref, "min", 10 );
+ setPreferenceProperty( magnificationPref, "max", 1000 );
+
+ int incrementPref = addPreference( tr( "VISU_GAUSS_PREF_INCREMENT" ), sizeGr,
+ SalomeApp_Preferences::IntSpin, "VISU", "point_sprite_increment" );
+ setPreferenceProperty( incrementPref, "min", 1 );
+ setPreferenceProperty( incrementPref, "max", 100 );
+}
+
- int mouseGr = addPreference( tr( "VISU_MOUSE_PREF_GROUP_TLT" ), gaussTab );
+//---------------------------------------------------------------
+void
+VisuGUI_Module
+::createSpaceMousePreferences()
+{
+ int mouseTab = addPreference( tr( "VISU_MOUSE_PREF_TAB_TLT" ) );
+
+ int mouseGr = addPreference( tr( "VISU_MOUSE_PREF_GROUP_TLT" ), mouseTab );
int mousePref = addPreference( tr( "VISU_MOUSE_PREF" ), mouseGr, SalomeApp_Preferences::Selector, "VISU", "mouse_behaviour" );
QStringList values;
values.append( tr( "VISU_MOUSE_PREF_STANDARD" ) );
setPreferenceProperty( mousePref, "strings", values );
setPreferenceProperty( mousePref, "indexes", indices );
- int keybrdGr = addPreference( tr( "VISU_KEYBOARD_PREF_GROUP_TTL" ), gaussTab );
+ int keybrdGr = addPreference( tr( "VISU_KEYBOARD_PREF_GROUP_TTL" ), mouseTab );
int keybrdPref = addPreference( tr( "VISU_KEYBOARD_PREF" ), keybrdGr, SalomeApp_Preferences::IntSpin, "VISU", "speed_increment" );
setPreferenceProperty( keybrdPref, "max", 1000 );
- int spacemouseGr = addPreference( tr( "VISU_SPACEMOUSE_PREF" ), gaussTab );
+ int spacemouseGr = addPreference( tr( "VISU_SPACEMOUSE_PREF" ), mouseTab );
setPreferenceProperty( spacemouseGr, "columns", 1 );
int spacemousePref1 = addPreference( tr( "VISU_SPACEMOUSE_PREF_1" ), spacemouseGr, SalomeApp_Preferences::Selector, "VISU", "spacemouse_func1_btn" ); //decrease_speed_increment
int spacemousePref2 = addPreference( tr( "VISU_SPACEMOUSE_PREF_2" ), spacemouseGr, SalomeApp_Preferences::Selector, "VISU", "spacemouse_func2_btn" ); //increase_speed_increment
setPreferenceProperty( spacemousePref5, "strings", values );
setPreferenceProperty( spacemousePref5, "indexes", indices );
- int cameraGr = addPreference( tr( "VISU_CAMERA_PREF_GROUP_TTL" ), gaussTab );
+ int cameraGr = addPreference( tr( "VISU_CAMERA_PREF_GROUP_TTL" ), mouseTab );
int cameraPref = addPreference( tr( "VISU_CAMERA_MOVE_PREF" ), cameraGr, SalomeApp_Preferences::IntSpin, "VISU", "camera_movement_steps" );
setPreferenceProperty( cameraPref, "max", 1000 );
}
+
+//---------------------------------------------------------------
void
VisuGUI_Module
::OnCreateGaussPoints()
bool
activateModule( SUIT_Study* );
+protected:
+ virtual
+ void
+ createSpaceMousePreferences();
+
+ virtual
+ void
+ createGaussPointsPreferences();
+
protected slots:
SUIT_ViewManager*
onCreateViewManager();