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"
|
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;
|
2016-12-06 01:48:26 +01:00
|
|
|
|
|
|
|
struct Options {
|
|
|
|
// Appearance
|
|
|
|
Palette palette;
|
|
|
|
int trackWidth;
|
|
|
|
int routeWidth;
|
|
|
|
Qt::PenStyle trackStyle;
|
|
|
|
Qt::PenStyle routeStyle;
|
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;
|
|
|
|
bool pathAntiAliasing;
|
|
|
|
bool graphAntiAliasing;
|
2017-09-10 12:42:49 +02:00
|
|
|
int mapOpacity;
|
|
|
|
QColor blendColor;
|
2017-05-22 14:54:22 +02:00
|
|
|
// Data
|
|
|
|
int elevationFilter;
|
|
|
|
int speedFilter;
|
|
|
|
int heartRateFilter;
|
|
|
|
int cadenceFilter;
|
|
|
|
int powerFilter;
|
|
|
|
bool outlierEliminate;
|
|
|
|
qreal pauseSpeed;
|
|
|
|
int pauseInterval;
|
2016-12-06 01:48:26 +01:00
|
|
|
// POI
|
|
|
|
int poiRadius;
|
|
|
|
// System
|
|
|
|
bool useOpenGL;
|
2017-05-03 23:55:16 +02:00
|
|
|
int pixmapCache;
|
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
|
|
|
|
|
|
|
|
public:
|
|
|
|
OptionsDialog(Options *options, QWidget *parent = 0);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void accept();
|
|
|
|
|
|
|
|
private:
|
|
|
|
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-10 00:09:39 +02:00
|
|
|
ColorBox *_blendColor;
|
2016-12-06 01:48:26 +01:00
|
|
|
QSpinBox *_trackWidth;
|
|
|
|
StyleComboBox *_trackStyle;
|
|
|
|
QSpinBox *_routeWidth;
|
|
|
|
StyleComboBox *_routeStyle;
|
|
|
|
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;
|
|
|
|
QCheckBox *_graphAA;
|
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;
|
|
|
|
QDoubleSpinBox *_pauseSpeed;
|
|
|
|
QSpinBox *_pauseInterval;
|
|
|
|
// 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;
|
2016-12-06 01:48:26 +01:00
|
|
|
QCheckBox *_useOpenGL;
|
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
|