summaryrefslogtreecommitdiff
authorwaspe <waspe>2003-12-02 19:03:50 (UTC)
committer waspe <waspe>2003-12-02 19:03:50 (UTC)
commit64304e555fc3e06aa69fa2f4a514ee55b7aa98bc (patch) (unidiff)
tree3ce47189f43f18cccd42d326cf52977b339c744d
parent7b74f202db22d458c43b2063ae128bf79b0e9777 (diff)
downloadopie-64304e555fc3e06aa69fa2f4a514ee55b7aa98bc.zip
opie-64304e555fc3e06aa69fa2f4a514ee55b7aa98bc.tar.gz
opie-64304e555fc3e06aa69fa2f4a514ee55b7aa98bc.tar.bz2
*** empty log message ***
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/tonleiter/editinst.cpp93
-rw-r--r--noncore/multimedia/tonleiter/editinst.h31
-rw-r--r--noncore/multimedia/tonleiter/editscale.cpp32
-rw-r--r--noncore/multimedia/tonleiter/editscale.h4
-rw-r--r--noncore/multimedia/tonleiter/editstringwidget.cpp32
-rw-r--r--noncore/multimedia/tonleiter/editstringwidget.h24
-rw-r--r--noncore/multimedia/tonleiter/menuwidget.cpp20
-rw-r--r--noncore/multimedia/tonleiter/pianoscale.cpp96
-rw-r--r--noncore/multimedia/tonleiter/pianoscale.h28
-rw-r--r--noncore/multimedia/tonleiter/tonleiter.pro4
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdata.cpp2
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdatahelper.cpp4
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdatahelper.h2
13 files changed, 365 insertions, 7 deletions
diff --git a/noncore/multimedia/tonleiter/editinst.cpp b/noncore/multimedia/tonleiter/editinst.cpp
index 1eba4dc..120c3ac 100644
--- a/noncore/multimedia/tonleiter/editinst.cpp
+++ b/noncore/multimedia/tonleiter/editinst.cpp
@@ -1,14 +1,107 @@
1#include "editinst.h" 1#include "editinst.h"
2 2
3#include <qlabel.h>
4#include <qpushbutton.h>
5
3Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name) 6Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name)
4:QDialog(parent,name,true,0),data(data) 7:QDialog(parent,name,true,0),data(data)
5{ 8{
6 setCaption("Tonleiter::"+tr("Instrument")); 9 setCaption("Tonleiter::"+tr("Instrument"));
10 QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom);
11 instid=data->getCurrentInstrumentID();
12 stringlist.setAutoDelete(true);
13
14 QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight);
15
16 //Name combo + Add + Delete
17 boxInst=new QComboBox(this,"boxInst");
18 boxInst->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
19 connect(boxInst,SIGNAL(activated(int)),this,SLOT(setCurrentInstrumetID(int)));
20 for(int i=0;i<data->noOfInstruments();i++)
21 {
22 Instrument inst=data->getInstrument(i);
23 QString name=inst.instName();
24 if(name.isNull()) continue;
25 boxInst->insertItem(name,i);
26 }
27 boxInst->setCurrentItem(instid);
28 toplayout->addWidget(boxInst);
29
30 QPushButton* addButton=new QPushButton(tr("Add"),this,"addButton");
31 connect(addButton,SIGNAL(pressed()),this,SLOT(addInstrument()));
32 toplayout->addWidget(addButton);
33
34 QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton");
35 connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument()));
36 toplayout->addWidget(delButton);
37
38 QPushButton* addhighButton=new QPushButton(tr("Add High String"),this,"addhighButton");
39 masterlayout->addWidget(addhighButton);
40
41 QScrollView* scrollview=new QScrollView(this);
42 scrollview->setVScrollBarMode(QScrollView::AlwaysOn);
43 scrollview->setHScrollBarMode(QScrollView::AlwaysOff);
44 stringwidget=new QVBox(scrollview->viewport());
45 stringwidget->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum));
46 stringwidget->setSpacing(10);
47 scrollview->addChild(stringwidget);
48 scrollview->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
49 //scrollview->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::MinimumExpanding));
50 masterlayout->addWidget(scrollview);
51
52 loadInstrument();
53
54 QPushButton* addlowButton=new QPushButton(tr("Add Low String"),this,"addlowButton");
55 masterlayout->addWidget(addlowButton);
56
57 //make dialog fit the screen
7 showMaximized(); 58 showMaximized();
8} 59}
9//**************************************************************************** 60//****************************************************************************
10Menu::InstEditDialog::~InstEditDialog() 61Menu::InstEditDialog::~InstEditDialog()
11{ 62{
12} 63}
13//**************************************************************************** 64//****************************************************************************
65void Menu::InstEditDialog::setCurrentInstrumetID(int id)
66{
67 saveInstrument();
68 instid=id;
69 data->setCurrentInstrumetID(id);
70 loadInstrument();
71}
72//****************************************************************************
73void Menu::InstEditDialog::addInstrument()
74{
75}
76//****************************************************************************
77void Menu::InstEditDialog::deleteInstrument()
78{
79}
80//****************************************************************************
81void Menu::InstEditDialog::addLowString()
82{
83}
84//****************************************************************************
85void Menu::InstEditDialog::addHighString()
86{
87}
88//****************************************************************************
89void Menu::InstEditDialog::deleteString(int id)
90{
91}
92//****************************************************************************
93void Menu::InstEditDialog::saveInstrument()
94{
95 stringlist.clear();
96}
97//****************************************************************************
98void Menu::InstEditDialog::loadInstrument()
99{
100 Instrument inst=data->getInstrument(instid);
101 for(uint s=0;s<inst.noOfStrings();s++)
102 {
103 stringlist.append(new EditStringWidget(inst.string(s),stringwidget));
104 }
105}
106//****************************************************************************
14//**************************************************************************** 107//****************************************************************************
diff --git a/noncore/multimedia/tonleiter/editinst.h b/noncore/multimedia/tonleiter/editinst.h
index e7eba15..948a2de 100644
--- a/noncore/multimedia/tonleiter/editinst.h
+++ b/noncore/multimedia/tonleiter/editinst.h
@@ -1,23 +1,52 @@
1#ifndef TONLEITER_EDIT_INSTRUMENT_DIALOG_H 1#ifndef TONLEITER_EDIT_INSTRUMENT_DIALOG_H
2#define TONLEITER_EDIT_INSTRUMENT_DIALOG_H 2#define TONLEITER_EDIT_INSTRUMENT_DIALOG_H
3 3
4#include <qdialog.h> 4#include <qdialog.h>
5#include <qcombobox.h>
6#include <qscrollview.h>
7#include <qspinbox.h>
8#include <qlayout.h>
9#include <qlist.h>
10#include <qvbox.h>
5 11
6#include "tonleiterdata.h" 12
13#include "editstringwidget.h"
7 14
8using namespace Data; 15using namespace Data;
9 16
17
10namespace Menu 18namespace Menu
11{ 19{
12 class InstEditDialog : public QDialog 20 class InstEditDialog : public QDialog
13 { 21 {
14 Q_OBJECT 22 Q_OBJECT
15 private: 23 private:
16 TonleiterData* data; 24 TonleiterData* data;
25 int instid;
26
27 QComboBox* boxInst;
28 QSpinBox* stringBox;
29
30 QVBox* stringwidget;
31
32 //this is a QPtrList !!
33 typedef QList<EditStringWidget> StringWidgetList;
34 StringWidgetList stringlist;
17 public: 35 public:
18 InstEditDialog(TonleiterData* data,QWidget* parent,const char* name="InstEditDialog"); 36 InstEditDialog(TonleiterData* data,QWidget* parent,const char* name="InstEditDialog");
19 ~InstEditDialog(); 37 ~InstEditDialog();
38 private slots:
39 void setCurrentInstrumetID(int id);
40 void addInstrument();
41 void deleteInstrument();
42
43 void addLowString();
44 void addHighString();
45 void deleteString(int id);
46 private:
47 void saveInstrument();
48 void loadInstrument();
20 }; 49 };
21}; 50};
22 51
23#endif //TONLEITER_EDIT_INSTRUMENT_DIALOG_H 52#endif //TONLEITER_EDIT_INSTRUMENT_DIALOG_H
diff --git a/noncore/multimedia/tonleiter/editscale.cpp b/noncore/multimedia/tonleiter/editscale.cpp
index 593a150..0be0058 100644
--- a/noncore/multimedia/tonleiter/editscale.cpp
+++ b/noncore/multimedia/tonleiter/editscale.cpp
@@ -1,14 +1,46 @@
1#include "editscale.h" 1#include "editscale.h"
2 2
3#include <qlayout.h>
4#include <qpushbutton.h>
5
3Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name) 6Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name)
4:QDialog(parent,name,true,0),data(data) 7:QDialog(parent,name,true,0),data(data)
5{ 8{
6 setCaption("Tonleiter::"+tr("Scale")); 9 setCaption("Tonleiter::"+tr("Scale"));
10 QBoxLayout* masterlayout=new QBoxLayout(this,QBoxLayout::TopToBottom);
11
12 QBoxLayout* toplayout=new QBoxLayout(masterlayout,QBoxLayout::LeftToRight);
13
14 boxScale=new QComboBox(this,"boxScale");
15 for(int s=0;s<data->noOfScales();s++)
16 {
17 Scale scale=data->getScale(s);
18 QString name=scale.scaleName();
19 if(name.isNull()) continue;
20 //boxScale->insertItem(name,s);
21 }
22 boxScale->setCurrentItem(data->getCurrentScaleID());
23 boxScale->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
24 connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int)));
25 toplayout->addWidget(boxScale);
26
27 QPushButton* addButton=new QPushButton(tr("Add"),this,"addButton");
28 connect(addButton,SIGNAL(pressed()),this,SLOT(addInstrument()));
29 toplayout->addWidget(addButton);
30
31 QPushButton* delButton=new QPushButton(tr("Delete"),this,"delButton");
32 connect(delButton,SIGNAL(pressed()),this,SLOT(deleteInstrument()));
33 toplayout->addWidget(delButton);
34
35 pianoscale=new PianoScale(this);
36 masterlayout->addWidget(pianoscale);
37
38 //make dialog fit the screen
7 showMaximized(); 39 showMaximized();
8} 40}
9//**************************************************************************** 41//****************************************************************************
10Menu::ScaleEditDialog::~ScaleEditDialog() 42Menu::ScaleEditDialog::~ScaleEditDialog()
11{ 43{
12} 44}
13//**************************************************************************** 45//****************************************************************************
14//**************************************************************************** 46//****************************************************************************
diff --git a/noncore/multimedia/tonleiter/editscale.h b/noncore/multimedia/tonleiter/editscale.h
index 0e5eb1c..1121c1f 100644
--- a/noncore/multimedia/tonleiter/editscale.h
+++ b/noncore/multimedia/tonleiter/editscale.h
@@ -1,23 +1,27 @@
1#ifndef TONLEITER_EDIT_SCALE_DIALOG_H 1#ifndef TONLEITER_EDIT_SCALE_DIALOG_H
2#define TONLEITER_EDIT_SCALE_DIALOG_H 2#define TONLEITER_EDIT_SCALE_DIALOG_H
3 3
4#include <qdialog.h> 4#include <qdialog.h>
5#include <qcombobox.h>
5 6
6#include "tonleiterdata.h" 7#include "tonleiterdata.h"
8#include "pianoscale.h"
7 9
8using namespace Data; 10using namespace Data;
9 11
10namespace Menu 12namespace Menu
11{ 13{
12 class ScaleEditDialog : public QDialog 14 class ScaleEditDialog : public QDialog
13 { 15 {
14 Q_OBJECT 16 Q_OBJECT
15 private: 17 private:
16 TonleiterData* data; 18 TonleiterData* data;
19 QComboBox* boxScale;
20 PianoScale* pianoscale;
17 public: 21 public:
18 ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name="ScaleEditDialog"); 22 ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name="ScaleEditDialog");
19 ~ScaleEditDialog(); 23 ~ScaleEditDialog();
20 }; 24 };
21}; 25};
22 26
23#endif //TONLEITER_EDIT_SCALE_DIALOG_H 27#endif //TONLEITER_EDIT_SCALE_DIALOG_H
diff --git a/noncore/multimedia/tonleiter/editstringwidget.cpp b/noncore/multimedia/tonleiter/editstringwidget.cpp
new file mode 100644
index 0000000..d22bbc5
--- a/dev/null
+++ b/noncore/multimedia/tonleiter/editstringwidget.cpp
@@ -0,0 +1,32 @@
1#include "editstringwidget.h"
2
3#include <qlabel.h>
4#include <qlayout.h>
5
6using namespace Data;
7
8Menu::EditStringWidget::EditStringWidget(int note,QWidget* parent,const char* name,WFlags f)
9:QFrame(parent,name,f)
10{
11 QBoxLayout* layout=new QBoxLayout(this,QBoxLayout::LeftToRight,10);
12
13 boxNote=new QComboBox(this,"boxNote");
14 boxNote->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
15 //connect(boxNote,SIGNAL(activated(int)),data,SLOT(setCurrentNote(int)));
16 layout->addWidget(boxNote,1,1);
17 for(int a=0;a<12;a++)
18 boxNote->insertItem(Note::notenames[a],a);
19 boxNote->setCurrentItem(note-12*Note::getOctaveOfNote(note));
20 layout->addWidget(boxNote);
21
22 setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
23 setFrameShape(QFrame::Panel);
24 setFrameShadow(QFrame::Sunken);
25
26}
27//****************************************************************************
28Menu::EditStringWidget::~EditStringWidget()
29{
30}
31//****************************************************************************
32//****************************************************************************
diff --git a/noncore/multimedia/tonleiter/editstringwidget.h b/noncore/multimedia/tonleiter/editstringwidget.h
new file mode 100644
index 0000000..ba105a9
--- a/dev/null
+++ b/noncore/multimedia/tonleiter/editstringwidget.h
@@ -0,0 +1,24 @@
1#ifndef TONLEITER_EDIT_STRING_WIDGT_H
2#define TONLEITER_EDIT_STRING_WIDGT_H
3
4#include <qframe.h>
5#include <qcombobox.h>
6#include <qspinbox.h>
7
8#include "tonleiterdata.h"
9
10namespace Menu
11{
12 class EditStringWidget : public QFrame
13 {
14 Q_OBJECT
15 private:
16 QComboBox* boxNote;
17 public:
18 EditStringWidget(int note,QWidget* parent,const char* name=0,WFlags f=0);
19 ~EditStringWidget();
20 };
21};
22
23#endif //TONLEITER_EDIT_STRING_WIDGT_H
24
diff --git a/noncore/multimedia/tonleiter/menuwidget.cpp b/noncore/multimedia/tonleiter/menuwidget.cpp
index 1e3742c..56a2f8a 100644
--- a/noncore/multimedia/tonleiter/menuwidget.cpp
+++ b/noncore/multimedia/tonleiter/menuwidget.cpp
@@ -1,89 +1,107 @@
1#include "menuwidget.h" 1#include "menuwidget.h"
2 2
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qlayout.h> 4#include <qlayout.h>
5 5
6#include "editinst.h" 6#include "editinst.h"
7#include "editscale.h" 7#include "editscale.h"
8 8
9Menu::MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFlags f) 9Menu::MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFlags f)
10:QWidget(parent,name,f),data(data) 10:QWidget(parent,name,f),data(data)
11{ 11{
12 QGridLayout* layout=new QGridLayout(this,3,3,10,-1,"menulayout"); 12 QGridLayout* layout=new QGridLayout(this,3,3,10,-1,"menulayout");
13 13
14 //Instrument
14 QLabel* instLabel=new QLabel(tr("Instr."),this,"instLabel"); 15 QLabel* instLabel=new QLabel(tr("Instr."),this,"instLabel");
16 instLabel->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
15 layout->addWidget(instLabel,0,0); 17 layout->addWidget(instLabel,0,0);
18
16 boxInst=new QComboBox(this,"boxInst"); 19 boxInst=new QComboBox(this,"boxInst");
20 boxInst->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
17 connect(boxInst,SIGNAL(activated(int)),data,SLOT(setCurrentInstrumetID(int))); 21 connect(boxInst,SIGNAL(activated(int)),data,SLOT(setCurrentInstrumetID(int)));
18 layout->addWidget(boxInst,0,1); 22 layout->addWidget(boxInst,0,1);
23
19 editInst=new QPushButton(tr("Edit"),this,"editInst"); 24 editInst=new QPushButton(tr("Edit"),this,"editInst");
25 editInst->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
20 connect(editInst,SIGNAL(pressed()),this,SLOT(editInstPressed())); 26 connect(editInst,SIGNAL(pressed()),this,SLOT(editInstPressed()));
21 layout->addWidget(editInst,0,2); 27 layout->addWidget(editInst,0,2);
22 28
29 //Note
23 QLabel* noteLabel=new QLabel(tr("Note"),this,"noteLabel"); 30 QLabel* noteLabel=new QLabel(tr("Note"),this,"noteLabel");
31 noteLabel->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
24 layout->addWidget(noteLabel,1,0); 32 layout->addWidget(noteLabel,1,0);
33
25 boxNote=new QComboBox(this,"boxNote"); 34 boxNote=new QComboBox(this,"boxNote");
35 boxNote->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
26 connect(boxNote,SIGNAL(activated(int)),data,SLOT(setCurrentNote(int))); 36 connect(boxNote,SIGNAL(activated(int)),data,SLOT(setCurrentNote(int)));
27 layout->addWidget(boxNote,1,1); 37 layout->addWidget(boxNote,1,1);
28 for(int a=0;a<12;a++) 38 for(int a=0;a<12;a++)
29 boxNote->insertItem(Note::notenames[a],a); 39 boxNote->insertItem(Note::notenames[a],a);
30 boxNote->setCurrentItem(data->getCurrentBaseNote()); 40 boxNote->setCurrentItem(data->getCurrentBaseNote());
41
31 noteCheck=new QCheckBox(tr("show"),this,"noteCheck"); 42 noteCheck=new QCheckBox(tr("show"),this,"noteCheck");
43 noteCheck->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
32 noteCheck->setChecked(data->isDrawNames()); 44 noteCheck->setChecked(data->isDrawNames());
33 connect(noteCheck,SIGNAL(toggled(bool)),data,SLOT(setDrawNames(bool))); 45 connect(noteCheck,SIGNAL(toggled(bool)),data,SLOT(setDrawNames(bool)));
34 layout->addWidget(noteCheck,1,2); 46 layout->addWidget(noteCheck,1,2);
35 47
48 //Scale
36 QLabel* scaleLabel=new QLabel(tr("Scale"),this,"scaleLabel"); 49 QLabel* scaleLabel=new QLabel(tr("Scale"),this,"scaleLabel");
50 scaleLabel->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
37 layout->addWidget(scaleLabel,2,0); 51 layout->addWidget(scaleLabel,2,0);
52
38 boxScale=new QComboBox(this,"boxScale"); 53 boxScale=new QComboBox(this,"boxScale");
54 boxScale->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
39 connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int))); 55 connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int)));
40 layout->addWidget(boxScale,2,1); 56 layout->addWidget(boxScale,2,1);
57
41 editScale=new QPushButton(tr("Edit"),this,"editScale"); 58 editScale=new QPushButton(tr("Edit"),this,"editScale");
59 editScale->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
42 connect(editScale,SIGNAL(pressed()),this,SLOT(editScalePressed())); 60 connect(editScale,SIGNAL(pressed()),this,SLOT(editScalePressed()));
43 layout->addWidget(editScale,2,2); 61 layout->addWidget(editScale,2,2);
44 62
45 updateBoxes(); 63 updateBoxes();
46 64 setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding,QSizePolicy::Maximum));
47} 65}
48//**************************************************************************** 66//****************************************************************************
49Menu::MenuWidget::~MenuWidget() 67Menu::MenuWidget::~MenuWidget()
50{ 68{
51} 69}
52//**************************************************************************** 70//****************************************************************************
53void Menu::MenuWidget::editInstPressed() 71void Menu::MenuWidget::editInstPressed()
54{ 72{
55 InstEditDialog* instdialog=new InstEditDialog(data,this); 73 InstEditDialog* instdialog=new InstEditDialog(data,this);
56 instdialog->exec(); 74 instdialog->exec();
57} 75}
58//**************************************************************************** 76//****************************************************************************
59void Menu::MenuWidget::editScalePressed() 77void Menu::MenuWidget::editScalePressed()
60{ 78{
61 ScaleEditDialog* scaledialog=new ScaleEditDialog(data,this); 79 ScaleEditDialog* scaledialog=new ScaleEditDialog(data,this);
62 scaledialog->exec(); 80 scaledialog->exec();
63} 81}
64//**************************************************************************** 82//****************************************************************************
65void Menu::MenuWidget::updateBoxes() 83void Menu::MenuWidget::updateBoxes()
66{ 84{
67 boxInst->clear(); 85 boxInst->clear();
68 86
69 for(int i=0;i<data->noOfInstruments();i++) 87 for(int i=0;i<data->noOfInstruments();i++)
70 { 88 {
71 Instrument inst=data->getInstrument(i); 89 Instrument inst=data->getInstrument(i);
72 QString name=inst.instName(); 90 QString name=inst.instName();
73 if(name.isNull()) continue; 91 if(name.isNull()) continue;
74 boxInst->insertItem(name,i); 92 boxInst->insertItem(name,i);
75 } 93 }
76 boxInst->setCurrentItem(data->getCurrentInstrumentID()); 94 boxInst->setCurrentItem(data->getCurrentInstrumentID());
77 95
78 boxScale->clear(); 96 boxScale->clear();
79 for(int s=0;s<data->noOfScales();s++) 97 for(int s=0;s<data->noOfScales();s++)
80 { 98 {
81 Scale scale=data->getScale(s); 99 Scale scale=data->getScale(s);
82 QString name=scale.scaleName(); 100 QString name=scale.scaleName();
83 if(name.isNull()) continue; 101 if(name.isNull()) continue;
84 boxScale->insertItem(name,s); 102 boxScale->insertItem(name,s);
85 } 103 }
86 boxScale->setCurrentItem(data->getCurrentScaleID()); 104 boxScale->setCurrentItem(data->getCurrentScaleID());
87} 105}
88//**************************************************************************** 106//****************************************************************************
89//**************************************************************************** 107//****************************************************************************
diff --git a/noncore/multimedia/tonleiter/pianoscale.cpp b/noncore/multimedia/tonleiter/pianoscale.cpp
new file mode 100644
index 0000000..3d5add2
--- a/dev/null
+++ b/noncore/multimedia/tonleiter/pianoscale.cpp
@@ -0,0 +1,96 @@
1#include "pianoscale.h"
2
3#include <qpainter.h>
4
5
6Menu::PianoScale::PianoScale(QWidget* parent,const char* name,WFlags f)
7:QWidget(parent,name,f)
8{
9 QColor black(0,0,0);
10 QColor white(255,255,255);
11 QColor mark(255,0,0);
12 blackBrush=QBrush(black);
13 whiteBrush=QBrush(white);
14 markBrush=QBrush(mark);
15 blackPen=QPen(black);
16 whitePen=QPen(white);
17 setBackgroundColor(QColor(0,0,255));
18}
19//****************************************************************************
20Menu::PianoScale::~ PianoScale()
21{
22}
23//****************************************************************************
24void Menu::PianoScale::paintEvent(QPaintEvent* pe)
25{
26 QPainter p(this);
27 QRect mysize=rect();
28
29 int pad=10;
30 int x0=pad;
31 int y0=pad;
32 int w0=mysize.width()-2*pad;
33 int h0=mysize.height()-2*pad;
34
35 int keypad=2;
36 if(mysize.width()>mysize.height())
37 {
38 int div=(int)(w0/14.0);
39 int halftonewidth=(int)(div/3.0);
40 int halftoneheight=(int)((h0-2*keypad)*0.66);
41 for(int a=0;a<14;a++)
42 {
43 int x=x0+a*div;
44
45 p.setPen(blackPen);
46 p.setBrush(blackBrush);
47 p.drawRect(x,y0,div,h0);
48
49 p.setPen(whitePen);
50 p.setBrush(whiteBrush);
51 p.drawRect(x+keypad,y0+keypad,div-2*keypad,h0-2*keypad);
52
53 if(a==1 || a==2 || a==4 || a==5 || a==6 || a==8 || a==9 || a==11 || a==12 || a==13)
54 {
55 p.setPen(blackPen);
56 p.setBrush(blackBrush);
57 p.drawRect(x-halftonewidth,y0+keypad,2*halftonewidth,halftoneheight);
58 }
59 }
60 }
61 else
62 {
63 int div=(int)(w0/7.0);
64 int halfheight=(int)(h0/2.0);
65 int halftonewidth=(int)(div/3.0);
66 int halftoneheight=(int)((halfheight-2*keypad)*0.66);
67 for(int a=0;a<7;a++)
68 {
69 int x=x0+a*div;
70
71 p.setPen(blackPen);
72 p.setBrush(blackBrush);
73 p.drawRect(x,y0,div,h0);
74
75 p.setPen(whitePen);
76 p.setBrush(whiteBrush);
77 p.drawRect(x+keypad,y0+keypad,div-2*keypad,halfheight-2*keypad);
78 p.drawRect(x+keypad,y0+keypad+halfheight,div-2*keypad,halfheight-2*keypad);
79
80 if(a==1 || a==2 || a==4 || a==5 || a==6)
81 {
82 p.setPen(blackPen);
83 p.setBrush(blackBrush);
84 p.drawRect(x-halftonewidth,y0+keypad,2*halftonewidth,halftoneheight);
85 p.drawRect(x-halftonewidth,y0+keypad+halfheight,2*halftonewidth,halftoneheight);
86 }
87 }
88 }
89}
90//****************************************************************************
91void Menu::PianoScale::mousePressEvent(QMouseEvent* me)
92{
93}
94//****************************************************************************
95//****************************************************************************
96
diff --git a/noncore/multimedia/tonleiter/pianoscale.h b/noncore/multimedia/tonleiter/pianoscale.h
new file mode 100644
index 0000000..63995b0
--- a/dev/null
+++ b/noncore/multimedia/tonleiter/pianoscale.h
@@ -0,0 +1,28 @@
1#ifndef TONLEITER_PIANO_SCALE_H
2#define TONLEITER_PIANO_SCALE_H
3
4#include <qwidget.h>
5#include <qpen.h>
6#include <qbrush.h>
7
8namespace Menu
9{
10 class PianoScale : public QWidget
11 {
12 Q_OBJECT
13 private:
14 QBrush blackBrush;
15 QBrush whiteBrush;
16 QBrush markBrush;
17 QPen blackPen;
18 QPen whitePen;
19 public:
20 PianoScale(QWidget* parent,const char* name="PianoScale",WFlags f=0);
21 ~PianoScale();
22 private:
23 void paintEvent(QPaintEvent* pe);
24 void mousePressEvent(QMouseEvent* me);
25 };
26};
27
28#endif //TONLEITER_PIANO_SCALE_H
diff --git a/noncore/multimedia/tonleiter/tonleiter.pro b/noncore/multimedia/tonleiter/tonleiter.pro
index 2b0a798..c52ca19 100644
--- a/noncore/multimedia/tonleiter/tonleiter.pro
+++ b/noncore/multimedia/tonleiter/tonleiter.pro
@@ -1,13 +1,13 @@
1TEMPLATE = app 1TEMPLATE = app
2#CONFIG = qt warn_on debug 2#CONFIG = qt warn_on debug
3CONFIG = qt warn_on release 3CONFIG = qt warn_on release
4HEADERS = mainwidget.h tonleiterdata.h tonleiterdatahelper.h fretboard.h menuwidget.h editinst.h editscale.h 4HEADERS = mainwidget.h tonleiterdata.h tonleiterdatahelper.h fretboard.h menuwidget.h editinst.h editstringwidget.h editscale.h pianoscale.h
5SOURCES = mainwidget.cpp tonleiterdata.cpp tonleiterdatahelper.cpp fretboard.cpp menuwidget.cpp main.cpp editinst.cpp editscale.cpp 5SOURCES = mainwidget.cpp tonleiterdata.cpp tonleiterdatahelper.cpp fretboard.cpp menuwidget.cpp main.cpp editinst.cpp editstringwidget.cpp editscale.cpp pianoscale.cpp
6INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
7DEPENDPATH += $(OPIEDIR)/include 7DEPENDPATH += $(OPIEDIR)/include
8LIBS += -lqpe 8LIBS += -lqpe
9INTERFACES = 9INTERFACES =
10TARGET = tonleiter 10TARGET = tonleiter
11DESTDIR = $(OPIEDIR)/bin 11DESTDIR = $(OPIEDIR)/bin
12#TMAKE_CXXFLAGS += -DQT_QWS_VERCEL_IDR -DQWS -fno-exceptions -fno-rtti 12#TMAKE_CXXFLAGS += -DQT_QWS_VERCEL_IDR -DQWS -fno-exceptions -fno-rtti
13include ( $(OPIEDIR)/include.pro ) 13include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/multimedia/tonleiter/tonleiterdata.cpp b/noncore/multimedia/tonleiter/tonleiterdata.cpp
index 946d4e3..bf7b32c 100644
--- a/noncore/multimedia/tonleiter/tonleiterdata.cpp
+++ b/noncore/multimedia/tonleiter/tonleiterdata.cpp
@@ -26,97 +26,97 @@ void TonleiterData::setCurrentInstrumetID(int id)
26 } 26 }
27} 27}
28//**************************************************************************** 28//****************************************************************************
29void TonleiterData::setCurrentScaleID(int id) 29void TonleiterData::setCurrentScaleID(int id)
30{ 30{
31 if(id>=0 && id<noOfScales()) 31 if(id>=0 && id<noOfScales())
32 { 32 {
33 currentScaleID=id; 33 currentScaleID=id;
34 emit dataChange(); 34 emit dataChange();
35 } 35 }
36} 36}
37//**************************************************************************** 37//****************************************************************************
38void TonleiterData::setCurrentNote(int id) 38void TonleiterData::setCurrentNote(int id)
39{ 39{
40 if(id>=0 && id<12) 40 if(id>=0 && id<12)
41 { 41 {
42 currentNote=id; 42 currentNote=id;
43 emit dataChange(); 43 emit dataChange();
44 } 44 }
45} 45}
46//**************************************************************************** 46//****************************************************************************
47void TonleiterData::setDrawNames(bool dn) 47void TonleiterData::setDrawNames(bool dn)
48{ 48{
49 drawnames=dn; 49 drawnames=dn;
50 emit dataChange(); 50 emit dataChange();
51} 51}
52//**************************************************************************** 52//****************************************************************************
53void TonleiterData::loadData() 53void TonleiterData::loadData()
54{ 54{
55 Config load("Tonleiter"); 55 Config load("Tonleiter");
56 if(!load.isValid()) 56 if(!load.isValid())
57 { 57 {
58 //write some default values 58 //write some default values
59 load.setGroup("General"); 59 load.setGroup("General");
60 load.writeEntry("currentInstrumentID",1); 60 load.writeEntry("currentInstrumentID",1);
61 load.writeEntry("currentNote",0); 61 load.writeEntry("currentNote",0);
62 load.writeEntry("currentScaleID",1); 62 load.writeEntry("currentScaleID",1);
63 load.writeEntry("drawnames",1); 63 load.writeEntry("drawnames",1);
64 load.setGroup("Instrument"); 64 load.setGroup("Instrument");
65 load.writeEntry("Inst0","Thumb6;26;11;16;21;26;31;36;"); 65 load.writeEntry("Inst0","Thumb6;26;11;16;21;26;31;36;");
66 load.writeEntry("Inst1","Bass 4;12;16;21;26;31;"); 66 load.writeEntry("Inst1","Bass 4;12;16;21;26;31;");
67 load.writeEntry("noOfInstruments",2); 67 load.writeEntry("noOfInstruments",2);
68 load.setGroup("Scale"); 68 load.setGroup("Scale");
69 load.writeEntry("Scale0","ionian;0;2;4;5;7;9;11;"); 69 load.writeEntry("Scale0","ionian;0;2;4;5;7;9;11;");
70 load.writeEntry("Scale1","aeolian;0;2;3;5;7;8;10;"); 70 load.writeEntry("Scale1","aeolian;0;2;3;5;7;8;10;");
71 load.writeEntry("Scale2","dorian;0;2;3;5;7;9;10;"); 71 load.writeEntry("Scale2","dorian;0;2;3;5;7;9;10;");
72 load.writeEntry("Scale3","phrygian;0;1;3;5;7;8;10;"); 72 load.writeEntry("Scale3","phrygian;0;1;3;5;7;8;10;");
73 load.writeEntry("Scale4","lydian;0;2;4;6;7;9;11;"); 73 load.writeEntry("Scale4","lydian;0;2;4;6;7;9;11;");
74 load.writeEntry("Scale5","mixolyd.;0;2;4;5;7;9;10;"); 74 load.writeEntry("Scale5","mixolydian;0;2;4;5;7;9;10;");
75 load.writeEntry("noOfScales",6); 75 load.writeEntry("noOfScales",6);
76 76
77 } 77 }
78 78
79 load.setGroup("General"); 79 load.setGroup("General");
80 currentNote=load.readNumEntry("currentNote"); 80 currentNote=load.readNumEntry("currentNote");
81 drawnames=load.readBoolEntry("drawnames"); 81 drawnames=load.readBoolEntry("drawnames");
82 currentInstrumentID=load.readNumEntry("currentInstrumentID"); 82 currentInstrumentID=load.readNumEntry("currentInstrumentID");
83 currentScaleID=load.readNumEntry("currentScaleID"); 83 currentScaleID=load.readNumEntry("currentScaleID");
84 84
85 load.setGroup("Instrument"); 85 load.setGroup("Instrument");
86 int noOfInstr=load.readNumEntry("noOfInstruments",0); 86 int noOfInstr=load.readNumEntry("noOfInstruments",0);
87 for(int i=0;i<noOfInstr;i++) 87 for(int i=0;i<noOfInstr;i++)
88 { 88 {
89 QStringList instlist=load.readListEntry("Inst"+QString::number(i),';'); 89 QStringList instlist=load.readListEntry("Inst"+QString::number(i),';');
90 QValueList<int> strings; 90 QValueList<int> strings;
91 for(int st=2;st<(int)instlist.count();st++) 91 for(int st=2;st<(int)instlist.count();st++)
92 strings.append(instlist[st].toInt()); 92 strings.append(instlist[st].toInt());
93 instruments.append(Instrument(instlist[0],instlist[1].toInt(),strings)); 93 instruments.append(Instrument(instlist[0],instlist[1].toInt(),strings));
94 } 94 }
95 95
96 load.setGroup("Scale"); 96 load.setGroup("Scale");
97 int scaleno=load.readNumEntry("noOfScales",0); 97 int scaleno=load.readNumEntry("noOfScales",0);
98 for(int s=0;s<scaleno;s++) 98 for(int s=0;s<scaleno;s++)
99 { 99 {
100 QStringList scalelist=load.readListEntry("Scale"+QString::number(s),';'); 100 QStringList scalelist=load.readListEntry("Scale"+QString::number(s),';');
101 QValueList<int> halftones; 101 QValueList<int> halftones;
102 for(int ht=1;ht<(int)scalelist.count();ht++) 102 for(int ht=1;ht<(int)scalelist.count();ht++)
103 halftones.append(scalelist[ht].toInt()); 103 halftones.append(scalelist[ht].toInt());
104 scales.append(Scale(scalelist[0],halftones)); 104 scales.append(Scale(scalelist[0],halftones));
105 } 105 }
106 106
107} 107}
108//**************************************************************************** 108//****************************************************************************
109void TonleiterData::saveData() 109void TonleiterData::saveData()
110{ 110{
111 Config save("Tonleiter"); 111 Config save("Tonleiter");
112 save.setGroup("General"); 112 save.setGroup("General");
113 save.writeEntry("currentNote",currentNote); 113 save.writeEntry("currentNote",currentNote);
114 save.writeEntry("drawnames",drawnames); 114 save.writeEntry("drawnames",drawnames);
115 save.writeEntry("currentInstrumentID",currentInstrumentID); 115 save.writeEntry("currentInstrumentID",currentInstrumentID);
116 save.writeEntry("currentScaleID",currentScaleID); 116 save.writeEntry("currentScaleID",currentScaleID);
117 117
118 save.setGroup("Instrument"); 118 save.setGroup("Instrument");
119 save.writeEntry("noOfInstruments",noOfInstruments()); 119 save.writeEntry("noOfInstruments",noOfInstruments());
120 for(int i=0;i<noOfInstruments();i++) 120 for(int i=0;i<noOfInstruments();i++)
121 { 121 {
122 QStringList instlist; 122 QStringList instlist;
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp
index 5714cea..156dba5 100644
--- a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp
+++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp
@@ -1,127 +1,129 @@
1#include "tonleiterdatahelper.h" 1#include "tonleiterdatahelper.h"
2 2
3#include <math.h>
4
3using namespace Data; 5using namespace Data;
4 6
5int Note::getOctaveOfNote(int note) 7int Note::getOctaveOfNote(int note)
6{ 8{
7 int remain=note%12; 9 int remain=note%12;
8 return (note-remain)/12; 10 return (note-remain)/12;
9} 11}
10//**************************************************************************** 12//****************************************************************************
11QString Note::getNameOfNote(int note) 13QString Note::getNameOfNote(int note)
12{ 14{
13 int octave=getOctaveOfNote(note); 15 int octave=getOctaveOfNote(note);
14 return notenames[note-12*octave]; 16 return notenames[note-12*octave];
15} 17}
16//**************************************************************************** 18//****************************************************************************
17int Note::getNoteFromName(QString name,int octave) 19int Note::getNoteFromName(QString name,int octave)
18{ 20{
19 int notevalue=0; 21 int notevalue=0;
20 for(int a=0;a<12;a++) 22 for(int a=0;a<12;a++)
21 { 23 {
22 if(name==notenames[a]) 24 if(name==notenames[a])
23 { 25 {
24 notevalue=a; 26 notevalue=a;
25 break; 27 break;
26 } 28 }
27 } 29 }
28 return notevalue+12*octave; 30 return notevalue+12*octave;
29} 31}
30//**************************************************************************** 32//****************************************************************************
31int Note::octaveOfBaseNote(int base,int note) 33int Note::octaveOfBaseNote(int base,int note)
32{ 34{
33 int normnote = (note>=base) ? note-base : (12-base)+note; 35 int normnote = (note>=base) ? note-base : (12-base)+note;
34 int octave=getOctaveOfNote(normnote); 36 int octave=getOctaveOfNote(normnote);
35 //qDebug("note %d of %d base is norm %d -> ocatve %d",note,base,normnote,octave); 37 //qDebug("note %d of %d base is norm %d -> ocatve %d",note,base,normnote,octave);
36 return octave; 38 return octave;
37} 39}
38//**************************************************************************** 40//****************************************************************************
39//**************************************************************************** 41//****************************************************************************
40Instrument::Instrument() 42Instrument::Instrument()
41{ 43{
42 name="UNDEFINED"; 44 name="UNDEFINED";
43 frets=0; 45 frets=0;
44} 46}
45//**************************************************************************** 47//****************************************************************************
46Instrument::Instrument(QString name,int frets,QValueList<int> strings) 48Instrument::Instrument(QString name,int frets,QValueList<int> strings)
47:name(name),frets(frets),strings(strings) 49:name(name),frets(frets),strings(strings)
48{ 50{
49} 51}
50//**************************************************************************** 52//****************************************************************************
51Instrument::~Instrument() 53Instrument::~Instrument()
52{ 54{
53} 55}
54//**************************************************************************** 56//****************************************************************************
55int Instrument::noOfStrings() 57int Instrument::noOfStrings()
56{ 58{
57 return (int)strings.count(); 59 return (int)strings.count();
58} 60}
59//**************************************************************************** 61//****************************************************************************
60int Instrument::noOfFrets() 62int Instrument::noOfFrets()
61{ 63{
62 return frets; 64 return frets;
63} 65}
64//**************************************************************************** 66//****************************************************************************
65QString Instrument::instName() 67QString Instrument::instName()
66{ 68{
67 return name; 69 return name;
68} 70}
69//**************************************************************************** 71//****************************************************************************
70int Instrument::string(int id) 72int Instrument::string(int id)
71{ 73{
72 return strings[id]; 74 return strings[id];
73} 75}
74//**************************************************************************** 76//****************************************************************************
75int Instrument::noOfOctaves() 77int Instrument::noOfOctaves()
76{ 78{
77 int lowest=strings[0]; 79 int lowest=strings[0];
78 int highest=strings[strings.count()-1]+frets; 80 int highest=strings[strings.count()-1]+frets;
79 return (int)((highest-lowest)/12.0); 81 return (int) ceil((highest-lowest)/12.0);
80} 82}
81//**************************************************************************** 83//****************************************************************************
82//**************************************************************************** 84//****************************************************************************
83Scale::Scale() 85Scale::Scale()
84{ 86{
85 name="UNDEFINED"; 87 name="UNDEFINED";
86} 88}
87//**************************************************************************** 89//****************************************************************************
88Scale::Scale(QString name,QValueList<int> halftones) 90Scale::Scale(QString name,QValueList<int> halftones)
89:name(name),halftones(halftones) 91:name(name),halftones(halftones)
90{ 92{
91} 93}
92//**************************************************************************** 94//****************************************************************************
93Scale::~Scale() 95Scale::~Scale()
94{ 96{
95} 97}
96//**************************************************************************** 98//****************************************************************************
97int Scale::noOfHaltones() 99int Scale::noOfHaltones()
98{ 100{
99 return (int)halftones.count(); 101 return (int)halftones.count();
100} 102}
101//**************************************************************************** 103//****************************************************************************
102int Scale::getHalfTone(int id) 104int Scale::getHalfTone(int id)
103{ 105{
104 if(id>=0 && id<noOfHaltones()) 106 if(id>=0 && id<noOfHaltones())
105 return halftones[id]; 107 return halftones[id];
106 else 108 else
107 return 0; 109 return 0;
108} 110}
109//**************************************************************************** 111//****************************************************************************
110QString Scale::scaleName() 112QString Scale::scaleName()
111{ 113{
112 return name; 114 return name;
113} 115}
114//**************************************************************************** 116//****************************************************************************
115bool Scale::noteInScale(int base,int note) 117bool Scale::noteInScale(int base,int note)
116{ 118{
117 int octave=Note::getOctaveOfNote(note); 119 int octave=Note::getOctaveOfNote(note);
118 note-=12*octave; 120 note-=12*octave;
119 int normnote = (note>=base) ? note-base : (12-base)+note; 121 int normnote = (note>=base) ? note-base : (12-base)+note;
120 122
121 if(halftones.contains(normnote)>0) 123 if(halftones.contains(normnote)>0)
122 { 124 {
123 //qDebug("OK : base : %d, note %d -> norm %d",base,note,normnote); 125 //qDebug("OK : base : %d, note %d -> norm %d",base,note,normnote);
124 return true; 126 return true;
125 } 127 }
126 else 128 else
127 { 129 {
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.h b/noncore/multimedia/tonleiter/tonleiterdatahelper.h
index b79162a..e4153d7 100644
--- a/noncore/multimedia/tonleiter/tonleiterdatahelper.h
+++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.h
@@ -1,55 +1,55 @@
1#ifndef TONLEITER_DATA_HELPER_H 1#ifndef TONLEITER_DATA_HELPER_H
2#define TONLEITER_DATA_HELPER_H 2#define TONLEITER_DATA_HELPER_H
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qvaluelist.h> 5#include <qvaluelist.h>
6 6
7namespace Data 7namespace Data
8{ 8{
9 namespace Note 9 namespace Note
10 { 10 {
11 const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; 11 const QString notenames[]={"A","Bb","B","C","C#","D","D#","E","F","F#","G","G#"};
12 12
13 int getOctaveOfNote(int note); 13 int getOctaveOfNote(int note);
14 QString getNameOfNote(int note); 14 QString getNameOfNote(int note);
15 int getNoteFromName(QString name,int octave); 15 int getNoteFromName(QString name,int octave);
16 int octaveOfBaseNote(int base,int note); 16 int octaveOfBaseNote(int base,int note);
17 }; 17 };
18 18
19 class Instrument 19 class Instrument
20 { 20 {
21 private: 21 private:
22 QString name; 22 QString name;
23 int frets; 23 int frets;
24 QValueList<int> strings; 24 QValueList<int> strings;
25 public: 25 public:
26 Instrument(); 26 Instrument();
27 Instrument(QString name,int frets,QValueList<int> strings); 27 Instrument(QString name,int frets,QValueList<int> strings);
28 ~Instrument(); 28 ~Instrument();
29 public: 29 public:
30 int noOfStrings(); 30 int noOfStrings();
31 int noOfFrets(); 31 int noOfFrets();
32 QString instName(); 32 QString instName();
33 int string(int id); 33 int string(int id);
34 int noOfOctaves(); 34 int noOfOctaves();
35 }; 35 };
36 36
37 class Scale 37 class Scale
38 { 38 {
39 private: 39 private:
40 QValueList<int> halftones; 40 QValueList<int> halftones;
41 QString name; 41 QString name;
42 public: 42 public:
43 Scale(); 43 Scale();
44 Scale(QString name,QValueList<int> halftones); 44 Scale(QString name,QValueList<int> halftones);
45 ~Scale(); 45 ~Scale();
46 public: 46 public:
47 int noOfHaltones(); 47 int noOfHaltones();
48 int getHalfTone(int id); 48 int getHalfTone(int id);
49 QString scaleName(); 49 QString scaleName();
50 bool noteInScale(int base,int note); 50 bool noteInScale(int base,int note);
51 }; 51 };
52}; 52};
53 53
54#endif //TONLEITER_DATA_HELPER_H 54#endif //TONLEITER_DATA_HELPER_H
55 55