summaryrefslogtreecommitdiff
path: root/dgedit
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2014-04-02 20:41:14 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2014-04-02 20:41:14 +0200
commite9720cba4e117dc26da46b0a72b56a576a950e17 (patch)
treeb391d09f14a54349adfdc081080eb73116a94cc0 /dgedit
parent8d2f80f5e83ed9b22574562af0db0590f2c67c1f (diff)
Updating prefix lineedit on presets change.
Diffstat (limited to 'dgedit')
-rw-r--r--dgedit/mainwindow.cc5
-rw-r--r--dgedit/mainwindow.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/dgedit/mainwindow.cc b/dgedit/mainwindow.cc
index adf1321..2799fdf 100644
--- a/dgedit/mainwindow.cc
+++ b/dgedit/mainwindow.cc
@@ -30,7 +30,6 @@
#include <QVBoxLayout>
#include <QPushButton>
-#include <QLineEdit>
#include <QLabel>
#include <QStatusBar>
#include <QApplication>
@@ -187,7 +186,7 @@ MainWindow::MainWindow()
configs->addWidget(slider4);
configs->addWidget(new QLabel("Prefix:"));
- QLineEdit *prefix = new QLineEdit();
+ prefix = new QLineEdit();
connect(prefix, SIGNAL(textChanged(const QString &)),
extractor, SLOT(setOutputPrefix(const QString &)));
prefix->setText("kick-r");
@@ -236,6 +235,7 @@ MainWindow::MainWindow()
QString presetname = list.at(i);
Preset p;
settings.beginGroup(presetname);
+ p.name = presetname;
p.attacklength = settings.value("attacklength", 0).toInt();
p.falloff = settings.value("falloff", 0).toInt();
p.fadelength = settings.value("fadelength", 0).toInt();
@@ -329,6 +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);
// sorter->setAttackLength(p.attacklength);
// selections->noiseFloorChanged(p.falloff);
// selections->fadeoutChanged(p.fadeout);
diff --git a/dgedit/mainwindow.h b/dgedit/mainwindow.h
index c358d3c..efdce99 100644
--- a/dgedit/mainwindow.h
+++ b/dgedit/mainwindow.h
@@ -31,6 +31,7 @@
#include <QScrollBar>
#include <QComboBox>
#include <QSlider>
+#include <QLineEdit>
#include "canvas.h"
#include "audioextractor.h"
@@ -40,6 +41,7 @@
class Preset {
public:
+ QString name;
int attacklength;
int falloff;
int fadelength;
@@ -80,6 +82,7 @@ private:
QSlider *slider_attacklength;
QSlider *slider_falloff;
QSlider *slider_fadelength;
+ QLineEdit *prefix;
};
#endif/*__DRUMGIZMO_MAINWINDOW_H__*/