SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
myCurveType = resMgr->integerValue( "Plot2d", "CurveType", myCurveType );
- if ( myCurveType < 1 || myCurveType > 2 )
- myCurveType = 1;
+ setCurveType( resMgr->integerValue( "Plot2d", "CurveType", myCurveType ) );
+
myShowLegend = resMgr->booleanValue( "Plot2d", "ShowLegend", myShowLegend );
myLegendPos = resMgr->integerValue( "Plot2d", "LegendPos", myLegendPos );
myMarkerSize = resMgr->integerValue( "Plot2d", "MarkerSize", myMarkerSize );
//****************************************************************
void Plot2d_ViewWindow::onChangeCurveMode()
{
- myCurveBtn->SetItem(myViewFrame->getCurveType());
+ int aCurveType = myViewFrame->getCurveType();
+ myCurveBtn->SetItem(aCurveType);
+
+ myActionsMap[CurvPointsId]->setOn(aCurveType == 0);
+ myActionsMap[CurvLinesId]->setOn(aCurveType == 1);
+ myActionsMap[CurvSplinesId]->setOn(aCurveType == 2);
}
//****************************************************************
void Plot2d_ViewWindow::onCurves()
{
QtxAction* aSender = (QtxAction*) sender();
- if(aSender == myActionsMap[CurvPointsId]) {
- myActionsMap[CurvPointsId]->setOn(true);
- myActionsMap[CurvLinesId]->setOn(false);
- myActionsMap[CurvSplinesId]->setOn(false);
+ if(aSender == myActionsMap[CurvPointsId])
myViewFrame->setCurveType(0);
- }
- else if(aSender == myActionsMap[CurvLinesId]) {
- myActionsMap[CurvLinesId]->setOn(true);
- myActionsMap[CurvPointsId]->setOn(false);
- myActionsMap[CurvSplinesId]->setOn(false);
+ else if(aSender == myActionsMap[CurvLinesId])
myViewFrame->setCurveType(1);
- }
- else if(aSender == myActionsMap[CurvSplinesId]) {
- myActionsMap[CurvSplinesId]->setOn( true );
- myActionsMap[CurvPointsId]->setOn( false );
- myActionsMap[CurvLinesId]->setOn( false );
+ else if(aSender == myActionsMap[CurvSplinesId])
myViewFrame->setCurveType(2);
- }
}
-
+
//****************************************************************
void Plot2d_ViewWindow::onDumpView()
{