summaryrefslogtreecommitdiff
path: root/src/rangeeditor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rangeeditor.h')
-rw-r--r--src/rangeeditor.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/src/rangeeditor.h b/src/rangeeditor.h
new file mode 100644
index 0000000..b3ecd9b
--- /dev/null
+++ b/src/rangeeditor.h
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/***************************************************************************
+ * rangeeditor.h
+ *
+ * Thu Apr 17 17:25:17 CEST 2014
+ * Copyright 2014 Bent Bisballe Nyeng
+ * deva@aasimon.org
+ ****************************************************************************/
+
+/*
+ * This file is part of DrumGizmo.
+ *
+ * DrumGizmo is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * DrumGizmo is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with DrumGizmo; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+#pragma once
+
+#include <QWidget>
+
+#include <QLineEdit>
+#include "range.h"
+
+class Instrument;
+
+class RangeEditor
+ : public QWidget
+{
+ Q_OBJECT
+public:
+ RangeEditor(Ranges& ranges, Instrument& instrument);
+
+public slots:
+ void added(sel_id_t id);
+ void updated(sel_id_t id);
+ void removed(sel_id_t id);
+ void activeChanged(sel_id_t id);
+
+private slots:
+ void update();
+ void updateRange();
+
+private:
+ Ranges& ranges;
+
+ sel_id_t cur;
+
+ QLineEdit* from;
+ QLineEdit* to;
+ QLineEdit* fadein;
+ QLineEdit* fadeout;
+ QLineEdit* energy;
+ QLineEdit* name;
+
+ Instrument& instrument;
+};