tdesktop/Telegram/SourceFiles/boxes/sticker_set_box.h

57 lines
1.2 KiB
C
Raw Normal View History

2015-05-19 15:46:45 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
2015-05-19 15:46:45 +00:00
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
2015-05-19 15:46:45 +00:00
*/
#pragma once
2017-04-06 14:38:10 +00:00
#include "boxes/abstract_box.h"
#include "base/timer.h"
#include "data/stickers/data_stickers.h"
2015-05-19 15:46:45 +00:00
namespace Window {
class SessionController;
} // namespace Window
namespace Ui {
2021-10-18 22:28:08 +00:00
class ConfirmBox;
class PlainShadow;
} // namespace Ui
2016-07-15 15:58:52 +00:00
class StickerSetBox final : public Ui::BoxContent {
2015-05-19 15:46:45 +00:00
public:
StickerSetBox(
QWidget*,
not_null<Window::SessionController*> controller,
const StickerSetIdentifier &set);
2019-09-18 11:19:05 +00:00
static QPointer<Ui::BoxContent> Show(
not_null<Window::SessionController*> controller,
not_null<DocumentData*> document);
protected:
void prepare() override;
void resizeEvent(QResizeEvent *e) override;
private:
2021-06-17 07:06:17 +00:00
enum class Error {
NotFound,
};
void updateTitleAndButtons();
void updateButtons();
void addStickers();
void copyStickersLink();
2021-06-17 07:06:17 +00:00
void handleError(Error error);
const not_null<Window::SessionController*> _controller;
const StickerSetIdentifier _set;
class Inner;
QPointer<Inner> _inner;
};