diff options
author | Jonas Suhr Christensen <jsc@umbraculum.org> | 2014-04-02 20:46:57 +0200 |
---|---|---|
committer | Jonas Suhr Christensen <jsc@umbraculum.org> | 2014-04-02 20:46:57 +0200 |
commit | d8053dd8e6d38165d9ac6a689081bc4a753ff7ad (patch) | |
tree | 1f759c48a3ca86cedbd0f557afeeb89e531891d9 | |
parent | e9720cba4e117dc26da46b0a72b56a576a950e17 (diff) |
Added prefix name to presets.ini.
-rw-r--r-- | dgedit/mainwindow.cc | 4 | ||||
-rw-r--r-- | dgedit/mainwindow.h | 2 | ||||
-rw-r--r-- | dgedit/presets.ini | 7 |
3 files changed, 8 insertions, 5 deletions
diff --git a/dgedit/mainwindow.cc b/dgedit/mainwindow.cc index 2799fdf..3436c25 100644 --- a/dgedit/mainwindow.cc +++ b/dgedit/mainwindow.cc @@ -235,7 +235,7 @@ MainWindow::MainWindow() QString presetname = list.at(i); Preset p; settings.beginGroup(presetname); - p.name = presetname; + p.prefix = settings.value("prefix", "unknown").toString(); p.attacklength = settings.value("attacklength", 0).toInt(); p.falloff = settings.value("falloff", 0).toInt(); p.fadelength = settings.value("fadelength", 0).toInt(); @@ -329,7 +329,7 @@ void MainWindow::setPreset(int index) slider_attacklength->setValue(p.attacklength); slider_falloff->setValue(p.falloff); slider_fadelength->setValue(p.fadelength); - prefix->setText(p.name); + prefix->setText(p.prefix); // sorter->setAttackLength(p.attacklength); // selections->noiseFloorChanged(p.falloff); // selections->fadeoutChanged(p.fadeout); diff --git a/dgedit/mainwindow.h b/dgedit/mainwindow.h index efdce99..fd4af57 100644 --- a/dgedit/mainwindow.h +++ b/dgedit/mainwindow.h @@ -41,7 +41,7 @@ class Preset { public: - QString name; + QString prefix; int attacklength; int falloff; int fadelength; diff --git a/dgedit/presets.ini b/dgedit/presets.ini index 4ef75ee..6434f05 100644 --- a/dgedit/presets.ini +++ b/dgedit/presets.ini @@ -1,12 +1,15 @@ -[Snare] +[Bright snare] + prefix = "Snare" attacklength = 1 falloff = 2 fadelength = 3 -[Tom] +[Tommy gun] + prefix = "Tom" attacklength = 10 falloff = 20 fadelength = 30 [Kickdrum] + prefix = "Kickass" attacklength = 100 falloff = 200 fadelength = 300 |