added GetCategory to CInstPictures class
This commit is contained in:
parent
9f7fc16ac3
commit
664429b309
3 changed files with 20 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
3.5.3git
|
3.5.3git
|
||||||
|
|
||||||
TODO improve input channel mapping and introduce input/output gains with overrange to amplification (separate dialog, replace Pan, etc.)
|
TODO improve input channel mapping and introduce input/output gains with overrange to amplification (separate dialog, replace Pan, etc.)
|
||||||
|
|
14
src/util.cpp
14
src/util.cpp
|
@ -1006,6 +1006,20 @@ QString CInstPictures::GetName ( const int iInstrument )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CInstPictures::EInstCategory CInstPictures::GetCategory ( const int iInstrument )
|
||||||
|
{
|
||||||
|
// range check
|
||||||
|
if ( IsInstIndexInRange ( iInstrument ) )
|
||||||
|
{
|
||||||
|
// return the name of the instrument
|
||||||
|
return GetTable()[iInstrument].eInstCategory;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return IC_OTHER_INSTRUMENT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Locale management class -----------------------------------------------------
|
// Locale management class -----------------------------------------------------
|
||||||
QString CLocale::GetCountryFlagIconsResourceReference ( const QLocale::Country eCountry )
|
QString CLocale::GetCountryFlagIconsResourceReference ( const QLocale::Country eCountry )
|
||||||
|
|
|
@ -761,9 +761,10 @@ public:
|
||||||
static int GetNotUsedInstrument() { return 0; }
|
static int GetNotUsedInstrument() { return 0; }
|
||||||
static bool IsNotUsedInstrument ( const int iInstrument ) { return iInstrument == 0; }
|
static bool IsNotUsedInstrument ( const int iInstrument ) { return iInstrument == 0; }
|
||||||
|
|
||||||
static int GetNumAvailableInst() { return GetTable().Size(); }
|
static int GetNumAvailableInst() { return GetTable().Size(); }
|
||||||
static QString GetResourceReference ( const int iInstrument );
|
static QString GetResourceReference ( const int iInstrument );
|
||||||
static QString GetName ( const int iInstrument );
|
static QString GetName ( const int iInstrument );
|
||||||
|
static EInstCategory GetCategory ( const int iInstrument );
|
||||||
|
|
||||||
// TODO make use of instrument category (not yet implemented)
|
// TODO make use of instrument category (not yet implemented)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue