From 3c92736c016e5c3ab5a1f7dae2a201fdcc68e5f4 Mon Sep 17 00:00:00 2001 From: Lars Mewes Date: Fri, 8 Oct 2021 11:21:31 +0000 Subject: [PATCH] =?UTF-8?q?Dateien=20hochladen=20nach=20=E2=80=9E=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tone.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Tone.h diff --git a/Tone.h b/Tone.h new file mode 100644 index 0000000..61c2d67 --- /dev/null +++ b/Tone.h @@ -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 +#include +#include + +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(); +};