From 102a38e5ae8f56ef6692e5a9340b002a3e778053 Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Wed, 6 Jan 2016 16:24:24 +0100 Subject: [PATCH] [TASK] Add tab for task #6. --- imageviewer-qt4.cpp | 18 ++++++++++++++++++ imageviewer-qt4.h | 7 +++++++ 2 files changed, 25 insertions(+) diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index 007f6ce..d909dd7 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -1091,6 +1091,24 @@ void ImageViewer::generateControlPanels() { tabWidget->addTab(task_tab5_widget, "Task #5"); + + // Tab for sixth task + task_tab6_widget = new QWidget(); + task_tab6_vboxlayout = new QVBoxLayout(); + task_tab6_widget->setLayout(task_tab6_vboxlayout); + task_tab6_scrollwidget = new QWidget(); + task_tab6_scrollarea = new QScrollArea(); + task_tab6_scrollarea->setWidgetResizable(true); + task_tab6_scrollarea->setWidget(task_tab6_scrollwidget); + task_tab6_vboxlayout->addWidget(task_tab6_scrollarea); + task_tab6_scrolllayout = new QVBoxLayout(); + task_tab6_scrolllayout->setSizeConstraint(QLayout::SetMaximumSize); + task_tab6_scrollwidget->setLayout(task_tab6_scrolllayout); + + task_tab6_scrolllayout->addWidget(new QLabel("Task #6 and stuff")); + + tabWidget->addTab(task_tab6_widget, "Task #6"); + //Show it tabWidget->show(); diff --git a/imageviewer-qt4.h b/imageviewer-qt4.h index 25c151f..2c622be 100644 --- a/imageviewer-qt4.h +++ b/imageviewer-qt4.h @@ -160,6 +160,13 @@ class ImageViewer : public QMainWindow { QDoubleSpinBox* usm_gauss_width; QDoubleSpinBox* usm_gauss_sigma; + // Sixth task tabWidget + QWidget* task_tab6_widget; + QVBoxLayout* task_tab6_vboxlayout; + QWidget* task_tab6_scrollwidget; + QScrollArea* task_tab6_scrollarea; + QVBoxLayout* task_tab6_scrolllayout; + // "My" space for storing data/results LazyImage* original; LazyImage* working_copy;