diff --git a/ChangeLog b/ChangeLog index ce507ca64f..04b8ae57e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,33 @@ 2008-07-18 Tobias Doerffel + * 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 diff --git a/include/controller.h b/include/controller.h index 3c405ddecb..d7d25fa7cc 100644 --- a/include/controller.h +++ b/include/controller.h @@ -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 diff --git a/include/lfo_controller.h b/include/lfo_controller.h index 9b5f9b96ca..dc461eb718 100644 --- a/include/lfo_controller.h +++ b/include/lfo_controller.h @@ -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; diff --git a/include/midi_controller.h b/include/midi_controller.h index d6e52f4f4e..d61a367de5 100644 --- a/include/midi_controller.h +++ b/include/midi_controller.h @@ -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 ); diff --git a/include/peak_controller.h b/include/peak_controller.h index f2c13c28a2..9721cfb128 100644 --- a/include/peak_controller.h +++ b/include/peak_controller.h @@ -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 ); diff --git a/include/plugin.h b/include/plugin.h index d2dea90a06..0806260fd3 100644 --- a/include/plugin.h +++ b/include/plugin.h @@ -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 * ); diff --git a/plugins/ladspa_effect/ladspa_effect.cpp b/plugins/ladspa_effect/ladspa_effect.cpp index 75a11d776b..c2eb0e8d96 100644 --- a/plugins/ladspa_effect/ladspa_effect.cpp +++ b/plugins/ladspa_effect/ladspa_effect.cpp @@ -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(); diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index de877a7ccb..3d57ec44c5 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -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() ); diff --git a/src/core/controller.cpp b/src/core/controller.cpp index f460a392a7..21c0c160a5 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -45,8 +45,9 @@ QVector 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: diff --git a/src/core/lfo_controller.cpp b/src/core/lfo_controller.cpp index a81a4e8a40..4a381673e1 100644 --- a/src/core/lfo_controller.cpp +++ b/src/core/lfo_controller.cpp @@ -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" ) ), diff --git a/src/core/midi/midi_controller.cpp b/src/core/midi/midi_controller.cpp index 3768441558..4403bac9bb 100644 --- a/src/core/midi/midi_controller.cpp +++ b/src/core/midi/midi_controller.cpp @@ -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, diff --git a/src/core/peak_controller.cpp b/src/core/peak_controller.cpp index 33b26bec99..8f18d07b27 100644 --- a/src/core/peak_controller.cpp +++ b/src/core/peak_controller.cpp @@ -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 ) { } diff --git a/src/core/tool.cpp b/src/core/tool.cpp index 821aa79e71..286eb2c868 100644 --- a/src/core/tool.cpp +++ b/src/core/tool.cpp @@ -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() ); } diff --git a/src/gui/effect_control_dialog.cpp b/src/gui/effect_control_dialog.cpp index 9cff5efee7..ccbc4d5367 100644 --- a/src/gui/effect_control_dialog.cpp +++ b/src/gui/effect_control_dialog.cpp @@ -39,7 +39,7 @@ effectControlDialog::effectControlDialog( effectControls * _controls ) : modelView( _controls, this ), m_effectControls( _controls ) { - setWindowTitle( m_effectControls->getEffect()->publicName() ); + setWindowTitle( m_effectControls->getEffect()->displayName() ); } diff --git a/src/gui/effect_select_dialog.cpp b/src/gui/effect_select_dialog.cpp index 12f9cd8ba7..24e9c0896f 100644 --- a/src/gui/effect_select_dialog.cpp +++ b/src/gui/effect_select_dialog.cpp @@ -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 : diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp index a87e304572..91a371077f 100644 --- a/src/gui/main_window.cpp +++ b/src/gui/main_window.cpp @@ -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 ) ); } diff --git a/src/gui/plugin_browser.cpp b/src/gui/plugin_browser.cpp index 4d01ffbefc..b8c4e88c2b 100644 --- a/src/gui/plugin_browser.cpp +++ b/src/gui/plugin_browser.cpp @@ -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 ) { diff --git a/src/gui/widgets/controller_view.cpp b/src/gui/widgets/controller_view.cpp index 677ef31674..7709089f93 100644 --- a/src/gui/widgets/controller_view.cpp +++ b/src/gui/widgets/controller_view.cpp @@ -145,9 +145,9 @@ void controllerView::paintEvent( QPaintEvent * ) controller * c = castModel(); 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 ); diff --git a/src/gui/widgets/effect_view.cpp b/src/gui/widgets/effect_view.cpp index db50bbbcaa..852a52bab4 100644 --- a/src/gui/widgets/effect_view.cpp +++ b/src/gui/widgets/effect_view.cpp @@ -220,7 +220,7 @@ void effectView::closeEffects( void ) void effectView::contextMenuEvent( QContextMenuEvent * ) { QPointer 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() ); } diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index 1e62fb0161..e035c0a938 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -355,7 +355,7 @@ QString instrumentTrack::instrumentName( void ) const { if( m_instrument != NULL ) { - return( m_instrument->publicName() ); + return( m_instrument->displayName() ); } return( QString::null ); }