Merge branch 'variable-tab-widget'
This commit is contained in:
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
virtual PluginView * instantiateView( QWidget * _parent )
|
||||
{
|
||||
return new InstrumentView( this, _parent );
|
||||
return new InstrumentViewFixedSize( this, _parent );
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
@@ -32,11 +32,12 @@
|
||||
class InstrumentTrackWindow;
|
||||
|
||||
|
||||
//! Instrument view with variable size
|
||||
class LMMS_EXPORT InstrumentView : public PluginView
|
||||
{
|
||||
public:
|
||||
InstrumentView( Instrument * _instrument, QWidget * _parent );
|
||||
virtual ~InstrumentView();
|
||||
~InstrumentView() override;
|
||||
|
||||
Instrument * model()
|
||||
{
|
||||
@@ -48,11 +49,25 @@ public:
|
||||
return( castModel<Instrument>() );
|
||||
}
|
||||
|
||||
virtual void setModel( Model * _model, bool = false );
|
||||
void setModel( Model * _model, bool = false ) override;
|
||||
|
||||
InstrumentTrackWindow * instrumentTrackWindow();
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
//! Instrument view with fixed LMMS-default size
|
||||
class LMMS_EXPORT InstrumentViewFixedSize : public InstrumentView
|
||||
{
|
||||
QSize sizeHint() const override { return QSize(250, 250); }
|
||||
QSize minimumSizeHint() const override { return sizeHint(); }
|
||||
|
||||
public:
|
||||
using InstrumentView::InstrumentView;
|
||||
~InstrumentViewFixedSize() override;
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -78,6 +78,7 @@ protected:
|
||||
virtual void resizeEvent( QResizeEvent * _re );
|
||||
virtual void wheelEvent( QWheelEvent * _we );
|
||||
virtual QSize minimumSizeHint() const;
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
private:
|
||||
struct widgetDesc
|
||||
|
||||
Reference in New Issue
Block a user