-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
97 lines (77 loc) · 2.38 KB
/
Copy pathmainwindow.h
File metadata and controls
97 lines (77 loc) · 2.38 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//MainWindow.h
#pragma once
#include <QMainWindow>
#include "MapManager.h"
#include "CompassPane.h"
#include "InfoPane.h"
#include "MapWidget.h"
#include <QShowEvent>
#include <QGeocoordinate.h>
#include "SearchLocationDialog.h"
#include "GeoResult.h"
#include <qlist.h>
#include "mapViewType.h"
//Predefines
class QAction;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(const QString& dbFilename, QWidget *parent = nullptr);
~MainWindow();
//Methods
public:
private:
void SetupMainMenu();
void setupBaseLayerMenus(QMenu* mapMenu );
void SetupWidgets( const QString& dbFilename );
void SetupConnects();
void UpdateInfoPane( );
bool HandleF6AndTabKeyEvents(QKeyEvent* pKeyEvent);
void syncLayerMenus();
protected:
void keyPressEvent(QKeyEvent* event) override;
void showEvent(QShowEvent *event ) override;
//Signals
signals:
void dispatchSearchResults(const QMap<QString,QGeoCoordinate> sdResults );
//Slots
public slots:
void handleSearchRequested(const QString& searchTerm);
void handleLocationSelected(const QGeoCoordinate& coordinates);
void PopulateGetLayersRequest(GLList& layerResults);
private slots:
void onOutlineTriggered(); // Slot for the "Go to Location" menu item
void onLayersTriggered(); // Slot for the "Go to Location" menu item
void onGoToLocationTriggered(); // Slot for the "Go to Location" menu item
void onSearchLocationTriggered(); // Slot for the "Go to Location" menu item
void onMapBaseLayerTriggered(); //slot for changing map type
public:
void onMapClicked(const QPoint& pixelPos, int width, int height);
private:
void onNorthButtonClicked();
void onEastButtonClicked();
void onSouthButtonClicked();
void onWestButtonClicked();
void onStepMoreButtonClicked();
void onStepLessButtonClicked();
void AnnounceInitialFocus();
//Menu methods
void showDocumentation();
void showLicensing();
void showAboutDialog();
//Member variables
private:
//Data variables
bool m_bInitialShow; //Flag to catch first time application starts up
bool m_bDataOK;
QList<CGeoResult> m_geoResults;
NRList m_pointResults;
//Main areas
CMapManager* m_pMapManager;
CMapWidget* m_pMapArea;
CCompassPane* m_pCompassPane;
CInfoPane* m_pInfoPane;
//Helpers
QMap<int, QAction*> m_layerActions;
};