tdesktop/Telegram/SourceFiles/boxes/peers/manage_peer_box.h

49 lines
1022 B
C
Raw Normal View History

2017-11-08 16:45:30 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
2017-11-08 16:45:30 +00:00
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
2017-11-08 16:45:30 +00:00
*/
#pragma once
#include "boxes/abstract_box.h"
2019-01-08 10:54:18 +00:00
namespace style {
struct InfoProfileCountButton;
} // namespace style
namespace Ui {
class VerticalLayout;
} // namespace Ui
namespace Info {
namespace Profile {
class Button;
} // namespace Profile
} // namespace Info
2017-11-08 16:45:30 +00:00
class ManagePeerBox : public BoxContent {
public:
ManagePeerBox(QWidget*, not_null<PeerData*> peer);
2017-11-08 16:45:30 +00:00
static bool Available(not_null<PeerData*> peer);
2017-11-08 16:45:30 +00:00
2019-01-08 10:54:18 +00:00
static Info::Profile::Button *CreateButton(
not_null<Ui::VerticalLayout*> parent,
rpl::producer<QString> &&text,
rpl::producer<QString> &&count,
Fn<void()> callback,
const style::InfoProfileCountButton &st,
const style::icon *icon = nullptr);
2019-01-08 10:54:18 +00:00
2017-11-08 16:45:30 +00:00
protected:
void prepare() override;
private:
void setupContent();
not_null<PeerData*> _peer;
2017-11-08 16:45:30 +00:00
};