summaryrefslogtreecommitdiff
path: root/src/mainwindow.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-05-16 20:19:09 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-05-16 20:19:09 +0200
commit8a3a2834b84ba9cdb4b9c505b124774f14034d27 (patch)
treefa361c19792ca6580135197db7672fc5fa7cf911 /src/mainwindow.cc
parent2840e3b4047fd0987095fb17ecbb154def019a2d (diff)
Store file list in instrument and make initial connections fomr UI connections to project storage.
Diffstat (limited to 'src/mainwindow.cc')
-rw-r--r--src/mainwindow.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc
index 1217fe3..fa64a6a 100644
--- a/src/mainwindow.cc
+++ b/src/mainwindow.cc
@@ -54,9 +54,9 @@ MainWindow::MainWindow(Settings& settings)
auto instr_id2 = project.createInstrument();
auto instr_id3 = project.createInstrument();
- auto instr1 = project.getInstrument(instr_id1);
- auto instr2 = project.getInstrument(instr_id2);
- auto instr3 = project.getInstrument(instr_id3);
+ auto& instr1 = project.getInstrument(instr_id1);
+ auto& instr2 = project.getInstrument(instr_id2);
+ auto& instr3 = project.getInstrument(instr_id3);
tab_widget->addTab(new InstrumentWidget(settings, instr1),
QPixmap(":icons/instrument.png"), "Snare");
@@ -91,6 +91,7 @@ MainWindow::MainWindow(Settings& settings)
connect(act_quit, SIGNAL(triggered()), this, SLOT(close()));
instruments_dock = new QDockWidget(tr("Instruments:"), this);
+ instruments_dock->setObjectName("instruments_dock");
instruments_dock->setAllowedAreas(Qt::LeftDockWidgetArea);
instruments_dock->setFeatures(QDockWidget::DockWidgetMovable);
QListWidget* instrument_list = new QListWidget();
@@ -99,6 +100,7 @@ MainWindow::MainWindow(Settings& settings)
addDockWidget(Qt::LeftDockWidgetArea, instruments_dock);
channels_dock = new QDockWidget(tr("Channels:"), this);
+ channels_dock->setObjectName("channels_dock");
channels_dock->setAllowedAreas(Qt::LeftDockWidgetArea);
channels_dock->setFeatures(QDockWidget::DockWidgetMovable);
QListWidget* channel_list = new QListWidget();
@@ -200,7 +202,9 @@ void MainWindow::loadProject()
project.setProjectFile(filename);
+ project_dirty = false;
updateWindowTitle();
+
statusBar()->showMessage(tr("Loaded"));
}