MythTV  master
Classes | Macros | Functions
statusbox.cpp File Reference
#include "statusbox.h"
#include <QRegExp>
#include <QHostAddress>
#include <QNetworkInterface>
#include "mythcorecontext.h"
#include "filesysteminfo.h"
#include "mythmiscutil.h"
#include "mythdb.h"
#include "mythlogging.h"
#include "mythversion.h"
#include "mythdate.h"
#include "config.h"
#include "remoteutil.h"
#include "tv.h"
#include "jobqueue.h"
#include "cardutil.h"
#include "recordinginfo.h"
#include "mythuihelper.h"
#include "mythuibuttonlist.h"
#include "mythuitext.h"
#include "mythuistatetype.h"
#include "mythdialogbox.h"
Include dependency graph for statusbox.cpp:

Go to the source code of this file.

Classes

struct  LogLine
 

Macros

#define ADD_STATUS_LOG_LINE(rtype, fstate)
 

Functions

static QString sm_str (long long sizeKB, int prec=1)
 Returns a short string describing an amount of space, choosing one of a number of useful units, "TB", "GB", "MB", or "KB". More...
 
static QString usage_str_kb (long long total, long long used, long long free)
 
static QString usage_str_mb (float total, float used, float free)
 
static void disk_usage_with_rec_time_kb (QStringList &out, long long total, long long used, long long free, const recprof2bps_t &prof2bps)
 
static QString uptimeStr (time_t uptime)
 

Macro Definition Documentation

◆ ADD_STATUS_LOG_LINE

#define ADD_STATUS_LOG_LINE (   rtype,
  fstate 
)
Value:
do { \
if (statusMatch[rtype] > 0) \
{ \
tmpstr = QString("%1 %2").arg(statusMatch[rtype]) \
.arg(statusText[rtype]); \
AddLogLine(tmpstr, helpmsg, tmpstr, tmpstr, fstate);\
} \
} while (false)

Function Documentation

◆ sm_str()

sm_str ( long long  sizeKB,
int  prec = 1 
)
static

Returns a short string describing an amount of space, choosing one of a number of useful units, "TB", "GB", "MB", or "KB".

Parameters
sizeKBNumber of kilobytes.
precPrecision to use if we have less than ten of whatever unit is chosen.

Definition at line 1084 of file statusbox.cpp.

Referenced by StatusBox::doAutoExpireList(), and usage_str_kb().

◆ usage_str_kb()

static QString usage_str_kb ( long long  total,
long long  used,
long long  free 
)
static

Definition at line 1105 of file statusbox.cpp.

Referenced by disk_usage_with_rec_time_kb(), and usage_str_mb().

◆ usage_str_mb()

static QString usage_str_mb ( float  total,
float  used,
float  free 
)
static

Definition at line 1120 of file statusbox.cpp.

Referenced by StatusBox::doMachineStatus().

◆ disk_usage_with_rec_time_kb()

static void disk_usage_with_rec_time_kb ( QStringList &  out,
long long  total,
long long  used,
long long  free,
const recprof2bps_t prof2bps 
)
static

Definition at line 1126 of file statusbox.cpp.

Referenced by StatusBox::doMachineStatus().

◆ uptimeStr()

static QString uptimeStr ( time_t  uptime)
static

Definition at line 1159 of file statusbox.cpp.

Referenced by StatusBox::doMachineStatus().