format_song_name.h 739 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. namespace Ui::Text {
  9. class FormatSongName final {
  10. public:
  11. struct ComposedName {
  12. QString title;
  13. QString performer;
  14. };
  15. FormatSongName(
  16. const QString &filename,
  17. const QString &songTitle,
  18. const QString &songPerformer);
  19. [[nodiscard]] ComposedName composedName() const;
  20. [[nodiscard]] QString string() const;
  21. [[nodiscard]] TextWithEntities textWithEntities(
  22. bool boldOnlyPerformer = false) const;
  23. private:
  24. const ComposedName _composedName;
  25. };
  26. } // namespace Ui::Text