1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/GUI/optionsdialog.h

170 lines
3.4 KiB
C
Raw Normal View History

2016-12-06 01:48:26 +01:00
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
#include <QDialog>
#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;
class OddSpinBox;
2016-12-06 01:48:26 +01:00
class QSpinBox;
class QDoubleSpinBox;
class QComboBox;
class QCheckBox;
class QRadioButton;
class PercentSlider;
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;
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;
int mapOpacity;
2017-09-15 00:07:09 +02:00
QColor backgroundColor;
// Map
int projection;
#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;
bool dataUseDEM;
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
int pixmapCache;
int connectionTimeout;
// Print/Export
bool hiresPrint;
bool printName;
bool printDate;
bool printDistance;
bool printTime;
bool printMovingTime;
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
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:
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();
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;
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;
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;
// Map
LimitedComboBox *_projection;
#ifdef ENABLE_HIDPI
QRadioButton *_hidpi;
QRadioButton *_lodpi;
#endif // ENABLE_HIDPI
2017-05-22 14:54:22 +02:00
// Data
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;
QRadioButton *_computedSpeed;
QRadioButton *_reportedSpeed;
QRadioButton *_dataGPSElevation;
QRadioButton *_dataDEMElevation;
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
QSpinBox *_pixmapCache;
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
QRadioButton *_wysiwyg;
QRadioButton *_hires;
QCheckBox *_name;
QCheckBox *_date;
QCheckBox *_distance;
QCheckBox *_time;
QCheckBox *_movingTime;
QCheckBox *_itemCount;
QCheckBox *_separateGraphPage;
2016-12-06 01:48:26 +01:00
};
#endif // OPTIONSDIALOG_H