diff options
Diffstat (limited to 'dgedit/mainwindow.cc')
-rw-r--r-- | dgedit/mainwindow.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/dgedit/mainwindow.cc b/dgedit/mainwindow.cc index 1b82841..8cefa82 100644 --- a/dgedit/mainwindow.cc +++ b/dgedit/mainwindow.cc @@ -41,6 +41,7 @@ #include <QFileDialog> #include <QIntValidator> #include <QTabWidget> +#include <QProgressBar> #include <unistd.h> @@ -86,11 +87,13 @@ MainWindow::MainWindow() CanvasTool *listen = g_listen; addTool(toolbar, canvas, listen); threshold = new CanvasToolThreshold(canvas); - addTool(toolbar, canvas, threshold); + canvas->tools.push_back(threshold);//addTool(toolbar, canvas, threshold); tool_selections = new CanvasToolSelections(canvas, selections, selections_preview); connect(threshold, SIGNAL(thresholdChanged(double)), tool_selections, SLOT(thresholdChanged(double))); + connect(threshold, SIGNAL(thresholdChanging(double)), + tool_selections, SLOT(thresholdChanged(double))); connect(&selections, SIGNAL(activeChanged(sel_id_t)), canvas, SLOT(update())); addTool(toolbar, canvas, tool_selections); @@ -217,6 +220,7 @@ void MainWindow::tabChanged(int tabid) tool_selections->setShowPreview(tabid == generateTabId); sorter->setShowPreview(tabid == generateTabId); tool_selections->autoCreateSelectionsPreview(); + threshold->setActive(tabid == generateTabId); } QWidget *MainWindow::createFilesTab() @@ -267,6 +271,8 @@ QWidget *MainWindow::createGenerateTab() connect(threshold, SIGNAL(thresholdChanged(double)), tool_selections, SLOT(autoCreateSelectionsPreview())); + connect(threshold, SIGNAL(thresholdChanging(double)), + tool_selections, SLOT(autoCreateSelectionsPreview())); QPushButton *clearsel = new QPushButton(); clearsel->setText("Clear"); @@ -375,6 +381,12 @@ QWidget *MainWindow::createExportTab() connect(exportsel, SIGNAL(clicked()), this, SLOT(doExport())); l->addWidget(exportsel); + QProgressBar *bar = new QProgressBar(); + connect(extractor, SIGNAL(progressUpdate(int)), bar, SLOT(setValue(int))); + connect(extractor, SIGNAL(setMaximumProgress(int)), + bar, SLOT(setMaximum(int))); + l->addWidget(bar); + l->addStretch(); return w; |