#include "find-files-model.h"
Public Member Functions | |
find_files_model (QObject *p=nullptr) | |
~find_files_model (void)=default | |
void | addFile (const QFileInfo &info) |
void | clear (void) |
int | columnCount (const QModelIndex &p=QModelIndex()) const |
QVariant | data (const QModelIndex &idx, int role) const |
QIcon | fileIcon (const QModelIndex &p) const |
QFileInfo | fileInfo (const QModelIndex &p) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
int | rowCount (const QModelIndex &p=QModelIndex()) const |
void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
Private Attributes | |
QStringList | m_columnNames |
QList< QFileInfo > | m_files |
int | m_sortorder |
Definition at line 36 of file find-files-model.h.
octave::find_files_model::find_files_model | ( | QObject * | p = nullptr | ) |
Definition at line 90 of file find-files-model.cc.
References m_columnNames, and m_sortorder.
|
default |
void octave::find_files_model::addFile | ( | const QFileInfo & | info | ) |
Definition at line 107 of file find-files-model.cc.
References m_files, and m_sortorder.
void octave::find_files_model::clear | ( | void | ) |
Definition at line 98 of file find-files-model.cc.
References m_files.
int octave::find_files_model::columnCount | ( | const QModelIndex & | p = QModelIndex () | ) | const |
Definition at line 130 of file find-files-model.cc.
References m_columnNames.
QVariant octave::find_files_model::data | ( | const QModelIndex & | idx, |
int | role | ||
) | const |
Definition at line 135 of file find-files-model.cc.
References fileIcon(), m_files, and retval.
QIcon octave::find_files_model::fileIcon | ( | const QModelIndex & | p | ) | const |
QFileInfo octave::find_files_model::fileInfo | ( | const QModelIndex & | p | ) | const |
Definition at line 204 of file find-files-model.cc.
References m_files.
QVariant octave::find_files_model::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role = Qt::DisplayRole |
||
) | const |
Definition at line 173 of file find-files-model.cc.
References m_columnNames.
int octave::find_files_model::rowCount | ( | const QModelIndex & | p = QModelIndex () | ) | const |
Definition at line 125 of file find-files-model.cc.
References m_files.
void octave::find_files_model::sort | ( | int | column, |
Qt::SortOrder | order = Qt::AscendingOrder |
||
) |
Definition at line 181 of file find-files-model.cc.
References m_files, and m_sortorder.
|
private |
Definition at line 68 of file find-files-model.h.
Referenced by find_files_model(), columnCount(), and headerData().
|
private |
Definition at line 67 of file find-files-model.h.
Referenced by addFile(), clear(), data(), fileIcon(), fileInfo(), rowCount(), and sort().
|
private |
Definition at line 69 of file find-files-model.h.
Referenced by find_files_model(), addFile(), and sort().