Marble

SearchInputWidget.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2012 Dennis Nienhüser <nienhueser@kde.org>
4// SPDX-FileCopyrightText: 2012 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
5//
6
7#ifndef MARBLE_SEARCHINPUTWIDGET_H
8#define MARBLE_SEARCHINPUTWIDGET_H
9
10#include <QSortFilterProxyModel>
11
12#include "MarbleLineEdit.h"
13#include "MarbleGlobal.h"
14#include "marble_export.h"
15
17
18class QCompleter;
19class QModelIndex;
20
21namespace Marble {
22
23class GeoDataCoordinates;
24
25class MARBLE_EXPORT SearchInputWidget : public MarbleLineEdit
26{
27 Q_OBJECT
28
29public:
30 explicit SearchInputWidget( QWidget* parent = nullptr );
31
32 void setCompletionModel( QAbstractItemModel *completionModel );
33
34public Q_SLOTS:
35 void disableSearchAnimation();
36
37Q_SIGNALS:
38 void search( const QString &searchTerm, SearchMode searchMode );
39
40 void centerOn( const GeoDataCoordinates &coordinates );
41
42private Q_SLOTS:
43 void search();
44
45 void centerOnSearchSuggestion( const QModelIndex &suggestionIndex );
46
47 void showDropDownMenu();
48
49 void setGlobalSearch();
50
51 void setAreaSearch();
52
53private:
54 void updatePlaceholderText();
55
56 QSortFilterProxyModel m_sortFilter;
57 QCompleter *const m_completer;
58 bool m_areaSearch;
59};
60
61}
62
63#endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.