Skip to content

Commit

Permalink
update with score ; fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Dec 21, 2018
1 parent ac225c3 commit 46e17a2
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Tutorial/PolymorphicEntity/PolymorphicEntity.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include <Tutorial/PolymorphicEntity/PolymorphicEntityFactory.hpp>
#include <score/plugins/customfactory/SerializableInterface.hpp>
#include <score/plugins/SerializableInterface.hpp>
#include <score/model/Entity.hpp>

namespace Tutorial
Expand Down
2 changes: 1 addition & 1 deletion Tutorial/PolymorphicEntity/PolymorphicEntityFactory.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <score/plugins/customfactory/FactoryInterface.hpp>
#include <score/plugins/Interface.hpp>
#include <score/serialization/VisitorCommon.hpp>
#include <score_addon_tutorial_export.h>

Expand Down
2 changes: 1 addition & 1 deletion Tutorial/Process/Inspector/TutorialProcessInspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void InspectorWidget::on_entityRemoved(const PolymorphicEntity& e)

void InspectorWidget::addBanana()
{
m_dispatcher.submitCommand<AddBanana>(process());
m_dispatcher.submit<AddBanana>(process());
}

}
2 changes: 1 addition & 1 deletion Tutorial/Process/Layer/TutorialProcessPresenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void TutorialPresenter::on_doubleClicked()

CommandDispatcher<> disp{m_context.context.commandStack};

disp.submitCommand<AddEntity>(
disp.submit<AddEntity>(
m_layer, // The object on which it is applied
factory_key // The factory that we used.
);
Expand Down
19 changes: 12 additions & 7 deletions Tutorial/Process/TutorialProcessMetadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ class ProcessModel;
}

PROCESS_METADATA(
,
Tutorial::ProcessModel,
"8337475a-9a3c-4195-9d60-b25c8bb94756",
"Tutorial",
"Tutorial",
"Control",
{},
, // Potentially an EXPORT macro
Tutorial::ProcessModel, // The class
"8337475a-9a3c-4195-9d60-b25c8bb94756", // Unique identifier
"Tutorial", // Name that will be stored in the save file
"Tutorial", // Name that will be shown to the user
Process::ProcessCategory::Other, // A broad category
"Tutorial", // Precise name for the category
"A tutorial process", // Textual description
"ossia score", // Author
{}, // Tags
{std::vector<Process::PortType>{}}, // Inputs
{std::vector<Process::PortType>{}}, // Outpus
Process::ProcessFlags::SupportsAll | Process::ProcessFlags::PutInNewSlot
)
18 changes: 9 additions & 9 deletions Tutorial/Process/TutorialProcessModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void ProcessModel::setBananas(int bananas)
bananasChanged(bananas);
}

QString ProcessModel::prettyName() const
QString ProcessModel::prettyName() const noexcept
{
return tr("Tutorial Process");
}
Expand All @@ -46,39 +46,39 @@ void ProcessModel::reset()
{
}

ProcessStateDataInterface* ProcessModel::startStateData() const
ProcessStateDataInterface* ProcessModel::startStateData() const noexcept
{
return nullptr;
}

ProcessStateDataInterface* ProcessModel::endStateData() const
ProcessStateDataInterface* ProcessModel::endStateData() const noexcept
{
return nullptr;
}

Selection ProcessModel::selectableChildren() const
Selection ProcessModel::selectableChildren() const noexcept
{
return {};
}

Selection ProcessModel::selectedChildren() const
Selection ProcessModel::selectedChildren() const noexcept
{
return {};
}

void ProcessModel::setSelection(const Selection& s) const
void ProcessModel::setSelection(const Selection& s) const noexcept
{
}

void ProcessModel::setDurationAndScale(const TimeVal& newDuration)
void ProcessModel::setDurationAndScale(const TimeVal& newDuration) noexcept
{
}

void ProcessModel::setDurationAndGrow(const TimeVal& newDuration)
void ProcessModel::setDurationAndGrow(const TimeVal& newDuration) noexcept
{
}

void ProcessModel::setDurationAndShrink(const TimeVal& newDuration)
void ProcessModel::setDurationAndShrink(const TimeVal& newDuration) noexcept
{
}

Expand Down
20 changes: 10 additions & 10 deletions Tutorial/Process/TutorialProcessModel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,19 @@ class ProcessModel final : public Process::ProcessModel

PROPERTY(int, bananas READ bananas WRITE setBananas NOTIFY bananasChanged)
private:
QString prettyName() const override;
QString prettyName() const noexcept override;
void startExecution() override;
void stopExecution() override;
void reset() override;
ProcessStateDataInterface*startStateData() const override;
ProcessStateDataInterface*endStateData() const override;
Selection selectableChildren() const override;
Selection selectedChildren() const override;
void setSelection(const Selection& s) const override;

void setDurationAndScale(const TimeVal& newDuration) override;
void setDurationAndGrow(const TimeVal& newDuration) override;
void setDurationAndShrink(const TimeVal& newDuration) override;
ProcessStateDataInterface*startStateData() const noexcept override;
ProcessStateDataInterface*endStateData() const noexcept override;
Selection selectableChildren() const noexcept override;
Selection selectedChildren() const noexcept override;
void setSelection(const Selection& s) const noexcept override;

void setDurationAndScale(const TimeVal& newDuration) noexcept override;
void setDurationAndGrow(const TimeVal& newDuration) noexcept override;
void setDurationAndShrink(const TimeVal& newDuration) noexcept override;

int m_bananas{};
};
Expand Down
2 changes: 1 addition & 1 deletion score_addon_tutorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <Tutorial/PolymorphicEntity/Implementation/ConcretePolymorphicEntity.hpp>
#include <Tutorial/Panel/TutorialPanelDelegate.hpp>

#include <score/plugins/customfactory/FactorySetup.hpp>
#include <score/plugins/FactorySetup.hpp>

score_addon_tutorial::score_addon_tutorial()
{
Expand Down
2 changes: 1 addition & 1 deletion score_addon_tutorial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <score/application/ApplicationContext.hpp>
#include <score/command/CommandGeneratorMap.hpp>
#include <score/command/Command.hpp>
#include <score/plugins/customfactory/FactoryFamily.hpp>
#include <score/plugins/InterfaceList.hpp>

#include <QObject>
#include <utility>
Expand Down

0 comments on commit 46e17a2

Please sign in to comment.