[bugui] wip on color
This commit is contained in:
parent
2d1d8ab1b0
commit
39f11ea247
3 changed files with 69 additions and 68 deletions
2
Hardware/3rdparty/bugui
vendored
2
Hardware/3rdparty/bugui
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit bb211f5b66f1775a1c2abd12b650fbaf486b8c86
|
Subproject commit 6e18b2d897e89ced5eb420aafe7c50f29026bfb6
|
|
@ -8,24 +8,24 @@
|
||||||
namespace Hardware
|
namespace Hardware
|
||||||
{
|
{
|
||||||
Controller::Controller(const score::DocumentContext& doc)
|
Controller::Controller(const score::DocumentContext& doc)
|
||||||
: bugui::controller{[&doc, this]
|
: bugui::painter{[&doc, this]
|
||||||
(commands com, const bool& shift)
|
(bugui::commands com, const bool& shift)
|
||||||
{
|
{
|
||||||
switch (com)
|
switch (com)
|
||||||
{
|
{
|
||||||
case Play:
|
case bugui::Play:
|
||||||
if (shift)
|
if (shift)
|
||||||
doc.app.actions.action<Actions::PlayGlobal>().action()->trigger();
|
doc.app.actions.action<Actions::PlayGlobal>().action()->trigger();
|
||||||
else
|
else
|
||||||
doc.app.actions.action<Actions::Play>().action()->trigger();
|
doc.app.actions.action<Actions::Play>().action()->trigger();
|
||||||
break;
|
break;
|
||||||
case Stop:
|
case bugui::Stop:
|
||||||
if (shift)
|
if (shift)
|
||||||
doc.app.actions.action<Actions::Reinitialize>().action()->trigger();
|
doc.app.actions.action<Actions::Reinitialize>().action()->trigger();
|
||||||
else
|
else
|
||||||
doc.app.actions.action<Actions::Stop>().action()->trigger();
|
doc.app.actions.action<Actions::Stop>().action()->trigger();
|
||||||
break;
|
break;
|
||||||
case Up:
|
case bugui::Up:
|
||||||
if (shift)
|
if (shift)
|
||||||
{
|
{
|
||||||
v_zoom += .2;
|
v_zoom += .2;
|
||||||
|
@ -37,7 +37,7 @@ Controller::Controller(const score::DocumentContext& doc)
|
||||||
draw_intervals();
|
draw_intervals();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Down:
|
case bugui::Down:
|
||||||
if (shift)
|
if (shift)
|
||||||
{
|
{
|
||||||
if (v_zoom > .2)
|
if (v_zoom > .2)
|
||||||
|
@ -52,7 +52,7 @@ Controller::Controller(const score::DocumentContext& doc)
|
||||||
draw_intervals();
|
draw_intervals();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Left:
|
case bugui::Left:
|
||||||
if (shift)
|
if (shift)
|
||||||
{
|
{
|
||||||
if (h_zoom > .02)
|
if (h_zoom > .02)
|
||||||
|
@ -70,7 +70,7 @@ Controller::Controller(const score::DocumentContext& doc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Right:
|
case bugui::Right:
|
||||||
if (shift)
|
if (shift)
|
||||||
{
|
{
|
||||||
h_zoom += .02;
|
h_zoom += .02;
|
||||||
|
@ -120,7 +120,8 @@ void Controller::draw_intervals()
|
||||||
|
|
||||||
// Copied from MiniscenarioView
|
// Copied from MiniscenarioView
|
||||||
auto& skin = Process::Style::instance();
|
auto& skin = Process::Style::instance();
|
||||||
// set_stroke_color();
|
const auto col = skin.IntervalBase().color();
|
||||||
|
set_color(col.redF(), col.greenF(), col.blackF(), col.alphaF());
|
||||||
|
|
||||||
for(const Scenario::IntervalModel& c : scenar->intervals)
|
for(const Scenario::IntervalModel& c : scenar->intervals)
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
#include <Scenario/Document/Interval/IntervalModel.hpp>
|
#include <Scenario/Document/Interval/IntervalModel.hpp>
|
||||||
#include <Scenario/Process/ScenarioModel.hpp>
|
#include <Scenario/Process/ScenarioModel.hpp>
|
||||||
|
|
||||||
#include <controller.hpp>
|
#include <painter.hpp>
|
||||||
|
|
||||||
namespace Hardware
|
namespace Hardware
|
||||||
{
|
{
|
||||||
class SCORE_ADDON_HARDWARE_EXPORT Controller
|
class SCORE_ADDON_HARDWARE_EXPORT Controller
|
||||||
: public bugui::controller
|
: public bugui::painter
|
||||||
, public QObject
|
, public QObject
|
||||||
{
|
{
|
||||||
W_OBJECT(Controller)
|
W_OBJECT(Controller)
|
||||||
|
|
Loading…
Add table
Reference in a new issue