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

56 lines
1.2 KiB
C
Raw Normal View History

2018-06-02 14:29:21 +00:00
/*
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 "export/export_settings.h"
#include "ui/rp_widget.h"
2018-06-15 18:56:17 +00:00
namespace Ui {
class VerticalLayout;
} // namespace Ui
2018-06-02 14:29:21 +00:00
namespace Export {
namespace View {
class SettingsWidget : public Ui::RpWidget {
public:
SettingsWidget(QWidget *parent);
rpl::producer<Settings> startClicks() const;
rpl::producer<> cancelClicks() const;
private:
using Type = Settings::Type;
using Types = Settings::Types;
using MediaType = MediaSettings::Type;
using MediaTypes = MediaSettings::Types;
using Format = Output::Format;
2018-06-02 14:29:21 +00:00
void setupContent();
2018-06-20 18:12:47 +00:00
void chooseFolder();
2018-06-02 14:29:21 +00:00
void refreshButtons(not_null<Ui::RpWidget*> container);
2018-06-15 18:56:17 +00:00
void createSizeSlider(not_null<Ui::VerticalLayout*> container);
2018-06-02 14:29:21 +00:00
Settings _data;
struct Wrap {
Wrap(rpl::producer<> value = rpl::never<>())
: value(std::move(value)) {
}
rpl::producer<> value;
};
2018-06-20 18:12:47 +00:00
rpl::event_stream<Settings> _startClicks;
2018-06-02 14:29:21 +00:00
rpl::variable<Wrap> _cancelClicks;
2018-06-15 18:56:17 +00:00
rpl::event_stream<Settings::Types> _dataTypesChanges;
2018-06-02 14:29:21 +00:00
};
} // namespace View
} // namespace Export