[TASK] Prepare third tab in advance.

This commit is contained in:
Jan Philipp Timme 2015-11-06 12:15:41 +01:00
parent 314ca30f92
commit 6af05f9c79
3 changed files with 21 additions and 6 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ Makefile
*~
*.o
moc_*
*.kdev4

View File

@ -287,10 +287,14 @@ void ImageViewer::generateControlPanels() {
task_tab1->addWidget(lineSlider);
task_tab1->addWidget(new QLabel("Sets the width of the cross."));
tabWidget->addTab(task_tab_widget1,"Task #1");
tabWidget->addTab(task_tab_widget1, "Task #1");
//Tab for second task
task_tab_widget2 = new QWidget();
task_tab2 = new QVBoxLayout();
task_tab_widget2->setLayout(task_tab2);
task_tab2_button1 = new QPushButton();
task_tab2_button1->setText("Analyze image");
QObject::connect(task_tab2_button1, SIGNAL(clicked()), this, SLOT (analyzeImage()));
@ -303,15 +307,21 @@ void ImageViewer::generateControlPanels() {
task_tab2_stats = new QLabel();
task_tab2_stats->setText("Results will go here ...");
task_tab_widget2 = new QWidget();
task_tab2 = new QVBoxLayout();
task_tab_widget2->setLayout(task_tab2);
task_tab2->addWidget(task_tab2_button1);
task_tab2->addWidget(task_tab2_stats);
task_tab2->addWidget(histogrammLabel);
tabWidget->addTab(task_tab_widget2,"Task #2");
tabWidget->addTab(task_tab_widget2, "Task #2");
//Tab for third task
task_tab_widget3 = new QWidget();
task_tab3 = new QVBoxLayout();
task_tab_widget3->setLayout(task_tab3);
tabWidget->addTab(task_tab_widget3, "Task #3");
//Show it
tabWidget->show();
}

View File

@ -86,6 +86,10 @@ class ImageViewer : public QMainWindow {
QLabel* task_tab2_stats;
QLabel* histogrammLabel;
// Third task tab
QWidget* task_tab_widget3;
QVBoxLayout* task_tab3;
// "My" space for storing data/results
int grayscale_absolute_histogramm[256];
double grayscale_relative_histogramm[256];