-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Make EffectControlDialog
inherit PluginView
#7544
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -28,7 +28,7 @@ | |||||
|
||||||
#include <QWidget> | ||||||
|
||||||
#include "ModelView.h" | ||||||
#include "PluginView.h" | ||||||
|
||||||
namespace lmms | ||||||
{ | ||||||
|
@@ -39,26 +39,21 @@ class EffectControls; | |||||
namespace gui | ||||||
{ | ||||||
|
||||||
class LMMS_EXPORT EffectControlDialog : public QWidget, public ModelView | ||||||
class LMMS_EXPORT EffectControlDialog : public PluginView | ||||||
{ | ||||||
Q_OBJECT | ||||||
public: | ||||||
EffectControlDialog( EffectControls * _controls ); | ||||||
EffectControlDialog(EffectControls *controls); | ||||||
~EffectControlDialog() override = default; | ||||||
|
||||||
virtual bool isResizable() const {return false;} | ||||||
|
||||||
|
||||||
signals: | ||||||
void closed(); | ||||||
|
||||||
|
||||||
protected: | ||||||
void closeEvent( QCloseEvent * _ce ) override; | ||||||
void closeEvent(QCloseEvent *closeEv) override; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
EffectControls * m_effectControls; | ||||||
|
||||||
} ; | ||||||
}; | ||||||
|
||||||
} // namespace gui | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -26,15 +26,17 @@ | |||||
#ifndef LMMS_GUI_EFFECT_VIEW_H | ||||||
#define LMMS_GUI_EFFECT_VIEW_H | ||||||
|
||||||
#include "AutomatableModel.h" | ||||||
#include "PluginView.h" | ||||||
#include <QPixmap> | ||||||
#include <QWidget> | ||||||
#include "ModelView.h" | ||||||
#include "Effect.h" | ||||||
|
||||||
class QGraphicsOpacityEffect; | ||||||
class QGroupBox; | ||||||
class QLabel; | ||||||
class QPushButton; | ||||||
class QMdiSubWindow; | ||||||
class QMouseEvent; | ||||||
|
||||||
namespace lmms::gui | ||||||
{ | ||||||
|
@@ -45,11 +47,11 @@ class LedCheckBox; | |||||
class TempoSyncKnob; | ||||||
|
||||||
|
||||||
class EffectView : public PluginView | ||||||
class EffectView : public QWidget, public ModelView | ||||||
{ | ||||||
Q_OBJECT | ||||||
public: | ||||||
EffectView( Effect * _model, QWidget * _parent ); | ||||||
EffectView(Effect *model, QWidget *parent); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
~EffectView() override; | ||||||
|
||||||
inline Effect * effect() | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -32,21 +32,20 @@ namespace lmms::gui | |||||
{ | ||||||
|
||||||
|
||||||
EffectControlDialog::EffectControlDialog( EffectControls * _controls ) : | ||||||
QWidget( nullptr ), | ||||||
ModelView( _controls, this ), | ||||||
m_effectControls( _controls ) | ||||||
EffectControlDialog::EffectControlDialog(EffectControls *controls) : | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
PluginView(controls->effect(), nullptr), | ||||||
m_effectControls(controls) | ||||||
{ | ||||||
setWindowTitle( m_effectControls->effect()->displayName() ); | ||||||
setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ); | ||||||
setWindowTitle(m_effectControls->effect()->displayName()); | ||||||
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); | ||||||
} | ||||||
|
||||||
|
||||||
|
||||||
|
||||||
void EffectControlDialog::closeEvent( QCloseEvent * _ce ) | ||||||
void EffectControlDialog::closeEvent(QCloseEvent *closeEv) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
{ | ||||||
_ce->ignore(); | ||||||
closeEv->ignore(); | ||||||
emit closed(); | ||||||
} | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -45,10 +45,11 @@ | |||||
namespace lmms::gui | ||||||
{ | ||||||
|
||||||
EffectView::EffectView( Effect * _model, QWidget * _parent ) : | ||||||
PluginView( _model, _parent ), | ||||||
m_bg( embed::getIconPixmap( "effect_plugin" ) ), | ||||||
m_subWindow( nullptr ), | ||||||
EffectView::EffectView(Effect * modelParam, QWidget *parent) : | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
QWidget(parent), | ||||||
ModelView(modelParam, this), | ||||||
m_bg(embed::getIconPixmap("effect_plugin")), | ||||||
m_subWindow(nullptr), | ||||||
m_controlView(nullptr), | ||||||
m_dragging(false) | ||||||
{ | ||||||
|
@@ -85,7 +86,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : | |||||
m_gate->setHintText( tr( "Gate:" ), "" ); | ||||||
|
||||||
|
||||||
setModel( _model ); | ||||||
setModel(modelParam); | ||||||
|
||||||
if( effect()->controls()->controlCount() > 0 ) | ||||||
{ | ||||||
|
@@ -126,7 +127,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : | |||||
setGraphicsEffect(m_opacityEffect); | ||||||
|
||||||
//move above vst effect view creation | ||||||
//setModel( _model ); | ||||||
//setModel(modelParam); | ||||||
} | ||||||
|
||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style