Marble
6#ifndef MARBLE_SEARCHBACKEND_H
7#define MARBLE_SEARCHBACKEND_H
10#include <QSortFilterProxyModel>
11#include <qqmlregistration.h>
13#include "MarblePlacemarkModel.h"
14#include "MarbleQuickItem.h"
21class SearchRunnerManager;
23class SearchBackend :
public QObject
28 Q_PROPERTY(
QObject *marbleQuickItem READ marbleQuickItem WRITE setMarbleQuickItem NOTIFY marbleQuickItemChanged)
29 Q_PROPERTY(MarblePlacemarkModel *completionModel READ completionModel NOTIFY completionModelChanged)
30 Q_PROPERTY(Placemark *selectedPlacemark READ selectedPlacemark NOTIFY selectedPlacemarkChanged)
35 Q_INVOKABLE void setCompletionPrefix(
const QString &prefix);
37 MarblePlacemarkModel *completionModel();
38 const QObject *marbleQuickItem()
const;
39 Placemark *selectedPlacemark();
42 void marbleQuickItemChanged(
QObject *marbleQuickItem);
43 void completionModelChanged(MarblePlacemarkModel *model);
44 void searchResultChanged(MarblePlacemarkModel *model);
45 void searchFinished(
const QString &searchTerm);
46 void selectedPlacemarkChanged(Placemark *selectedPlacemark);
49 Q_INVOKABLE void setSelectedPlacemark(
int placemarkIndex);
50 void setMarbleQuickItem(
QObject *marbleQuickItem);
51 void updateSearchResult(QAbstractItemModel *result);
54 static GeoDataPlacemark *placemarkFromQVariant(
const QVariant &data);
55 QSortFilterProxyModel m_model;
56 SearchRunnerManager *m_searchManager =
nullptr;
57 MarbleQuickItem *m_marbleQuickItem =
nullptr;
58 MarblePlacemarkModel *m_placemarkModel =
nullptr;
59 QCompleter *m_completer =
nullptr;
60 MarblePlacemarkModel *
const m_completionModel;
61 QList<GeoDataPlacemark *> *m_completionContainer =
nullptr;
62 Placemark m_selectedPlacemark;
63 QString m_lastSuccessfulCompletion;
Binds a QML item to a specific geodetic location in screen coordinates.
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:08 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.