removed publicName-properties in various classes and plugin-descriptor and use model::displayName instead
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1337 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
28
ChangeLog
28
ChangeLog
@@ -1,5 +1,33 @@
|
||||
2008-07-18 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/lb303/lb303.h:
|
||||
removed declaration of unimplemented slot - fixes win32-build
|
||||
|
||||
* plugins/ladspa_effect/ladspa_effect.cpp:
|
||||
* plugins/vibed/vibed.cpp:
|
||||
* include/controller.h:
|
||||
* include/lfo_controller.h:
|
||||
* include/midi_controller.h:
|
||||
* include/peak_controller.h:
|
||||
* include/plugin.h:
|
||||
* src/core/controller.cpp:
|
||||
* src/core/lfo_controller.cpp:
|
||||
* src/core/peak_controller.cpp:
|
||||
* src/core/tool.cpp:
|
||||
* src/core/midi/midi_controller.cpp:
|
||||
* src/gui/effect_control_dialog.cpp:
|
||||
* src/gui/effect_select_dialog.cpp:
|
||||
* src/gui/main_window.cpp:
|
||||
* src/gui/plugin_browser.cpp:
|
||||
* src/gui/widgets/controller_view.cpp:
|
||||
* src/gui/widgets/effect_view.cpp:
|
||||
* src/tracks/instrument_track.cpp:
|
||||
removed publicName-properties in various classes and plugin-descriptor
|
||||
and use model::displayName instead
|
||||
|
||||
* src/gui/controller_connection_dialog.cpp:
|
||||
improved GUI-layout
|
||||
|
||||
* include/automation_pattern.h:
|
||||
* src/core/automation_pattern.cpp:
|
||||
- removed obsolete variable
|
||||
|
||||
@@ -55,7 +55,8 @@ public:
|
||||
NumControllerTypes
|
||||
} ;
|
||||
|
||||
controller( ControllerTypes _type, model * _parent );
|
||||
controller( ControllerTypes _type, model * _parent,
|
||||
const QString & _display_name );
|
||||
|
||||
virtual ~controller();
|
||||
|
||||
@@ -73,11 +74,6 @@ public:
|
||||
m_sampleExact = _exact;
|
||||
}
|
||||
|
||||
virtual QString publicName() const
|
||||
{
|
||||
return "Dummy Controller";
|
||||
}
|
||||
|
||||
ControllerTypes type( void ) const
|
||||
{
|
||||
return( m_type );
|
||||
@@ -109,6 +105,7 @@ public:
|
||||
static void triggerFrameCounter( void );
|
||||
static void resetFrameCounter( void );
|
||||
|
||||
|
||||
public slots:
|
||||
virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
|
||||
@@ -117,8 +114,8 @@ public slots:
|
||||
m_name = _new_name;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
// The internal per-controller get-value function
|
||||
virtual float value( int _offset );
|
||||
|
||||
@@ -132,11 +129,6 @@ protected:
|
||||
|
||||
static unsigned int s_frames;
|
||||
|
||||
/*
|
||||
slots:
|
||||
void trigger();
|
||||
|
||||
*/
|
||||
|
||||
signals:
|
||||
// The value changed while the mixer isn't running (i.e: MIDI CC)
|
||||
@@ -146,7 +138,8 @@ signals:
|
||||
void destroying( void );
|
||||
|
||||
friend class controllerDialog;
|
||||
};
|
||||
|
||||
} ;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -50,29 +50,19 @@ public:
|
||||
|
||||
virtual ~lfoController();
|
||||
|
||||
virtual QString publicName() const
|
||||
{
|
||||
return "LFO Controller";
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual QString nodeName( void ) const;
|
||||
|
||||
|
||||
public slots:
|
||||
virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
// The internal per-controller get-value function
|
||||
virtual float value( int _offset );
|
||||
|
||||
/*
|
||||
slots:
|
||||
void trigger();
|
||||
|
||||
*/
|
||||
|
||||
floatModel m_baseModel;
|
||||
tempoSyncKnobModel m_speedModel;
|
||||
floatModel m_amountModel;
|
||||
@@ -86,11 +76,12 @@ slots:
|
||||
|
||||
sample_t (*m_sampleFunction)( const float );
|
||||
|
||||
|
||||
protected slots:
|
||||
void updateSampleFunction( void );
|
||||
|
||||
friend class lfoControllerDialog;
|
||||
};
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -101,19 +92,9 @@ public:
|
||||
lfoControllerDialog( controller * _controller, QWidget * _parent );
|
||||
virtual ~lfoControllerDialog();
|
||||
|
||||
public slots:
|
||||
//void editControls( void );
|
||||
//void deletePlugin( void );
|
||||
//void displayHelp( void );
|
||||
//void closeEffects( void );
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
//virtual void paintEvent( QPaintEvent * _pe );
|
||||
virtual void modelChanged( void );
|
||||
|
||||
lfoController * m_lfo;
|
||||
|
||||
@@ -43,13 +43,6 @@ public:
|
||||
midiController( model * _parent );
|
||||
virtual ~midiController();
|
||||
|
||||
#warning TODO: use displayName-property!
|
||||
virtual QString publicName() const
|
||||
{
|
||||
return "MIDI Controller";
|
||||
}
|
||||
|
||||
|
||||
virtual void processInEvent( const midiEvent & _me,
|
||||
const midiTime & _time );
|
||||
|
||||
|
||||
@@ -49,11 +49,6 @@ public:
|
||||
|
||||
virtual ~peakController();
|
||||
|
||||
virtual QString publicName() const
|
||||
{
|
||||
return "Peak Controller";
|
||||
}
|
||||
|
||||
virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
|
||||
virtual void loadSettings( const QDomElement & _this );
|
||||
virtual QString nodeName( void ) const;
|
||||
@@ -61,26 +56,19 @@ public:
|
||||
static peakControllerEffectVector s_effects;
|
||||
static int s_lastEffectId;
|
||||
|
||||
|
||||
public slots:
|
||||
virtual controllerDialog * createDialog( QWidget * _parent );
|
||||
|
||||
protected:
|
||||
|
||||
protected:
|
||||
// The internal per-controller get-value function
|
||||
virtual float value( int _offset );
|
||||
|
||||
/*
|
||||
slots:
|
||||
void trigger();
|
||||
|
||||
*/
|
||||
|
||||
peakControllerEffect * m_peakEffect;
|
||||
|
||||
protected slots:
|
||||
|
||||
friend class peakControllerDialog;
|
||||
};
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -91,16 +79,6 @@ public:
|
||||
peakControllerDialog( controller * _controller, QWidget * _parent );
|
||||
virtual ~peakControllerDialog();
|
||||
|
||||
public slots:
|
||||
//void editControls( void );
|
||||
//void deletePlugin( void );
|
||||
//void displayHelp( void );
|
||||
//void closeEffects( void );
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
struct descriptor
|
||||
{
|
||||
const char * name;
|
||||
const char * publicName;
|
||||
const char * displayName;
|
||||
const char * description;
|
||||
const char * author;
|
||||
int version;
|
||||
@@ -163,16 +163,12 @@ public:
|
||||
plugin( const descriptor * _descriptor, model * _parent );
|
||||
virtual ~plugin();
|
||||
|
||||
// returns public-name out of descriptor
|
||||
virtual inline QString publicName( void ) const
|
||||
// returns display-name out of descriptor
|
||||
virtual QString displayName( void ) const
|
||||
{
|
||||
return( m_publicName != QString::null ?
|
||||
m_publicName : m_descriptor->publicName );
|
||||
}
|
||||
|
||||
virtual void setPublicName( const QString & _public_name )
|
||||
{
|
||||
m_publicName = _public_name;
|
||||
return( model::displayName() != QString::null ?
|
||||
model::displayName() :
|
||||
m_descriptor->displayName );
|
||||
}
|
||||
|
||||
// return plugin-type
|
||||
@@ -231,7 +227,6 @@ protected:
|
||||
|
||||
private:
|
||||
const descriptor * m_descriptor;
|
||||
QString m_publicName;
|
||||
|
||||
// pointer to instantiation-function in plugin
|
||||
typedef plugin * ( * instantiationHook )( model *, void * );
|
||||
|
||||
@@ -77,7 +77,7 @@ ladspaEffect::ladspaEffect( model * _parent,
|
||||
return;
|
||||
}
|
||||
|
||||
setPublicName( manager->getShortName( m_key ) );
|
||||
setDisplayName( manager->getShortName( m_key ) );
|
||||
|
||||
pluginInstantiation();
|
||||
|
||||
@@ -270,7 +270,7 @@ void ladspaEffect::setControl( int _control, LADSPA_Data _value )
|
||||
|
||||
void ladspaEffect::pluginInstantiation( void )
|
||||
{
|
||||
m_maxSampleRate = maxSamplerate( publicName() );
|
||||
m_maxSampleRate = maxSamplerate( displayName() );
|
||||
|
||||
ladspa2LMMS * manager = engine::getLADSPAManager();
|
||||
|
||||
|
||||
@@ -552,8 +552,6 @@ vibedView::vibedView( instrument * _instrument,
|
||||
this, SLOT( showString( Uint8 ) ) );
|
||||
|
||||
showString( 0 );
|
||||
// Get current graph-model
|
||||
graphModel * gModel = m_graph->model();
|
||||
|
||||
m_sinWaveBtn = new pixmapButton( this, tr( "Sine wave" ) );
|
||||
m_sinWaveBtn->move( 212, 24 );
|
||||
@@ -762,7 +760,7 @@ void vibedView::normalizeClicked( void )
|
||||
void vibedView::contextMenuEvent( QContextMenuEvent * )
|
||||
{
|
||||
|
||||
captionMenu contextMenu( model()->publicName() );
|
||||
captionMenu contextMenu( model()->displayName() );
|
||||
contextMenu.addAction( embed::getIconPixmap( "help" ), tr( "&Help" ),
|
||||
this, SLOT( displayHelp() ) );
|
||||
contextMenu.exec( QCursor::pos() );
|
||||
|
||||
@@ -45,8 +45,9 @@ QVector<controller *> controller::s_controllers;
|
||||
|
||||
|
||||
|
||||
controller::controller( ControllerTypes _type, model * _parent ) :
|
||||
model( _parent ),
|
||||
controller::controller( ControllerTypes _type, model * _parent,
|
||||
const QString & _display_name ) :
|
||||
model( _parent, _display_name ),
|
||||
journallingObject(),
|
||||
m_type( _type )
|
||||
{
|
||||
@@ -149,7 +150,8 @@ controller * controller::create( ControllerTypes _ct, model * _parent )
|
||||
if( dummy )
|
||||
c = dummy;
|
||||
else
|
||||
c = new controller( DummyController, NULL );
|
||||
c = new controller( DummyController, NULL,
|
||||
QString() );
|
||||
break;
|
||||
|
||||
case LfoController:
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
const float TWO_PI = 6.28318531f;
|
||||
|
||||
lfoController::lfoController( model * _parent ) :
|
||||
controller( LfoController, _parent ),
|
||||
controller( LfoController, _parent, tr( "LFO Controller" ) ),
|
||||
m_baseModel( 0.5, 0.0, 1.0, 0.001, this, tr( "Base value" ) ),
|
||||
m_speedModel( 2.0, 0.01, 20.0, 0.0001, 20000.0, this, tr( "Oscillator speed" ) ),
|
||||
m_amountModel( 1.0, -1.0, 1.0, 0.005, this, tr( "Oscillator amount" ) ),
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
|
||||
midiController::midiController( model * _parent ) :
|
||||
controller( MidiController, _parent ),
|
||||
controller( MidiController, _parent, tr( "MIDI Controller" ) ),
|
||||
midiEventProcessor(),
|
||||
m_midiPort( tr( "unnamed_midi_controller" ),
|
||||
engine::getMixer()->getMIDIClient(), this, this,
|
||||
|
||||
@@ -44,7 +44,7 @@ peakControllerEffectVector peakController::s_effects;
|
||||
|
||||
peakController::peakController( model * _parent,
|
||||
peakControllerEffect * _peak_effect ) :
|
||||
controller( PeakController, _parent ),
|
||||
controller( PeakController, _parent, tr( "LFO Controller" ) ),
|
||||
m_peakEffect( _peak_effect )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ toolView::toolView( tool * _tool ) :
|
||||
engine::getMainWindow()->workspace()->addSubWindow( this );
|
||||
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
|
||||
|
||||
setWindowTitle( _tool->publicName() );
|
||||
setWindowTitle( _tool->displayName() );
|
||||
setWindowIcon( _tool->getDescriptor()->logo->pixmap() );
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ effectControlDialog::effectControlDialog( effectControls * _controls ) :
|
||||
modelView( _controls, this ),
|
||||
m_effectControls( _controls )
|
||||
{
|
||||
setWindowTitle( m_effectControls->getEffect()->publicName() );
|
||||
setWindowTitle( m_effectControls->getEffect()->displayName() );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ effectListWidget::effectListWidget( QWidget * _parent ) :
|
||||
for( effectKeyList::const_iterator it = m_effectKeys.begin();
|
||||
it != m_effectKeys.end(); ++it )
|
||||
{
|
||||
plugin_names += QString( ( *it ).desc->publicName ) +
|
||||
plugin_names += QString( ( *it ).desc->displayName ) +
|
||||
( ( ( *it ).desc->sub_plugin_features != NULL ) ?
|
||||
": " + ( *it ).name
|
||||
:
|
||||
|
||||
@@ -254,7 +254,7 @@ void mainWindow::finalize( void )
|
||||
if( it->type == plugin::Tool )
|
||||
{
|
||||
m_toolsMenu->addAction( it->logo->pixmap(),
|
||||
it->publicName );
|
||||
it->displayName );
|
||||
m_tools.push_back( tool::instantiate( it->name,
|
||||
/*this*/NULL )->createView( this ) );
|
||||
}
|
||||
|
||||
@@ -141,7 +141,8 @@ void pluginDescWidget::paintEvent( QPaintEvent * )
|
||||
QFont f = pointSize<8>( p.font() );
|
||||
f.setBold( TRUE );
|
||||
p.setFont( f );
|
||||
p.drawText( 10 + logo_size.width(), 15, m_pluginDescriptor.publicName );
|
||||
p.drawText( 10 + logo_size.width(), 15,
|
||||
m_pluginDescriptor.displayName );
|
||||
|
||||
if( height() > 24 || m_mouseOver )
|
||||
{
|
||||
|
||||
@@ -145,9 +145,9 @@ void controllerView::paintEvent( QPaintEvent * )
|
||||
controller * c = castModel<controller>();
|
||||
|
||||
p.setPen( QColor( 64, 64, 64 ) );
|
||||
p.drawText( 7, 13, c->publicName() );
|
||||
p.drawText( 7, 13, c->displayName() );
|
||||
p.setPen( Qt::white );
|
||||
p.drawText( 6, 12, c->publicName() );
|
||||
p.drawText( 6, 12, c->displayName() );
|
||||
|
||||
f.setBold( FALSE );
|
||||
p.setFont( f );
|
||||
|
||||
@@ -220,7 +220,7 @@ void effectView::closeEffects( void )
|
||||
void effectView::contextMenuEvent( QContextMenuEvent * )
|
||||
{
|
||||
QPointer<captionMenu> contextMenu = new captionMenu(
|
||||
getEffect()->publicName() );
|
||||
getEffect()->displayName() );
|
||||
contextMenu->addAction( embed::getIconPixmap( "arp_up_on" ),
|
||||
tr( "Move &up" ),
|
||||
this, SLOT( moveUp() ) );
|
||||
@@ -252,9 +252,9 @@ void effectView::paintEvent( QPaintEvent * )
|
||||
p.setFont( f );
|
||||
|
||||
p.setPen( QColor( 64, 64, 64 ) );
|
||||
p.drawText( 6, 55, getEffect()->publicName() );
|
||||
p.drawText( 6, 55, getEffect()->displayName() );
|
||||
p.setPen( Qt::white );
|
||||
p.drawText( 5, 54, getEffect()->publicName() );
|
||||
p.drawText( 5, 54, getEffect()->displayName() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -355,7 +355,7 @@ QString instrumentTrack::instrumentName( void ) const
|
||||
{
|
||||
if( m_instrument != NULL )
|
||||
{
|
||||
return( m_instrument->publicName() );
|
||||
return( m_instrument->displayName() );
|
||||
}
|
||||
return( QString::null );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user