CaptureMoment 0.1.0
Free and open-source non-destructive photo editor
Loading...
Searching...
No Matches
operation_provider.h
Go to the documentation of this file.
1
8#pragma once
9
10#include <QObject>
11#include <spdlog/spdlog.h>
13
14namespace CaptureMoment::UI {
15
16namespace Models::Operations {
17
35class OperationProvider : public QObject, public IOperationModel {
36 Q_OBJECT
37
38public:
43 explicit OperationProvider(QObject* parent = nullptr){ spdlog::debug("OperationProvider: Constructed"); };
44
48 virtual ~OperationProvider() = default;
49
50public slots:
56 virtual void onOperationCompleted() = 0;
57
65 virtual void onOperationFailed(const QString& error) = 0;
66
67signals:
75
81
88 void operationFailed(QString error);
89};
90
91} // namespace Models::Operations
92
93} // namespace CaptureMoment::UI
Pure interface for operation models.
Generic base class providing Qt signals/slots infrastructure for operation models.
void isActiveChanged()
Signal emitted when the operation's activity state changes. This signal is emitted by the operation m...
void operationApplied()
Signal emitted when an operation is applied successfully. Generic signal name, can be connected by UI...
virtual void onOperationCompleted()=0
Pure virtual slot to handle successful operation completion. Implementations in derived classes shoul...
virtual void onOperationFailed(const QString &error)=0
Pure virtual slot to handle operation failure. Implementations in derived classes should react to a f...
OperationProvider(QObject *parent=nullptr)
Constructs an OperationProvider.
virtual ~OperationProvider()=default
Virtual destructor.
void operationFailed(QString error)
Signal emitted when an operation fails. Generic signal name, can be connected by UI components or oth...
CaptureMoment — footer