some code style changes, adjusted some parameters for graph
This commit is contained in:
parent
b52fd5ed9e
commit
742201760b
2 changed files with 15 additions and 14 deletions
|
@ -31,21 +31,22 @@ CHistoryGraph::CHistoryGraph() :
|
||||||
bDoHistory ( false ),
|
bDoHistory ( false ),
|
||||||
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
|
||||||
iYAxisStart ( 0 ),
|
iNumTicksX ( 0 ), // just an initialization value, will be overwritten
|
||||||
iYAxisEnd ( 24 ),
|
iYAxisStart ( 0 ),
|
||||||
iNumTicksY ( 5 ),
|
iYAxisEnd ( 24 ),
|
||||||
iNumTicksX ( 0 ), // just initialization value, will be overwritten
|
iNumTicksY ( 5 ),
|
||||||
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
|
||||||
PlotTextColor ( Qt::black ), // black text
|
PlotTextColor ( Qt::black ), // black text
|
||||||
PlotMarkerNewColor ( Qt::blue ), // blue marker for new connection
|
PlotMarkerNewColor ( Qt::blue ), // blue marker for new connection
|
||||||
PlotMarkerStopColor ( Qt::red ), // red marker server stop
|
PlotMarkerStopColor ( Qt::red ), // red marker server stop
|
||||||
PlotPixmap ( 1, 1, QImage::Format_RGB32 )
|
PlotPixmap ( 1, 1, QImage::Format_RGB32 )
|
||||||
{
|
{
|
||||||
|
@ -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++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue