Browse Source

„ColorScale.cpp“ löschen

master
Lars Mewes 2 years ago
parent
commit
5731d50739
1 changed files with 0 additions and 63 deletions
  1. 0
    63
      ColorScale.cpp

+ 0
- 63
ColorScale.cpp View File

#include "ColorScale.h"

ColorScale::ColorScale(){
allTones[0].setColor(Qt::red);
allTones[0].setName("C");
allTones[0].setFlatTone(true);

allTones[1].setColor(QColor(150,127,192));
allTones[1].setName("Cis");
allTones[1].setFlatTone(false);

allTones[2].setColor(Qt::yellow);
allTones[2].setName("D");
allTones[2].setFlatTone(true);

allTones[3].setColor(QColor(63,32,127));
allTones[3].setName("Dis");
allTones[3].setFlatTone(false);

allTones[4].setColor(QColor(200,255,255));
allTones[4].setName("E");
allTones[4].setFlatTone(true);

allTones[5].setColor(Qt::darkRed);
allTones[5].setName("F");
allTones[5].setFlatTone(true);

allTones[6].setColor(Qt::cyan);
allTones[6].setName("Fis");
allTones[6].setFlatTone(false);

allTones[7].setColor(QColor(255,100,0));
allTones[7].setName("G");
allTones[7].setFlatTone(true);

allTones[8].setColor(Qt::magenta);
allTones[8].setName("Gis");
allTones[8].setFlatTone(false);

allTones[9].setColor(Qt::green);
allTones[9].setName("A");
allTones[9].setFlatTone(true);

allTones[10].setColor(Qt::gray);
allTones[10].setName("Ais");
allTones[10].setFlatTone(false);

allTones[11].setColor(Qt::blue);
allTones[11].setName("H");
allTones[11].setFlatTone(true);
}

Tone * ColorScale::getToneByName(QString name){
for(int i=0; i<12; i++){
if(QString::compare(allTones[i].getName(), name, Qt::CaseInsensitive)==0)
return allTones+i;
}
return nullptr;
};

Tone * ColorScale::getToneByKeyboardPosition(int pos){
return allTones + ((pos-12)%12);
}

Loading…
Cancel
Save