summaryrefslogtreecommitdiff
path: root/attic/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2011-09-15 12:14:55 +0000
committerRobert Jonsson <spamatica@gmail.com>2011-09-15 12:14:55 +0000
commitb0546e5e7f7044019892543c6c82029db8d564a7 (patch)
tree1b96a6260900f3fbf3513fb48a5a72aa89052dc8 /attic/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp
parent583c73d1a07154d3d2672d65d8cce6495f490454 (diff)
moved attic to a branch of it's own
Diffstat (limited to 'attic/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp')
-rw-r--r--attic/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp68
1 files changed, 0 insertions, 68 deletions
diff --git a/attic/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp b/attic/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp
deleted file mode 100644
index 562adf2c..00000000
--- a/attic/muse_qt4_evolution/midiplugins/drumglue/drumgluegui.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//=========================================================
-// MusE
-// Linux Music Editor
-//
-// (C) Copyright 2008 Robert Jonsson (rj@spamatica.se)
-// (C) Copyright 2005- Werner Schweer (ws@seh.de)
-// Copyright: See COPYING file that comes with this distribution
-//=========================================================
-
-#include "drumgluegui.h"
-#include "drumglue.h"
-#include "globalinstrumentview.h"
-
-//---------------------------------------------------------
-// DrumGlueGui
-//---------------------------------------------------------
-
-DrumGlueGui::DrumGlueGui(DrumGlue* f, QWidget* parent)
- : QDialog(parent)
- {
- drumGlue = f;
- setupUi(this);
- instrumentsTabWidget->clear();
-
- connect (addInstrumentButton, SIGNAL(clicked()), this, SLOT(addInstrument()));
- }
-
-//---------------------------------------------------------
-// init
-//---------------------------------------------------------
-void DrumGlueGui::init()
- {
- foreach(DrumInstrument *di, drumGlue->drumInstruments) {
- GlobalInstrumentView *giView = new GlobalInstrumentView(drumGlue,this, di->name);
- instrumentsTabWidget->addTab(giView, di->name);
- }
- }
-
-//---------------------------------------------------------
-// addInstrument
-//---------------------------------------------------------
-void DrumGlueGui::addInstrument()
- {
- bool ok;
- QString text = QInputDialog::getText(this, tr("Instrument name"),
- tr("Name of instrument:"), QLineEdit::Normal,
- "", &ok);
- if (ok && !text.isEmpty()) {
- DrumInstrument *di = new DrumInstrument();
- di->name = text;
- drumGlue->drumInstruments.append(di);
- GlobalInstrumentView *giView = new GlobalInstrumentView(drumGlue,this, text);
- instrumentsTabWidget->addTab(giView, text);
- }
- }
-
-//---------------------------------------------------------
-// removeInstrument
-//---------------------------------------------------------
-void DrumGlueGui::removeInstrument()
- {
- int ret = QMessageBox::warning(this, tr("Remove instrument"),
- tr("Are you sure you want to remove current instrument?"),
- QMessageBox::No,
- QMessageBox::Yes);
- if (ret == QMessageBox::Yes)
- instrumentsTabWidget->removeTab(instrumentsTabWidget->currentIndex());
- }