Root/searchwidget.h

1/*
2 * Copyright 2010 Niels Kummerfeldt <niels.kummerfeldt@tu-harburg.de>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
18 */
19
20#ifndef SEARCHWIDGET_H
21#define SEARCHWIDGET_H
22
23#include <QtGui/QLineEdit>
24#include <QtGui/QListWidget>
25
26#include "interfaces/iaddresslookup.h"
27
28class SearchWidget : public QWidget
29{
30    Q_OBJECT
31public:
32    SearchWidget(QWidget *parent = 0);
33    ~SearchWidget();
34
35signals:
36    void back();
37    void centerOn(qreal lon, qreal lat);
38
39private slots:
40    void cityChanged(const QString &city);
41    void cityEntered();
42    void citySelected(QListWidgetItem *item);
43    void streetChanged(const QString &street);
44    void streetSelected(QListWidgetItem *item);
45
46private:
47    IAddressLookup *m_addrLookup;
48    QHash<int, GPSCoordinate> m_cityCoordinates;
49    bool m_loaded;
50    QLineEdit *m_city;
51    QListWidget *m_cityList;
52    QLineEdit *m_street;
53    QListWidget *m_streetList;
54 
55};
56
57#endif // SEARCHWIDGET_H
58

Archive Download this file

Branches:
master



interactive