2020-09-30 11:32:02 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
|
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
|
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
|
|
|
inline constexpr auto FileStatusSizeReady = 0x7FFFFFF0;
|
|
|
|
inline constexpr auto FileStatusSizeLoaded = 0x7FFFFFF1;
|
|
|
|
inline constexpr auto FileStatusSizeFailed = 0x7FFFFFF2;
|
|
|
|
|
|
|
|
[[nodiscard]] QString FormatSizeText(qint64 size);
|
|
|
|
[[nodiscard]] QString FormatDownloadText(qint64 ready, qint64 total);
|
2020-11-17 03:38:39 +00:00
|
|
|
[[nodiscard]] QString FormatProgressText(qint64 ready, qint64 total);
|
|
|
|
[[nodiscard]] QString FormatDateTime(QDateTime date, QString format);
|
2020-09-30 11:32:02 +00:00
|
|
|
[[nodiscard]] QString FormatDurationText(qint64 duration);
|
|
|
|
[[nodiscard]] QString FormatDurationWords(qint64 duration);
|
|
|
|
[[nodiscard]] QString FormatDurationAndSizeText(qint64 duration, qint64 size);
|
|
|
|
[[nodiscard]] QString FormatGifAndSizeText(qint64 size);
|
|
|
|
[[nodiscard]] QString FormatPlayedText(qint64 played, qint64 duration);
|
|
|
|
|
|
|
|
[[nodiscard]] QString FillAmountAndCurrency(
|
|
|
|
uint64 amount,
|
|
|
|
const QString ¤cy);
|
|
|
|
|
2020-10-13 15:11:53 +00:00
|
|
|
[[nodiscard]] QString ComposeNameString(
|
|
|
|
const QString &filename,
|
|
|
|
const QString &songTitle,
|
|
|
|
const QString &songPerformer);
|
|
|
|
|
2020-09-30 11:32:02 +00:00
|
|
|
} // namespace Ui
|