Diffstat (limited to 'noncore/multimedia/tonleiter/tonleiterdata.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/tonleiter/tonleiterdata.cpp | 67 |
1 files changed, 25 insertions, 42 deletions
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 | |||
@@ -3,4 +3,7 @@ | |||
3 | #include <qpe/config.h> | 3 | #include <qpe/config.h> |
4 | 4 | ||
5 | using namespace Data; | ||
6 | |||
7 | |||
5 | TonleiterData::TonleiterData(QObject* parent) | 8 | TonleiterData::TonleiterData(QObject* parent) |
6 | :QObject(parent) | 9 | :QObject(parent) |
@@ -50,48 +53,28 @@ void TonleiterData::setDrawNames(bool dn) | |||
50 | void TonleiterData::loadData() | 53 | void 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"); |