forked from organicmaps/organicmaps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouting_settings_dialog.hpp
47 lines (35 loc) · 1 KB
/
routing_settings_dialog.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include "geometry/latlon.hpp"
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QComboBox>
#include <QtWidgets/QDialog>
#include <QtWidgets/QLineEdit>
#include <optional>
#include <string>
class Framework;
namespace qt
{
class RoutingSettings : public QDialog
{
public:
static void LoadSession(Framework & framework);
static bool TurnsEnabled();
static bool UseDebugGuideTrack();
static std::optional<ms::LatLon> GetCoords(bool start);
RoutingSettings(QWidget * parent, Framework & framework);
void ShowModal();
private:
static std::optional<ms::LatLon> GetCoordsFromString(std::string const & input);
void ShowMessage(std::string const & message);
bool ValidateAndSaveCoordsFromInput();
bool SaveSettings();
void LoadSettings();
Framework & m_framework;
QLineEdit * m_startInput;
QLineEdit * m_finishInput;
QComboBox * m_routerType;
QCheckBox * m_showTurnsCheckbox;
QCheckBox * m_useDebugGuideCheckbox;
QCheckBox * m_saveSessionCheckbox;
};
} // namespace qt