9 #ifndef UI_MAINWINDOW_H
10 #define UI_MAINWINDOW_H
12 #include <QtCore/QVariant>
13 #include <QtWidgets/QAction>
14 #include <QtWidgets/QApplication>
15 #include <QtWidgets/QButtonGroup>
16 #include <QtWidgets/QCheckBox>
17 #include <QtWidgets/QComboBox>
18 #include <QtWidgets/QGridLayout>
19 #include <QtWidgets/QHBoxLayout>
20 #include <QtWidgets/QHeaderView>
21 #include <QtWidgets/QLabel>
22 #include <QtWidgets/QLineEdit>
23 #include <QtWidgets/QMainWindow>
24 #include <QtWidgets/QMenu>
25 #include <QtWidgets/QMenuBar>
26 #include <QtWidgets/QPlainTextEdit>
27 #include <QtWidgets/QPushButton>
28 #include <QtWidgets/QSpacerItem>
29 #include <QtWidgets/QStatusBar>
30 #include <QtWidgets/QTabWidget>
31 #include <QtWidgets/QTableView>
32 #include <QtWidgets/QToolBar>
33 #include <QtWidgets/QToolButton>
34 #include <QtWidgets/QVBoxLayout>
35 #include <QtWidgets/QWidget>
43 QAction *actionSample;
45 QAction *actionOutput;
46 QWidget *centralWidget;
47 QGridLayout *gridLayout_5;
48 QHBoxLayout *horizontalLayout_3;
49 QTabWidget *tabWidget;
51 QHBoxLayout *horizontalLayout_4;
52 QGridLayout *gridLayout;
58 QToolButton *toolButton_input;
66 QToolButton *toolButton_output;
67 QToolButton *toolButton_sample;
70 QHBoxLayout *horizontalLayout_5;
71 QGridLayout *gridLayout_4;
73 QSpacerItem *verticalSpacer;
79 QToolButton *toolButton_createTable;
83 QSpacerItem *verticalSpacer_2;
84 QVBoxLayout *verticalLayout_2;
86 QTableView *tableView_labels;
89 QHBoxLayout *horizontalLayout_6;
90 QVBoxLayout *verticalLayout;
92 QLineEdit *commandLineEdit;
94 QPlainTextEdit *consoleEdit;
95 QHBoxLayout *horizontalLayout;
96 QPushButton *pushButton_run;
97 QSpacerItem *horizontalSpacer;
98 QPushButton *pushButton_restore;
101 QToolBar *mainToolBar;
102 QStatusBar *statusBar;
106 if (MainWindow->objectName().isEmpty())
107 MainWindow->setObjectName(QStringLiteral(
"MainWindow"));
108 MainWindow->resize(703, 706);
109 actionInput =
new QAction(MainWindow);
110 actionInput->setObjectName(QStringLiteral(
"actionInput"));
111 actionSample =
new QAction(MainWindow);
112 actionSample->setObjectName(QStringLiteral(
"actionSample"));
113 actionMask =
new QAction(MainWindow);
114 actionMask->setObjectName(QStringLiteral(
"actionMask"));
115 actionOutput =
new QAction(MainWindow);
116 actionOutput->setObjectName(QStringLiteral(
"actionOutput"));
117 centralWidget =
new QWidget(MainWindow);
118 centralWidget->setObjectName(QStringLiteral(
"centralWidget"));
119 centralWidget->setMinimumSize(QSize(423, 392));
120 gridLayout_5 =
new QGridLayout(centralWidget);
121 gridLayout_5->setSpacing(6);
122 gridLayout_5->setContentsMargins(11, 11, 11, 11);
123 gridLayout_5->setObjectName(QStringLiteral(
"gridLayout_5"));
124 horizontalLayout_3 =
new QHBoxLayout();
125 horizontalLayout_3->setSpacing(6);
126 horizontalLayout_3->setObjectName(QStringLiteral(
"horizontalLayout_3"));
127 tabWidget =
new QTabWidget(centralWidget);
128 tabWidget->setObjectName(QStringLiteral(
"tabWidget"));
129 tab_2 =
new QWidget();
130 tab_2->setObjectName(QStringLiteral(
"tab_2"));
131 horizontalLayout_4 =
new QHBoxLayout(tab_2);
132 horizontalLayout_4->setSpacing(6);
133 horizontalLayout_4->setContentsMargins(11, 11, 11, 11);
134 horizontalLayout_4->setObjectName(QStringLiteral(
"horizontalLayout_4"));
135 gridLayout =
new QGridLayout();
136 gridLayout->setSpacing(6);
137 gridLayout->setObjectName(QStringLiteral(
"gridLayout"));
138 label_14 =
new QLabel(tab_2);
139 label_14->setObjectName(QStringLiteral(
"label_14"));
141 gridLayout->addWidget(label_14, 1, 3, 1, 1);
143 bndnodata =
new QLineEdit(tab_2);
144 bndnodata->setObjectName(QStringLiteral(
"bndnodata"));
146 gridLayout->addWidget(bndnodata, 1, 1, 1, 1);
148 label_13 =
new QLabel(tab_2);
149 label_13->setObjectName(QStringLiteral(
"label_13"));
151 gridLayout->addWidget(label_13, 1, 0, 1, 1);
153 output =
new QLineEdit(tab_2);
154 output->setObjectName(QStringLiteral(
"output"));
156 gridLayout->addWidget(output, 3, 1, 1, 1);
158 input =
new QLineEdit(tab_2);
159 input->setObjectName(QStringLiteral(
"input"));
161 gridLayout->addWidget(input, 0, 1, 1, 1);
163 toolButton_input =
new QToolButton(tab_2);
164 toolButton_input->setObjectName(QStringLiteral(
"toolButton_input"));
166 gridLayout->addWidget(toolButton_input, 0, 2, 1, 1);
168 f =
new QComboBox(tab_2);
169 f->setObjectName(QStringLiteral(
"f"));
171 gridLayout->addWidget(f, 3, 4, 1, 1);
173 label_16 =
new QLabel(tab_2);
174 label_16->setObjectName(QStringLiteral(
"label_16"));
176 gridLayout->addWidget(label_16, 3, 3, 1, 1);
178 label_15 =
new QLabel(tab_2);
179 label_15->setObjectName(QStringLiteral(
"label_15"));
181 gridLayout->addWidget(label_15, 3, 0, 1, 1);
183 label_3 =
new QLabel(tab_2);
184 label_3->setObjectName(QStringLiteral(
"label_3"));
186 gridLayout->addWidget(label_3, 0, 0, 1, 1);
188 sample =
new QLineEdit(tab_2);
189 sample->setObjectName(QStringLiteral(
"sample"));
191 gridLayout->addWidget(sample, 2, 1, 1, 1);
193 label_23 =
new QLabel(tab_2);
194 label_23->setObjectName(QStringLiteral(
"label_23"));
196 gridLayout->addWidget(label_23, 2, 0, 1, 1);
198 srcnodata =
new QLineEdit(tab_2);
199 srcnodata->setObjectName(QStringLiteral(
"srcnodata"));
201 gridLayout->addWidget(srcnodata, 1, 4, 1, 1);
203 toolButton_output =
new QToolButton(tab_2);
204 toolButton_output->setObjectName(QStringLiteral(
"toolButton_output"));
206 gridLayout->addWidget(toolButton_output, 3, 2, 1, 1);
208 toolButton_sample =
new QToolButton(tab_2);
209 toolButton_sample->setObjectName(QStringLiteral(
"toolButton_sample"));
211 gridLayout->addWidget(toolButton_sample, 2, 2, 1, 1);
213 polygon =
new QCheckBox(tab_2);
214 polygon->setObjectName(QStringLiteral(
"polygon"));
216 gridLayout->addWidget(polygon, 4, 3, 1, 1);
219 horizontalLayout_4->addLayout(gridLayout);
221 tabWidget->addTab(tab_2, QString());
223 tab->setObjectName(QStringLiteral(
"tab"));
224 horizontalLayout_5 =
new QHBoxLayout(tab);
225 horizontalLayout_5->setSpacing(6);
226 horizontalLayout_5->setContentsMargins(11, 11, 11, 11);
227 horizontalLayout_5->setObjectName(QStringLiteral(
"horizontalLayout_5"));
228 gridLayout_4 =
new QGridLayout();
229 gridLayout_4->setSpacing(6);
230 gridLayout_4->setObjectName(QStringLiteral(
"gridLayout_4"));
231 bname =
new QLineEdit(tab);
232 bname->setObjectName(QStringLiteral(
"bname"));
234 gridLayout_4->addWidget(bname, 1, 1, 1, 1);
236 verticalSpacer =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
238 gridLayout_4->addItem(verticalSpacer, 2, 1, 1, 1);
240 label_20 =
new QLabel(tab);
241 label_20->setObjectName(QStringLiteral(
"label_20"));
243 gridLayout_4->addWidget(label_20, 4, 0, 1, 1);
245 rule =
new QComboBox(tab);
246 rule->setObjectName(QStringLiteral(
"rule"));
248 gridLayout_4->addWidget(rule, 0, 1, 1, 1);
250 label_4 =
new QLabel(tab);
251 label_4->setObjectName(QStringLiteral(
"label_4"));
253 gridLayout_4->addWidget(label_4, 0, 0, 1, 1);
255 nclass =
new QLineEdit(tab);
256 nclass->setObjectName(QStringLiteral(
"nclass"));
257 QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
258 sizePolicy.setHorizontalStretch(10);
259 sizePolicy.setVerticalStretch(0);
260 sizePolicy.setHeightForWidth(nclass->sizePolicy().hasHeightForWidth());
261 nclass->setSizePolicy(sizePolicy);
263 gridLayout_4->addWidget(nclass, 4, 1, 1, 1);
265 label_21 =
new QLabel(tab);
266 label_21->setObjectName(QStringLiteral(
"label_21"));
268 gridLayout_4->addWidget(label_21, 3, 1, 1, 1);
270 toolButton_createTable =
new QToolButton(tab);
271 toolButton_createTable->setObjectName(QStringLiteral(
"toolButton_createTable"));
273 gridLayout_4->addWidget(toolButton_createTable, 4, 2, 1, 1);
275 label_2 =
new QLabel(tab);
276 label_2->setObjectName(QStringLiteral(
"label_2"));
278 gridLayout_4->addWidget(label_2, 1, 0, 1, 1);
280 label =
new QLabel(tab);
281 label->setObjectName(QStringLiteral(
"label"));
283 gridLayout_4->addWidget(label, 5, 0, 1, 1);
285 threshold =
new QLineEdit(tab);
286 threshold->setObjectName(QStringLiteral(
"threshold"));
288 gridLayout_4->addWidget(threshold, 5, 1, 1, 1);
290 verticalSpacer_2 =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
292 gridLayout_4->addItem(verticalSpacer_2, 6, 0, 1, 1);
295 horizontalLayout_5->addLayout(gridLayout_4);
297 verticalLayout_2 =
new QVBoxLayout();
298 verticalLayout_2->setSpacing(6);
299 verticalLayout_2->setObjectName(QStringLiteral(
"verticalLayout_2"));
300 label_17 =
new QLabel(tab);
301 label_17->setObjectName(QStringLiteral(
"label_17"));
303 verticalLayout_2->addWidget(label_17);
305 tableView_labels =
new QTableView(tab);
306 tableView_labels->setObjectName(QStringLiteral(
"tableView_labels"));
308 verticalLayout_2->addWidget(tableView_labels);
310 label_22 =
new QLabel(tab);
311 label_22->setObjectName(QStringLiteral(
"label_22"));
313 verticalLayout_2->addWidget(label_22, 0, Qt::AlignHCenter);
316 horizontalLayout_5->addLayout(verticalLayout_2);
318 tabWidget->addTab(tab, QString());
319 tab_4 =
new QWidget();
320 tab_4->setObjectName(QStringLiteral(
"tab_4"));
321 horizontalLayout_6 =
new QHBoxLayout(tab_4);
322 horizontalLayout_6->setSpacing(6);
323 horizontalLayout_6->setContentsMargins(11, 11, 11, 11);
324 horizontalLayout_6->setObjectName(QStringLiteral(
"horizontalLayout_6"));
325 verticalLayout =
new QVBoxLayout();
326 verticalLayout->setSpacing(6);
327 verticalLayout->setObjectName(QStringLiteral(
"verticalLayout"));
328 label_18 =
new QLabel(tab_4);
329 label_18->setObjectName(QStringLiteral(
"label_18"));
331 verticalLayout->addWidget(label_18);
333 commandLineEdit =
new QLineEdit(tab_4);
334 commandLineEdit->setObjectName(QStringLiteral(
"commandLineEdit"));
336 verticalLayout->addWidget(commandLineEdit);
338 label_19 =
new QLabel(tab_4);
339 label_19->setObjectName(QStringLiteral(
"label_19"));
341 verticalLayout->addWidget(label_19);
343 consoleEdit =
new QPlainTextEdit(tab_4);
344 consoleEdit->setObjectName(QStringLiteral(
"consoleEdit"));
346 verticalLayout->addWidget(consoleEdit);
349 horizontalLayout_6->addLayout(verticalLayout);
351 tabWidget->addTab(tab_4, QString());
353 horizontalLayout_3->addWidget(tabWidget);
356 gridLayout_5->addLayout(horizontalLayout_3, 0, 0, 1, 1);
358 horizontalLayout =
new QHBoxLayout();
359 horizontalLayout->setSpacing(6);
360 horizontalLayout->setObjectName(QStringLiteral(
"horizontalLayout"));
361 pushButton_run =
new QPushButton(centralWidget);
362 pushButton_run->setObjectName(QStringLiteral(
"pushButton_run"));
364 horizontalLayout->addWidget(pushButton_run);
366 horizontalSpacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
368 horizontalLayout->addItem(horizontalSpacer);
370 pushButton_restore =
new QPushButton(centralWidget);
371 pushButton_restore->setObjectName(QStringLiteral(
"pushButton_restore"));
373 horizontalLayout->addWidget(pushButton_restore);
376 gridLayout_5->addLayout(horizontalLayout, 1, 0, 1, 1);
378 MainWindow->setCentralWidget(centralWidget);
379 menuBar =
new QMenuBar(MainWindow);
380 menuBar->setObjectName(QStringLiteral(
"menuBar"));
381 menuBar->setGeometry(QRect(0, 0, 703, 27));
382 menuFile =
new QMenu(menuBar);
383 menuFile->setObjectName(QStringLiteral(
"menuFile"));
384 MainWindow->setMenuBar(menuBar);
385 mainToolBar =
new QToolBar(MainWindow);
386 mainToolBar->setObjectName(QStringLiteral(
"mainToolBar"));
387 MainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
388 statusBar =
new QStatusBar(MainWindow);
389 statusBar->setObjectName(QStringLiteral(
"statusBar"));
390 MainWindow->setStatusBar(statusBar);
391 QWidget::setTabOrder(input, toolButton_input);
392 QWidget::setTabOrder(toolButton_input, bndnodata);
393 QWidget::setTabOrder(bndnodata, srcnodata);
394 QWidget::setTabOrder(srcnodata, sample);
395 QWidget::setTabOrder(sample, toolButton_sample);
396 QWidget::setTabOrder(toolButton_sample, output);
397 QWidget::setTabOrder(output, toolButton_output);
398 QWidget::setTabOrder(toolButton_output, f);
399 QWidget::setTabOrder(f, polygon);
400 QWidget::setTabOrder(polygon, rule);
401 QWidget::setTabOrder(rule, bname);
402 QWidget::setTabOrder(bname, nclass);
403 QWidget::setTabOrder(nclass, toolButton_createTable);
404 QWidget::setTabOrder(toolButton_createTable, threshold);
405 QWidget::setTabOrder(threshold, consoleEdit);
406 QWidget::setTabOrder(consoleEdit, pushButton_run);
407 QWidget::setTabOrder(pushButton_run, pushButton_restore);
408 QWidget::setTabOrder(pushButton_restore, tabWidget);
409 QWidget::setTabOrder(tabWidget, tableView_labels);
410 QWidget::setTabOrder(tableView_labels, commandLineEdit);
412 menuBar->addAction(menuFile->menuAction());
413 menuFile->addAction(actionInput);
414 menuFile->addAction(actionMask);
415 menuFile->addAction(actionSample);
416 menuFile->addAction(actionOutput);
418 retranslateUi(MainWindow);
420 tabWidget->setCurrentIndex(0);
423 QMetaObject::connectSlotsByName(MainWindow);
426 void retranslateUi(QMainWindow *MainWindow)
428 MainWindow->setWindowTitle(QApplication::translate(
"MainWindow",
"pkextract_gui", 0));
429 actionInput->setText(QApplication::translate(
"MainWindow",
"Input", 0));
430 actionSample->setText(QApplication::translate(
"MainWindow",
"Sample", 0));
431 actionMask->setText(QApplication::translate(
"MainWindow",
"Mask", 0));
432 actionOutput->setText(QApplication::translate(
"MainWindow",
"Output", 0));
433 #ifndef QT_NO_TOOLTIP
434 label_14->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>invalid value(s) for input image</p></body></html>", 0));
435 #endif // QT_NO_TOOLTIP
436 label_14->setText(QApplication::translate(
"MainWindow",
"srcnodata", 0));
437 #ifndef QT_NO_TOOLTIP
438 label_13->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>Band(s) in input image to check if pixel is valid (used for srcnodata)</p></body></html>", 0));
439 #endif // QT_NO_TOOLTIP
440 label_13->setText(QApplication::translate(
"MainWindow",
"bndnodata", 0));
441 toolButton_input->setText(QApplication::translate(
"MainWindow",
"...", 0));
442 #ifndef QT_NO_TOOLTIP
443 label_16->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>OGR supported vector format</p></body></html>", 0));
444 #endif // QT_NO_TOOLTIP
445 label_16->setText(QApplication::translate(
"MainWindow",
"format", 0));
446 #ifndef QT_NO_TOOLTIP
447 label_15->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>Output will contain sample features with input band information included</p></body></html>", 0));
448 #endif // QT_NO_TOOLTIP
449 label_15->setText(QApplication::translate(
"MainWindow",
"Output data", 0));
450 #ifndef QT_NO_TOOLTIP
451 label_3->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>Raster input dataset containing band information</p></body></html>", 0));
452 #endif // QT_NO_TOOLTIP
453 label_3->setText(QApplication::translate(
"MainWindow",
"Input data", 0));
454 #ifndef QT_NO_TOOLTIP
455 label_23->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>OGR vector file with features to be extracted from input data. Output will contain features with input band information included. Sample image can also be GDAL raster dataset.</p></body></html>", 0));
456 #endif // QT_NO_TOOLTIP
457 label_23->setText(QApplication::translate(
"MainWindow",
"Sample image", 0));
458 toolButton_output->setText(QApplication::translate(
"MainWindow",
"...", 0));
459 toolButton_sample->setText(QApplication::translate(
"MainWindow",
"...", 0));
460 #ifndef QT_NO_TOOLTIP
461 polygon->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>Keep output features as polygons (only if input vector are polygons as well)</p></body></html>", 0));
462 #endif // QT_NO_TOOLTIP
463 polygon->setText(QApplication::translate(
"MainWindow",
"polygons", 0));
464 tabWidget->setTabText(tabWidget->indexOf(tab_2), QApplication::translate(
"MainWindow",
"Input/Output", 0));
465 #ifndef QT_NO_TOOLTIP
466 label_20->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>Prepare a table with class names. To prepare the table, first enter the number of classes and then press the button '->'. </p><p>Prepare a class table only in two cases:</p><p>1) The sample is a raster file and you want to select a subset of classes, with each a defined threshold (in percentage). A threshold of 50 means you want half of the pixels to be selected.</p><p>2) The sample is a vector file and the extraction rule is either 'proportion' or 'maxvote'. For 'proportion', define only the clas(ses) for which you want to calculate the proportion (e.g. proportion with respect to remaining classes). For 'maxvote', define all the (e.g. land cover) classes in the input raster map</p><p>In all other cases, do NOT prepare a class table</p></body></html>", 0));
467 #endif // QT_NO_TOOLTIP
468 label_20->setText(QApplication::translate(
"MainWindow",
"prepare table ", 0));
469 #ifndef QT_NO_TOOLTIP
470 label_4->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>Rule how to extract the features from the input data</p></body></html>", 0));
471 #endif // QT_NO_TOOLTIP
472 label_4->setText(QApplication::translate(
"MainWindow",
"extraction rule", 0));
473 label_21->setText(QApplication::translate(
"MainWindow",
"# classes", 0));
474 #ifndef QT_NO_TOOLTIP
475 toolButton_createTable->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>Prepare a table with class names. To prepare the table, first enter the number of classes and then press the button '->'. </p><p>Prepare a class table only in two cases:</p><p>1) The sample is a raster file and you want to select a subset of classes, with each a defined threshold (in percentage). A threshold of 50 means you want half of the pixels to be selected.</p><p>2) The sample is a vector file and the extraction rule is either 'proportion' or 'maxvote'. For 'proportion', define only the clas(ses) for which you want to calculate the proportion (e.g. proportion with respect to remaining classes). For 'maxvote', define all the (e.g. land cover) classes in the input raster map</p><p>In all other cases, do NOT prepare a class table</p></body></html>", 0));
476 #endif // QT_NO_TOOLTIP
477 toolButton_createTable->setText(QApplication::translate(
"MainWindow",
"->", 0));
478 #ifndef QT_NO_TOOLTIP
479 label_2->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>For single band input data, this extra attribute name will correspond to the raster values. For multi-band input data, multiple attributes with this prefix will be added (e.g. B0, B1, B2, etc.)</p></body></html>", 0));
480 #endif // QT_NO_TOOLTIP
481 label_2->setText(QApplication::translate(
"MainWindow",
"attribute (prefix) name for raster info", 0));
482 #ifndef QT_NO_TOOLTIP
483 label->setToolTip(QApplication::translate(
"MainWindow",
"<html><head/><body><p>Threshold value for selection process. Select this percentage of the raster pixels (if sample is a raster dataset) or this percentage of the features in the vector file (if sample is a vector file). In case the sample is a land cover raster dataset, you can also define a threshold for each land cover class individually by preparing the table on the right.</p></body></html>", 0));
484 #endif // QT_NO_TOOLTIP
485 label->setText(QApplication::translate(
"MainWindow",
"Single threshold", 0));
486 label_17->setText(QApplication::translate(
"MainWindow",
"class name-threshold (%) pairs", 0));
487 label_22->setText(QApplication::translate(
"MainWindow",
"replace label names with\n"
488 " the labels in your training\n"
490 tabWidget->setTabText(tabWidget->indexOf(tab), QApplication::translate(
"MainWindow",
"Extract", 0));
491 label_18->setText(QApplication::translate(
"MainWindow",
"Command line", 0));
492 label_19->setText(QApplication::translate(
"MainWindow",
"Console output", 0));
493 tabWidget->setTabText(tabWidget->indexOf(tab_4), QApplication::translate(
"MainWindow",
"Console", 0));
494 pushButton_run->setText(QApplication::translate(
"MainWindow",
"Run", 0));
495 pushButton_restore->setText(QApplication::translate(
"MainWindow",
"Restore defaults", 0));
496 menuFile->setTitle(QApplication::translate(
"MainWindow",
"File", 0));
507 #endif // UI_MAINWINDOW_H