You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CircleElement.cpp 676B

12345678910111213141516171819202122232425262728
  1. #include "CircleElement.h"
  2. #include <QLineF>
  3. #include <QBrush>
  4. CircleElement::CircleElement(Tone *tone): tone(tone){
  5. QLineF * guidingLine = new QLineF();
  6. guidingLine->setP1(QPoint(0,100));
  7. guidingLine->setP2(QPoint(0,0));
  8. guidingLine->setAngle(90- 30 * tone->getQuintenPosition());
  9. setRect(guidingLine->p2().x(),guidingLine->p2().y(), 70,70);
  10. setPos(guidingLine->p2());
  11. setBrush(QBrush(tone->getColor()));
  12. delete guidingLine;
  13. };
  14. CircleElement::CircleElement(){};
  15. CircleElement::~CircleElement(){};
  16. Tone * CircleElement::getTone()const{
  17. return tone;
  18. };
  19. //SLOTS:
  20. void CircleElement::redraw(){
  21. setBrush(QBrush(tone->getColor()));
  22. };