Browse Source

„Tone.cpp“ löschen

master
Lars Mewes 2 years ago
parent
commit
c184149f6d
1 changed files with 0 additions and 62 deletions
  1. 0
    62
      Tone.cpp

+ 0
- 62
Tone.cpp View File

@@ -1,62 +0,0 @@
#include "Tone.h"

Tone::Tone(QString name, QColor color, bool flatTone): name(name), color(color), flatTone(flatTone){

};
Tone::Tone(){};

int Tone::getKeyboardPosition()const{
if(QString::compare(name, "c", Qt::CaseInsensitive)==0) return 0;
if(QString::compare(name, "cis", Qt::CaseInsensitive)==0) return 0;
if(QString::compare(name, "d", Qt::CaseInsensitive)==0) return 1;
if(QString::compare(name, "dis", Qt::CaseInsensitive)==0) return 1;
if(QString::compare(name, "e", Qt::CaseInsensitive)==0) return 2;
if(QString::compare(name, "f", Qt::CaseInsensitive)==0) return 3;
if(QString::compare(name, "fis", Qt::CaseInsensitive)==0) return 3;
if(QString::compare(name, "g", Qt::CaseInsensitive)==0) return 4;
if(QString::compare(name, "gis", Qt::CaseInsensitive)==0) return 4;
if(QString::compare(name, "a", Qt::CaseInsensitive)==0) return 5;
if(QString::compare(name, "ais", Qt::CaseInsensitive)==0) return 5;
if(QString::compare(name, "h", Qt::CaseInsensitive)==0) return 6;
return 7;
};

int Tone::getQuintenPosition()const{
if(QString::compare(name, "c", Qt::CaseInsensitive)==0) return 0;
if(QString::compare(name, "g", Qt::CaseInsensitive)==0) return 1;
if(QString::compare(name, "d", Qt::CaseInsensitive)==0) return 2;
if(QString::compare(name, "a", Qt::CaseInsensitive)==0) return 3;
if(QString::compare(name, "e", Qt::CaseInsensitive)==0) return 4;
if(QString::compare(name, "h", Qt::CaseInsensitive)==0) return 5;
if(QString::compare(name, "fis", Qt::CaseInsensitive)==0) return 6;
if(QString::compare(name, "cis", Qt::CaseInsensitive)==0) return 7;
if(QString::compare(name, "gis", Qt::CaseInsensitive)==0) return 8;
if(QString::compare(name, "dis", Qt::CaseInsensitive)==0) return 9;
if(QString::compare(name, "ais", Qt::CaseInsensitive)==0) return 10;
if(QString::compare(name, "f", Qt::CaseInsensitive)==0) return 11;

return 30;
};

void Tone::setColor(QColor color){
this->color = color;
emit colorchanged();
};
void Tone::setName(QString name){
this->name = name;
};
void Tone::setFlatTone(bool flatTone){
this->flatTone = flatTone;
};

QString Tone::getName()const{
return name;
};
QColor Tone::getColor()const{
return color;
};
bool Tone::getFlatTone()const{
return flatTone;
};

Tone::~Tone(){};

Loading…
Cancel
Save