in instrument tracks draw icon of instrument rather than displaying the full name of the instrument on track label button

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1766 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-10-18 10:22:43 +00:00
parent 88f6f1d080
commit 58c2980507
6 changed files with 62 additions and 47 deletions

View File

@@ -93,6 +93,11 @@ public:
{
}
virtual QString pixmapName( void ) const
{
return m_name;
}
protected:
QString m_name;
} ;
@@ -116,6 +121,13 @@ public:
}
return( QPixmap() );
}
virtual QString pixmapName( void ) const
{
return QString( STRINGIFY_PLUGIN_NAME(PLUGIN_NAME) ) +
"::" + m_name;
}
} ;
#endif

View File

@@ -101,11 +101,6 @@ public:
// name-stuff
virtual void setName( const QString & _new_name );
inline virtual QString displayName( void ) const
{
return instrumentName() + ":" + track::displayName();
}
// translate given key of a note-event to absolute key (i.e.
// add global master-pitch and base-note of this instrument track)
int masterKey( int _midi_key ) const;

View File

@@ -76,9 +76,9 @@ public:
const char * supportedFileTypes;
inline bool supportsFileType( const QString & _ext ) const
{
return( QString( supportedFileTypes ).
return QString( supportedFileTypes ).
split( QChar( ',' ) ).
contains( _ext ) );
contains( _ext );
}
class EXPORT subPluginFeatures
{
@@ -105,8 +105,8 @@ public:
inline bool isValid( void ) const
{
return( desc != NULL &&
name != QString::null );
return desc != NULL &&
name != QString::null;
}
plugin::descriptor * desc;
@@ -152,21 +152,21 @@ public:
// returns display-name out of descriptor
virtual QString displayName( void ) const
{
return( model::displayName().isNull() ?
m_descriptor->displayName :
model::displayName() );
return model::displayName().isNull() ?
m_descriptor->displayName :
model::displayName();
}
// return plugin-type
inline PluginTypes type( void ) const
{
return( m_descriptor->type );
return m_descriptor->type;
}
// return plugin-descriptor for further information
inline const descriptor * getDescriptor( void ) const
{
return( m_descriptor );
return m_descriptor;
}
// can be called if a file matching supportedFileTypes should be

View File

@@ -54,6 +54,7 @@ protected:
private:
trackView * m_trackView;
QString m_iconName;
} ;