QString Plot2d_ViewFrame::myPrefTitle = "";
QString Plot2d_ViewFrame::myPrefXTitle = "";
QString Plot2d_ViewFrame::myPrefYTitle = "";
+QString Plot2d_ViewFrame::myPrefY2Title = "";
bool Plot2d_ViewFrame::myPrefTitleChangedByUser = false;
bool Plot2d_ViewFrame::myXPrefTitleChangedByUser = false;
bool Plot2d_ViewFrame::myYPrefTitleChangedByUser = false;
+bool Plot2d_ViewFrame::myY2PrefTitleChangedByUser = false;
const long COLOR_DISTANCE = 100;
const int MAX_ATTEMPTS = 10;
myXMode( 0 ), myYMode( 0 ), mySecondY( false ),
myTitleAutoUpdate( true ), myXTitleAutoUpdate( true ), myYTitleAutoUpdate( true ),
myTitleChangedByUser( false ), myXTitleChangedByUser( false ), myYTitleChangedByUser( false ),
- myIsTimeColorization( false ), myTimePosition( -1 ), myInactiveColor( Qt::gray )
+ myY2TitleChangedByUser( false ), myIsTimeColorization( false ), myTimePosition( -1 ), myInactiveColor( Qt::gray )
{
setObjectName( title );
/* Plot 2d View */
myTitle = myPrefTitle;
myXTitle = myPrefXTitle;
myYTitle = myPrefYTitle;
+ myY2Title = myPrefY2Title;
}
/*!
myPrefYTitle = myYTitle;
myYPrefTitleChangedByUser = true;
}
+ if ( myY2TitleChangedByUser )
+ {
+ myPrefY2Title = myY2Title;
+ myY2PrefTitleChangedByUser = true;
+ }
}
/*!
myYTitleChangedByUser = true;
if (mySecondY) // vertical right axis title
+ {
+ isTileChanged = dlg->getY2Title() != myY2Title;
setTitle( dlg->isY2TitleEnabled(), dlg->getY2Title(), Y2Title, false );
+ myY2TitleChangedByUser = isTileChanged ? true : myY2TitleChangedByUser;
+ }
// main title
isTileChanged = dlg->getMainTitle() != myTitle;
myTitleChangedByUser = vf->myTitleChangedByUser;
myXTitleChangedByUser = vf->myXTitleChangedByUser;
myYTitleChangedByUser = vf->myYTitleChangedByUser;
+ myY2TitleChangedByUser = vf->myY2TitleChangedByUser;
}
/*!
return myXPrefTitleChangedByUser || myXTitleChangedByUser;
case YTitle:
return myYPrefTitleChangedByUser || myYTitleChangedByUser;
+ case Y2Title:
+ return myY2PrefTitleChangedByUser || myY2TitleChangedByUser;
default:
return false;
}
case YTitle:
myYTitleChangedByUser = false;
break;
+ case Y2Title:
+ myY2TitleChangedByUser = false;
+ break;
default:
break;
}
bool mySecondY;
bool myTitleAutoUpdate, myXTitleAutoUpdate, myYTitleAutoUpdate;
- bool myTitleChangedByUser, myXTitleChangedByUser, myYTitleChangedByUser;
+ bool myTitleChangedByUser, myXTitleChangedByUser, myYTitleChangedByUser,
+ myY2TitleChangedByUser;
static QString myPrefTitle;
static QString myPrefXTitle;
static QString myPrefYTitle;
+ static QString myPrefY2Title;
static bool myPrefTitleChangedByUser;
static bool myXPrefTitleChangedByUser;
static bool myYPrefTitleChangedByUser;
+ static bool myY2PrefTitleChangedByUser;
bool myIsTimeColorization;
double myTimePosition;