Browse Source

Change app::ParamQuantity to engine::ParamQuantity.

tags/v1.0.0
Andrew Belt 5 years ago
parent
commit
6660c88885
6 changed files with 9 additions and 16 deletions
  1. +2
    -3
      include/app/ParamWidget.hpp
  2. +2
    -2
      include/engine/ParamQuantity.hpp
  3. +2
    -2
      include/helpers.hpp
  4. +0
    -0
      src/Quantity.cpp
  5. +0
    -6
      src/app/ParamWidget.cpp
  6. +3
    -3
      src/engine/ParamQuantity.cpp

+ 2
- 3
include/app/ParamWidget.hpp View File

@@ -2,7 +2,7 @@
#include "app/common.hpp"
#include "widget/OpaqueWidget.hpp"
#include "ui/Tooltip.hpp"
#include "app/ParamQuantity.hpp"
#include "engine/ParamQuantity.hpp"
#include "history.hpp"


@@ -12,11 +12,10 @@ namespace app {

/** Manages an engine::Param on a ModuleWidget. */
struct ParamWidget : widget::OpaqueWidget {
ParamQuantity *paramQuantity = NULL;
engine::ParamQuantity *paramQuantity = NULL;
float dirtyValue = NAN;
ui::Tooltip *tooltip = NULL;

~ParamWidget();
void step() override;
void draw(const DrawArgs &args) override;
void onButton(const widget::ButtonEvent &e) override;


include/app/ParamQuantity.hpp → include/engine/ParamQuantity.hpp View File

@@ -5,7 +5,7 @@


namespace rack {
namespace app {
namespace engine {


/** A Quantity that wraps an engine::Param. */
@@ -33,5 +33,5 @@ struct ParamQuantity : Quantity {
};


} // namespace app
} // namespace engine
} // namespace rack

+ 2
- 2
include/helpers.hpp View File

@@ -5,10 +5,10 @@
#include "ui/MenuLabel.hpp"
#include "ui/Menu.hpp"
#include "app/PortWidget.hpp"
#include "app/ParamQuantity.hpp"
#include "app/ParamWidget.hpp"
#include "app/Scene.hpp"
#include "engine/Module.hpp"
#include "engine/ParamQuantity.hpp"
#include "app.hpp"
#include "window.hpp"

@@ -66,7 +66,7 @@ TParamWidget *createParam(math::Vec pos, engine::Module *module, int paramId) {
if (f)
o->paramQuantity = f->create();
else
o->paramQuantity = new app::ParamQuantity;
o->paramQuantity = new engine::ParamQuantity;
o->paramQuantity->module = module;
o->paramQuantity->paramId = paramId;
}


src/ui/Quantity.cpp → src/Quantity.cpp View File


+ 0
- 6
src/app/ParamWidget.cpp View File

@@ -2,7 +2,6 @@
#include "ui/MenuOverlay.hpp"
#include "ui/TextField.hpp"
#include "app/Scene.hpp"
#include "app/ParamQuantity.hpp"
#include "app.hpp"
#include "engine/Engine.hpp"
#include "settings.hpp"
@@ -109,11 +108,6 @@ struct ParamUnmapItem : ui::MenuItem {
};


ParamWidget::~ParamWidget() {
if (paramQuantity)
delete paramQuantity;
}

void ParamWidget::step() {
if (paramQuantity) {
float value = paramQuantity->getValue();


src/app/ParamQuantity.cpp → src/engine/ParamQuantity.cpp View File

@@ -1,10 +1,10 @@
#include "app/ParamQuantity.hpp"
#include "engine/ParamQuantity.hpp"
#include "app.hpp"
#include "engine/Engine.hpp"


namespace rack {
namespace app {
namespace engine {


engine::Param *ParamQuantity::getParam() {
@@ -119,5 +119,5 @@ std::string ParamQuantity::getUnit() {
}


} // namespace app
} // namespace engine
} // namespace rack

Loading…
Cancel
Save