diff --git a/src/core/BlendEffects/blendeffectmenucreator.cpp b/src/core/BlendEffects/blendeffectmenucreator.cpp new file mode 100644 index 000000000..0488a9340 --- /dev/null +++ b/src/core/BlendEffects/blendeffectmenucreator.cpp @@ -0,0 +1,35 @@ +/* +# +# Friction - https://friction.graphics +# +# Copyright (c) Friction contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# See 'README.md' for more information. +# +*/ + +#include "BlendEffects/blendeffectmenucreator.h" + +#include "BlendEffects/moveblendeffect.h" +#include "BlendEffects/targetedblendeffect.h" + +void BlendEffectMenuCreator::forEveryEffect(const EffectAdder &add) +{ + add(QObject::tr("Move"), + []() { return enve::make_shared(); }); + add(QObject::tr("Targeted"), + []() { return enve::make_shared(); }); +} diff --git a/src/core/BlendEffects/blendeffectmenucreator.h b/src/core/BlendEffects/blendeffectmenucreator.h index eda5b6928..7dabe8d20 100644 --- a/src/core/BlendEffects/blendeffectmenucreator.h +++ b/src/core/BlendEffects/blendeffectmenucreator.h @@ -26,10 +26,7 @@ #include "core_global.h" -#include #include -#include "BlendEffects/moveblendeffect.h" -#include "BlendEffects/targetedblendeffect.h" #include "smartPointers/selfref.h" class BlendEffect; @@ -41,13 +38,7 @@ struct CORE_EXPORT BlendEffectMenuCreator using EffectCreator = Creator; using EffectAdder = Func; - static void forEveryEffect(const EffectAdder& add) - { - add(QObject::tr("Move"), - []() { return enve::make_shared(); }); - add(QObject::tr("Targeted"), - []() { return enve::make_shared(); }); - } + static void forEveryEffect(const EffectAdder& add); }; #endif // BLENDEFFECTMENUCREATOR_H diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 2ce3ca7d8..b06143979 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -79,6 +79,7 @@ set( BlendEffects/blendeffectcollection.cpp BlendEffects/moveblendeffect.cpp BlendEffects/targetedblendeffect.cpp + BlendEffects/blendeffectmenucreator.cpp Boxes/animationbox.cpp Boxes/boundingbox.cpp Boxes/boxrendercontainer.cpp @@ -168,6 +169,7 @@ set( PathEffects/subpatheffect.cpp PathEffects/sumpatheffect.cpp PathEffects/zigzagpatheffect.cpp + PathEffects/patheffectmenucreator.cpp Private/Tasks/complextask.cpp Private/Tasks/execcontroller.cpp Private/Tasks/gputaskexecutor.cpp @@ -234,6 +236,7 @@ set( TransformEffects/trackeffect.cpp TransformEffects/transformeffect.cpp TransformEffects/transformeffectcollection.cpp + TransformEffects/transformeffectmenucreator.cpp XML/xevexporter.cpp XML/xevimporter.cpp XML/xevzipfilesaver.cpp diff --git a/src/core/PathEffects/patheffectmenucreator.cpp b/src/core/PathEffects/patheffectmenucreator.cpp new file mode 100644 index 000000000..370f8edc4 --- /dev/null +++ b/src/core/PathEffects/patheffectmenucreator.cpp @@ -0,0 +1,59 @@ +/* +# +# Friction - https://friction.graphics +# +# Copyright (c) Friction contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# See 'README.md' for more information. +# +*/ + +#include "PathEffects/patheffectmenucreator.h" + +#include "PathEffects/dashpatheffect.h" +#include "PathEffects/displacepatheffect.h" +#include "PathEffects/duplicatepatheffect.h" +#include "PathEffects/linespatheffect.h" +#include "PathEffects/solidifypatheffect.h" +#include "PathEffects/spatialdisplacepatheffect.h" +#include "PathEffects/subdividepatheffect.h" +#include "PathEffects/subpatheffect.h" +#include "PathEffects/sumpatheffect.h" +#include "PathEffects/zigzagpatheffect.h" + +void PathEffectMenuCreator::forEveryEffect(const EffectAdder &add) +{ + add(QObject::tr("Displace"), + []() { return enve::make_shared(); }); + add(QObject::tr("Spatial Displace"), + []() { return enve::make_shared(); }); + add(QObject::tr("Dash"), + []() { return enve::make_shared(); }); + add(QObject::tr("Duplicate"), + []() { return enve::make_shared(); }); + add(QObject::tr("Sub-Path"), + []() { return enve::make_shared(); }); + add(QObject::tr("Solidify"), + []() { return enve::make_shared(); }); + add(QObject::tr("Sum"), + []() { return enve::make_shared(); }); + add(QObject::tr("Lines"), + []() { return enve::make_shared(); }); + add(QObject::tr("ZigZag"), + []() { return enve::make_shared(); }); + add(QObject::tr("Subdivide"), + []() { return enve::make_shared(); }); +} diff --git a/src/core/PathEffects/patheffectmenucreator.h b/src/core/PathEffects/patheffectmenucreator.h index cb649c77b..22f74bf62 100644 --- a/src/core/PathEffects/patheffectmenucreator.h +++ b/src/core/PathEffects/patheffectmenucreator.h @@ -26,17 +26,6 @@ #include "core_global.h" -#include -#include "PathEffects/dashpatheffect.h" -#include "PathEffects/displacepatheffect.h" -#include "PathEffects/duplicatepatheffect.h" -#include "PathEffects/linespatheffect.h" -#include "PathEffects/solidifypatheffect.h" -#include "PathEffects/spatialdisplacepatheffect.h" -#include "PathEffects/subdividepatheffect.h" -#include "PathEffects/subpatheffect.h" -#include "PathEffects/sumpatheffect.h" -#include "PathEffects/zigzagpatheffect.h" #include #include "smartPointers/selfref.h" @@ -49,29 +38,7 @@ struct CORE_EXPORT PathEffectMenuCreator using EffectCreator = Creator; using EffectAdder = Func; - static void forEveryEffect(const EffectAdder& add) - { - add(QObject::tr("Displace"), - []() { return enve::make_shared(); }); - add(QObject::tr("Spatial Displace"), - []() { return enve::make_shared(); }); - add(QObject::tr("Dash"), - []() { return enve::make_shared(); }); - add(QObject::tr("Duplicate"), - []() { return enve::make_shared(); }); - add(QObject::tr("Sub-Path"), - []() { return enve::make_shared(); }); - add(QObject::tr("Solidify"), - []() { return enve::make_shared(); }); - add(QObject::tr("Sum"), - []() { return enve::make_shared(); }); - add(QObject::tr("Lines"), - []() { return enve::make_shared(); }); - add(QObject::tr("ZigZag"), - []() { return enve::make_shared(); }); - add(QObject::tr("Subdivide"), - []() { return enve::make_shared(); }); - } + static void forEveryEffect(const EffectAdder& add); }; #endif // PATHEFFECTMENUCREATOR_H diff --git a/src/core/TransformEffects/transformeffectmenucreator.cpp b/src/core/TransformEffects/transformeffectmenucreator.cpp new file mode 100644 index 000000000..c6821361d --- /dev/null +++ b/src/core/TransformEffects/transformeffectmenucreator.cpp @@ -0,0 +1,44 @@ +/* +# +# Friction - https://friction.graphics +# +# Copyright (c) Friction contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# See 'README.md' for more information. +# +*/ + +#include "TransformEffects/transformeffectmenucreator.h" + +#include "TransformEffects/followobjecteffect.h" +#include "TransformEffects/followobjectrelativeeffect.h" +#include "TransformEffects/followpatheffect.h" +#include "TransformEffects/parenteffect.h" +#include "TransformEffects/trackeffect.h" + +void TransformEffectMenuCreator::forEveryEffect(const EffectAdder &add) +{ + add(QObject::tr("Track"), + []() { return enve::make_shared(); }); + add(QObject::tr("Follow Path"), + []() { return enve::make_shared(); }); + add(QObject::tr("Follow Object"), + []() { return enve::make_shared(); }); + add(QObject::tr("Follow Object Relative"), + []() { return enve::make_shared(); }); + add(QObject::tr("Parent"), + []() { return enve::make_shared(); }); +} diff --git a/src/core/TransformEffects/transformeffectmenucreator.h b/src/core/TransformEffects/transformeffectmenucreator.h index 2ee80ec8d..c4b00c371 100644 --- a/src/core/TransformEffects/transformeffectmenucreator.h +++ b/src/core/TransformEffects/transformeffectmenucreator.h @@ -26,13 +26,7 @@ #include "core_global.h" -#include #include -#include "TransformEffects/followobjecteffect.h" -#include "TransformEffects/followobjectrelativeeffect.h" -#include "TransformEffects/followpatheffect.h" -#include "TransformEffects/parenteffect.h" -#include "TransformEffects/trackeffect.h" #include "smartPointers/selfref.h" class TransformEffect; @@ -44,19 +38,7 @@ struct CORE_EXPORT TransformEffectMenuCreator using EffectCreator = Creator; using EffectAdder = Func; - static void forEveryEffect(const EffectAdder& add) - { - add(QObject::tr("Track"), - []() { return enve::make_shared(); }); - add(QObject::tr("Follow Path"), - []() { return enve::make_shared(); }); - add(QObject::tr("Follow Object"), - []() { return enve::make_shared(); }); - add(QObject::tr("Follow Object Relative"), - []() { return enve::make_shared(); }); - add(QObject::tr("Parent"), - []() { return enve::make_shared(); }); - } + static void forEveryEffect(const EffectAdder& add); }; #endif // TRANSFORMEFFECTMENUCREATOR_H