addPreference( tr( "PREF_AUTO_UPDATE" ), updateGroup, LightApp_Preferences::Bool, "SMESH", "auto_update" );
int qaGroup = addPreference( tr( "PREF_GROUP_QUALITY" ), genTab );
+ setPreferenceProperty( qaGroup, "columns", 2 );
addPreference( tr( "PREF_DISPLAY_ENTITY" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "display_entity" );
addPreference( tr( "PREF_PRECISION_USE" ), qaGroup, LightApp_Preferences::Bool, "SMESH", "use_precision" );
int precGroup = addPreference( tr( "PREF_GROUP_PRECISION" ), genTab );
- setPreferenceProperty( precGroup, "columns", 1 );
+ setPreferenceProperty( precGroup, "columns", 2 );
int prec = addPreference( tr( "PREF_PRECISION_VALUE" ), precGroup, LightApp_Preferences::IntSpin, "SMESH", "controls_precision" );
setPreferenceProperty( prec, "max", 16 );
int dispgroup = addPreference( tr( "PREF_DISPLAY_MODE" ), genTab );
+ setPreferenceProperty( dispgroup, "columns", 2 );
int dispmode = addPreference( tr( "PREF_DISPLAY_MODE" ), dispgroup, LightApp_Preferences::Selector, "SMESH", "display_mode" );
QStringList modes;
modes.append( "Wireframe" );
setPreferenceProperty( dispmode, "indexes", indices );
int exportgroup = addPreference( tr( "PREF_GROUP_EXPORT" ), genTab );
+ setPreferenceProperty( exportgroup, "columns", 2 );
addPreference( tr( "PREF_AUTO_GROUPS" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "auto_groups" );
addPreference( tr( "PREF_RENUMBER" ), exportgroup, LightApp_Preferences::Bool, "SMESH", "renumbering" );
int meshTab = addPreference( tr( "PREF_TAB_MESH" ) );
int nodeGroup = addPreference( tr( "PREF_GROUP_NODES" ), meshTab );
+ setPreferenceProperty( nodeGroup, "columns", 2 );
addPreference( tr( "PREF_COLOR" ), nodeGroup, LightApp_Preferences::Color, "SMESH", "node_color" );
int nodeSz = addPreference( tr( "PREF_SIZE" ), nodeGroup, LightApp_Preferences::IntSpin, "SMESH", "node_size" );
setPreferenceProperty( nodeSz, "max", 5 );
int elemGroup = addPreference( tr( "PREF_GROUP_ELEMENTS" ), meshTab );
+ setPreferenceProperty( elemGroup, "columns", 2 );
addPreference( tr( "PREF_FILL" ), elemGroup, LightApp_Preferences::Color, "SMESH", "fill_color" );
addPreference( tr( "PREF_OUTLINE" ), elemGroup, LightApp_Preferences::Color, "SMESH", "outline_color" );
int selTab = addPreference( tr( "PREF_TAB_SELECTION" ) );
int selGroup = addPreference( tr( "PREF_GROUP_SELECTION" ), selTab );
+ setPreferenceProperty( selGroup, "columns", 2 );
addPreference( tr( "PREF_OBJECT_COLOR" ), selGroup, LightApp_Preferences::Color, "SMESH", "selection_object_color" );
addPreference( tr( "PREF_ELEMENT_COLOR" ), selGroup, LightApp_Preferences::Color, "SMESH", "selection_element_color" );
setPreferenceProperty( selW, "max", 5 );
int preGroup = addPreference( tr( "PREF_GROUP_PRESELECTION" ), selTab );
+ setPreferenceProperty( preGroup, "columns", 2 );
addPreference( tr( "PREF_HIGHLIGHT_COLOR" ), preGroup, LightApp_Preferences::Color, "SMESH", "highlight_color" );
int preW = addPreference( tr( "PREF_WIDTH" ), preGroup, LightApp_Preferences::IntSpin, "SMESH", "highlight_width" );
setPreferenceProperty( preW, "max", 5 );
int precSelGroup = addPreference( tr( "PREF_GROUP_PRECISION" ), selTab );
+ setPreferenceProperty( precSelGroup, "columns", 2 );
addPreference( tr( "PREF_NODES" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_node" );
addPreference( tr( "PREF_ELEMENTS" ), precSelGroup, LightApp_Preferences::Double, "SMESH", "selection_precision_element" );
int sbarTab = addPreference( tr( "SMESH_SCALARBAR" ) );
int fontGr = addPreference( tr( "SMESH_FONT_SCALARBAR" ), sbarTab );
+ setPreferenceProperty( fontGr, "columns", 4 );
int tfont = addPreference( tr( "SMESH_TITLE" ), fontGr, LightApp_Preferences::Font, "SMESH", "scalar_bar_title_font" );
addPreference( tr( "PREF_TITLE_COLOR" ), fontGr, LightApp_Preferences::Color, "SMESH", "scalar_bar_title_color" );
setPreferenceProperty( lfont, "widget_flags", wflag );
int colorsLabelsGr = addPreference( tr( "SMESH_LABELS_COLORS_SCALARBAR" ), sbarTab );
+ setPreferenceProperty( colorsLabelsGr, "columns", 4 );
int numcol = addPreference( tr( "SMESH_NUMBEROFCOLORS" ), colorsLabelsGr, LightApp_Preferences::IntSpin, "SMESH", "scalar_bar_num_colors" );
setPreferenceProperty( numcol, "min", 2 );
setPreferenceProperty( numlab, "max", 65 );
int orientGr = addPreference( tr( "SMESH_ORIENTATION" ), sbarTab );
+ setPreferenceProperty( orientGr, "columns", 2 );
int orient = addPreference( tr( "SMESH_ORIENTATION" ), orientGr, LightApp_Preferences::Selector, "SMESH", "scalar_bar_orientation" );
QStringList orients;
orients.append( tr( "SMESH_VERTICAL" ) );
setPreferenceProperty( orient, "indexes", indices );
int posVSizeGr = addPreference( tr( "SMESH_POSITION_SIZE_SCALARBAR" ) + " " + tr( "SMESH_VERTICAL" ), sbarTab );
+ setPreferenceProperty( posVSizeGr, "columns", 4 );
int xv = addPreference( tr( "SMESH_X_SCALARBAR" ), posVSizeGr, LightApp_Preferences::DblSpin, "SMESH", "scalar_bar_vertical_x" );
int yv = addPreference( tr( "SMESH_Y_SCALARBAR" ), posVSizeGr, LightApp_Preferences::DblSpin, "SMESH", "scalar_bar_vertical_y" );
int wv = addPreference( tr( "SMESH_WIDTH" ), posVSizeGr, LightApp_Preferences::DblSpin, "SMESH", "scalar_bar_vertical_width" );
setPreferenceProperty( hv, "step", 0.1 );
int posHSizeGr = addPreference( tr( "SMESH_POSITION_SIZE_SCALARBAR" ) + " " + tr( "SMESH_HORIZONTAL" ), sbarTab );
+ setPreferenceProperty( posHSizeGr, "columns", 4 );
int xh = addPreference( tr( "SMESH_X_SCALARBAR" ), posHSizeGr, LightApp_Preferences::DblSpin, "SMESH", "scalar_bar_horizontal_x" );
int yh = addPreference( tr( "SMESH_Y_SCALARBAR" ), posHSizeGr, LightApp_Preferences::DblSpin, "SMESH", "scalar_bar_horizontal_y" );
int wh = addPreference( tr( "SMESH_WIDTH" ), posHSizeGr, LightApp_Preferences::DblSpin, "SMESH", "scalar_bar_horizontal_width" );
// SALOME GUI includes
#include <SUIT_Desktop.h>
#include <SUIT_ResourceMgr.h>
+#include <SUIT_Session.h>
+#include <SUIT_MessageBox.h>
+#include <LightApp_Application.h>
#include <LightApp_SelectionMgr.h>
#include <SALOME_ListIO.hxx>
myApplyBtn->setAutoDefault( true );
myCancelBtn = new QPushButton( tr( "SMESH_BUT_CLOSE" ), myButtonGrp );
myCancelBtn->setAutoDefault( true );
+ myHelpBtn = new QPushButton( tr("SMESH_BUT_HELP"), myButtonGrp );
+ myHelpBtn->setAutoDefault(true);
myButtonGrpLayout->addWidget( myOkBtn );
myButtonGrpLayout->addSpacing( 10 );
myButtonGrpLayout->addSpacing( 10 );
myButtonGrpLayout->addStretch();
myButtonGrpLayout->addWidget( myCancelBtn );
+ myButtonGrpLayout->addWidget( myHelpBtn );
aTopLayout->addWidget( myButtonGrp );
connect( myOkBtn, SIGNAL( clicked() ), this, SLOT( onOk() ) );
connect( myApplyBtn, SIGNAL( clicked() ), this, SLOT( onApply() ) );
connect( myCancelBtn, SIGNAL( clicked() ), this, SLOT( onCancel() ) );
+ connect( myHelpBtn, SIGNAL(clicked()), this, SLOT( onHelp() ) );
connect( myXSpin, SIGNAL( valueChanged( double ) ), this, SLOT( onXYChanged() ) );
connect( myYSpin, SIGNAL( valueChanged( double ) ), this, SLOT( onXYChanged() ) );
connect( aOrientationGrp, SIGNAL( buttonClicked( int ) ), this, SLOT( onOrientationChanged() ) );
connect( mySelectionMgr, SIGNAL( currentSelectionChanged() ), this, SLOT( onSelectionChanged() ) );
connect( mySMESHGUI, SIGNAL( SignalCloseAllDialogs() ), this, SLOT( onCancel() ) );
+
+ myHelpFileName = "about_quality_controls_page.html";
}
//=================================================================================================
close();
}
+//=================================================================================================
+/*!
+ * SMESHGUI_Preferences_ScalarBarDlg::onHelp
+ *
+ * Help button slot
+ */
+//=================================================================================================
+void SMESHGUI_Preferences_ScalarBarDlg::onHelp()
+{
+ LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication());
+ if (app)
+ app->onHelpContextModule(mySMESHGUI ? app->moduleName(mySMESHGUI->moduleName()) : QString(""), myHelpFileName);
+ else {
+ QString platform;
+#ifdef WIN32
+ platform = "winapplication";
+#else
+ platform = "application";
+#endif
+ SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ platform)).
+ arg(myHelpFileName));
+ }
+}
+
//=================================================================================================
/*!
* SMESHGUI_Preferences_ScalarBarDlg::onSelectionChanged