tdesktop/Telegram/SourceFiles/intro/intro_signup.h

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