LogDoctor 2.05
Parse Apache2/Nginx/IIS logs and view dinamically generated statistics
Loading...
Searching...
No Matches
Functions
PrintSec Namespace Reference

PrintSec. More...

Functions

const QString printableSize (const size_t bytes)
 Formats the size including the suffix, for display purposes.
 
const QString printableSpeed (const double bytes, const double seconds)
 Formats the speed including the suffix, for display purposes.
 
const QString printableTime (const unsigned seconds)
 Formats the time, for display purposes.
 
const QString printableTime (const int hour, const int minute, const int second)
 Returns a string of the given time in the format HH:MM:SS.
 
const QString printableDate (const int year, const int month, const int day)
 Returns a string of the given date in the format YYYY-MM-DD.
 
const QString printableBool (const int value)
 Returns a string corresponding to the given value.
 

Detailed Description

PrintSec.

Utilities to have printable stuff

Function Documentation

◆ printableBool()

const QString PrintSec::printableBool ( const int  value)

Returns a string corresponding to the given value.

Used to convert numeric booleans [0,1] to string [FALSE,TRUE]

Parameters
valueThe value to convert
Returns
The corresponding printable string

◆ printableDate()

const QString PrintSec::printableDate ( const int  year,
const int  month,
const int  day 
)

Returns a string of the given date in the format YYYY-MM-DD.

Parameters
yearThe year (4 digits number)
monthThe month
dayThe day
Returns
The printable date

◆ printableSize()

const QString PrintSec::printableSize ( const size_t  bytes)

Formats the size including the suffix, for display purposes.

Parameters
bytesThe size in bytes
Returns
The string to be displayed

◆ printableSpeed()

const QString PrintSec::printableSpeed ( const double  bytes,
const double  seconds 
)

Formats the speed including the suffix, for display purposes.

Parameters
bytesThe size in bytes
secondsThe number of seconds
Returns
The string to be displayed

◆ printableTime() [1/2]

const QString PrintSec::printableTime ( const int  hour,
const int  minute,
const int  second 
)

Returns a string of the given time in the format HH:MM:SS.

Parameters
hourThe hour
minutThe minute
secondThe second
Returns
The printable time

◆ printableTime() [2/2]

const QString PrintSec::printableTime ( const unsigned  seconds)

Formats the time, for display purposes.

Parameters
secondsThe number of seconds
Returns
The string to be displayed