File: fingerlist.h

package info (click to toggle)
noteedit 2.8.1-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 14,068 kB
  • ctags: 4,929
  • sloc: cpp: 45,808; sh: 18,530; perl: 2,798; yacc: 1,535; lex: 287; makefile: 280
file content (58 lines) | stat: -rw-r--r-- 1,824 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*****************************************************************************/
/* This file is a modification of the original "fingerlist.h" from           */
/* the "kguitar" program version 0.4. As of this writing the whole programs  */
/* was available from:                                                       */
/*                                                                           */
/*    http://kguitar.sourceforge.net                                         */
/*                                                                           */
/* The modifications mainly concern KDE3 support.                            */
/*                                                                           */
/*****************************************************************************/
/* J.Anders <ja@informatik.tu-chemnitz.de> 17.05.2002                        */
/*****************************************************************************/

#ifndef FINGERLIST_H
#define FINGERLIST_H

#include <qgridview.h>
#include "global.h"

#define ICONCHORD      55

class TabTrack;

typedef struct {
    int f[MAX_STRINGS];
} fingering;

class FingerList: public QGridView
{
    Q_OBJECT
public:
    FingerList(TabTrack *p, QWidget *parent=0, const char *name=0);

    void addFingering(const int a[MAX_STRINGS]);
    void clear();
	void beginSession();
	void endSession();
    void setFirstChord();

signals:
    void chordSelected(const int *);

protected:
    virtual void paintCell(QPainter *, int row, int col);
    virtual void resizeEvent(QResizeEvent *); 
    virtual void mousePressEvent(QMouseEvent *);

private:
    enum { SCALE=6, CIRCLE=4, CIRCBORD=1, BORDER=3, SPACER=1, FRETTEXT=12 };
    
    int num,perRow;
    QArray<fingering> appl;

    int curSel,oldCol,oldRow;
    TabTrack *parm;
};

#endif