/* 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" class BoxContentDivider; namespace Ui { class InputField; class VerticalLayout; class ScrollArea; class FadeShadow; class PlainShadow; class FlatLabel; class RoundButton; template class SlideWrap; } // namespace Ui namespace Info { namespace Profile { class Button; } // namespace Profile } // namespace Info namespace Passport { class PanelController; struct ValueMap; struct ScanInfo; class ScanButton; class PanelEditIdentity : public Ui::RpWidget { public: PanelEditIdentity( QWidget *parent, not_null controller, int valueIndex, const ValueMap &data, std::vector &&files); protected: void focusInEvent(QFocusEvent *e) override; void resizeEvent(QResizeEvent *e) override; private: void setupControls(const ValueMap &data); not_null setupContent(const ValueMap &data); void updateControlsGeometry(); void chooseScan(); void encryptScan(const QString &path); void encryptScanContent(QByteArray &&content); void updateScan(ScanInfo &&info); void pushScan(const ScanInfo &info); rpl::producer uploadButtonText() const; void save(); not_null _controller; int _valueIndex = -1; std::vector _files; object_ptr _scroll; object_ptr _topShadow; object_ptr _bottomShadow; QPointer> _scansDivider; QPointer> _scansHeader; QPointer _scansWrap; std::vector>> _scans; QPointer _scansUpload; QPointer _firstName; QPointer _lastName; object_ptr _done; }; } // namespace Passport