Moved to separate file some structs for internal usage in photo editor.

This commit is contained in:
23rd 2021-07-07 20:51:13 +03:00
parent bf8f3e42f4
commit d2d97a3e47
8 changed files with 38 additions and 19 deletions

View File

@ -525,6 +525,7 @@ PRIVATE
editor/photo_editor_content.h
editor/photo_editor_controls.cpp
editor/photo_editor_controls.h
editor/photo_editor_inner_common.h
editor/photo_editor_layer_widget.cpp
editor/photo_editor_layer_widget.h
editor/scene/scene.cpp

View File

@ -8,7 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#pragma once
#include "base/unique_qptr.h"
#include "editor/photo_editor_common.h"
#include "editor/photo_editor_inner_common.h"
#include "ui/effects/animations.h"
namespace Ui {

View File

@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/rp_widget.h"
#include "editor/photo_editor_common.h"
#include "editor/photo_editor_inner_common.h"
#include "editor/scene/scene_item_base.h"
class QGraphicsItem;

View File

@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/unique_qptr.h"
#include "editor/photo_editor_common.h"
#include "editor/photo_editor_inner_common.h"
#include "ui/image/image.h"
namespace Window {

View File

@ -11,19 +11,6 @@ namespace Editor {
class Scene;
struct PhotoEditorMode {
enum class Mode {
Transform,
Paint,
} mode = Mode::Transform;
enum class Action {
None,
Save,
Discard,
} action = Action::None;
};
struct PhotoModifications {
int angle = 0;
bool flipped = false;
@ -46,11 +33,6 @@ struct EditorData {
bool keepAspectRatio = false;
};
struct Brush {
float sizeRatio = 0.;
QColor color;
};
[[nodiscard]] QImage ImageModified(
QImage image,
const PhotoModifications &mods);

View File

@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/rp_widget.h"
#include "editor/photo_editor_common.h"
#include "editor/photo_editor_inner_common.h"
#include "ui/image/image.h"
namespace Editor {

View File

@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/effects/animations.h"
#include "editor/photo_editor_common.h"
#include "editor/photo_editor_inner_common.h"
namespace Ui {
class IconButton;

View File

@ -0,0 +1,32 @@
/*
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
namespace Editor {
class Scene;
struct PhotoEditorMode {
enum class Mode {
Transform,
Paint,
} mode = Mode::Transform;
enum class Action {
None,
Save,
Discard,
} action = Action::None;
};
struct Brush {
float sizeRatio = 0.;
QColor color;
};
} // namespace Editor