2018-03-31 01:45:40 +00:00
|
|
|
/*
|
|
|
|
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
|
|
|
|
|
2019-09-13 06:06:02 +00:00
|
|
|
#include "window/layer_widget.h"
|
|
|
|
|
|
|
|
class BoxContent;
|
|
|
|
|
2018-03-31 01:45:40 +00:00
|
|
|
namespace Ui {
|
2018-06-02 09:59:19 +00:00
|
|
|
class RpWidget;
|
|
|
|
class SeparatePanel;
|
2018-03-31 01:45:40 +00:00
|
|
|
} // namespace Ui
|
|
|
|
|
|
|
|
namespace Passport {
|
|
|
|
|
|
|
|
class PanelController;
|
|
|
|
|
2018-06-02 09:59:19 +00:00
|
|
|
class Panel {
|
2018-03-31 01:45:40 +00:00
|
|
|
public:
|
|
|
|
Panel(not_null<PanelController*> controller);
|
|
|
|
|
2018-04-13 18:14:14 +00:00
|
|
|
int hideAndDestroyGetDuration();
|
2018-03-31 01:45:40 +00:00
|
|
|
|
|
|
|
void showAskPassword();
|
|
|
|
void showNoPassword();
|
|
|
|
void showForm();
|
2018-04-15 15:06:53 +00:00
|
|
|
void showCriticalError(const QString &error);
|
2018-03-31 01:45:40 +00:00
|
|
|
void showEditValue(object_ptr<Ui::RpWidget> form);
|
2018-04-16 17:02:40 +00:00
|
|
|
void showBox(
|
|
|
|
object_ptr<BoxContent> box,
|
|
|
|
LayerOptions options,
|
|
|
|
anim::type animated);
|
2018-06-02 09:59:19 +00:00
|
|
|
void showToast(const QString &text);
|
2018-03-31 01:45:40 +00:00
|
|
|
|
|
|
|
rpl::producer<> backRequests() const;
|
|
|
|
void setBackAllowed(bool allowed);
|
|
|
|
|
2018-06-02 09:59:19 +00:00
|
|
|
not_null<Ui::RpWidget*> widget() const;
|
2018-03-31 01:45:40 +00:00
|
|
|
|
2018-06-02 09:59:19 +00:00
|
|
|
~Panel();
|
2018-03-31 01:45:40 +00:00
|
|
|
|
2018-06-02 09:59:19 +00:00
|
|
|
private:
|
2018-03-31 01:45:40 +00:00
|
|
|
not_null<PanelController*> _controller;
|
2018-06-02 09:59:19 +00:00
|
|
|
std::unique_ptr<Ui::SeparatePanel> _widget;
|
2018-03-31 01:45:40 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Passport
|