photo_editor_layer_widget.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. enum class ImageRoundRadius;
  9. namespace ChatHelpers {
  10. class Show;
  11. } // namespace ChatHelpers
  12. namespace Ui {
  13. class RpWidget;
  14. struct PreparedFile;
  15. } // namespace Ui
  16. namespace Window {
  17. class Controller;
  18. class SessionController;
  19. } // namespace Window
  20. namespace Editor {
  21. constexpr auto kProfilePhotoSize = int(640);
  22. struct EditorData;
  23. void OpenWithPreparedFile(
  24. not_null<QWidget*> parent,
  25. std::shared_ptr<ChatHelpers::Show> show,
  26. not_null<Ui::PreparedFile*> file,
  27. int previewWidth,
  28. Fn<void(bool ok)> &&doneCallback,
  29. QSize exactSize = {});
  30. void PrepareProfilePhoto(
  31. not_null<QWidget*> parent,
  32. not_null<Window::Controller*> controller,
  33. EditorData data,
  34. Fn<void(QImage &&image)> &&doneCallback,
  35. QImage &&image);
  36. void PrepareProfilePhotoFromFile(
  37. not_null<QWidget*> parent,
  38. not_null<Window::Controller*> controller,
  39. EditorData data,
  40. Fn<void(QImage &&image)> &&doneCallback);
  41. } // namespace Editor