2 * I Am Here(iamhere) - an application to find user's location
4 * Copyright (C) 2010 Vytarani Mathane <vytarani.mathane@gmail.com>.
6 * This file is part of I Am Here.
8 * I Am Here is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * I Am Here is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with I Am Here. If not, see <http://www.gnu.org/licenses/>.
22 #include <QMainWindow>
25 #include <QGeoSearchManager>
26 #include <QGeoServiceProvider>
27 #include <QGeoPositionInfoSource>
32 class Window:public QMainWindow {
35 Window(QWidget * parent);
38 void positionUpdated(const QGeoPositionInfo & info);
39 void updateTimeout() {
40 // Current location could not be retrieved within the specified timeout of 5 seconds.
41 qWarning("Failed to retrieve current position.");
45 public slots: void handlePressed();
46 void handlePressedClose();
47 void replyFinished(QGeoSearchReply * reply);
48 void resultsError(QGeoSearchReply * reply,
49 QGeoSearchReply::Error errorCode,
52 QGeoSearchManager * m_searchManager;
53 QGeoServiceProvider *m_serviceProvider;
54 QGeoPositionInfoSource *m_source;
55 QGeoCoordinate m_coord;