mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Moved to separate file some structs for internal usage in photo editor.
This commit is contained in:
parent
bf8f3e42f4
commit
d2d97a3e47
8 changed files with 38 additions and 19 deletions
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
32
Telegram/SourceFiles/editor/photo_editor_inner_common.h
Normal file
32
Telegram/SourceFiles/editor/photo_editor_inner_common.h
Normal 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
|
Loading…
Add table
Reference in a new issue