Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/StereoMatrix/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
INCLUDE(BuildPlugin)

BUILD_PLUGIN(stereomatrix StereoMatrix.cpp StereoMatrixControls.cpp StereoMatrixControlDialog.cpp StereoMatrix.h StereoMatrixControls.h StereoMatrixControlDialog.h MOCFILES StereoMatrixControls.h StereoMatrixControlDialog.h EMBEDDED_RESOURCES artwork.png logo.png)
BUILD_PLUGIN(stereomatrix StereoMatrix.cpp StereoMatrixControls.cpp StereoMatrixControlDialog.cpp StereoMatrix.h StereoMatrixControls.h StereoMatrixControlDialog.h MOCFILES StereoMatrixControls.h StereoMatrixControlDialog.h EMBEDDED_RESOURCES artwork.svg logo.svg)

57 changes: 25 additions & 32 deletions plugins/StereoMatrix/StereoMatrixControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
*/




#include "StereoMatrixControlDialog.h"

#include <QHBoxLayout>
#include "embed.h"
#include "Knob.h"
#include "StereoMatrixControls.h"
Expand All @@ -35,38 +34,32 @@ namespace lmms::gui
{


StereoMatrixControlDialog::StereoMatrixControlDialog(
StereoMatrixControls * _controls ) :
EffectControlDialog( _controls )
StereoMatrixControlDialog::StereoMatrixControlDialog(StereoMatrixControls* controls) :
EffectControlDialog(controls)
{

setFixedSize( 160, 185 );

setAutoFillBackground( true );
QPalette pal;
pal.setBrush( backgroundRole(),
PLUGIN_NAME::getIconPixmap( "artwork" ) );
setPalette( pal );

auto llKnob = new Knob(KnobType::Bright26, this);
llKnob->setModel( &_controls->m_llModel );
llKnob->setHintText( tr( "Left to Left Vol:" ) , "" );
llKnob->move( 10, 79 );

auto lrKnob = new Knob(KnobType::Bright26, this);
lrKnob->setModel( &_controls->m_lrModel );
lrKnob->setHintText( tr( "Left to Right Vol:" ) , "" );
lrKnob->move( 48, 79 );

auto rlKnob = new Knob(KnobType::Bright26, this);
rlKnob->setModel( &_controls->m_rlModel );
rlKnob->setHintText( tr( "Right to Left Vol:" ) , "" );
rlKnob->move( 85, 79 );

auto rrKnob = new Knob(KnobType::Bright26, this);
rrKnob->setModel( &_controls->m_rrModel );
rrKnob->setHintText( tr( "Right to Right Vol:" ) , "" );
rrKnob->move( 123, 79 );
setAutoFillBackground(true);
setFixedSize(160, 185);
pal.setBrush(backgroundRole(), PLUGIN_NAME::getIconPixmap("artwork"));
setPalette(pal);

auto layout = new QHBoxLayout(this);

const auto makeKnob = [this, layout](
FloatModel *model,
const QString &txt_before
) {
auto k = new Knob(KnobType::Bright26, this);
k->setModel(model);
k->setHintText(txt_before, "");
layout->addWidget(k, 0, Qt::AlignHCenter);
return k;
};

makeKnob(&controls->m_llModel, tr("Left to Left Vol:"));
makeKnob(&controls->m_lrModel, tr("Left to Right Vol:"));
makeKnob(&controls->m_rlModel, tr("Right to Left Vol:"));
makeKnob(&controls->m_rrModel, tr("Right to Right Vol:"));
}


Expand Down
Binary file removed plugins/StereoMatrix/artwork.png
Binary file not shown.
29 changes: 29 additions & 0 deletions plugins/StereoMatrix/artwork.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed plugins/StereoMatrix/logo.png
Binary file not shown.
3 changes: 3 additions & 0 deletions plugins/StereoMatrix/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading