LeechCraft 0.6.70-14794-g33744ae6ce
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
util.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include "utilconfig.h"
12#include <QString>
13
14class QTranslator;
15class QLocale;
16class QAction;
17class QImage;
18class QObject;
19
20template<typename T>
21class QList;
22
23class QModelIndex;
24
25namespace LC::Util
26{
37
49
65
76
78 const QString& locale,
79 const QString& prefix = "leechcraft",
80 const QString& appname = "leechcraft");
81
101 const QString& prefix = "leechcraft",
102 const QString& appname = "leechcraft");
103
123
125
136
138
146 UTIL_API QAction* CreateSeparator (QObject *parent);
147}
QString MakePrettySizeShort(qint64 sourcesize)
Converts a bytes count to a string representation with appropriately chosen units.
Definition util.cpp:64
Container< T > Filter(const Container< T > &c, F f)
Definition prelude.h:155
QString GetLocaleName()
Returns the current locale name, like en_US.
Definition util.cpp:149
QTranslator * LoadTranslator(const QString &baseName, const QString &localeName, const QString &prefix, const QString &appName)
Definition util.cpp:89
QString MakeTimeFromLong(ulong time)
Makes a formatted time from number.
Definition util.cpp:77
QModelIndexList GetSummarySelectedRows(QObject *sender)
Definition util.cpp:195
QTranslator * InstallTranslator(const QString &baseName, const QString &prefix, const QString &appName)
Loads and installs a translator.
Definition util.cpp:129
QString GetAsBase64Src(const QImage &pix)
Returns the given image in a Base64-encoded form.
Definition util.cpp:28
QString GetLanguage()
Returns the current language name.
Definition util.cpp:190
QAction * CreateSeparator(QObject *parent)
Returns the action that is set to act as a separator.
Definition util.cpp:212
QString MakePrettySize(qint64 sourcesize)
Makes a formatted size from number.
Definition util.cpp:51
QString GetInternetLocaleName(const QLocale &locale)
Definition util.cpp:180
#define UTIL_API
Definition utilconfig.h:16