summaryrefslogtreecommitdiff
path: root/dgedit
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-04-02 21:15:06 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-04-02 21:15:06 +0200
commit915324ed1a65df1dfd6ede548459a44a426cf01d (patch)
tree3d80438e5e2a56336a2e4687f0d7f70d242d100d /dgedit
parent0aef6f2f81bdb6f78fc04e090aa60b5146326765 (diff)
parent5f3b212b63418851907b788b6a2bfea69ba570b6 (diff)
Merge branch 'master' of http://git.drumgizmo.org/drumgizmo
Diffstat (limited to 'dgedit')
-rw-r--r--dgedit/mainwindow.cc18
-rw-r--r--dgedit/mainwindow.h2
2 files changed, 15 insertions, 5 deletions
diff --git a/dgedit/mainwindow.cc b/dgedit/mainwindow.cc
index dfc150c..b4ef076 100644
--- a/dgedit/mainwindow.cc
+++ b/dgedit/mainwindow.cc
@@ -38,6 +38,7 @@
#include <QToolBar>
#include <QAction>
#include <QMenuBar>
+#include <QFileDialog>
#include "canvastool.h"
#include "canvastoolthreshold.h"
@@ -203,11 +204,16 @@ MainWindow::MainWindow()
configs->addWidget(prefix);
configs->addWidget(new QLabel("Export path:"));
- QLineEdit *exportp = new QLineEdit();
+ QHBoxLayout *lo_exportp = new QHBoxLayout();
+ exportp = new QLineEdit();
connect(exportp, SIGNAL(textChanged(const QString &)),
extractor, SLOT(setExportPath(const QString &)));
exportp->setText("/home/deva/tmp/drumgizmoexport");
- configs->addWidget(exportp);
+ lo_exportp->addWidget(exportp);
+ QPushButton *btn_browse = new QPushButton("...");
+ connect(btn_browse, SIGNAL(clicked()), this, SLOT(browse()));
+ lo_exportp->addWidget(btn_browse);
+ configs->addLayout(lo_exportp);
QPushButton *loadbtn = new QPushButton();
loadbtn->setText("Add files...");
@@ -362,7 +368,9 @@ void MainWindow::setPreset(int index)
slider_falloff->setValue(p.falloff);
slider_fadelength->setValue(p.fadelength);
prefix->setText(p.prefix);
-// sorter->setAttackLength(p.attacklength);
-// selections->noiseFloorChanged(p.falloff);
-// selections->fadeoutChanged(p.fadeout);
+}
+
+void MainWindow::browse() {
+ QString path = QFileDialog::getExistingDirectory(this, "Select export path", exportp->text());
+ exportp->setText(path);
}
diff --git a/dgedit/mainwindow.h b/dgedit/mainwindow.h
index c7ce3fb..3e9e588 100644
--- a/dgedit/mainwindow.h
+++ b/dgedit/mainwindow.h
@@ -62,6 +62,7 @@ public slots:
void loadFile(QString filename);
void playSamples();
void setPreset(int);
+ void browse();
protected:
void closeEvent(QCloseEvent*);
@@ -85,6 +86,7 @@ private:
QSlider *slider_falloff;
QSlider *slider_fadelength;
QLineEdit *prefix;
+ QLineEdit *exportp;
};
#endif/*__DRUMGIZMO_MAINWINDOW_H__*/