Marble
OfflineDataModel.cpp
16 m_newstuffModel.setTargetDirectory(Marble::MarbleDirs::localPath() + QLatin1StringView("/maps"));
17 m_newstuffModel.setRegistryFile(QDir::homePath() + QStringLiteral("/.kde/share/apps/knewstuff3/marble-offline-data.knsregistry"),
19 m_newstuffModel.setProvider(QStringLiteral("http://files.kde.org/marble/newstuff/maps-monav.xml"));
29 connect(&m_newstuffModel, &Marble::NewstuffModel::installationProgressed, this, &OfflineDataModel::handleInstallationProgress);
30 connect(&m_newstuffModel, &Marble::NewstuffModel::installationFinished, this, &OfflineDataModel::handleInstallationFinished);
31 connect(&m_newstuffModel, &Marble::NewstuffModel::installationFailed, this, &OfflineDataModel::handleInstallationFailed);
32 connect(&m_newstuffModel, &Marble::NewstuffModel::uninstallationFinished, this, &OfflineDataModel::handleUninstallationFinished);
47 if (index.isValid() && index.row() >= 0 && index.row() < rowCount() && role == Qt::DisplayRole) {
48 QStringList const data = QSortFilterProxyModel::data(index, role).toString().split(QLatin1Char('/'));
61 if (index.isValid() && index.row() >= 0 && index.row() < rowCount() && role == Qt::UserRole + 17) {
62 QStringList const data = QSortFilterProxyModel::data(index, Qt::DisplayRole).toString().split(QLatin1Char('/'));
132 } else if ((m_vehicleTypeFilter & Pedestrian) && data.contains(QLatin1StringView("(Pedestrian)"))) {
void beginResetModel()
void endResetModel()
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
sourceModel
QString homePath()
const_reference at(qsizetype i) const const
pointer data()
T & first()
qsizetype size() const const
bool isValid() const const
int row() const const
Q_EMITQ_EMIT
virtual QVariant data(const QModelIndex &index, int role) const const override
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const const override
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const const override
virtual int rowCount(const QModelIndex &parent) const const override
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QString & remove(QChar ch, Qt::CaseSensitivity cs)
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString trimmed() const const
UserRole
QFuture< void > filter(QThreadPool *pool, Sequence &sequence, KeepFunctor &&filterFunction)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.