code style changes

This commit is contained in:
Volker Fischer 2020-03-22 20:24:30 +01:00
parent 09efb08254
commit 4cac0e935b
6 changed files with 14 additions and 19 deletions

View file

@ -92,7 +92,7 @@ LED bar: lbr
// file name for logging file // file name for logging file
#define DEFAULT_LOG_FILE_NAME "Jamulussrvlog.txt" #define DEFAULT_LOG_FILE_NAME "Jamulussrvlog.txt"
// Default oldest item to draw in history graph (days ago) // default oldest item to draw in history graph (days ago)
#define DEFAULT_DAYS_HISTORY 60 #define DEFAULT_DAYS_HISTORY 60
// default server address // default server address

View file

@ -27,7 +27,7 @@
/* Abstract class *************************************************************/ /* Abstract class *************************************************************/
AHistoryGraph::AHistoryGraph( const int iMaxDaysHistory ) : AHistoryGraph::AHistoryGraph ( const int iMaxDaysHistory ) :
sFileName ( "" ), sFileName ( "" ),
bDoHistory ( false ), bDoHistory ( false ),
vHistoryDataFifo ( NUM_ITEMS_HISTORY ), vHistoryDataFifo ( NUM_ITEMS_HISTORY ),
@ -137,7 +137,7 @@ void AHistoryGraph::Update ( )
curDate = QDate::currentDate(); curDate = QDate::currentDate();
// set oldest date to draw // set oldest date to draw
QDate minDate = curDate.addDays ( iHistMaxDays * -1 ); QDate minDate = curDate.addDays ( iHistMaxDays * -1 );
// get oldest date in history // get oldest date in history
QDate oldestDate = curDate.addDays ( 1 ); // one day in the future QDate oldestDate = curDate.addDays ( 1 ); // one day in the future
@ -299,7 +299,7 @@ void AHistoryGraph::AddMarker ( const SHistoryData& curHistoryData )
/* JPEG History Graph implementation ******************************************/ /* JPEG History Graph implementation ******************************************/
CJpegHistoryGraph::CJpegHistoryGraph( const int iMaxDaysHistory ) : CJpegHistoryGraph::CJpegHistoryGraph ( const int iMaxDaysHistory ) :
AHistoryGraph ( iMaxDaysHistory ), AHistoryGraph ( iMaxDaysHistory ),
PlotPixmap ( 1, 1, QImage::Format_RGB32 ), PlotPixmap ( 1, 1, QImage::Format_RGB32 ),
iAxisFontWeight ( -1 ) iAxisFontWeight ( -1 )
@ -404,7 +404,7 @@ void CJpegHistoryGraph::point ( const unsigned int x, const unsigned int y, cons
/* SVG History Graph implementation *******************************************/ /* SVG History Graph implementation *******************************************/
CSvgHistoryGraph::CSvgHistoryGraph( const int iMaxDaysHistory ) : CSvgHistoryGraph::CSvgHistoryGraph ( const int iMaxDaysHistory ) :
AHistoryGraph ( iMaxDaysHistory ), AHistoryGraph ( iMaxDaysHistory ),
svgImage ( "" ), svgImage ( "" ),
svgStreamWriter ( &svgImage ) svgStreamWriter ( &svgImage )

View file

@ -58,7 +58,7 @@ public:
HIT_SERVER_STOP HIT_SERVER_STOP
}; };
AHistoryGraph( const int iMaxDaysHistory ); AHistoryGraph ( const int iMaxDaysHistory );
~AHistoryGraph() { } ~AHistoryGraph() { }
void Start ( const QString& sNewFileName ); void Start ( const QString& sNewFileName );
@ -139,7 +139,7 @@ class CJpegHistoryGraph : public QObject, virtual public AHistoryGraph
Q_OBJECT Q_OBJECT
public: public:
CJpegHistoryGraph( const int iMaxDaysHistory ); CJpegHistoryGraph ( const int iMaxDaysHistory );
virtual void Update ( ); virtual void Update ( );
protected: protected:
@ -163,7 +163,7 @@ class CSvgHistoryGraph : public QObject, virtual public AHistoryGraph
Q_OBJECT Q_OBJECT
public: public:
CSvgHistoryGraph( const int iMaxDaysHistory ); CSvgHistoryGraph ( const int iMaxDaysHistory );
virtual void Update(); virtual void Update();
protected: protected:

View file

@ -130,8 +130,7 @@ int main ( int argc, char** argv )
} }
// Maximum days in history display -------------------------------------
// Maximum days in history display ------------------------------------
if ( GetNumericArgument ( tsConsole, if ( GetNumericArgument ( tsConsole,
argc, argc,
argv, argv,

View file

@ -25,14 +25,6 @@
#include "serverlogging.h" #include "serverlogging.h"
// Server logging -------------------------------------------------------------- // Server logging --------------------------------------------------------------
CServerLogging::CServerLogging( const int iMaxDaysHistory ) :
JpegHistoryGraph ( iMaxDaysHistory ),
SvgHistoryGraph ( iMaxDaysHistory ),
bDoLogging ( false ),
File ( DEFAULT_LOG_FILE_NAME )
{
}
CServerLogging::~CServerLogging() CServerLogging::~CServerLogging()
{ {
// close logging file of open // close logging file of open

View file

@ -38,7 +38,11 @@
class CServerLogging class CServerLogging
{ {
public: public:
CServerLogging( const int iMaxDaysHistory ); CServerLogging ( const int iMaxDaysHistory ) :
JpegHistoryGraph ( iMaxDaysHistory ),
SvgHistoryGraph ( iMaxDaysHistory ),
bDoLogging ( false ),
File ( DEFAULT_LOG_FILE_NAME ) {}
virtual ~CServerLogging(); virtual ~CServerLogging();