2021-02-05 05:44:04 +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 "ui/rp_widget.h"
|
|
|
|
|
2021-02-07 23:10:30 +00:00
|
|
|
#include "editor/photo_editor_common.h"
|
|
|
|
|
2021-02-05 07:08:20 +00:00
|
|
|
#include "base/unique_qptr.h"
|
|
|
|
|
2021-02-05 05:44:04 +00:00
|
|
|
namespace Editor {
|
|
|
|
|
|
|
|
class PhotoEditorContent;
|
|
|
|
class PhotoEditorControls;
|
|
|
|
|
|
|
|
class PhotoEditor final : public Ui::RpWidget {
|
|
|
|
public:
|
|
|
|
PhotoEditor(
|
|
|
|
not_null<Ui::RpWidget*> parent,
|
|
|
|
std::shared_ptr<QPixmap> photo);
|
|
|
|
|
2021-02-08 03:13:40 +00:00
|
|
|
void save();
|
|
|
|
rpl::producer<PhotoModifications> done() const;
|
|
|
|
|
2021-02-05 05:44:04 +00:00
|
|
|
private:
|
|
|
|
|
2021-02-07 23:10:30 +00:00
|
|
|
PhotoModifications _modifications;
|
|
|
|
|
2021-02-05 07:08:20 +00:00
|
|
|
base::unique_qptr<PhotoEditorContent> _content;
|
|
|
|
base::unique_qptr<PhotoEditorControls> _controls;
|
|
|
|
|
2021-02-08 03:13:40 +00:00
|
|
|
rpl::event_stream<PhotoModifications> _done;
|
|
|
|
|
2021-02-05 05:44:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Editor
|