@@ -1,27 +0,0 @@ | |||
#include "PianoKey.h" | |||
#include <QBrush> | |||
PianoKey::PianoKey(Tone *tone): tone(tone){ | |||
if(tone->getFlatTone()){ | |||
setRect(-350+tone->getKeyboardPosition()*100,0, 100, 700); | |||
} | |||
else{ | |||
setRect(-350+75+tone->getKeyboardPosition()*100,0, 50, 500); | |||
setZValue(1); | |||
} | |||
setBrush(QBrush(tone->getColor())); | |||
}; | |||
PianoKey::~PianoKey(){}; | |||
Tone * PianoKey::getTone()const{ | |||
return tone; | |||
}; | |||
//SLOTS: | |||
void PianoKey::redraw(){ | |||
setBrush(QBrush(tone->getColor())); | |||
}; | |||