From ce70df2e8f6e7ea92300b254af46dfd4f0462676 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 27 Aug 2019 23:11:32 -0400 Subject: [PATCH] Editor: Amend includes of ProjectModel.hpp This was missed when organizing includes in commit ef86e69421dc8fbae4bb20ca597f79f64e5700c0 (my bad!) --- Editor/KeymapEditor.cpp | 1 + Editor/MainWindow.hpp | 1 + Editor/ProjectModel.cpp | 47 +++++++++++++++++++---------------------- Editor/ProjectModel.hpp | 32 ++++++++++++++++++---------- 4 files changed, 45 insertions(+), 36 deletions(-) diff --git a/Editor/KeymapEditor.cpp b/Editor/KeymapEditor.cpp index 268bdc8..c6a442c 100644 --- a/Editor/KeymapEditor.cpp +++ b/Editor/KeymapEditor.cpp @@ -9,6 +9,7 @@ #include #include +#include "Common.hpp" #include "KeyboardWidget.hpp" #include "MainWindow.hpp" diff --git a/Editor/MainWindow.hpp b/Editor/MainWindow.hpp index 96302b1..f9705b1 100644 --- a/Editor/MainWindow.hpp +++ b/Editor/MainWindow.hpp @@ -11,6 +11,7 @@ #include #include +#include "Common.hpp" #include "EditorWidget.hpp" #include "ProjectModel.hpp" diff --git a/Editor/ProjectModel.cpp b/Editor/ProjectModel.cpp index 0663fef..8d0a733 100644 --- a/Editor/ProjectModel.cpp +++ b/Editor/ProjectModel.cpp @@ -1,16 +1,21 @@ -#include -#include #include "ProjectModel.hpp" -#include "Common.hpp" -#include "athena/YAMLDocWriter.hpp" -#include "athena/VectorWriter.hpp" -#include "MainWindow.hpp" -#include "EditorWidget.hpp" -#include "amuse/SongConverter.hpp" -#include "amuse/ContainerRegistry.hpp" + +#include #include #include -#include + +#include "Common.hpp" +#include "EditorWidget.hpp" +#include "MainWindow.hpp" +#include "NewSoundMacroDialog.hpp" + +#include +#include + +#include +#include +#include +#include QIcon ProjectModel::GroupNode::Icon; QIcon ProjectModel::SongGroupNode::Icon; @@ -497,6 +502,8 @@ ProjectModel::ProjectModel(const QString& path, QObject* parent) SoundGroupNode::Icon = QIcon(QStringLiteral(":/icons/IconSoundGroup.svg")); } +ProjectModel::~ProjectModel() = default; + bool ProjectModel::clearProjectData() { m_projectDatabase = amuse::ProjectDatabase(); m_groups.clear(); @@ -1333,25 +1340,17 @@ ProjectModel::SongGroupNode* ProjectModel::newSongGroup(GroupNode* group, QStrin constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::SoundMacroNode*) { return ProjectModel::INode::Type::SoundMacro; } -constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::ADSRNode*) { - return ProjectModel::INode::Type::ADSR; -} -constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::CurveNode*) { - return ProjectModel::INode::Type::Curve; -} +constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::ADSRNode*) { return ProjectModel::INode::Type::ADSR; } +constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::CurveNode*) { return ProjectModel::INode::Type::Curve; } constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::KeymapNode*) { return ProjectModel::INode::Type::Keymap; } -constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::LayersNode*) { - return ProjectModel::INode::Type::Layer; -} +constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::LayersNode*) { return ProjectModel::INode::Type::Layer; } constexpr ProjectModel::INode::Type GetINodeType(ProjectModel::SampleNode*) { return ProjectModel::INode::Type::Sample; } -constexpr amuse::NameDB::Type GetNameDBType(ProjectModel::SoundMacroNode*) { - return amuse::NameDB::Type::SoundMacro; -} +constexpr amuse::NameDB::Type GetNameDBType(ProjectModel::SoundMacroNode*) { return amuse::NameDB::Type::SoundMacro; } constexpr amuse::NameDB::Type GetNameDBType(ProjectModel::ADSRNode*) { return amuse::NameDB::Type::Table; } constexpr amuse::NameDB::Type GetNameDBType(ProjectModel::CurveNode*) { return amuse::NameDB::Type::Table; } constexpr amuse::NameDB::Type GetNameDBType(ProjectModel::KeymapNode*) { return amuse::NameDB::Type::Keymap; } @@ -2121,6 +2120,4 @@ amuse::SongId ProjectModel::exchangeSongId(amuse::SongId oldId, std::string_view return newId; } -void ProjectModel::setIdDatabases(INode* context) const { - m_projectDatabase.setIdDatabases(); -} +void ProjectModel::setIdDatabases(INode* context) const { m_projectDatabase.setIdDatabases(); } diff --git a/Editor/ProjectModel.hpp b/Editor/ProjectModel.hpp index 9b1d7ef..5443806 100644 --- a/Editor/ProjectModel.hpp +++ b/Editor/ProjectModel.hpp @@ -1,21 +1,30 @@ #pragma once +#include +#include +#include +#include +#include + #include -#include -#include #include #include -#include -#include "Common.hpp" -#include "NewSoundMacroDialog.hpp" -#include "amuse/AudioGroup.hpp" -#include "amuse/AudioGroupData.hpp" -#include "amuse/AudioGroupProject.hpp" -#include "amuse/AudioGroupPool.hpp" -#include "amuse/AudioGroupSampleDirectory.hpp" +#include +#include + +#include "Common.hpp" + +#include +#include +#include +#include +#include +#include -class ProjectModel; class EditorUndoCommand; +class ProjectModel; + +struct SoundMacroTemplateEntry; enum AmuseItemEditFlags { AmuseItemNone = 0, @@ -373,6 +382,7 @@ public: public: explicit ProjectModel(const QString& path, QObject* parent = Q_NULLPTR); + ~ProjectModel() override; bool clearProjectData(); bool openGroupData(QString groupName, UIMessenger& messenger);