12#include <QApplication>
22#include <QModelIndexList>
33 buf.open (QIODevice::ReadWrite);
49 return QString::number (size,
'f', 1) +
units.value (
strNum);
70 QObject::tr (
"b",
"Short one-character unit for bytes."),
71 QObject::tr (
"K",
"Short one-character unit for kilobytes."),
72 QObject::tr (
"M",
"Short one-character unit for megabytes."),
73 QObject::tr (
"G",
"Short one-character unit for gigabytes.")
86 result += QObject::tr (
"%n day(s), ",
"",
d);
107 QCoreApplication::applicationDirPath () +
"/translations"))
108 #elif defined (Q_OS_MAC) && !defined (USE_UNIX_LAYOUT)
112 QCoreApplication::applicationDirPath () +
"/../Resources/translations"))
113 #elif defined (INSTALL_PREFIX)
138 QCoreApplication::installTranslator (
transl);
143 <<
"could not load translation file for locale"
154 QCoreApplication::applicationName ());
172 const auto&
cs = QLocale::countriesForLanguage (
lang);
184 if (
locale.language () == QLocale::AnyLanguage)
188 locStr.replace (
'_',
'-');
205 d <<
"sender is not a QAction*"
217 result->setSeparator (
true);
QString MakePrettySizeShort(qint64 sourcesize)
Converts a bytes count to a string representation with appropriately chosen units.
Container< T > Filter(const Container< T > &c, F f)
QString GetLocaleName()
Returns the current locale name, like en_US.
QTranslator * LoadTranslator(const QString &baseName, const QString &localeName, const QString &prefix, const QString &appName)
QString MakeTimeFromLong(ulong time)
Makes a formatted time from number.
QModelIndexList GetSummarySelectedRows(QObject *sender)
QString GetAsBase64Src(const QImage &pix)
Returns the given image in a Base64-encoded form.
QString GetLanguage()
Returns the current language name.
QAction * CreateSeparator(QObject *parent)
Returns the action that is set to act as a separator.
const QString LCLowercase
The "leechcraft" literal, with no run-time overhead.
QString MakePrettySize(qint64 sourcesize)
Makes a formatted size from number.
QTranslator * InstallTranslator(const QString &baseName, const QString &prefix, const QString &appName)
Loads and installs a translator.
QString GetInternetLocaleName(const QLocale &locale)