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 "MarbleGlobal.h"
13#include "MarbleLineEdit.h"
14#include "marble_export.h"
15
17
18class QCompleter;
19class QModelIndex;
20
21namespace Marble
22{
23
24class GeoDataCoordinates;
25
26class MARBLE_EXPORT SearchInputWidget : public MarbleLineEdit
27{
28 Q_OBJECT
29
30public:
31 explicit SearchInputWidget(QWidget *parent = nullptr);
32
33 void setCompletionModel(QAbstractItemModel *completionModel);
34
35public Q_SLOTS:
36 void disableSearchAnimation();
37
38Q_SIGNALS:
39 void search(const QString &searchTerm, SearchMode searchMode);
40
41 void centerOn(const GeoDataCoordinates &coordinates);
42
43private Q_SLOTS:
44 void search();
45
46 void centerOnSearchSuggestion(const QModelIndex &suggestionIndex);
47
48 void showDropDownMenu();
49
50 void setGlobalSearch();
51
52 void setAreaSearch();
53
54private:
55 void updatePlaceholderText();
56
57 QSortFilterProxyModel m_sortFilter;
58 QCompleter *const m_completer;
59 bool m_areaSearch;
60};
61
62}
63
64#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 Mon Nov 4 2024 16:37:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.