MCPcopy Create free account
hub / github.com/davy7125/polyphone / TuningProgramManager

Method TuningProgramManager

sources/context/tuningprogrammanager.cpp:80–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80TuningProgramManager::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
102TuningProgramManager::~TuningProgramManager()
103{

Callers

nothing calls this directly

Calls 3

parseMethod · 0.45
openMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected