/* 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/layers/layer_widget.h" #include "base/unique_qptr.h" #include "editor/photo_editor_common.h" #include "ui/image/image.h" namespace Ui { struct PreparedFile; } // namespace Ui namespace Window { class Controller; class SessionController; } // namespace Window namespace Editor { void OpenWithPreparedFile( not_null parent, not_null controller, not_null file, int previewWidth, Fn &&doneCallback); void PrepareProfilePhoto( not_null parent, not_null controller, Fn &&doneCallback); class PhotoEditor; class LayerWidget : public Ui::LayerWidget { public: LayerWidget( not_null parent, not_null window, std::shared_ptr photo, PhotoModifications modifications, Fn &&doneCallback, EditorData data = EditorData()); void parentResized() override; bool closeByOutsideClick() const override; protected: void keyPressEvent(QKeyEvent *e) override; int resizeGetHeight(int newWidth) override; private: const base::unique_qptr _content; }; } // namespace Editor