| 78 | } |
| 79 | |
| 80 | TuningProgramManager::TuningProgramManager() : |
| 81 | _defaultPrograms(true), |
| 82 | _updated(true) |
| 83 | { |
| 84 | // Load the default tuning programs |
| 85 | _tuningPrograms[0].parse(QObject::tr("Equal", "Equal musical temperament") + ",0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0"); |
| 86 | QFile file(":/misc/temperaments.csv"); |
| 87 | int index = 1; |
| 88 | if (file.open(QIODevice::ReadOnly | QFile::Text)) |
| 89 | { |
| 90 | QTextStream in(&file); |
| 91 | QString line; |
| 92 | while (!(line = in.readLine()).isEmpty()) |
| 93 | { |
| 94 | if (_tuningPrograms[index].parse(line)) |
| 95 | index++; |
| 96 | else |
| 97 | _tuningPrograms.remove(index); |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | TuningProgramManager::~TuningProgramManager() |
| 103 | { |