Root/monav/interfaces/iaddresslookup.h

1/*
2Copyright 2010 Christian Vetter veaac.fdirct@gmail.com
3
4This file is part of MoNav.
5
6MoNav is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11MoNav is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with MoNav. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef IADDRESSLOOKUP_H
21#define IADDRESSLOOKUP_H
22
23#include "utils/coordinates.h"
24#include <QtPlugin>
25#include <QVector>
26
27class IAddressLookup
28{
29public:
30    virtual ~IAddressLookup() {}
31
32    virtual QString GetName() = 0;
33    virtual void SetInputDirectory( const QString& dir ) = 0;
34    virtual void ShowSettings() = 0;
35    virtual bool LoadData() = 0;
36    // for a given user input's prefix get a list of place name suggestions as well as partial input suggestions
37    virtual bool GetPlaceSuggestions( const QString& input, int amount, QStringList* suggestions, QStringList* inputSuggestions ) = 0;
38    // for a given user input's prefix get a list of street name suggestions as well as partial input suggestions
39    virtual bool GetStreetSuggestions( const QString& input, int amount, QStringList* suggestions, QStringList* inputSuggestions ) = 0;
40    // for a given place name get a list of places and their coordinates
41    virtual bool GetPlaceData( QString input, QVector< int >* placeIDs, QVector< UnsignedCoordinate >* placeCoordinates ) = 0;
42    // selects a place by it's id
43    virtual bool SelectPlace( int placeID ) = 0;
44    // uses the selected place to provide street name suggestions and partial input suggestions
45    virtual bool GetStreetData( QString input, QVector< int >* segmentLength, QVector< UnsignedCoordinate >* coordinates ) = 0;
46};
47
48Q_DECLARE_INTERFACE( IAddressLookup, "monav.IAddressLookup/1.1" )
49
50#endif // IADDRESSLOOKUP_H
51

Archive Download this file

Branches:
master



interactive