From 5935492fe66e408d2656b9a3434b9a89cf5d892c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 17 Apr 2014 17:55:59 +0200 Subject: Added selection editor. --- dgedit/mainwindow.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'dgedit/mainwindow.cc') diff --git a/dgedit/mainwindow.cc b/dgedit/mainwindow.cc index 8cefa82..d573ff4 100644 --- a/dgedit/mainwindow.cc +++ b/dgedit/mainwindow.cc @@ -49,6 +49,7 @@ #include "canvastoolthreshold.h" #include "canvastoollisten.h" #include "volumefader.h" +#include "selectioneditor.h" #define MAXVAL 10000000L #define SINGLESTEP MAXVAL/100000 @@ -96,6 +97,8 @@ MainWindow::MainWindow() tool_selections, SLOT(thresholdChanged(double))); connect(&selections, SIGNAL(activeChanged(sel_id_t)), canvas, SLOT(update())); + connect(&selections, SIGNAL(updated(sel_id_t)), + canvas, SLOT(update())); addTool(toolbar, canvas, tool_selections); QMenu *fileMenu = menuBar()->addMenu("&File"); @@ -251,7 +254,15 @@ QWidget *MainWindow::createFilesTab() QWidget *MainWindow::createEditTab() { - return new QWidget(); + SelectionEditor *se = new SelectionEditor(selections); + + connect(&selections, SIGNAL(added(sel_id_t)), se, SLOT(added(sel_id_t))); + connect(&selections, SIGNAL(updated(sel_id_t)), se, SLOT(updated(sel_id_t))); + connect(&selections, SIGNAL(removed(sel_id_t)), se, SLOT(removed(sel_id_t))); + connect(&selections, SIGNAL(activeChanged(sel_id_t)), + se, SLOT(activeChanged(sel_id_t))); + + return se; } QWidget *MainWindow::createGenerateTab() -- cgit v1.2.3