createEditors();
myPreferences->retrieve();
- setMinimumSize(800, 300);
+ setMinimumSize(820, 300);
}
ModuleBase_PreferencesDlg::~ModuleBase_PreferencesDlg()
SUIT_PreferenceMgr::Bool, ModuleBase_Preferences::VIEWER_SECTION, "highlighting-3d");
myPreferences->addItem(tr("In 2d mode"), highlightGroup,
SUIT_PreferenceMgr::Bool, ModuleBase_Preferences::VIEWER_SECTION, "highlighting-2d");
+
+ int colorScaleGroup = myPreferences->addItem(tr("Color scale"), viewTab);
+ myPreferences->setItemProperty("columns", 4, colorScaleGroup);
+ int aItem = myPreferences->addItem(tr("X position"), colorScaleGroup,
+ SUIT_PreferenceMgr::Double, ModuleBase_Preferences::VIEWER_SECTION, "scalar_bar_x_position");
+ myPreferences->setItemProperty("min", 0, aItem);
+ myPreferences->setItemProperty("max", 1, aItem);
+
+ aItem = myPreferences->addItem(tr("Y position"), colorScaleGroup,
+ SUIT_PreferenceMgr::Double, ModuleBase_Preferences::VIEWER_SECTION, "scalar_bar_y_position");
+ myPreferences->setItemProperty("min", 0, aItem);
+ myPreferences->setItemProperty("max", 1, aItem);
+
+ aItem = myPreferences->addItem(tr("Width"), colorScaleGroup,
+ SUIT_PreferenceMgr::Double, ModuleBase_Preferences::VIEWER_SECTION, "scalar_bar_width");
+ myPreferences->setItemProperty("min", 0, aItem);
+ myPreferences->setItemProperty("max", 1, aItem);
+
+ aItem = myPreferences->addItem(tr("Height"), colorScaleGroup,
+ SUIT_PreferenceMgr::Double, ModuleBase_Preferences::VIEWER_SECTION, "scalar_bar_height");
+ myPreferences->setItemProperty("min", 0, aItem);
+ myPreferences->setItemProperty("max", 1, aItem);
+
+ aItem = myPreferences->addItem(tr("Intervals number"), colorScaleGroup,
+ SUIT_PreferenceMgr::Integer, ModuleBase_Preferences::VIEWER_SECTION, "scalar_bar_nb_intervals");
+ myPreferences->setItemProperty("min", 0, aItem);
+ myPreferences->setItemProperty("max", 100, aItem);
+
+ aItem = myPreferences->addItem(tr("Text height"), colorScaleGroup,
+ SUIT_PreferenceMgr::Integer, ModuleBase_Preferences::VIEWER_SECTION, "scalar_bar_text_height");
+ myPreferences->setItemProperty("min", 0, aItem);
+ myPreferences->setItemProperty("max", 100, aItem);
+
+ aItem = myPreferences->addItem(tr("Text color"), colorScaleGroup,
+ SUIT_PreferenceMgr::Color, ModuleBase_Preferences::VIEWER_SECTION, "scalar_bar_text_color");
}
void ModuleBase_PreferencesDlg::createMenuPage(int thePageId)
void PartSet_FieldStepPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
const Handle(Prs3d_Presentation)& thePrs, const Standard_Integer theMode)
{
+ SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr();
ModelAPI_AttributeTables::ValueType aType = dataType();
DataPtr aData = myFeature->data();
switch (aType) {
{
double aMin, aMax;
QList<double> aShapeData = range(aMin, aMax);
- SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr();
int aNbIntertvals = aResMgr->integerValue("Viewer", "scalar_bar_nb_intervals", 20);
AttributeSelectionListPtr aSelList = aData->selectionList(CollectionPlugin_Field::SELECTED_ID());
anAspectText3d->SetColor(myLabelColor);
aGroup->SetPrimitivesAspect(anAspectText3d);
+ int aT = aResMgr->integerValue("Viewer", "scalar_bar_text_height", 14);
QString aString = aValues.at(i);
- aGroup->Text(aString.toUtf8().constData(), aVertex, 14);
+ aGroup->Text(aString.toUtf8().constData(), aVertex, aT);
}
}
}