Dateien hochladen nach „“
This commit is contained in:
parent
f62313ef8f
commit
3c92736c01
50
Tone.h
Normal file
50
Tone.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#pragma once
|
||||||
|
/* TONE_H
|
||||||
|
* CLASS DECLARATION
|
||||||
|
*
|
||||||
|
* CHANGLOG:
|
||||||
|
* NAME: | CHANGES: | DATE: |
|
||||||
|
* Mewes, Lars | Neuerstellung | 24.09.2021 |
|
||||||
|
* | | |
|
||||||
|
* | | |
|
||||||
|
* | | |
|
||||||
|
*
|
||||||
|
* DESCRIPTION:
|
||||||
|
* trivial,
|
||||||
|
* sobald sich die Farbe eines Tons ändert, wird ein Signal emittiert, damit die Quintenzirkel- und Klaviertastenelemente neugezeichnet werden.
|
||||||
|
* Dafür muss die Klasse von "QObject" abgeleitet werden und das Makro "Q_OBJECT" enthalten.
|
||||||
|
*
|
||||||
|
* TO-DOs:
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <QString>
|
||||||
|
#include <QColor>
|
||||||
|
#include <QBrush>
|
||||||
|
|
||||||
|
class Tone: public QObject{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
QString name;
|
||||||
|
QColor color;
|
||||||
|
bool flatTone;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
|
||||||
|
Tone(QString name, QColor color, bool flatTone);
|
||||||
|
Tone();
|
||||||
|
int getKeyboardPosition()const;
|
||||||
|
int getQuintenPosition() const;
|
||||||
|
void setColor(QColor color);
|
||||||
|
void setName(QString name);
|
||||||
|
void setFlatTone(bool flatTone);
|
||||||
|
QString getName()const;
|
||||||
|
QColor getColor()const;
|
||||||
|
bool getFlatTone()const;
|
||||||
|
|
||||||
|
virtual ~Tone();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void colorchanged();
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user