added GetCategory to CInstPictures class

This commit is contained in:
Volker Fischer 2020-04-26 16:39:55 +02:00
parent 9f7fc16ac3
commit 664429b309
3 changed files with 20 additions and 3 deletions

View File

@ -1,5 +1,7 @@
3.5.3git
TODO improve input channel mapping and introduce input/output gains with overrange to amplification (separate dialog, replace Pan, etc.)

View File

@ -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 -----------------------------------------------------
QString CLocale::GetCountryFlagIconsResourceReference ( const QLocale::Country eCountry )

View File

@ -761,9 +761,10 @@ public:
static int GetNotUsedInstrument() { return 0; }
static bool IsNotUsedInstrument ( const int iInstrument ) { return iInstrument == 0; }
static int GetNumAvailableInst() { return GetTable().Size(); }
static QString GetResourceReference ( const int iInstrument );
static QString GetName ( const int iInstrument );
static int GetNumAvailableInst() { return GetTable().Size(); }
static QString GetResourceReference ( const int iInstrument );
static QString GetName ( const int iInstrument );
static EInstCategory GetCategory ( const int iInstrument );
// TODO make use of instrument category (not yet implemented)