engine: internals supporting the facade migration

UndoStack push_pre_executed, FolderAddChild-based true folder moves,
NodeViewDeleteCommand delete-then-reconnect support, event emission
points for the facade event bus, and related internal adjustments.
This commit is contained in:
2026-07-26 22:43:09 +08:00
parent e9f173916f
commit f95590e924
38 changed files with 302 additions and 746 deletions
+5
View File
@@ -46,6 +46,11 @@ ProjectImportTask::ProjectImportTask(Folder *folder,
set_title(tr("Importing %n file(s)", nullptr, file_count_));
}
ProjectImportTask::~ProjectImportTask()
{
delete command_;
}
const int &ProjectImportTask::get_file_count() const
{
return file_count_;
+7 -2
View File
@@ -37,12 +37,17 @@ class ProjectImportTask : public Task {
Q_OBJECT
public:
ProjectImportTask(Folder *folder, const QStringList &filenames);
~ProjectImportTask() override;
const int &get_file_count() const;
MultiUndoCommand *get_command() const
/** Take ownership of the import command. After this call the task no
* longer owns (and will not delete) the returned command. */
MultiUndoCommand *take_command()
{
return command_;
MultiUndoCommand *c = command_;
command_ = nullptr;
return c;
}
const QStringList &get_invalid_files() const
+1 -1
View File
@@ -23,7 +23,7 @@
#define OAK_PROJECTLOADMANAGER_H
#include "loadbasetask.h"
#include "node/project/serializer/mainwindowlayoutinfo.h"
#include "node/project/serializer/serializedlayoutinfo.h"
namespace olive
{
+3 -3
View File
@@ -23,7 +23,7 @@
#define OAK_PROJECTLOADBASETASK_H
#include "node/project.h"
#include "node/project/serializer/mainwindowlayoutinfo.h"
#include "node/project/serializer/serializedlayoutinfo.h"
#include "task/task.h"
namespace olive
@@ -44,7 +44,7 @@ public:
return filename_;
}
const MainWindowLayoutInfo &get_loaded_layout() const
const SerializedLayoutInfo &get_loaded_layout() const
{
return layout_;
}
@@ -52,7 +52,7 @@ public:
protected:
Project *project_;
MainWindowLayoutInfo layout_;
SerializedLayoutInfo layout_;
private:
QString filename_;
+3 -3
View File
@@ -23,7 +23,7 @@
#define OAK_PROJECTSAVEMANAGER_H
#include "node/project.h"
#include "node/project/serializer/mainwindowlayoutinfo.h"
#include "node/project/serializer/serializedlayoutinfo.h"
#include "task/task.h"
namespace olive
@@ -44,7 +44,7 @@ public:
override_filename_ = filename;
}
void set_layout(const MainWindowLayoutInfo &layout)
void set_layout(const SerializedLayoutInfo &layout)
{
layout_ = layout;
}
@@ -59,7 +59,7 @@ private:
bool use_compression_;
MainWindowLayoutInfo layout_;
SerializedLayoutInfo layout_;
};
}