2018-06-02 17:29:21 +03: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 21:56:17 +03:00
|
|
|
namespace Ui {
|
|
|
|
class VerticalLayout;
|
|
|
|
} // namespace Ui
|
|
|
|
|
2018-06-02 17:29:21 +03: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;
|
|
|
|
|
|
|
|
void setupContent();
|
2018-06-20 19:12:47 +01:00
|
|
|
void chooseFolder();
|
2018-06-02 17:29:21 +03:00
|
|
|
void refreshButtons(not_null<Ui::RpWidget*> container);
|
2018-06-15 21:56:17 +03:00
|
|
|
void createSizeSlider(not_null<Ui::VerticalLayout*> container);
|
2018-06-02 17:29:21 +03:00
|
|
|
|
|
|
|
Settings _data;
|
|
|
|
struct Wrap {
|
|
|
|
Wrap(rpl::producer<> value = rpl::never<>())
|
|
|
|
: value(std::move(value)) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpl::producer<> value;
|
|
|
|
|
|
|
|
};
|
2018-06-20 19:12:47 +01:00
|
|
|
rpl::event_stream<Settings> _startClicks;
|
2018-06-02 17:29:21 +03:00
|
|
|
rpl::variable<Wrap> _cancelClicks;
|
2018-06-15 21:56:17 +03:00
|
|
|
rpl::event_stream<Settings::Types> _dataTypesChanges;
|
2018-06-02 17:29:21 +03:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace View
|
|
|
|
} // namespace Export
|