myXGridMinorEnabled( false ), myYGridMinorEnabled( false ), myY2GridMinorEnabled( false ),
myXGridMaxMajor( 8 ), myYGridMaxMajor( 8 ), myY2GridMaxMajor( 8 ),
myXGridMaxMinor( 5 ), myYGridMaxMinor( 5 ), myY2GridMaxMinor( 5 ),
- myXMode( 0 ), myYMode( 0 ), mySecondY( false ), myKeepCurrentRange( false ),
+ myXMode( 0 ), myYMode( 0 ),
+ myXDistance( 0 ), myYDistance( 0 ), myYDistance2( 0 ),
+ mySecondY( false ), myKeepCurrentRange( false ),
+ myXMultiplier( 1 ),
myTitleAutoUpdate( true ), myXTitleAutoUpdate( true ), myYTitleAutoUpdate( true ),
myTitleChangedByUser( false ), myXTitleChangedByUser( false ), myYTitleChangedByUser( false ),
myY2TitleChangedByUser( false ), myIsTimeColorization( false ), myTimePosition( -1 ), myInactiveColor( Qt::gray )
/*!
Get second Y
*/
-bool Plot2d_ViewFrame::getSecondY()
+bool Plot2d_ViewFrame::getSecondY() const
{
return mySecondY;
}
/*!
Get flag which indicate keep current range or not
*/
-bool Plot2d_ViewFrame::getKeepCurrentRange()
+bool Plot2d_ViewFrame::getKeepCurrentRange() const
{
return myKeepCurrentRange;
}
+/*!
+ Set X axis multiplier
+*/
+void Plot2d_ViewFrame::setXMultiplier( const double theXMultiplier )
+{
+ myXMultiplier = theXMultiplier;
+}
+
+/*!
+ Get X axis multiplier
+*/
+double Plot2d_ViewFrame::getXMultiplier() const
+{
+ return myXMultiplier;
+}
+
/*!
Erase presentation
*/
curve->buildSymbolsColorMap( myPlot, MAX_ATTEMPTS );
}
setCurveType( aPCurve, myCurveType );
- aPCurve->setData( curve->horData(), curve->verData(), curve->nbPoints() );
+ aPCurve->setData( curve->horData( 1.0 / myXMultiplier ), curve->verData(), curve->nbPoints() );
aPCurve->setYAxis( curve->getYAxis() );
aPCurve->setSymbolsColorData( curve->colorData(), curve->nbPoints() );
aPCurve->setSymbolsColorMap( curve->getColorMap() );
QBrush( curve->getColor() ),
QPen( curve->getColor(), 1 ), // width's set to 1 for correct printing
QSize( myMarkerSize, myMarkerSize ) ) );
- aPCurve->setData( curve->horData(), curve->verData(), curve->nbPoints() );
+ aPCurve->setData( curve->horData( 1.0 / myXMultiplier ), curve->verData(), curve->nbPoints() );
Plot2d_PlotCurve* aPlot2dCurve = dynamic_cast< Plot2d_PlotCurve* >( aPCurve );
if ( aPlot2dCurve )
{
QString getTitle( ObjectType type ) const;
void setSecondY( const bool& theSecondY );
- bool getSecondY();
+ bool getSecondY() const;
- bool getKeepCurrentRange();
void setKeepCurrentRange( const bool& theKeepCurrentRange );
+ bool getKeepCurrentRange() const;
+
+ void setXMultiplier( const double theXMultiplier );
+ double getXMultiplier() const;
bool isTitleChangedByUser( const ObjectType type );
void forgetLocalUserChanges( const ObjectType type );
double myXDistance, myYDistance, myYDistance2;
bool mySecondY;
bool myKeepCurrentRange;
-
+
+ double myXMultiplier; // 0.001 for ms, 1 for seconds, 60 for minutes, 3600 for hours
+
bool myTitleAutoUpdate, myXTitleAutoUpdate, myYTitleAutoUpdate;
bool myTitleChangedByUser, myXTitleChangedByUser, myYTitleChangedByUser,
myY2TitleChangedByUser;
myStartPoint = 0;
myEndPoint = 0;
+ myTimeUnit = -1;
+
// Scalar bar
myToDisplayScalarBar = false;
theBounds[4] = myRealBounds[4];
theBounds[5] = myRealBounds[5];
}
+
+//=============================================================================
+// Function : SetTimeUnit
+// Purpose :
+//=============================================================================
+void Plot3d_Actor::SetTimeUnit( const int theTimeUnit )
+{
+ myTimeUnit = theTimeUnit;
+}
+
+//=============================================================================
+// Function : GetTimeUnit
+// Purpose :
+//=============================================================================
+int Plot3d_Actor::GetTimeUnit() const
+{
+ return myTimeUnit;
+}