1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-30 22:51:16 +01:00

Moved the area appearance controls to the paths tab + layout polishing

This commit is contained in:
Martin Tůma 2019-02-13 00:45:59 +01:00
parent a6b327f773
commit 69d635be10

View File

@ -127,6 +127,28 @@ QWidget *OptionsDialog::createAppearancePage()
routeBox->setLayout(routeLayout); routeBox->setLayout(routeLayout);
#endif // Q_OS_MAC #endif // Q_OS_MAC
// Areas
_areaWidth = new QSpinBox();
_areaWidth->setValue(_options->areaWidth);
_areaWidth->setMinimum(1);
_areaStyle = new StyleComboBox();
_areaStyle->setValue(_options->areaStyle);
_areaOpacity = new PercentSlider();
_areaOpacity->setValue(_options->areaOpacity);
QFormLayout *areaLayout = new QFormLayout();
#ifdef Q_OS_MAC
areaLayout->addRow(tr("Area border width:"), _areaWidth);
areaLayout->addRow(tr("Area border style:"), _areaStyle);
areaLayout->addRow(tr("Area fill opacity:"), _areaOpacity)
#else // Q_OS_MAC
areaLayout->addRow(tr("Width:"), _areaWidth);
areaLayout->addRow(tr("Style:"), _areaStyle);
areaLayout->addRow(tr("Fill opacity:"), _areaOpacity);
QGroupBox *areaBox = new QGroupBox(tr("Areas"));
areaBox->setLayout(areaLayout);
#endif // Q_OS_MAC
// Palette & antialiasing
_baseColor = new ColorBox(); _baseColor = new ColorBox();
_baseColor->setColor(_options->palette.color()); _baseColor->setColor(_options->palette.color());
_colorOffset = new QDoubleSpinBox(); _colorOffset = new QDoubleSpinBox();
@ -150,9 +172,12 @@ QWidget *OptionsDialog::createAppearancePage()
pathTabLayout->addWidget(line()); pathTabLayout->addWidget(line());
pathTabLayout->addLayout(routeLayout); pathTabLayout->addLayout(routeLayout);
pathTabLayout->addWidget(line()); pathTabLayout->addWidget(line());
pathTabLayout->addLayout(areaLayout);
pathTabLayout->addWidget(line());
#else // Q_OS_MAC #else // Q_OS_MAC
pathTabLayout->addWidget(trackBox); pathTabLayout->addWidget(trackBox);
pathTabLayout->addWidget(routeBox); pathTabLayout->addWidget(routeBox);
pathTabLayout->addWidget(areaBox);
#endif // Q_OS_MAC #endif // Q_OS_MAC
pathTabLayout->addLayout(paletteLayout); pathTabLayout->addLayout(paletteLayout);
pathTabLayout->addLayout(pathAALayout); pathTabLayout->addLayout(pathAALayout);
@ -160,26 +185,6 @@ QWidget *OptionsDialog::createAppearancePage()
pathTab->setLayout(pathTabLayout); pathTab->setLayout(pathTabLayout);
// Areas
_areaWidth = new QSpinBox();
_areaWidth->setValue(_options->areaWidth);
_areaWidth->setMinimum(1);
_areaStyle = new StyleComboBox();
_areaStyle->setValue(_options->areaStyle);
_areaOpacity = new PercentSlider();
_areaOpacity->setValue(_options->areaOpacity);
QFormLayout *areaLayout = new QFormLayout();
areaLayout->addRow(tr("Border width:"), _areaWidth);
areaLayout->addRow(tr("Border style:"), _areaStyle);
areaLayout->addRow(tr("Fill opacity:"), _areaOpacity);
QWidget *areaTab = new QWidget();
QVBoxLayout *areaTabLayout = new QVBoxLayout();
areaTabLayout->addLayout(areaLayout);
areaTabLayout->addStretch();
areaTab->setLayout(areaTabLayout);
// Waypoints // Waypoints
_waypointSize = new QSpinBox(); _waypointSize = new QSpinBox();
_waypointSize->setMinimum(1); _waypointSize->setMinimum(1);
@ -270,7 +275,6 @@ QWidget *OptionsDialog::createAppearancePage()
QTabWidget *appearancePage = new QTabWidget(); QTabWidget *appearancePage = new QTabWidget();
appearancePage->addTab(pathTab, tr("Paths")); appearancePage->addTab(pathTab, tr("Paths"));
appearancePage->addTab(areaTab, tr("Areas"));
appearancePage->addTab(pointTab, tr("Points")); appearancePage->addTab(pointTab, tr("Points"));
appearancePage->addTab(graphTab, tr("Graphs")); appearancePage->addTab(graphTab, tr("Graphs"));
appearancePage->addTab(mapTab, tr("Map")); appearancePage->addTab(mapTab, tr("Map"));
@ -314,10 +318,6 @@ QWidget *OptionsDialog::createDataPage()
QFormLayout *outlierLayout = new QFormLayout(); QFormLayout *outlierLayout = new QFormLayout();
outlierLayout->addWidget(_outlierEliminate); outlierLayout->addWidget(_outlierEliminate);
#ifndef Q_OS_MAC
QGroupBox *outlierBox = new QGroupBox(tr("Outlier elimination"));
outlierBox->setLayout(outlierLayout);
#endif // Q_OS_MAC
QWidget *filterTab = new QWidget(); QWidget *filterTab = new QWidget();
QVBoxLayout *filterTabLayout = new QVBoxLayout(); QVBoxLayout *filterTabLayout = new QVBoxLayout();
@ -325,11 +325,10 @@ QWidget *OptionsDialog::createDataPage()
filterTabLayout->addWidget(new QLabel(tr("Smoothing:"))); filterTabLayout->addWidget(new QLabel(tr("Smoothing:")));
filterTabLayout->addLayout(smoothLayout); filterTabLayout->addLayout(smoothLayout);
filterTabLayout->addWidget(line()); filterTabLayout->addWidget(line());
filterTabLayout->addLayout(outlierLayout);
#else // Q_OS_MAC #else // Q_OS_MAC
filterTabLayout->addWidget(smoothBox); filterTabLayout->addWidget(smoothBox);
filterTabLayout->addWidget(outlierBox);
#endif // Q_OS_MAC #endif // Q_OS_MAC
filterTabLayout->addLayout(outlierLayout);
filterTabLayout->addStretch(); filterTabLayout->addStretch();
filterTab->setLayout(filterTabLayout); filterTab->setLayout(filterTabLayout);