"................................",
"................................",
"................................"};
+
+QString Plot2d_ViewFrame::myPrefTitle = "";
+QString Plot2d_ViewFrame::myPrefXTitle = "";
+QString Plot2d_ViewFrame::myPrefYTitle = "";
+
+bool Plot2d_ViewFrame::myTitleAutoGeneration = true;
+bool Plot2d_ViewFrame::myXTitleAutoGeneration = true;
+bool Plot2d_ViewFrame::myYTitleAutoGeneration = true;
/*!
myBackground( white ),
myTitleEnabled( true ), myXTitleEnabled( true ),
myYTitleEnabled( true ), myY2TitleEnabled (true),
- myTitleAutoGeneration( true ), myXTitleAutoGeneration( true ),
- myYTitleAutoGeneration( true ),
myXGridMajorEnabled( true ), myYGridMajorEnabled( true ), myY2GridMajorEnabled( true ),
myXGridMinorEnabled( false ), myYGridMinorEnabled( false ), myY2GridMinorEnabled( false ),
myXGridMaxMajor( 8 ), myYGridMaxMajor( 8 ), myY2GridMaxMajor( 8 ),
myYMode = resMgr->integerValue( "Plot2d", "VerScaleMode", myYMode );
myYMode = QMAX( 0, QMIN( 1, myYMode ) );
+
+ myTitle = myPrefTitle;
+ myXTitle = myPrefXTitle;
+ myYTitle = myPrefYTitle;
}
/*!
}
resMgr->setValue( "Plot2d", "VerScaleMode", myYMode );
+
+ if ( !myTitleAutoGeneration )
+ myPrefTitle = myTitle;
+ if ( !myXTitleAutoGeneration )
+ myPrefXTitle = myXTitle;
+ if ( !myYTitleAutoGeneration )
+ myPrefYTitle = myYTitle;
}
/*!
/*!
Verifies whether plot title must be generated automatically using curves titles
*/
-bool Plot2d_ViewFrame::getTitleAutoGeneration() const
+bool Plot2d_ViewFrame::getTitleAutoGeneration()
{
return myTitleAutoGeneration;
}
/*!
Verifies whether plot title must be generated automatically using curves titles
*/
-bool Plot2d_ViewFrame::getTitleAutoGeneration( const ObjectType type ) const
+bool Plot2d_ViewFrame::getTitleAutoGeneration( const ObjectType type )
{
switch ( type )
{
void setTitle( const QString& title );
QString getTitle() const { return myTitle; }
void setTitleAutoGeneration( const bool toGenerate, const bool update = true );
- bool getTitleAutoGeneration() const;
+ bool getTitleAutoGeneration();
void displayCurve( Plot2d_Curve* curve, bool update = false );
void displayCurves( const curveList& curves, bool update = false );
void eraseCurve ( Plot2d_Curve* curve, bool update = false );
void setTitleAutoGeneration( const bool toGenerate,
const ObjectType type,
const bool update = true );
- bool getTitleAutoGeneration( const ObjectType type ) const;
+ static bool getTitleAutoGeneration( const ObjectType type );
void setFont( const QFont& font, ObjectType type, bool update = true );
void setHorScaleMode( const int mode, bool update = true );
QColor myBackground;
QString myTitle, myXTitle, myYTitle, myY2Title;
bool myTitleEnabled, myXTitleEnabled, myYTitleEnabled, myY2TitleEnabled;
- bool myTitleAutoGeneration, myXTitleAutoGeneration, myYTitleAutoGeneration;
bool myXGridMajorEnabled, myYGridMajorEnabled, myY2GridMajorEnabled;
bool myXGridMinorEnabled, myYGridMinorEnabled, myY2GridMinorEnabled;
int myXGridMaxMajor, myYGridMaxMajor, myY2GridMaxMajor;
int myXMode, myYMode;
double myXDistance, myYDistance, myYDistance2;
bool mySecondY;
+
+ static QString myPrefTitle;
+ static QString myPrefXTitle;
+ static QString myPrefYTitle;
+
+ static bool myTitleAutoGeneration;
+ static bool myXTitleAutoGeneration;
+ static bool myYTitleAutoGeneration;
};
class Plot2d_Plot2d : public QwtPlot