CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
image_controller_painted.cpp
Go to the documentation of this file.
1
10
11#include <spdlog/spdlog.h>
12
14
16 : Controller::ImageControllerBase(parent) {
17 spdlog::info("ImageControllerPainted: Initialized with PhotoEngine");
18}
19
21{
22 spdlog::debug("ImageControllerPainted: Destroyed, worker thread stopped");
23}
24
26{
27 m_painted_image_item = item;
28
30 {
31 m_display_manager->setRenderingItem(m_painted_image_item);
33 if (m_painted_image_item) {
34 spdlog::info("ImageControllerPainted: PaintedImageItem connected");
35 } else {
36 spdlog::debug("ImageControllerPainted: PaintedImageItem disconnected (set to nullptr)");
37 }
38 } else {
39 spdlog::warn("ImageControllerPainted: DisplayManager not available, cannot connect PaintedImageItem");
40 }
41}
42
44{
45 if (item) {
47 spdlog::info("ImageControllerPainted: PaintedImageItem connected from QML");
48 } else {
49 spdlog::warn("ImageControllerPainted: Received nullptr PaintedImageItem from QML");
50 }
51}
52
53} // namespace CaptureMoment::UI::Controller
std::unique_ptr< CaptureMoment::UI::Display::DisplayManager > m_display_manager
The unique displaymanager instance for managing display updates.
void setPaintedImageItem(CaptureMoment::UI::Rendering::PaintedImageItem *item)
Set the Painted display item for rendering.
Q_INVOKABLE void setPaintedImageItemFromQml(CaptureMoment::UI::Rendering::PaintedImageItem *item)
QML-accessible method to set the Painted image item.
ImageControllerPainted(QObject *parent=nullptr)
Constructs ImageController.
void paintedImageItemChanged()
Signal emitted when the Painted image item property changes.
~ImageControllerPainted()
Destructor - cleans up worker thread.
void setRenderingItem(Rendering::IRenderingItemBase *item)
Assigns the rendering item that will receive image updates.
QQuickItem that renders an image via QPainter.
Head for ImageControllerPainted from main class ImageControllerBase.
Simple image display using QQuickPaintedItem and QPainter (Qt 6)
CaptureMoment — footer