6 #include <QNetworkAccessManager>
7 #include <QNetworkReply>
12 #include "InfoPanel.h"
15 #include <navigation.h>
17 class MainApp: public QMainWindow
22 explicit MainApp(Navigation *navigation);
24 int AuthenticatePOI(const QString & CredentialsFile);
25 int StartMonitoringUserInput();
26 void setInfoScreen(bool val) { isInfoScreen = val; }
27 void setKeyboard(bool val) { isKeyboard = val; }
30 void ParseJsonBusinessList(const char* buf, std::vector<Business> & Output);
31 bool eventFilter(QObject *obj, QEvent *ev);
32 void resizeEvent(QResizeEvent* event);
33 void SetDestination(int index = 0);
34 bool IsCoordinatesConsistent(Business & business);
35 void DisplayLineEdit(bool display = true);
36 void DisplayResultList(bool display, bool RefreshDisplay = true);
37 void DisplayInformation(bool display, bool RefreshDisplay = true);
38 int FillResultList(std::vector<Business> & list, int focusIndex = 0);
39 void SetWayPoints(uint32_t myRoute);
42 QNetworkAccessManager networkManager;
43 QPushButton searchBtn;
46 QMutex mutex; // to protect pointers from concurrent access
48 QString currentSearchingText;
49 QString currentSearchedText;
50 QNetworkReply *pSearchReply;
51 InfoPanel *pInfoPanel;
52 QTreeWidget *pResultList;
53 double currentLatitude;
54 double currentLongitude;
55 double destinationLatitude;
56 double destinationLongitude;
57 uint32_t navicoreSession;
58 uint32_t currentRouteHandle;
62 bool isInputDisplayed;
65 std::vector<Business> Businesses;
69 void getAllSessions_reply(const std::map< uint32_t, std::string >& allSessions);
70 //void getPosition_reply(std::map< int32_t, naviapi::variant > position);
71 void getAllRoutes_reply(std::vector< uint32_t > allRoutes);
72 void createRoute_reply(uint32_t routeHandle);
75 void searchBtnClicked();
76 void textChanged(const QString & text);
77 void textAdded(const QString & text);
78 void keyPressed(int key);
80 void networkReplySearch(QNetworkReply* reply);
81 void UpdateAglSurfaces();
88 void allSessionsGotSignal();
89 void positionGotSignal();
90 void allRoutesGotSignal();
91 void routeCreatedSignal();
94 #endif // __MAINAPP_H__