blob: bd76e9d71a5ec63d86197e33c780de4db42b693a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef UTILS_H
#define UTILS_H
#include <QObject>
#include <QDebug>
#include <QFileInfo>
#include <QStandardPaths>
#include <QDir>
#include <QTextDocument>
#include <QUuid>
class utils : public QObject
{
Q_OBJECT
public:
utils(QObject* parent=0);
virtual ~utils();
public slots:
static QString refreshCacheSize(const QString cache_dir);
static bool delete_cache(const QString cache_dir);
static QString toCamelCase(const QString &s);
static QString generateRandomId(int length);
static QString genRand(int length);
static QString convertSectoDay(qint64 secs);
static QString returnPath(QString pathname);
static QString EncodeXML ( const QString& encodeMe );
static QString DecodeXML ( const QString& decodeMe );
static QString htmlToPlainText(QString str);
static QString GetEnvironmentVar(const QString &variable_name);
static float RoundToOneDecimal(float number);
void DisplayExceptionErrorDialog(const QString &error_info);
static QString appDebugInfo();
private slots:
//use refreshCacheSize
static quint64 dir_size(const QString &directory);
};
#endif // UTILS_H
|