1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-19 12:12:08 +01:00
GPXSee/src/GUI/optionsdialog.h

187 lines
3.8 KiB
C
Raw Normal View History

2016-12-06 01:48:26 +01:00
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
#include <QDialog>
#include "palette.h"
2016-12-07 21:38:36 +01:00
#include "units.h"
2020-05-20 21:00:36 +02:00
#include "timezoneinfo.h"
2018-07-23 23:53:58 +02:00
2016-12-06 01:48:26 +01:00
class QSpinBox;
class QDoubleSpinBox;
class QComboBox;
class QCheckBox;
class QRadioButton;
class QLineEdit;
class ColorBox;
class StyleComboBox;
class OddSpinBox;
class PercentSlider;
class ProjectionComboBox;
class DirSelectWidget;
class AuthenticationWidget;
2020-05-20 21:00:36 +02:00
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 outputProjection;
int inputProjection;
bool hidpiMap;
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;
2020-05-20 21:00:36 +02:00
TimeZoneInfo timeZone;
2020-09-20 22:18:35 +02:00
bool useSegments;
2016-12-06 01:48:26 +01:00
// POI
int poiRadius;
// DEM
QString demURL;
QString demUsername;
QString demPassword;
bool demAuthorization;
2016-12-06 01:48:26 +01:00
// System
bool useOpenGL;
2018-07-23 23:53:58 +02:00
bool enableHTTP2;
int pixmapCache;
int connectionTimeout;
QString dataPath;
QString mapsPath;
QString poiPath;
// Print/Export
bool hiresPrint;
bool printName;
bool printDate;
bool printDistance;
bool printTime;
bool printMovingTime;
bool printItemCount;
bool separateGraphPage;
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:
2020-09-27 00:34:38 +02:00
OptionsDialog(Options &options, Units units, QWidget *parent = 0);
2016-12-06 01:48:26 +01:00
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();
QWidget *createDEMPage();
2016-12-06 01:48:26 +01:00
2020-09-27 00:34:38 +02:00
Options &_options;
2016-12-06 01:48:26 +01:00
2020-09-27 00:34:38 +02:00
Units _units;
2017-05-22 14:54:22 +02:00
// Appearance
2016-12-06 01:48:26 +01:00
ColorBox *_baseColor;
2020-05-20 21:00:36 +02:00
PercentSlider *_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
ProjectionComboBox *_outputProjection;
ProjectionComboBox *_inputProjection;
QRadioButton *_hidpi;
QRadioButton *_lodpi;
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;
2020-05-20 21:00:36 +02:00
QRadioButton *_utcZone;
QRadioButton *_systemZone;
QRadioButton *_customZone;
QComboBox *_timeZone;
2020-09-20 22:18:35 +02:00
QCheckBox *_useSegments;
2017-05-22 14:54:22 +02:00
// POI
2016-12-06 01:48:26 +01:00
QDoubleSpinBox *_poiRadius;
// DEM
QLineEdit *_demURL;
AuthenticationWidget *_demAuth;
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
QCheckBox *_enableHTTP2;
DirSelectWidget *_dataPath;
DirSelectWidget *_mapsPath;
DirSelectWidget *_poiPath;
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