drumstick
2.9.0
C++ MIDI libraries using Qt objects, idioms, and style.
keylabel.h
Go to the documentation of this file.
1
/*
2
Virtual Piano Widget for Qt
3
Copyright (C) 2008-2023, Pedro Lopez-Cabanillas <plcl@users.sf.net>
4
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License along
16
with this program; If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef KEYLABEL_H
20
#define KEYLABEL_H
21
22
#include <QGraphicsTextItem>
23
#include <
drumstick/pianokeybd.h
>
24
30
namespace
drumstick
{
31
namespace
widgets {
32
33
class
KeyLabel :
public
QGraphicsTextItem
34
{
35
public
:
36
explicit
KeyLabel(QGraphicsItem *parent =
nullptr
);
37
virtual
~KeyLabel() =
default
;
38
void
setPlainText(
const
QString& text);
39
void
adjust();
40
void
setOrientation(
LabelOrientation
ori);
41
void
restoreColor();
42
void
setHtml(
const
QString& text);
43
44
private
:
45
LabelOrientation
m_orientation =
HorizontalOrientation
;
46
void
calculateRotation();
47
48
QColor m_savedColor;
49
};
50
51
}}
// namespace drumstick::widgets
52
53
#endif
// KEYLABEL_H
drumstick::widgets::LabelOrientation
LabelOrientation
Labels Orientation.
Definition:
pianokeybd.h:141
drumstick::widgets::HorizontalOrientation
@ HorizontalOrientation
Show horizontal names.
Definition:
pianokeybd.h:142
drumstick
Drumstick common.
Definition:
alsaclient.cpp:68
pianokeybd.h
Piano Keyboard Widget.
drumstick
library
widgets
keylabel.h
Generated by
1.9.5