2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-23 10:47:11 +00:00

59 lines
1.2 KiB
C
Raw Normal View History

/*
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-11-26 14:10:44 +03:00
#include "intro/intro_step.h"
namespace Ui {
class RoundButton;
2016-11-24 22:28:23 +03:00
class InputField;
class UserpicButton;
} // namespace Ui
2016-11-24 22:28:23 +03:00
namespace Intro {
2019-11-26 14:10:44 +03:00
namespace details {
2016-11-24 22:28:23 +03:00
2019-11-27 11:33:18 +03:00
class SignupWidget final : public Step {
public:
2019-07-24 10:46:23 +02:00
SignupWidget(
QWidget *parent,
not_null<Main::Account*> account,
2019-11-26 14:10:44 +03:00
not_null<Data*> data);
2018-06-01 10:00:18 +03:00
void finishInit() override;
2016-11-24 22:28:23 +03:00
void setInnerFocus() override;
void activate() override;
void cancelled() override;
2016-11-24 22:28:23 +03:00
void submit() override;
rpl::producer<QString> nextButtonText() const override;
2016-11-24 22:28:23 +03:00
protected:
void resizeEvent(QResizeEvent *e) override;
private:
void refreshLang();
void updateControlsGeometry();
2016-11-24 22:28:23 +03:00
void nameSubmitDone(const MTPauth_Authorization &result);
bool nameSubmitFail(const RPCError &error);
object_ptr<Ui::UserpicButton> _photo;
object_ptr<Ui::InputField> _first;
object_ptr<Ui::InputField> _last;
QString _firstName, _lastName;
mtpRequestId _sentRequest = 0;
bool _invertOrder = false;
2018-06-01 10:00:18 +03:00
bool _termsAccepted = false;
};
2016-11-24 22:28:23 +03:00
2019-11-26 14:10:44 +03:00
} // namespace details
2016-11-24 22:28:23 +03:00
} // namespace Intro