2016-12-06 01:48:26 +01:00
|
|
|
#ifndef OPTIONSDIALOG_H
|
|
|
|
#define OPTIONSDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2018-11-02 20:01:19 +01:00
|
|
|
#include "common/config.h"
|
2016-12-06 01:48:26 +01:00
|
|
|
#include "palette.h"
|
2016-12-07 21:38:36 +01:00
|
|
|
#include "units.h"
|
2018-07-23 23:53:58 +02:00
|
|
|
|
2016-12-06 01:48:26 +01:00
|
|
|
class ColorBox;
|
|
|
|
class StyleComboBox;
|
2017-05-22 23:41:01 +02:00
|
|
|
class OddSpinBox;
|
2016-12-06 01:48:26 +01:00
|
|
|
class QSpinBox;
|
|
|
|
class QDoubleSpinBox;
|
|
|
|
class QComboBox;
|
|
|
|
class QCheckBox;
|
2017-08-28 15:25:45 +02:00
|
|
|
class QRadioButton;
|
2017-08-24 17:29:59 +02:00
|
|
|
class PercentSlider;
|
2019-05-14 23:01:24 +02:00
|
|
|
class LimitedComboBox;
|
2016-12-06 01:48:26 +01:00
|
|
|
|
|
|
|
struct Options {
|
|
|
|
// Appearance
|
|
|
|
Palette palette;
|
|
|
|
int trackWidth;
|
|
|
|
int routeWidth;
|
2019-01-31 01:46:53 +01:00
|
|
|
int areaWidth;
|
2016-12-06 01:48:26 +01:00
|
|
|
Qt::PenStyle trackStyle;
|
|
|
|
Qt::PenStyle routeStyle;
|
2019-01-31 01:46:53 +01:00
|
|
|
Qt::PenStyle areaStyle;
|
|
|
|
int areaOpacity;
|
2017-09-10 12:42:49 +02:00
|
|
|
QColor waypointColor;
|
|
|
|
QColor poiColor;
|
|
|
|
int waypointSize;
|
|
|
|
int poiSize;
|
2016-12-06 01:48:26 +01:00
|
|
|
int graphWidth;
|
2017-12-03 00:36:52 +01:00
|
|
|
QColor sliderColor;
|
2016-12-06 01:48:26 +01:00
|
|
|
bool pathAntiAliasing;
|
|
|
|
bool graphAntiAliasing;
|
2017-09-10 12:42:49 +02:00
|
|
|
int mapOpacity;
|
2017-09-15 00:07:09 +02:00
|
|
|
QColor backgroundColor;
|
2018-09-11 00:33:20 +02:00
|
|
|
// Map
|
2019-05-14 23:01:24 +02:00
|
|
|
int projection;
|
2018-09-11 00:33:20 +02:00
|
|
|
#ifdef ENABLE_HIDPI
|
|
|
|
bool hidpiMap;
|
|
|
|
#endif // ENABLE_HIDPI
|
2017-05-22 14:54:22 +02:00
|
|
|
// Data
|
|
|
|
int elevationFilter;
|
|
|
|
int speedFilter;
|
|
|
|
int heartRateFilter;
|
|
|
|
int cadenceFilter;
|
|
|
|
int powerFilter;
|
|
|
|
bool outlierEliminate;
|
2019-11-13 08:27:54 +01:00
|
|
|
bool automaticPause;
|
2017-05-22 14:54:22 +02:00
|
|
|
qreal pauseSpeed;
|
|
|
|
int pauseInterval;
|
2018-06-21 20:54:24 +02:00
|
|
|
bool useReportedSpeed;
|
2019-01-22 23:01:40 +01:00
|
|
|
bool dataUseDEM;
|
2020-03-25 23:08:26 +01:00
|
|
|
bool showSecondaryElevation;
|
|
|
|
bool showSecondarySpeed;
|
2016-12-06 01:48:26 +01:00
|
|
|
// POI
|
|
|
|
int poiRadius;
|
|
|
|
// System
|
|
|
|
bool useOpenGL;
|
2018-07-23 23:53:58 +02:00
|
|
|
#ifdef ENABLE_HTTP2
|
|
|
|
bool enableHTTP2;
|
|
|
|
#endif // ENABLE_HTTP2
|
2017-05-03 23:55:16 +02:00
|
|
|
int pixmapCache;
|
2018-04-27 19:31:27 +02:00
|
|
|
int connectionTimeout;
|
2016-12-16 02:30:58 +01:00
|
|
|
// Print/Export
|
2017-08-28 15:25:45 +02:00
|
|
|
bool hiresPrint;
|
2016-12-16 02:30:58 +01:00
|
|
|
bool printName;
|
|
|
|
bool printDate;
|
|
|
|
bool printDistance;
|
|
|
|
bool printTime;
|
2017-01-31 09:37:01 +01:00
|
|
|
bool printMovingTime;
|
2016-12-16 02:30:58 +01:00
|
|
|
bool printItemCount;
|
|
|
|
bool separateGraphPage;
|
2016-12-07 21:38:36 +01:00
|
|
|
|
|
|
|
Units units;
|
2016-12-06 01:48:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
class OptionsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2019-05-14 23:01:24 +02:00
|
|
|
public slots:
|
|
|
|
void accept();
|
|
|
|
|
2016-12-06 01:48:26 +01:00
|
|
|
public:
|
|
|
|
OptionsDialog(Options *options, QWidget *parent = 0);
|
|
|
|
|
2019-11-13 08:27:54 +01:00
|
|
|
private slots:
|
|
|
|
void automaticPauseDetectionSet(bool set);
|
|
|
|
|
2016-12-06 01:48:26 +01:00
|
|
|
private:
|
2018-09-11 00:33:20 +02:00
|
|
|
QWidget *createMapPage();
|
2016-12-06 01:48:26 +01:00
|
|
|
QWidget *createAppearancePage();
|
2017-05-22 14:54:22 +02:00
|
|
|
QWidget *createDataPage();
|
2016-12-06 01:48:26 +01:00
|
|
|
QWidget *createPOIPage();
|
|
|
|
QWidget *createSystemPage();
|
2016-12-16 02:30:58 +01:00
|
|
|
QWidget *createExportPage();
|
2016-12-06 01:48:26 +01:00
|
|
|
|
|
|
|
Options *_options;
|
|
|
|
|
2017-05-22 14:54:22 +02:00
|
|
|
// Appearance
|
2016-12-06 01:48:26 +01:00
|
|
|
ColorBox *_baseColor;
|
|
|
|
QDoubleSpinBox *_colorOffset;
|
2017-08-24 17:29:59 +02:00
|
|
|
PercentSlider *_mapOpacity;
|
2017-09-15 00:07:09 +02:00
|
|
|
ColorBox *_backgroundColor;
|
2016-12-06 01:48:26 +01:00
|
|
|
QSpinBox *_trackWidth;
|
|
|
|
StyleComboBox *_trackStyle;
|
|
|
|
QSpinBox *_routeWidth;
|
|
|
|
StyleComboBox *_routeStyle;
|
2019-01-31 01:46:53 +01:00
|
|
|
QSpinBox *_areaWidth;
|
|
|
|
StyleComboBox *_areaStyle;
|
|
|
|
PercentSlider *_areaOpacity;
|
2016-12-06 01:48:26 +01:00
|
|
|
QCheckBox *_pathAA;
|
2017-09-10 12:42:49 +02:00
|
|
|
QSpinBox *_waypointSize;
|
|
|
|
ColorBox *_waypointColor;
|
|
|
|
QSpinBox *_poiSize;
|
|
|
|
ColorBox *_poiColor;
|
2016-12-06 01:48:26 +01:00
|
|
|
QSpinBox *_graphWidth;
|
2017-12-03 00:36:52 +01:00
|
|
|
ColorBox *_sliderColor;
|
2016-12-06 01:48:26 +01:00
|
|
|
QCheckBox *_graphAA;
|
2018-09-11 00:33:20 +02:00
|
|
|
// Map
|
2019-05-14 23:01:24 +02:00
|
|
|
LimitedComboBox *_projection;
|
2018-09-11 00:33:20 +02:00
|
|
|
#ifdef ENABLE_HIDPI
|
|
|
|
QRadioButton *_hidpi;
|
|
|
|
QRadioButton *_lodpi;
|
|
|
|
#endif // ENABLE_HIDPI
|
2017-05-22 14:54:22 +02:00
|
|
|
// Data
|
2017-05-22 23:41:01 +02:00
|
|
|
OddSpinBox *_elevationFilter;
|
|
|
|
OddSpinBox *_speedFilter;
|
|
|
|
OddSpinBox *_heartRateFilter;
|
|
|
|
OddSpinBox *_cadenceFilter;
|
|
|
|
OddSpinBox *_powerFilter;
|
2017-05-22 14:54:22 +02:00
|
|
|
QCheckBox *_outlierEliminate;
|
2019-11-13 08:27:54 +01:00
|
|
|
|
|
|
|
QRadioButton *_automaticPause;
|
|
|
|
QRadioButton *_manualPause;
|
2017-05-22 14:54:22 +02:00
|
|
|
QDoubleSpinBox *_pauseSpeed;
|
|
|
|
QSpinBox *_pauseInterval;
|
2019-01-06 18:45:09 +01:00
|
|
|
QRadioButton *_computedSpeed;
|
|
|
|
QRadioButton *_reportedSpeed;
|
2019-01-22 23:01:40 +01:00
|
|
|
QRadioButton *_dataGPSElevation;
|
|
|
|
QRadioButton *_dataDEMElevation;
|
2020-03-25 23:08:26 +01:00
|
|
|
QCheckBox *_showSecondaryElevation;
|
|
|
|
QCheckBox *_showSecondarySpeed;
|
2017-05-22 14:54:22 +02:00
|
|
|
// POI
|
2016-12-06 01:48:26 +01:00
|
|
|
QDoubleSpinBox *_poiRadius;
|
2017-05-22 14:54:22 +02:00
|
|
|
// System
|
2017-05-03 23:55:16 +02:00
|
|
|
QSpinBox *_pixmapCache;
|
2018-04-27 19:31:27 +02:00
|
|
|
QSpinBox *_connectionTimeout;
|
2016-12-06 01:48:26 +01:00
|
|
|
QCheckBox *_useOpenGL;
|
2018-07-23 23:53:58 +02:00
|
|
|
#ifdef ENABLE_HTTP2
|
|
|
|
QCheckBox *_enableHTTP2;
|
|
|
|
#endif // ENABLE_HTTP2
|
2017-05-22 14:54:22 +02:00
|
|
|
// Print/Export
|
2017-08-28 15:25:45 +02:00
|
|
|
QRadioButton *_wysiwyg;
|
|
|
|
QRadioButton *_hires;
|
2016-12-16 02:30:58 +01:00
|
|
|
QCheckBox *_name;
|
|
|
|
QCheckBox *_date;
|
|
|
|
QCheckBox *_distance;
|
|
|
|
QCheckBox *_time;
|
2017-01-31 09:37:01 +01:00
|
|
|
QCheckBox *_movingTime;
|
2016-12-16 02:30:58 +01:00
|
|
|
QCheckBox *_itemCount;
|
|
|
|
QCheckBox *_separateGraphPage;
|
2016-12-06 01:48:26 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // OPTIONSDIALOG_H
|