#ifndef _QTPIANO_H_
#define _QTPIANO_H_
#include "qtEditor.h"
class KbNote;
class KbPart;
/**
* Qt implementation of the piano roll editor
* @author ?
* @version ?
*/
class QtPiano : public QtEditor
{
Q_OBJECT
private:
// used for the range (in ticks) that is to be displayed
int xLeft;
int xRight;
// ticks per bar
int ticksPerBar;
// used for a notes information in paintEvent
KbNote * next;
int freq;
int pos;
int len;
// coordinates, used at several places...
int xx;
int yy;
int xxLen;
char barText[5];
public:
/**
* constructor, takes the part to be displayed as a parameter
*/
QtPiano(KbPart * kbpart);
public slots:
/// do all the painting here
void paintEvent ( QPaintEvent * );
/// mouse is pressed here
void mousePressEvent ( QMouseEvent * );
/// mouse is moved
void mouseMoveEvent ( QMouseEvent * );
/// mouse is released
void mouseReleaseEvent ( QMouseEvent * );
/// a key is pressed
void keyPressEvent ( QKeyEvent * );
/// a key is released
void keyReleaseEvent ( QKeyEvent * );
};
#endif
Documentation generated by wuerthne@clouseau on Sat Feb 20 16:41:13 MST 1999