summaryrefslogtreecommitdiff
authorwaspe <waspe>2003-11-20 19:34:08 (UTC)
committer waspe <waspe>2003-11-20 19:34:08 (UTC)
commite6a5ed6de7e821a070d571045ff063f8c41b0b79 (patch) (unidiff)
tree8455d7bf537cf804337b6c03b28f891ee3f286ce
parentf43e28fe8f226039d96ebda4e6c4d26e4f3320ba (diff)
downloadopie-e6a5ed6de7e821a070d571045ff063f8c41b0b79.zip
opie-e6a5ed6de7e821a070d571045ff063f8c41b0b79.tar.gz
opie-e6a5ed6de7e821a070d571045ff063f8c41b0b79.tar.bz2
added preliminary edit dialogs
default config added
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/multimedia/tonleiter/editinst.cpp14
-rw-r--r--noncore/multimedia/tonleiter/editinst.h23
-rw-r--r--noncore/multimedia/tonleiter/editscale.cpp14
-rw-r--r--noncore/multimedia/tonleiter/editscale.h23
-rw-r--r--noncore/multimedia/tonleiter/fretboard.cpp18
-rw-r--r--noncore/multimedia/tonleiter/fretboard.h8
-rw-r--r--noncore/multimedia/tonleiter/mainwidget.cpp6
-rw-r--r--noncore/multimedia/tonleiter/mainwidget.h6
-rw-r--r--noncore/multimedia/tonleiter/menuwidget.cpp23
-rw-r--r--noncore/multimedia/tonleiter/menuwidget.h7
-rw-r--r--noncore/multimedia/tonleiter/tonleiter.pro4
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdata.cpp67
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdata.h3
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdatahelper.cpp2
-rw-r--r--noncore/multimedia/tonleiter/tonleiterdatahelper.h4
15 files changed, 156 insertions, 66 deletions
diff --git a/noncore/multimedia/tonleiter/editinst.cpp b/noncore/multimedia/tonleiter/editinst.cpp
new file mode 100644
index 0000000..1eba4dc
--- a/dev/null
+++ b/noncore/multimedia/tonleiter/editinst.cpp
@@ -0,0 +1,14 @@
1#include "editinst.h"
2
3Menu::InstEditDialog::InstEditDialog(TonleiterData* data,QWidget* parent,const char* name)
4:QDialog(parent,name,true,0),data(data)
5{
6 setCaption("Tonleiter::"+tr("Instrument"));
7 showMaximized();
8}
9//****************************************************************************
10Menu::InstEditDialog::~InstEditDialog()
11{
12}
13//****************************************************************************
14//****************************************************************************
diff --git a/noncore/multimedia/tonleiter/editinst.h b/noncore/multimedia/tonleiter/editinst.h
new file mode 100644
index 0000000..e7eba15
--- a/dev/null
+++ b/noncore/multimedia/tonleiter/editinst.h
@@ -0,0 +1,23 @@
1#ifndef TONLEITER_EDIT_INSTRUMENT_DIALOG_H
2#define TONLEITER_EDIT_INSTRUMENT_DIALOG_H
3
4#include <qdialog.h>
5
6#include "tonleiterdata.h"
7
8using namespace Data;
9
10namespace Menu
11{
12 class InstEditDialog : public QDialog
13 {
14 Q_OBJECT
15 private:
16 TonleiterData* data;
17 public:
18 InstEditDialog(TonleiterData* data,QWidget* parent,const char* name="InstEditDialog");
19 ~InstEditDialog();
20 };
21};
22
23#endif //TONLEITER_EDIT_INSTRUMENT_DIALOG_H
diff --git a/noncore/multimedia/tonleiter/editscale.cpp b/noncore/multimedia/tonleiter/editscale.cpp
new file mode 100644
index 0000000..593a150
--- a/dev/null
+++ b/noncore/multimedia/tonleiter/editscale.cpp
@@ -0,0 +1,14 @@
1#include "editscale.h"
2
3Menu::ScaleEditDialog::ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name)
4:QDialog(parent,name,true,0),data(data)
5{
6 setCaption("Tonleiter::"+tr("Scale"));
7 showMaximized();
8}
9//****************************************************************************
10Menu::ScaleEditDialog::~ScaleEditDialog()
11{
12}
13//****************************************************************************
14//****************************************************************************
diff --git a/noncore/multimedia/tonleiter/editscale.h b/noncore/multimedia/tonleiter/editscale.h
new file mode 100644
index 0000000..0e5eb1c
--- a/dev/null
+++ b/noncore/multimedia/tonleiter/editscale.h
@@ -0,0 +1,23 @@
1#ifndef TONLEITER_EDIT_SCALE_DIALOG_H
2#define TONLEITER_EDIT_SCALE_DIALOG_H
3
4#include <qdialog.h>
5
6#include "tonleiterdata.h"
7
8using namespace Data;
9
10namespace Menu
11{
12 class ScaleEditDialog : public QDialog
13 {
14 Q_OBJECT
15 private:
16 TonleiterData* data;
17 public:
18 ScaleEditDialog(TonleiterData* data,QWidget* parent,const char* name="ScaleEditDialog");
19 ~ScaleEditDialog();
20 };
21};
22
23#endif //TONLEITER_EDIT_SCALE_DIALOG_H
diff --git a/noncore/multimedia/tonleiter/fretboard.cpp b/noncore/multimedia/tonleiter/fretboard.cpp
index 57806be..7936c83 100644
--- a/noncore/multimedia/tonleiter/fretboard.cpp
+++ b/noncore/multimedia/tonleiter/fretboard.cpp
@@ -2,7 +2,7 @@
2 2
3#include <qpainter.h> 3#include <qpainter.h>
4 4
5FretBoard::FretBoard(TonleiterData* data,QWidget* parent,const char* name,WFlags f) 5Graph::FretBoard::FretBoard(TonleiterData* data,QWidget* parent,const char* name,WFlags f)
6:QWidget(parent,name,f),data(data) 6:QWidget(parent,name,f),data(data)
7{ 7{
8 setBackgroundColor(QColor(0,0,0)); 8 setBackgroundColor(QColor(0,0,0));
@@ -12,16 +12,16 @@ FretBoard::FretBoard(TonleiterData* data,QWidget* parent,const char* name,WFlags
12 connect(data,SIGNAL(dataChange()),this,SLOT(dataChange())); 12 connect(data,SIGNAL(dataChange()),this,SLOT(dataChange()));
13} 13}
14//**************************************************************************** 14//****************************************************************************
15FretBoard::~FretBoard() 15Graph::FretBoard::~FretBoard()
16{ 16{
17} 17}
18//**************************************************************************** 18//****************************************************************************
19void FretBoard::dataChange() 19void Graph::FretBoard::dataChange()
20{ 20{
21 repaint(true); 21 repaint(true);
22} 22}
23//**************************************************************************** 23//****************************************************************************
24void FretBoard::paintEvent(QPaintEvent* pe) 24void Graph::FretBoard::paintEvent(QPaintEvent* pe)
25{ 25{
26 Q_UNUSED(pe); 26 Q_UNUSED(pe);
27 27
@@ -48,12 +48,12 @@ void FretBoard::paintEvent(QPaintEvent* pe)
48 paintScale(&p); 48 paintScale(&p);
49} 49}
50//**************************************************************************** 50//****************************************************************************
51void FretBoard::resizeEvent(QResizeEvent* re) 51void Graph::FretBoard::resizeEvent(QResizeEvent* re)
52{ 52{
53 Q_UNUSED(re); 53 Q_UNUSED(re);
54} 54}
55//**************************************************************************** 55//****************************************************************************
56void FretBoard::paintBoard(QPainter* p) 56void Graph::FretBoard::paintBoard(QPainter* p)
57{ 57{
58 //debug 58 //debug
59 QColor bgc=QColor(142,138,120); 59 QColor bgc=QColor(142,138,120);
@@ -63,7 +63,7 @@ void FretBoard::paintBoard(QPainter* p)
63 63
64} 64}
65//**************************************************************************** 65//****************************************************************************
66void FretBoard::paintFrets(QPainter* p) 66void Graph::FretBoard::paintFrets(QPainter* p)
67{ 67{
68 //draw frets 68 //draw frets
69 p->setPen(fretpen); 69 p->setPen(fretpen);
@@ -99,7 +99,7 @@ void FretBoard::paintFrets(QPainter* p)
99 } 99 }
100} 100}
101//**************************************************************************** 101//****************************************************************************
102void FretBoard::paintStrings(QPainter* p) 102void Graph::FretBoard::paintStrings(QPainter* p)
103{ 103{
104 //draw strings 104 //draw strings
105 p->setPen(stringpen); 105 p->setPen(stringpen);
@@ -116,7 +116,7 @@ void FretBoard::paintStrings(QPainter* p)
116 } 116 }
117} 117}
118//**************************************************************************** 118//****************************************************************************
119void FretBoard::paintScale(QPainter* p) 119void Graph::FretBoard::paintScale(QPainter* p)
120{ 120{
121 int dotsize=10; 121 int dotsize=10;
122 int scaleid=data->getCurrentScaleID(); 122 int scaleid=data->getCurrentScaleID();
diff --git a/noncore/multimedia/tonleiter/fretboard.h b/noncore/multimedia/tonleiter/fretboard.h
index eb509b0..458c733 100644
--- a/noncore/multimedia/tonleiter/fretboard.h
+++ b/noncore/multimedia/tonleiter/fretboard.h
@@ -9,6 +9,10 @@
9 9
10#include "tonleiterdata.h" 10#include "tonleiterdata.h"
11 11
12using namespace Data;
13
14namespace Graph
15{
12class FretBoard : public QWidget 16class FretBoard : public QWidget
13{ 17{
14 Q_OBJECT 18 Q_OBJECT
@@ -42,13 +46,11 @@ private slots:
42private: 46private:
43 void paintEvent(QPaintEvent* pe); 47 void paintEvent(QPaintEvent* pe);
44 void resizeEvent(QResizeEvent* re); 48 void resizeEvent(QResizeEvent* re);
45 //void mousePressEvent(QMouseEvent* mpe);
46 //void mouseMoveEvent(QMouseEvent* mme);
47 //void mouseReleaseEvent(QMouseEvent* mre);
48 void paintBoard(QPainter* p); 49 void paintBoard(QPainter* p);
49 void paintFrets(QPainter* p); 50 void paintFrets(QPainter* p);
50 void paintStrings(QPainter* p); 51 void paintStrings(QPainter* p);
51 void paintScale(QPainter* p); 52 void paintScale(QPainter* p);
52}; 53};
54};
53 55
54#endif //TONLEITER_FRET_BOARD_H 56#endif //TONLEITER_FRET_BOARD_H
diff --git a/noncore/multimedia/tonleiter/mainwidget.cpp b/noncore/multimedia/tonleiter/mainwidget.cpp
index 0a20b9e..f09207b 100644
--- a/noncore/multimedia/tonleiter/mainwidget.cpp
+++ b/noncore/multimedia/tonleiter/mainwidget.cpp
@@ -7,16 +7,16 @@ MainWidget::MainWidget(QWidget* parent,const char* name,WFlags f)
7:QMainWindow(parent,name,f) 7:QMainWindow(parent,name,f)
8{ 8{
9 setCaption("Tonleiter"); 9 setCaption("Tonleiter");
10 data=new TonleiterData(this); 10 data=new Data::TonleiterData(this);
11 11
12 QWidget* mainwidget=new QWidget(this,"mainwidget"); 12 QWidget* mainwidget=new QWidget(this,"mainwidget");
13 setCentralWidget(mainwidget); 13 setCentralWidget(mainwidget);
14 QBoxLayout* mainlayout=new QBoxLayout(mainwidget,QBoxLayout::TopToBottom); 14 QBoxLayout* mainlayout=new QBoxLayout(mainwidget,QBoxLayout::TopToBottom);
15 15
16 menuwidget=new MenuWidget(data,mainwidget); 16 menuwidget=new Menu::MenuWidget(data,mainwidget);
17 mainlayout->addWidget(menuwidget); 17 mainlayout->addWidget(menuwidget);
18 18
19 fretboard=new FretBoard(data,mainwidget); 19 fretboard=new Graph::FretBoard(data,mainwidget);
20 mainlayout->addWidget(fretboard); 20 mainlayout->addWidget(fretboard);
21 21
22} 22}
diff --git a/noncore/multimedia/tonleiter/mainwidget.h b/noncore/multimedia/tonleiter/mainwidget.h
index 71b5ba9..9bb593c 100644
--- a/noncore/multimedia/tonleiter/mainwidget.h
+++ b/noncore/multimedia/tonleiter/mainwidget.h
@@ -11,9 +11,9 @@ class MainWidget : public QMainWindow
11{ 11{
12 Q_OBJECT 12 Q_OBJECT
13private: 13private:
14 TonleiterData* data; 14 Data::TonleiterData* data;
15 MenuWidget* menuwidget; 15 Menu::MenuWidget* menuwidget;
16 FretBoard* fretboard; 16 Graph::FretBoard* fretboard;
17public: 17public:
18 MainWidget(QWidget* parent=0,const char* name="MainWidget",WFlags f=0); 18 MainWidget(QWidget* parent=0,const char* name="MainWidget",WFlags f=0);
19 virtual ~MainWidget(); 19 virtual ~MainWidget();
diff --git a/noncore/multimedia/tonleiter/menuwidget.cpp b/noncore/multimedia/tonleiter/menuwidget.cpp
index 3dfa09d..1e3742c 100644
--- a/noncore/multimedia/tonleiter/menuwidget.cpp
+++ b/noncore/multimedia/tonleiter/menuwidget.cpp
@@ -3,7 +3,10 @@
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qlayout.h> 4#include <qlayout.h>
5 5
6MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFlags f) 6#include "editinst.h"
7#include "editscale.h"
8
9Menu::MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFlags f)
7:QWidget(parent,name,f),data(data) 10:QWidget(parent,name,f),data(data)
8{ 11{
9 QGridLayout* layout=new QGridLayout(this,3,3,10,-1,"menulayout"); 12 QGridLayout* layout=new QGridLayout(this,3,3,10,-1,"menulayout");
@@ -14,6 +17,7 @@ MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFla
14 connect(boxInst,SIGNAL(activated(int)),data,SLOT(setCurrentInstrumetID(int))); 17 connect(boxInst,SIGNAL(activated(int)),data,SLOT(setCurrentInstrumetID(int)));
15 layout->addWidget(boxInst,0,1); 18 layout->addWidget(boxInst,0,1);
16 editInst=new QPushButton(tr("Edit"),this,"editInst"); 19 editInst=new QPushButton(tr("Edit"),this,"editInst");
20 connect(editInst,SIGNAL(pressed()),this,SLOT(editInstPressed()));
17 layout->addWidget(editInst,0,2); 21 layout->addWidget(editInst,0,2);
18 22
19 QLabel* noteLabel=new QLabel(tr("Note"),this,"noteLabel"); 23 QLabel* noteLabel=new QLabel(tr("Note"),this,"noteLabel");
@@ -35,17 +39,30 @@ MenuWidget::MenuWidget(TonleiterData* data,QWidget* parent,const char* name,WFla
35 connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int))); 39 connect(boxScale,SIGNAL(activated(int)),data,SLOT(setCurrentScaleID(int)));
36 layout->addWidget(boxScale,2,1); 40 layout->addWidget(boxScale,2,1);
37 editScale=new QPushButton(tr("Edit"),this,"editScale"); 41 editScale=new QPushButton(tr("Edit"),this,"editScale");
42 connect(editScale,SIGNAL(pressed()),this,SLOT(editScalePressed()));
38 layout->addWidget(editScale,2,2); 43 layout->addWidget(editScale,2,2);
39 44
40 updateBoxes(); 45 updateBoxes();
41 46
42} 47}
43//**************************************************************************** 48//****************************************************************************
44MenuWidget::~MenuWidget() 49Menu::MenuWidget::~MenuWidget()
50{
51}
52//****************************************************************************
53void Menu::MenuWidget::editInstPressed()
54{
55 InstEditDialog* instdialog=new InstEditDialog(data,this);
56 instdialog->exec();
57}
58//****************************************************************************
59void Menu::MenuWidget::editScalePressed()
45{ 60{
61 ScaleEditDialog* scaledialog=new ScaleEditDialog(data,this);
62 scaledialog->exec();
46} 63}
47//**************************************************************************** 64//****************************************************************************
48void MenuWidget::updateBoxes() 65void Menu::MenuWidget::updateBoxes()
49{ 66{
50 boxInst->clear(); 67 boxInst->clear();
51 68
diff --git a/noncore/multimedia/tonleiter/menuwidget.h b/noncore/multimedia/tonleiter/menuwidget.h
index 2635f8a..044a3e6 100644
--- a/noncore/multimedia/tonleiter/menuwidget.h
+++ b/noncore/multimedia/tonleiter/menuwidget.h
@@ -9,6 +9,9 @@
9 9
10#include "tonleiterdata.h" 10#include "tonleiterdata.h"
11 11
12using namespace Data;
13namespace Menu
14{
12class MenuWidget : public QWidget 15class MenuWidget : public QWidget
13{ 16{
14 Q_OBJECT 17 Q_OBJECT
@@ -23,8 +26,12 @@ private:
23public: 26public:
24 MenuWidget(TonleiterData* data,QWidget* parent,const char* name="MenuWidget",WFlags f=0); 27 MenuWidget(TonleiterData* data,QWidget* parent,const char* name="MenuWidget",WFlags f=0);
25 ~MenuWidget(); 28 ~MenuWidget();
29 private slots:
30 void editInstPressed();
31 void editScalePressed();
26public slots: 32public slots:
27 void updateBoxes(); 33 void updateBoxes();
28}; 34};
35};
29 36
30#endif //TONLEITER_MENU_WIDGET_H 37#endif //TONLEITER_MENU_WIDGET_H
diff --git a/noncore/multimedia/tonleiter/tonleiter.pro b/noncore/multimedia/tonleiter/tonleiter.pro
index bf19c3a..2b0a798 100644
--- a/noncore/multimedia/tonleiter/tonleiter.pro
+++ b/noncore/multimedia/tonleiter/tonleiter.pro
@@ -1,8 +1,8 @@
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 4HEADERS = mainwidget.h tonleiterdata.h tonleiterdatahelper.h fretboard.h menuwidget.h editinst.h editscale.h
5SOURCES = mainwidget.cpp tonleiterdata.cpp tonleiterdatahelper.cpp fretboard.cpp menuwidget.cpp main.cpp 5SOURCES = mainwidget.cpp tonleiterdata.cpp tonleiterdatahelper.cpp fretboard.cpp menuwidget.cpp main.cpp editinst.cpp editscale.cpp
6INCLUDEPATH += $(OPIEDIR)/include 6INCLUDEPATH += $(OPIEDIR)/include
7DEPENDPATH += $(OPIEDIR)/include 7DEPENDPATH += $(OPIEDIR)/include
8LIBS += -lqpe 8LIBS += -lqpe
diff --git a/noncore/multimedia/tonleiter/tonleiterdata.cpp b/noncore/multimedia/tonleiter/tonleiterdata.cpp
index e1ecb5a..946d4e3 100644
--- a/noncore/multimedia/tonleiter/tonleiterdata.cpp
+++ b/noncore/multimedia/tonleiter/tonleiterdata.cpp
@@ -2,6 +2,9 @@
2 2
3#include <qpe/config.h> 3#include <qpe/config.h>
4 4
5using namespace Data;
6
7
5TonleiterData::TonleiterData(QObject* parent) 8TonleiterData::TonleiterData(QObject* parent)
6:QObject(parent) 9:QObject(parent)
7{ 10{
@@ -49,50 +52,30 @@ void TonleiterData::setDrawNames(bool dn)
49//**************************************************************************** 52//****************************************************************************
50void TonleiterData::loadData() 53void TonleiterData::loadData()
51{ 54{
52/* 55 Config load("Tonleiter");
53 QValueList<int> strings1; 56 if(!load.isValid())
54 strings1.append(Note::getNoteFromName("B",0)); 57 {
55 strings1.append(Note::getNoteFromName("E",1)); 58 //write some default values
56 strings1.append(Note::getNoteFromName("A",1)); 59 load.setGroup("General");
57 strings1.append(Note::getNoteFromName("D",2)); 60 load.writeEntry("currentInstrumentID",1);
58 strings1.append(Note::getNoteFromName("G",2)); 61 load.writeEntry("currentNote",0);
59 strings1.append(Note::getNoteFromName("C",3)); 62 load.writeEntry("currentScaleID",1);
60 instruments.append(Instrument("Thumb6",26,strings1)); 63 load.writeEntry("drawnames",1);
61 64 load.setGroup("Instrument");
62 QValueList<int> strings2; 65 load.writeEntry("Inst0","Thumb6;26;11;16;21;26;31;36;");
63 strings2.append(Note::getNoteFromName("E",1)); 66 load.writeEntry("Inst1","Bass 4;12;16;21;26;31;");
64 strings2.append(Note::getNoteFromName("A",1)); 67 load.writeEntry("noOfInstruments",2);
65 strings2.append(Note::getNoteFromName("D",2)); 68 load.setGroup("Scale");
66 strings2.append(Note::getNoteFromName("G",2)); 69 load.writeEntry("Scale0","ionian;0;2;4;5;7;9;11;");
67 instruments.append(Instrument("Bass 4",12,strings2)); 70 load.writeEntry("Scale1","aeolian;0;2;3;5;7;8;10;");
68 71 load.writeEntry("Scale2","dorian;0;2;3;5;7;9;10;");
69 currentInstrumentID=1; 72 load.writeEntry("Scale3","phrygian;0;1;3;5;7;8;10;");
70 73 load.writeEntry("Scale4","lydian;0;2;4;6;7;9;11;");
71 QValueList<int> scale1; 74 load.writeEntry("Scale5","mixolyd.;0;2;4;5;7;9;10;");
72 scale1.append(0); 75 load.writeEntry("noOfScales",6);
73 scale1.append(2);
74 scale1.append(3);
75 scale1.append(5);
76 scale1.append(7);
77 scale1.append(8);
78 scale1.append(10);
79 scales.append(Scale("Minor",scale1));
80
81 QValueList<int> scale2;
82 scale2.append(0);
83 scale2.append(2);
84 scale2.append(4);
85 scale2.append(5);
86 scale2.append(7);
87 scale2.append(9);
88 scale2.append(10);
89 scales.append(Scale("Major",scale2));
90 76
91 currentScaleID=0; 77 }
92 78
93 currentNote=Note::getNoteFromName("A",0);
94*/
95 Config load("Tonleiter");
96 load.setGroup("General"); 79 load.setGroup("General");
97 currentNote=load.readNumEntry("currentNote"); 80 currentNote=load.readNumEntry("currentNote");
98 drawnames=load.readBoolEntry("drawnames"); 81 drawnames=load.readBoolEntry("drawnames");
diff --git a/noncore/multimedia/tonleiter/tonleiterdata.h b/noncore/multimedia/tonleiter/tonleiterdata.h
index a5e6884..71d05fd 100644
--- a/noncore/multimedia/tonleiter/tonleiterdata.h
+++ b/noncore/multimedia/tonleiter/tonleiterdata.h
@@ -5,6 +5,8 @@
5 5
6#include "tonleiterdatahelper.h" 6#include "tonleiterdatahelper.h"
7 7
8namespace Data
9{
8class TonleiterData : public QObject 10class TonleiterData : public QObject
9{ 11{
10 Q_OBJECT 12 Q_OBJECT
@@ -42,5 +44,6 @@ public:
42 int getCurrentBaseNote(); 44 int getCurrentBaseNote();
43 bool isDrawNames(); 45 bool isDrawNames();
44}; 46};
47};
45 48
46#endif //TONLEITER_DATA_H 49#endif //TONLEITER_DATA_H
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp
index c52e0da..5714cea 100644
--- a/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp
+++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.cpp
@@ -1,5 +1,7 @@
1#include "tonleiterdatahelper.h" 1#include "tonleiterdatahelper.h"
2 2
3using namespace Data;
4
3int Note::getOctaveOfNote(int note) 5int Note::getOctaveOfNote(int note)
4{ 6{
5 int remain=note%12; 7 int remain=note%12;
diff --git a/noncore/multimedia/tonleiter/tonleiterdatahelper.h b/noncore/multimedia/tonleiter/tonleiterdatahelper.h
index 94895ea..b79162a 100644
--- a/noncore/multimedia/tonleiter/tonleiterdatahelper.h
+++ b/noncore/multimedia/tonleiter/tonleiterdatahelper.h
@@ -4,6 +4,8 @@
4#include <qstring.h> 4#include <qstring.h>
5#include <qvaluelist.h> 5#include <qvaluelist.h>
6 6
7namespace Data
8{
7namespace Note 9namespace Note
8{ 10{
9 const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"}; 11 const QString notenames[]={"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"};
@@ -47,7 +49,7 @@ public:
47 QString scaleName(); 49 QString scaleName();
48 bool noteInScale(int base,int note); 50 bool noteInScale(int base,int note);
49}; 51};
50 52};
51 53
52#endif //TONLEITER_DATA_HELPER_H 54#endif //TONLEITER_DATA_HELPER_H
53 55