feat: initial commit
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
#pragma once
|
||||
|
||||
#include "editor/EditorCanvas.h"
|
||||
#include "export/ExportService.h"
|
||||
#include "model/EditorDocument.h"
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
class QActionGroup;
|
||||
class QAction;
|
||||
class QComboBox;
|
||||
class QSpinBox;
|
||||
|
||||
namespace ws::app {
|
||||
|
||||
class EditorWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit EditorWindow(QWidget* parent = nullptr);
|
||||
|
||||
void set_image(const QImage& image);
|
||||
bool load_image(const QString& path);
|
||||
|
||||
private:
|
||||
void build_toolbar();
|
||||
void update_window_title();
|
||||
void apply_style_controls();
|
||||
void save_to_path(const QString& path);
|
||||
[[nodiscard]] QString choose_save_path(bool force_prompt) const;
|
||||
|
||||
model::EditorDocument document_;
|
||||
editor::EditorCanvas* canvas_ = nullptr;
|
||||
exporting::ExportService export_service_;
|
||||
QString current_path_;
|
||||
|
||||
QAction* undo_action_ = nullptr;
|
||||
QAction* redo_action_ = nullptr;
|
||||
QActionGroup* tool_group_ = nullptr;
|
||||
QComboBox* color_combo_ = nullptr;
|
||||
QSpinBox* stroke_spin_ = nullptr;
|
||||
};
|
||||
|
||||
} // namespace ws::app
|
||||
Reference in New Issue
Block a user