ark
archivemodel.cpp
Go to the documentation of this file.
77 const QStringList pieces = entry[FileName].toString().split(QLatin1Char( '/' ), QString::SkipEmptyParts);
81 m_icon = KIconLoader::global()->loadMimeTypeIcon(KMimeType::mimeType(QLatin1String("inode/directory"))->iconName(), KIconLoader::Small);
229 inline bool operator()(const QPair<ArchiveNode*, int> &left, const QPair<ArchiveNode*, int> &right) const
239 bool lessThan(const QPair<ArchiveNode*, int> &left, const QPair<ArchiveNode*, int> &right) const
428 ArchiveDirNode *parentNode = parent.isValid() ? static_cast<ArchiveDirNode*>(parent.internalPointer()) : m_rootNode;
488 ArchiveNode *parentNode = parent.isValid() ? static_cast<ArchiveNode*>(parent.internalPointer()) : m_rootNode;
582 bool ArchiveModel::dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent)
636 QStringList pieces = entry[ FileName ].toString().split(QLatin1Char( '/' ), QString::SkipEmptyParts);
710 ArchiveNode *entry = m_rootNode->findByPath(entryFileName.split(QLatin1Char( '/' ), QString::SkipEmptyParts));
799 ArchiveNode *existing = m_rootNode->findByPath(entry[ FileName ].toString().split(QLatin1Char( '/' )));
818 QString name = entry[ FileName ].toString().split(QLatin1Char( '/' ), QString::SkipEmptyParts).last();
823 if (entry[ FileName ].toString().endsWith(QLatin1Char( '/' )) || (entry.contains(IsDirectory) && entry[ IsDirectory ].toBool())) {
895 ExtractJob* ArchiveModel::extractFile(const QVariant& fileName, const QString & destinationDir, const Kerfuffle::ExtractionOptions options) const
902 ExtractJob* ArchiveModel::extractFiles(const QList<QVariant>& files, const QString & destinationDir, const Kerfuffle::ExtractionOptions options) const
911 AddJob* ArchiveModel::addFiles(const QStringList & filenames, const CompressionOptions& options)
978 kDebug() << "Delete with parent entries " << rawNode->parent()->entries() << " and row " << rawNode->row();
bool hasIndex(int row, int column, const QModelIndex &parent) const
void clear()
Kerfuffle::ExtractJob * extractFile(const QVariant &fileName, const QString &destinationDir, const Kerfuffle::ExtractionOptions options=Kerfuffle::ExtractionOptions()) const
Definition: archivemodel.cpp:895
void layoutChanged()
Definition: queries.h:44
void push_back(const T &value)
Definition: jobs.h:155
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
const T & at(int i) const
const QObjectList & children() const
void changePersistentIndexList(const QModelIndexList &from, const QModelIndexList &to)
Definition: jobs.h:140
QDBusConnection sessionBus()
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: archivemodel.cpp:425
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
Definition: archivemodel.cpp:569
Kerfuffle::AddJob * addFiles(const QStringList &paths, const Kerfuffle::CompressionOptions &options=Kerfuffle::CompressionOptions())
Definition: archivemodel.cpp:911
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: archivemodel.cpp:380
int size() const
Definition: jobs.h:92
void reset(T *other)
void layoutAboutToBeChanged()
Qt::ItemFlags flags(const QModelIndex &index) const
Definition: archivemodel.cpp:369
void reset()
bool isValid() const
void loadingStarted()
QString number(int n, int base)
int count(const T &value) const
void append(const T &value)
int toInt(bool *ok) const
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
void endInsertRows()
bool isEmpty() const
bool isEmpty() const
void beginRemoveRows(const QModelIndex &parent, int first, int last)
int row() const
KJob * setArchive(Kerfuffle::Archive *archive)
Definition: archivemodel.cpp:863
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
void * internalPointer() const
ArchiveModel(const QString &dbusPathName, QObject *parent=0)
Definition: archivemodel.cpp:282
int childCount(const QModelIndex &index, int &dirs, int &files) const
Definition: archivemodel.cpp:463
void droppedFiles(const QStringList &files, const QString &path=QString())
Definition: archive.h:88
QString toLocalFile() const
QModelIndex createIndex(int row, int column, void *ptr) const
Kerfuffle::DeleteJob * deleteFiles(const QList< QVariant > &files)
Definition: archivemodel.cpp:930
T * data() const
const T value(const Key &key) const
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Definition: archivemodel.cpp:582
Definition: jobs.h:118
void setItalic(bool enable)
void beginInsertRows(const QModelIndex &parent, int first, int last)
QString mid(int position, int n) const
bool hasUrls() const
char * toString(const T &value)
QVariant data(const QModelIndex &index, int role) const
Definition: archivemodel.cpp:295
T takeFirst()
typedef DropActions
QList< QUrl > urls() const
virtual bool hasChildren(const QModelIndex &parent) const
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: archivemodel.cpp:485
T & last()
virtual Qt::DropActions supportedDropActions() const
Definition: archivemodel.cpp:548
void removeLast()
int column() const
QStringList split(const QString &sep, const QString &str, bool allowEmptyEntries)
virtual void sort(int column, Qt::SortOrder order=Qt::AscendingOrder)
Definition: archivemodel.cpp:505
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: archivemodel.cpp:497
virtual Qt::ItemFlags flags(const QModelIndex &index) const
void prepend(const T &value)
Kerfuffle::ExtractJob * extractFiles(const QList< QVariant > &files, const QString &destinationDir, const Kerfuffle::ExtractionOptions options=Kerfuffle::ExtractionOptions()) const
Definition: archivemodel.cpp:902
void setData(const QString &mimeType, const QByteArray &data)
Definition: archive.h:73
void endRemoveRows()
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
void endInsertColumns()
QString toString() const
void beginInsertColumns(const QModelIndex &parent, int first, int last)
void loadingFinished(KJob *)
Kerfuffle::ArchiveEntry entryForIndex(const QModelIndex &index)
Definition: archivemodel.cpp:453
typedef ItemFlags
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:36 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:42:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.