tdesktop/Telegram/SourceFiles/export/view/export_view_progress.h

53 lines
1.1 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
#include "ui/rp_widget.h"
#include "export/view/export_view_content.h"
2018-06-19 20:31:30 +02:00
namespace Ui {
class VerticalLayout;
class RoundButton;
class FlatLabel;
2018-06-19 20:31:30 +02:00
} // namespace Ui
namespace Export {
namespace View {
class ProgressWidget : public Ui::RpWidget {
public:
ProgressWidget(
QWidget *parent,
rpl::producer<Content> content);
2018-06-19 20:31:30 +02:00
rpl::producer<> cancelClicks() const;
rpl::producer<> doneClicks() const;
2018-06-19 20:31:30 +02:00
~ProgressWidget();
private:
void setupBottomButton(not_null<Ui::RoundButton*> button);
void updateState(Content &&content);
void showDone();
Content _content;
class Row;
2018-06-19 20:31:30 +02:00
object_ptr<Ui::VerticalLayout> _body;
std::vector<not_null<Row*>> _rows;
QPointer<Ui::FlatLabel> _about;
base::unique_qptr<Ui::RoundButton> _cancel;
base::unique_qptr<Ui::RoundButton> _done;
rpl::event_stream<> _doneClicks;
};
} // namespace View
} // namespace Export