Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign of the Controller Rack #2944

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
16203e1
Redesign of the Controller Rack
BaraMGB Jul 28, 2016
f8ea0cc
makes the controller title bar themable in styles.css
BaraMGB Jul 31, 2016
e79196f
change width when scroll bar is needed
BaraMGB Jul 31, 2016
ff124c2
minor style corretions
BaraMGB Jul 31, 2016
9ba7cd7
change window width if scrollbar is needed/minor style corrections
BaraMGB Jul 31, 2016
8ccf0f7
minor corrections
BaraMGB Jul 31, 2016
5eb3b63
change order of member variables to avoiding compiler warnings
BaraMGB Aug 2, 2016
ff7cd24
change identify method for peakcontroller dialog for avoiding subwindow
BaraMGB Aug 2, 2016
c7dbd45
detect collapse for resize window if scrollbar is not needed anymore
BaraMGB Aug 2, 2016
b853dc3
Adds drop feature to controller
BaraMGB Aug 5, 2016
82da86b
change some Headers
BaraMGB Jan 24, 2017
187406e
rebase to master
BaraMGB Jan 24, 2017
aa88b07
correct artwork files
BaraMGB Jan 24, 2017
2aa980d
add controller type to title bar
BaraMGB Jan 24, 2017
b152520
pull master
BaraMGB Aug 27, 2017
8c98234
Merge branch 'master' of https://github.com/LMMS/lmms into controller…
BaraMGB Mar 11, 2018
a93c61a
remove the <controls> button in the effect chain for peak controllers
BaraMGB Mar 11, 2018
50c6cce
Controls button in EffectRack now shows/hides ControllerRack
BaraMGB Mar 12, 2018
437facd
add <collapse/expand all> in context menu
BaraMGB Mar 12, 2018
286414e
add <move up/down controller> in the context menu
BaraMGB Mar 13, 2018
210d7f2
merge master
BaraMGB Jun 12, 2019
40c557d
clean up ControllerRackView.*
BaraMGB Jun 25, 2019
1f8b0e2
clean up ControllerView.*
BaraMGB Jun 25, 2019
f5ef8a3
fix: Controller position after reload project is wrong
BaraMGB Aug 1, 2019
5dd58d6
merge master
BaraMGB Aug 1, 2019
7427142
merge master part2
BaraMGB Aug 1, 2019
cf6c7a8
ensure qt5.4 compatibility for windows builds
BaraMGB Aug 13, 2019
d325dd2
improve the collapsing
BaraMGB Aug 13, 2019
3ea3da8
saves the collapsing state with the project / clean up code
BaraMGB Aug 24, 2019
1252142
clean up code
BaraMGB Aug 24, 2019
66ad5b5
fix crash during load an old project
BaraMGB Aug 25, 2019
b863932
suggested changes from code review by PhysSong
BaraMGB Aug 28, 2019
afafa21
move SubWindow logic from EffectView to EffectControllerDialog
BaraMGB Aug 28, 2019
9e67b38
export ControllerRackView class
BaraMGB Aug 29, 2019
63a14a4
clean up #includes in PeakControllerDialog.cpp
BaraMGB Aug 29, 2019
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
16 changes: 9 additions & 7 deletions include/ControllerView.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "ModelView.h"

class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
class QMdiSubWindow;

Expand All @@ -58,28 +58,30 @@ class ControllerView : public QFrame, public ModelView


public slots:
void editControls();

void deleteController();
void displayHelp();
void closeControls();
void renameController();
void collapseController();
void renameFinished();
void rename();


signals:
void deleteController( ControllerView * _view );


protected:
virtual void paintEvent( QPaintEvent * event );
virtual void contextMenuEvent( QContextMenuEvent * _me );
virtual void modelChanged();
virtual void mouseDoubleClickEvent( QMouseEvent * event );


private:
QMdiSubWindow * m_subWindow;
ControllerDialog * m_controllerDlg;
QLabel * m_nameLabel;
QLineEdit * m_nameLineEdit;
QPushButton * m_collapse;
bool m_show;

} ;

#endif
3 changes: 2 additions & 1 deletion include/PeakController.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class EXPORT PeakController : public Controller
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
virtual void loadSettings( const QDomElement & _this );
virtual QString nodeName() const;
PeakControllerEffect *getPeakControllerEffect();

static void initGetControllerBySetting();
static PeakController * getControllerBySetting( const QDomElement & _this );
Expand Down Expand Up @@ -90,7 +91,7 @@ class PeakControllerDialog : public ControllerDialog
{
Q_OBJECT
public:
PeakControllerDialog( Controller * _controller, QWidget * _parent );
PeakControllerDialog(PeakController *_controller, QWidget * _parent );
virtual ~PeakControllerDialog();

protected:
Expand Down
5 changes: 5 additions & 0 deletions src/core/PeakController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ QString PeakController::nodeName() const
return( "Peakcontroller" );
}

PeakControllerEffect * PeakController::getPeakControllerEffect()
{
return m_peakEffect;
}



ControllerDialog * PeakController::createDialog( QWidget * _parent )
Expand Down
16 changes: 8 additions & 8 deletions src/gui/PeakControllerDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
#include "Knob.h"
#include "TempoSyncKnob.h"
#include "PixmapButton.h"
#include "plugins/peak_controller_effect/peak_controller_effect.h"
#include "EffectControlDialog.h"
#include <QLayout>


PeakControllerDialog::PeakControllerDialog( Controller * _model, QWidget * _parent ) :
PeakControllerDialog::PeakControllerDialog( PeakController * _model, QWidget * _parent ) :
ControllerDialog( _model, _parent )
{
EffectControlDialog * dlg = _model->getPeakControllerEffect()->controls()->createView();
setWindowTitle( tr( "PEAK" ) );
setWindowIcon( embed::getIconPixmap( "controller" ) );
setFixedSize( 256, 64 );

ToolTip::add( this, tr( "LFO Controller" ) );

QLabel * l = new QLabel( this );
l->setText( "Use FX's controls" );
l->move(10, 10);
setFixedSize( dlg->size() );
dlg->setParent( this );
dlg->show();

setModel( _model );
}
Expand Down
19 changes: 13 additions & 6 deletions src/gui/widgets/ControllerRackView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,16 @@ ControllerRackView::ControllerRackView( ) :
m_scrollArea = new QScrollArea( this );
m_scrollArea->setPalette( QApplication::palette( m_scrollArea ) );
m_scrollArea->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
m_scrollArea->setFrameStyle( QFrame::Plain );
m_scrollArea->setFrameShadow( QFrame::Plain );


QWidget * scrollAreaWidget = new QWidget( m_scrollArea );
m_scrollAreaLayout = new QVBoxLayout( scrollAreaWidget );
m_scrollAreaLayout->addStretch();
m_scrollAreaLayout->setMargin( 0 );
m_scrollAreaLayout->setSpacing( 0 );
// m_scrollAreaLayout->setContentsMargins( 0, 0, 0, 0 );
scrollAreaWidget->setLayout( m_scrollAreaLayout );

m_scrollArea->setWidget( scrollAreaWidget );
Expand All @@ -76,7 +82,8 @@ ControllerRackView::ControllerRackView( ) :
QVBoxLayout * layout = new QVBoxLayout();
layout->addWidget( m_scrollArea );
layout->addWidget( m_addButton );
this->setLayout( layout );
layout->setMargin( 0 );
setLayout( layout );

QMdiSubWindow * subWin = gui->mainWindow()->addWindowedWidget( this );

Expand All @@ -86,8 +93,9 @@ ControllerRackView::ControllerRackView( ) :
subWin->setWindowFlags( flags );

subWin->setAttribute( Qt::WA_DeleteOnClose, false );
subWin->move( 680, 310 );
subWin->resize(400, 200);
subWin->move( 680, 60 );
subWin->resize( 400, 262 );
subWin->setFixedWidth( 262 );
}


Expand All @@ -103,7 +111,7 @@ ControllerRackView::~ControllerRackView()
void ControllerRackView::saveSettings( QDomDocument & _doc,
QDomElement & _this )
{
MainWindow::saveWidgetState( this, _this, QSize( 400, 300) );
MainWindow::saveWidgetState( this, _this, QSize( 400, 300 ) );
}


Expand Down Expand Up @@ -213,5 +221,4 @@ void ControllerRackView::closeEvent( QCloseEvent * _ce )
hide();
}
_ce->ignore();
}

}
Loading