mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 10:11:41 -05:00
73 lines
1.5 KiB
C++
73 lines
1.5 KiB
C++
/*
|
|
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/rp_widget.h"
|
|
|
|
namespace Ui {
|
|
class PasswordInput;
|
|
class FlatLabel;
|
|
class LinkButton;
|
|
class RoundButton;
|
|
class UserpicButton;
|
|
class VerticalLayout;
|
|
} // namespace Ui
|
|
|
|
namespace Passport {
|
|
|
|
class PanelController;
|
|
|
|
class PanelAskPassword : public Ui::RpWidget {
|
|
public:
|
|
PanelAskPassword(
|
|
QWidget *parent,
|
|
not_null<PanelController*> controller);
|
|
|
|
void submit();
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent *e) override;
|
|
void focusInEvent(QFocusEvent *e) override;
|
|
|
|
private:
|
|
void updateControlsGeometry();
|
|
void showError(const QString &error);
|
|
void hideError();
|
|
void recover();
|
|
|
|
not_null<PanelController*> _controller;
|
|
|
|
object_ptr<Ui::UserpicButton> _userpic;
|
|
object_ptr<Ui::FlatLabel> _about1;
|
|
object_ptr<Ui::FlatLabel> _about2;
|
|
object_ptr<Ui::PasswordInput> _password;
|
|
object_ptr<Ui::FlatLabel> _hint = { nullptr };
|
|
object_ptr<Ui::FlatLabel> _error = { nullptr };
|
|
object_ptr<Ui::RoundButton> _submit;
|
|
object_ptr<Ui::LinkButton> _forgot;
|
|
|
|
};
|
|
|
|
class PanelNoPassword : public Ui::RpWidget {
|
|
public:
|
|
PanelNoPassword(
|
|
QWidget *parent,
|
|
not_null<PanelController*> controller);
|
|
|
|
private:
|
|
void setupContent();
|
|
void refreshBottom();
|
|
|
|
not_null<PanelController*> _controller;
|
|
|
|
not_null<Ui::VerticalLayout*> _inner;
|
|
base::unique_qptr<Ui::RpWidget> _about;
|
|
|
|
};
|
|
|
|
} // namespace Passport
|