-rw-r--r-- | noncore/multimedia/tonleiter/tonleiterdata.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/multimedia/tonleiter/tonleiterdata.cpp b/noncore/multimedia/tonleiter/tonleiterdata.cpp index bf7b32c..33b3c49 100644 --- a/noncore/multimedia/tonleiter/tonleiterdata.cpp +++ b/noncore/multimedia/tonleiter/tonleiterdata.cpp | |||
@@ -29,70 +29,70 @@ void TonleiterData::setCurrentInstrumetID(int id) | |||
29 | void TonleiterData::setCurrentScaleID(int id) | 29 | void 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 | //**************************************************************************** |
38 | void TonleiterData::setCurrentNote(int id) | 38 | void 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 | //**************************************************************************** |
47 | void TonleiterData::setDrawNames(bool dn) | 47 | void TonleiterData::setDrawNames(bool dn) |
48 | { | 48 | { |
49 | drawnames=dn; | 49 | drawnames=dn; |
50 | emit dataChange(); | 50 | emit dataChange(); |
51 | } | 51 | } |
52 | //**************************************************************************** | 52 | //**************************************************************************** |
53 | void TonleiterData::loadData() | 53 | void 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",3); |
62 | load.writeEntry("currentScaleID",1); | 62 | load.writeEntry("currentScaleID",0); |
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;14;19;24;29;34;39;"); |
66 | load.writeEntry("Inst1","Bass 4;12;16;21;26;31;"); | 66 | load.writeEntry("Inst1","Bass 4;12;19;24;29;34;"); |
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","mixolydian;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++) |