/* 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 #include "ui/wrap/padding_wrap.h" #include "base/timer.h" namespace Window { class SessionController; } // namespace Window namespace Ui { class UserpicButton; class FlatLabel; template class SlideWrap; } // namespace Ui namespace HistoryView { class StickerPlayer; } // namespace HistoryView namespace Data { class ForumTopic; } // namespace Data namespace Info { class Controller; class Section; } // namespace Info namespace style { struct InfoProfileCover; } // namespace style namespace Info::Profile { class EmojiStatusPanel; class Badge; class Cover final : public Ui::FixedHeightWidget { public: Cover( QWidget *parent, not_null peer, not_null controller); Cover( QWidget *parent, not_null topic, not_null controller); Cover( QWidget *parent, not_null peer, not_null controller, rpl::producer title); ~Cover(); Cover *setOnlineCount(rpl::producer &&count); [[nodiscard]] rpl::producer
showSection() const { return _showSection.events(); } private: using StickerPlayer = HistoryView::StickerPlayer; Cover( QWidget *parent, not_null peer, Data::ForumTopic *topic, not_null controller, rpl::producer title); void setupIcon(not_null topic); void setupIconPlayer(not_null topic); void setupIconImage(not_null topic); void setupChildGeometry(); void initViewers(rpl::producer title); void refreshStatusText(); void refreshNameGeometry(int newWidth); void refreshStatusGeometry(int newWidth); void refreshUploadPhotoOverlay(); const style::InfoProfileCover &_st; const not_null _controller; const not_null _peer; const std::unique_ptr _emojiStatusPanel; const std::unique_ptr _badge; int _onlineCount = 0; object_ptr _userpic; object_ptr _iconView; std::shared_ptr _iconPlayer; QImage _iconImage; object_ptr _name = { nullptr }; object_ptr _status = { nullptr }; //object_ptr _dropArea = { nullptr }; base::Timer _refreshStatusTimer; rpl::event_stream
_showSection; }; } // namespace Info::Profile