author | waspe <waspe> | 2003-11-16 19:31:57 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-16 19:31:57 (UTC) |
commit | e7a81ed5ba0dc6b996f179d1dc40d778492218a9 (patch) (side-by-side diff) | |
tree | 62081f88e6dad4df5a2f278050cf402c2da9ed98 /noncore/multimedia/tonleiter/fretboard.h | |
parent | 0b0c071017298ebd189420f85b5aa8d44885c50e (diff) | |
download | opie-e7a81ed5ba0dc6b996f179d1dc40d778492218a9.zip opie-e7a81ed5ba0dc6b996f179d1dc40d778492218a9.tar.gz opie-e7a81ed5ba0dc6b996f179d1dc40d778492218a9.tar.bz2 |
first commit
Diffstat (limited to 'noncore/multimedia/tonleiter/fretboard.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/fretboard.h | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/noncore/multimedia/tonleiter/fretboard.h b/noncore/multimedia/tonleiter/fretboard.h new file mode 100644 index 0000000..eb509b0 --- a/dev/null +++ b/noncore/multimedia/tonleiter/fretboard.h @@ -0,0 +1,54 @@ +#ifndef TONLEITER_FRET_BOARD_H +#define TONLEITER_FRET_BOARD_H + +#include <qbrush.h> +#include <qpen.h> +#include <qvaluelist.h> +#include <qwidget.h> + + +#include "tonleiterdata.h" + +class FretBoard : public QWidget +{ + Q_OBJECT +private: + TonleiterData* data; + + QPen fretpen; + QBrush markerbrush; + QPen stringpen; + + Instrument inst; + + int xmargin; + int xmin; + int xmax; + int xwidth; + + int ymargin; + int ymin; + int ymax; + int yheight; + + double fretdist; + double stringdist; + +public: + FretBoard(TonleiterData* data,QWidget* parent,const char* name="FretBoard",WFlags f=0); + virtual ~FretBoard(); +private slots: + void dataChange(); +private: + void paintEvent(QPaintEvent* pe); + void resizeEvent(QResizeEvent* re); + //void mousePressEvent(QMouseEvent* mpe); + //void mouseMoveEvent(QMouseEvent* mme); + //void mouseReleaseEvent(QMouseEvent* mre); + void paintBoard(QPainter* p); + void paintFrets(QPainter* p); + void paintStrings(QPainter* p); + void paintScale(QPainter* p); +}; + +#endif //TONLEITER_FRET_BOARD_H |