some code style changes, adjusted some parameters for graph

This commit is contained in:
Volker Fischer 2009-06-07 09:25:02 +00:00
parent b52fd5ed9e
commit 742201760b
2 changed files with 15 additions and 14 deletions

View File

@ -32,15 +32,16 @@ CHistoryGraph::CHistoryGraph() :
vDateTimeFifo ( NUM_ITEMS_HISTORY ), vDateTimeFifo ( NUM_ITEMS_HISTORY ),
vItemTypeFifo ( NUM_ITEMS_HISTORY ), vItemTypeFifo ( NUM_ITEMS_HISTORY ),
PlotCanvasRect ( 0, 0, 600, 450 ), // defines total size of graph PlotCanvasRect ( 0, 0, 600, 450 ), // defines total size of graph
iNumTicksX ( 0 ), // just an initialization value, will be overwritten
iYAxisStart ( 0 ), iYAxisStart ( 0 ),
iYAxisEnd ( 24 ), iYAxisEnd ( 24 ),
iNumTicksY ( 5 ), iNumTicksY ( 5 ),
iNumTicksX ( 0 ), // just initialization value, will be overwritten
iGridFrameOffset ( 10 ), iGridFrameOffset ( 10 ),
iTextOffsetToGrid ( 3 ), iTextOffsetToGrid ( 3 ),
iYAxisTextHeight ( 20 ), iYAxisTextHeight ( 20 ),
AxisFont ( "Arial", 10 ),
iMarkerSize ( 9 ), iMarkerSize ( 9 ),
AxisFont ( "Arial", 12 ),
iTextOffsetX ( 18 ),
PlotBackgroundColor ( Qt::white ), // white background PlotBackgroundColor ( Qt::white ), // white background
PlotFrameColor ( Qt::black ), // black frame PlotFrameColor ( Qt::black ), // black frame
PlotGridColor ( Qt::gray ), // gray grid PlotGridColor ( Qt::gray ), // gray grid
@ -111,7 +112,6 @@ void CHistoryGraph::DrawFrame ( const int iNewNumTicksX )
const int iXAxisTickStep = iNumTicksX / 5 + 1; const int iXAxisTickStep = iNumTicksX / 5 + 1;
// grid (ticks) for x-axis // grid (ticks) for x-axis
const int iTextOffsetX = 20;
iXSpace = PlotGridFrame.width() / ( iNumTicksX + 1 ); iXSpace = PlotGridFrame.width() / ( iNumTicksX + 1 );
for ( i = 0; i < iNumTicksX; i++ ) for ( i = 0; i < iNumTicksX; i++ )
{ {

View File

@ -65,6 +65,7 @@ protected:
int iNumTicksY; int iNumTicksY;
int iGridFrameOffset; int iGridFrameOffset;
int iTextOffsetToGrid; int iTextOffsetToGrid;
int iTextOffsetX;
int iYAxisTextHeight; int iYAxisTextHeight;
int iMarkerSize; int iMarkerSize;
int iXSpace; int iXSpace;