From afdb507c9b04509654adfde9263a343468e32848 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 18 Dec 2015 13:00:33 +0100 Subject: [PATCH] [TASK] Prepare Task #5. --- .gitignore | 1 + imageviewer-qt4.cpp | 27 +++++++++++++++++++++++++++ imageviewer-qt4.h | 9 +++++++++ 3 files changed, 37 insertions(+) diff --git a/.gitignore b/.gitignore index f9f2dad..57aeb3c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ Makefile *.o moc_* *.kdev4 +*.kate-swp diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index 97459cc..1b4725a 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -642,6 +642,15 @@ void ImageViewer::applyBasicFilterWithOverflowHandling() { renewLogging(); updateImageDisplay(); } + +/** + * Does the whole canny edge thing. + * + * @brief ImageViewer::runCannyEdge + */ +void ImageViewer::runCannyEdge(void) { + +} /**************************************************************************************** * * GUI elements related to the tasks are set up here. @@ -890,6 +899,24 @@ void ImageViewer::generateControlPanels() { tabWidget->addTab(task_tab4_widget, "Task #4"); + // Tab for fifth task + task_tab5_widget = new QWidget(); + task_tab5_vboxlayout = new QVBoxLayout(); + task_tab5_widget->setLayout(task_tab5_vboxlayout); + task_tab5_scrollwidget = new QWidget(); + task_tab5_scrollarea = new QScrollArea(); + task_tab5_scrollarea->setWidgetResizable(true); + task_tab5_scrollarea->setWidget(task_tab5_scrollwidget); + task_tab5_vboxlayout->addWidget(task_tab5_scrollarea); + task_tab5_scrolllayout = new QVBoxLayout(); + task_tab5_scrolllayout->setSizeConstraint(QLayout::SetMaximumSize); + task_tab5_scrollwidget->setLayout(task_tab5_scrolllayout); + + run_canny_edge = new QPushButton("Run canny edge algorithm!"); + QObject::connect(run_canny_edge, SIGNAL(clicked()), this, SLOT(runCannyEdge())); + + tabWidget->addTab(task_tab5_widget, "Task #5"); + //Show it tabWidget->show(); diff --git a/imageviewer-qt4.h b/imageviewer-qt4.h index a33b106..1f7a299 100644 --- a/imageviewer-qt4.h +++ b/imageviewer-qt4.h @@ -138,6 +138,15 @@ class ImageViewer : public QMainWindow { QComboBox* filter_mode_combobox; QPushButton* apply_border_mode_filter; + // Fifth task tabWidget + QWidget* task_tab5_widget; + QVBoxLayout* task_tab5_vboxlayout; + QWidget* task_tab5_scrollwidget; + QScrollArea* task_tab5_scrollarea; + QVBoxLayout* task_tab5_scrolllayout; + + QPushButton* run_canny_edge; + // "My" space for storing data/results LazyImage* original; LazyImage* working_copy;