diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-04-22 00:16:50 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-04-22 00:16:50 +0800 |
commit | eba45fdf11a98113b439db0510b55f14845db8fb (patch) | |
tree | 1d73816893ccb36fa3a5f1f5c63a629bac7f0787 /simple-visualization/qmppianowidget.hpp | |
parent | d2b00a80c237c1c3d8bc9551966cf781292525e6 (diff) | |
download | QMidiPlayer-eba45fdf11a98113b439db0510b55f14845db8fb.tar.xz |
New development cycle!
Partially reintroduce High DPI handling.
Pressing enter when a preset is focused now opens the preset selection
dialog.
Close all functionality windows before shutting down.
Temporary fix for switching all channels of an external synth to mono
mode unintentionally.
And the most important one of them all: simple visualization!
I'm ditching the 0.8.6 cycle because there was no clear goal for that
release now (as the OPL3 emulation is now delayed indefinitely).
In contrast, the 0.8.7 release has a pretty good-looking feature set
mainly focused on improving support for external synthesizers:
- Per-device initialization profile.
- Instrument mapping files.
- And a simple visualization ~~for showing off your external synthesizers~~.
As always no ETA is set, nor will I promise the implementaion of all
the features listed above.
Diffstat (limited to 'simple-visualization/qmppianowidget.hpp')
-rw-r--r-- | simple-visualization/qmppianowidget.hpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/simple-visualization/qmppianowidget.hpp b/simple-visualization/qmppianowidget.hpp new file mode 100644 index 0000000..22af6ce --- /dev/null +++ b/simple-visualization/qmppianowidget.hpp @@ -0,0 +1,25 @@ +#ifndef QMPPIANOWIDGET_HPP +#define QMPPIANOWIDGET_HPP + +#include <QWidget> +#include <bitset> + +class qmpPianoWidget : public QWidget +{ + Q_OBJECT + public: + explicit qmpPianoWidget(QWidget *parent = nullptr); + void setKeyState(int key,bool state); + void reset(); + QSize minimumSizeHint()const override; + + protected: + void paintEvent(QPaintEvent *event)override; + + private: + bool keystates[128]; + QRectF getKeyRect(int key); + void paintKey(QRectF keyrect,QColor keycolor); +}; + +#endif // QMPPIANOWIDGET_HPP |