marble
OfflineDataModel.cpp
Go to the documentation of this file.
21 m_newstuffModel.setRegistryFile( QDir::homePath() + "/.kde/share/apps/knewstuff3/marble-offline-data.knsregistry", Marble::NewstuffModel::NameTag );
36 connect( &m_newstuffModel, SIGNAL(installationProgressed(int,qreal)), this, SLOT(handleInstallationProgress(int,qreal)) );
37 connect( &m_newstuffModel, SIGNAL(installationFinished(int)), this, SLOT(handleInstallationFinished(int)) );
38 connect( &m_newstuffModel, SIGNAL(installationFailed(int,QString)), this, SLOT(handleInstallationFailed(int,QString)) );
39 connect( &m_newstuffModel, SIGNAL(uninstallationFinished(int)), this, SLOT(handleUninstallationFinished(int)) );
56 if ( index.isValid() && index.row() >= 0 && index.row() < rowCount() && role == Qt::DisplayRole ) {
70 if ( index.isValid() && index.row() >= 0 && index.row() < rowCount() && role == Qt::UserRole+17 ) {
71 QStringList const data = QSortFilterProxyModel::data( index, Qt::DisplayRole ).toString().split( '/' );
132 bool OfflineDataModel::filterAcceptsRow( int source_row, const QModelIndex &source_parent ) const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
virtual void sort(int column, Qt::SortOrder order)
void setRoleNames(const QHash< int, QByteArray > &roleNames)
virtual void setSourceModel(QAbstractItemModel *sourceModel)
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
const QHash< int, QByteArray > & roleNames() const
void setProvider(const QString &downloadUrl)
Add a newstuff provider.
Definition: NewstuffModel.cpp:569
const T & at(int i) const
QString & remove(int position, int n)
QString homePath()
virtual int rowCount(const QModelIndex &parent) const
int size() const
void beginResetModel()
bool isValid() const
void setTargetDirectory(const QString &targetDirectory)
Definition: NewstuffModel.cpp:585
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
int count() const
QString trimmed() const
int row() const
void setDynamicSortFilter(bool enable)
void installationFailed(int newstuffindex, const QString &error)
virtual QVariant data(const QModelIndex &index, int role) const =0
T & first()
Definition: OfflineDataModel.h:30
bool contains(QChar ch, Qt::CaseSensitivity cs) const
OfflineDataModel(QObject *parent=0)
Definition: OfflineDataModel.cpp:17
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
Definition: OfflineDataModel.cpp:132
void installationProgressed(int newstuffindex, qreal progress)
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
QAbstractItemModel * sourceModel() const
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
void installationFinished(int newstuffindex)
void setRegistryFile(const QString ®istryFile, IdTag idTag=PayloadTag)
Definition: NewstuffModel.cpp:605
void uninstallationFinished(int newstuffindex)
void endResetModel()
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setVehicleTypeFilter(VehicleTypes filter)
Definition: OfflineDataModel.cpp:80
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: OfflineDataModel.cpp:54
QString toString() const
virtual QVariant data(const QModelIndex &index, int role) const
Definition: OfflineDataModel.h:29
Definition: NewstuffModel.h:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.