Attempting to add model.displayName
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1074 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2008-06-05 Paul Giblock <drfaygo/at/gmail/dot/com>
|
||||
|
||||
* include/automatable_model.h:
|
||||
* include/mv_base.h:
|
||||
* src/gui/automatable_model_view.cpp:
|
||||
* src/gui/widgets/knob.cpp:
|
||||
add setDisplayName to model, but doesn't work right for some reason
|
||||
|
||||
2008-06-05 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* include/note.h:
|
||||
|
||||
@@ -248,11 +248,6 @@ public:
|
||||
return( 0 );
|
||||
}*/
|
||||
|
||||
virtual QString displayName( void ) const
|
||||
{
|
||||
return( QString::null );
|
||||
}
|
||||
|
||||
|
||||
public slots:
|
||||
virtual void reset( void );
|
||||
|
||||
@@ -53,9 +53,23 @@ public:
|
||||
return( m_defaultConstructed );
|
||||
}
|
||||
|
||||
virtual QString displayName( void ) const
|
||||
{
|
||||
printf("displayName() Returned: %s\n", qPrintable(m_displayName) );
|
||||
return m_displayName;
|
||||
}
|
||||
|
||||
void setDisplayName( const QString & _displayName )
|
||||
{
|
||||
printf("setDisplayName() 1: %s ", qPrintable(_displayName));
|
||||
m_displayName = _displayName;
|
||||
printf("setDisplayName() 2: %s\n", qPrintable(m_displayName));
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
bool m_defaultConstructed;
|
||||
QString m_displayName;
|
||||
|
||||
signals:
|
||||
// emitted if actual data of the model (e.g. values) have changed
|
||||
|
||||
@@ -38,10 +38,11 @@
|
||||
void automatableModelView::addDefaultActions( QMenu * _menu )
|
||||
{
|
||||
automatableModel * _model = modelUntyped();
|
||||
printf( "addDefaultActions for %s\n", qPrintable(_model->displayName()) );
|
||||
|
||||
automatableModelViewSlots * amvSlots =
|
||||
new automatableModelViewSlots( this, _menu );
|
||||
|
||||
|
||||
_menu->addAction( embed::getIconPixmap( "reload" ),
|
||||
automatableModel::tr( "&Reset (%1%2)" ).
|
||||
arg( _model->displayValue(
|
||||
@@ -129,10 +130,12 @@ void automatableModelViewSlots::execConnectionDialog( void )
|
||||
{
|
||||
// TODO[pg]: Display a dialog with list of controllers currently in the song
|
||||
// in addition to any system MIDI controllers
|
||||
automatableModel * m = amv->modelUntyped();
|
||||
|
||||
automatableModel * m = amv->modelUntyped();
|
||||
|
||||
m->displayName();
|
||||
controllerConnectionDialog * d = new controllerConnectionDialog(
|
||||
(QWidget*)engine::getMainWindow(),
|
||||
/* m->displayName(), */
|
||||
m->getControllerConnection() );
|
||||
|
||||
d->exec();
|
||||
@@ -149,8 +152,11 @@ void automatableModelViewSlots::execConnectionDialog( void )
|
||||
// New
|
||||
else
|
||||
{
|
||||
m->setControllerConnection(
|
||||
new controllerConnection( d->chosenController() ) );
|
||||
controllerConnection * cc =
|
||||
new controllerConnection( d->chosenController() );
|
||||
m->setControllerConnection( cc );
|
||||
//cc->setTargetName( m->displayName() );
|
||||
|
||||
}
|
||||
}
|
||||
// no controller, so delete existing connection
|
||||
|
||||
@@ -78,6 +78,9 @@ knob::knob( int _knob_num, QWidget * _parent, const QString & _name ) :
|
||||
setAcceptDrops( TRUE );
|
||||
|
||||
setAccessibleName( _name );
|
||||
printf("knob's Display name: %s\n", qPrintable(_name));
|
||||
model()->setDisplayName( _name );
|
||||
printf("knob-model's Display name: %s\n", qPrintable( model()->displayName() ));
|
||||
|
||||
if( m_knobNum != knobStyled ) {
|
||||
m_knobPixmap = new QPixmap( embed::getIconPixmap( QString( "knob0" +
|
||||
|
||||
Reference in New Issue
Block a user