calls_cover_item.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. #include "ui/rp_widget.h"
  9. #include "ui/widgets/menu/menu_item_base.h"
  10. #include "boxes/peers/peer_short_info_box.h"
  11. struct PreparedShortInfoUserpic;
  12. namespace style {
  13. struct ShortInfoCover;
  14. } // namespace style
  15. namespace Calls {
  16. namespace Group {
  17. struct MuteRequest;
  18. struct VolumeRequest;
  19. struct ParticipantState;
  20. } // namespace Group
  21. class CoverItem final : public Ui::Menu::ItemBase {
  22. public:
  23. CoverItem(
  24. not_null<RpWidget*> parent,
  25. const style::Menu &stMenu,
  26. const style::ShortInfoCover &st,
  27. rpl::producer<QString> name,
  28. rpl::producer<QString> status,
  29. PreparedShortInfoUserpic userpic);
  30. not_null<QAction*> action() const override;
  31. bool isEnabled() const override;
  32. private:
  33. int contentHeight() const override;
  34. const PeerShortInfoCover _cover;
  35. const not_null<QAction*> _dummyAction;
  36. const style::ShortInfoCover &_st;
  37. };
  38. class AboutItem final : public Ui::Menu::ItemBase {
  39. public:
  40. AboutItem(
  41. not_null<RpWidget*> parent,
  42. const style::Menu &st,
  43. TextWithEntities &&about);
  44. not_null<QAction*> action() const override;
  45. bool isEnabled() const override;
  46. private:
  47. int contentHeight() const override;
  48. const style::Menu &_st;
  49. const base::unique_qptr<Ui::FlatLabel> _text;
  50. const not_null<QAction*> _dummyAction;
  51. };
  52. } // namespace Calls