# LogDoctor: PrintSec Class Reference

Loading...
Searching...
No Matches
PrintSec Class Reference

## Static Public Member Functions

static const QString | printableSize (const unsigned bytes)
| Formats the size including the suffix, for display purposes. More...
static const QString | printableSpeed (const unsigned bytes, const unsigned seconds)
| Formats the speed including the suffix, for display purposes. More...
static const QString | printableTime (const unsigned seconds)
| Formats the time, for display purposes. More...
static 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. More...
static 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. More...
static const QString | printableBool (const int value)
| Returns a string corresponding to the given value. More...

## Member Function Documentation

## printableBool()

const QString PrintSec::printableBool | ( | const int | value | ) |

static

Returns a string corresponding to the given value.

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

Parameters

  value | The value to convert

Returns
  The corresponding printable string

## printableDate()

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

static

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

Parameters

  year | The year (4 digits number)
  month | The month
  day | The day

Returns
  The printable date

## printableSize()

const QString PrintSec::printableSize | ( | const unsigned | bytes | ) |

static

Formats the size including the suffix, for display purposes.

Parameters

  bytes | The size in bytes

Returns
  The string to be displayed

## printableSpeed()

const QString PrintSec::printableSpeed | ( | const unsigned | bytes,
|  | const unsigned | seconds
| ) |  |

static

Formats the speed including the suffix, for display purposes.

Parameters

  bytes | The size in bytes
  seconds | The 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
| ) |  |

static

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

Parameters

  hour | The hour
  minut | The minute
  second | The second

Returns
  The printable time

## printableTime() [2/2]

const QString PrintSec::printableTime | ( | const unsigned | seconds | ) |

static

Formats the time, for display purposes.

Parameters

  seconds | The number of seconds

Returns
  The string to be displayed

The documentation for this class was generated from the following files:

- logdoctor/utilities/printables.h
- logdoctor/utilities/printables.cpp