From eba45fdf11a98113b439db0510b55f14845db8fb Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 22 Apr 2019 00:16:50 +0800 Subject: 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. --- simple-visualization/qmppianowidget.hpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 simple-visualization/qmppianowidget.hpp (limited to 'simple-visualization/qmppianowidget.hpp') 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 +#include + +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 -- cgit v1.2.3