report_box_graphics.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 style {
  9. struct ReportBox;
  10. } // namespace style
  11. namespace Ui {
  12. class AbstractButton;
  13. class GenericBox;
  14. class VerticalLayout;
  15. enum class ReportSource {
  16. Message,
  17. Channel,
  18. Group,
  19. Bot,
  20. ProfilePhoto,
  21. ProfileVideo,
  22. GroupPhoto,
  23. GroupVideo,
  24. ChannelPhoto,
  25. ChannelVideo,
  26. Story,
  27. };
  28. enum class ReportReason {
  29. Spam,
  30. Fake,
  31. Violence,
  32. ChildAbuse,
  33. Pornography,
  34. Copyright,
  35. IllegalDrugs,
  36. PersonalDetails,
  37. Other,
  38. };
  39. void ReportReasonBox(
  40. not_null<GenericBox*> box,
  41. const style::ReportBox &st,
  42. ReportSource source,
  43. Fn<void(ReportReason)> done);
  44. void ReportDetailsBox(
  45. not_null<GenericBox*> box,
  46. const style::ReportBox &st,
  47. Fn<void(QString)> done);
  48. [[nodiscard]] not_null<Ui::AbstractButton*> AddReportOptionButton(
  49. not_null<Ui::VerticalLayout*> container,
  50. const QString &text,
  51. const style::ReportBox *stOverride);
  52. void AddReportDetailsIconButton(not_null<GenericBox*> box);
  53. } // namespace Ui