1 /* 2 This file is part of Qadastre. 3 Copyright (C) 2010 Pierre Ducroquet <pinaraf@pinaraf.info> 4 5 Qadastre is free software: you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation, either version 3 of the License, or 8 (at your option) any later version. 9 10 Qadastre is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with Qadastre. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef SEARCHDIALOG_H 20 #define SEARCHDIALOG_H 21 22 #include <QDialog> 23 #include <QMap> 24 25 class CadastreWrapper; 26 27 namespace Ui { 28 class SearchDialog; 29 } 30 31 class SearchDialog : public QDialog { 32 Q_OBJECT 33 public: 34 SearchDialog(QWidget *parent = 0); 35 ~SearchDialog(); 36 37 QString cityCode(); 38 QString cityName(); 39 40 public: 41 CadastreWrapper *cadastre; 42 43 protected: 44 void changeEvent(QEvent *e); 45 46 private: 47 Ui::SearchDialog *ui; 48 QMap<QString,QString> m_results; 49 50 private slots: 51 void on_results_activated(int index); 52 void on_searchButton_clicked(); 53 void resultsAvailable(QMap<QString,QString> results); 54 }; 55 56 #endif // SEARCHDIALOG_H 57