// \param theH is number of intervals
virtual void setColorScaleTextHeigth(int theH) = 0;
+ //! Set color of text of color scale
+ // \param theH is number of intervals
+ virtual void setColorScaleTextColor(const QColor& theColor) = 0;
+
//! Set title of color scale
// \param theText is a title
virtual void setColorScaleTitle(const QString& theText) = 0;
#include "PartSet_FieldStepPrs.h"
+#include <ModuleBase_Preferences.h>
+
#include <CollectionPlugin_Field.h>
#include <ModelAPI_AttributeSelectionList.h>
#include <ModelAPI_AttributeIntArray.h>
#include <ModelAPI_AttributeStringArray.h>
+#include <SUIT_ResourceMgr.h>
+
#include <AIS_ColorScale.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_PointAspect.hxx>
aDrawer->SetPointAspect(
new Prs3d_PointAspect(Aspect_TOM_POINT, Quantity_NOC_YELLOW, POINT_SIZE));
- myLabelColor = Quantity_Color(1, 1, 1, Quantity_TOC_RGB);
+ SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr();
+ QColor aQColor = aResMgr->colorValue("Viewer", "scalar_bar_text_color", Qt::black);
+
+ myLabelColor = Quantity_Color(aQColor.redF(), aQColor.greenF(), aQColor.blueF(),
+ Quantity_TOC_RGB);
+
+ SetMaterial(Graphic3d_NOM_PLASTIC);
}
{
double aMin, aMax;
QList<double> aShapeData = range(aMin, aMax);
- int aNbIntertvals = 20;
+ SUIT_ResourceMgr* aResMgr = ModuleBase_Preferences::resourceMgr();
+ int aNbIntertvals = aResMgr->integerValue("Viewer", "scalar_bar_nb_intervals", 20);
AttributeSelectionListPtr aSelList = aData->selectionList(CollectionPlugin_Field::SELECTED_ID());
for (int i = 0; i < aSelList->size(); i++) {
<parameter name="scalar_bar_height" value="0.5" />
<parameter name="scalar_bar_text_height" value="14" />
<parameter name="scalar_bar_nb_intervals" value="20" />
+ <parameter name="scalar_bar_text_color" value="#000000" />
</section>
<section name="Menu" >
<!-- Menu bar preferences -->
#endif
}
+void XGUI_ViewerProxy::setColorScaleTextColor(const QColor& theColor)
+{
+#ifdef HAVE_SALOME
+ myWorkshop->salomeConnector()->viewer()->setColorScaleTextColor(theColor);
+#else
+ Handle(AIS_ColorScale) aColorScale = myWorkshop->mainWindow()->viewer()->colorScale();
+ Quantity_Color aColor(theColor.redF(), theColor.greenF(), theColor.blueF(), Quantity_TOC_RGB);
+ aColorScale->SetColor(aColor);
+#endif
+}
+
+
void XGUI_ViewerProxy::setColorScaleTextHeigth(int theH)
{
#ifdef HAVE_SALOME
double aH = aResMgr->doubleValue("Viewer", "scalar_bar_height", 0.5);
setColorScaleSize(aW, aH);
+ QColor aColor = aResMgr->integerValue("Viewer", "scalar_bar_text_color", Qt::black);
+ setColorScaleTextColor(aColor);
+
int aT = aResMgr->integerValue("Viewer", "scalar_bar_text_height", 14);
setColorScaleTextHeigth(aT);
// \param theH is number of intervals
virtual void setColorScaleTextHeigth(int theH);
+ //! Set color of text of color scale
+ // \param theH is number of intervals
+ virtual void setColorScaleTextColor(const QColor& theColor);
+
//! Set title of color scale
// \param theText is a title
virtual void setColorScaleTitle(const QString& theText);