25 #if ! defined (octave_find_files_model_h)
26 #define octave_find_files_model_h 1
28 #include <QAbstractListModel>
32 #include <QStringList>
48 void addFile (
const QFileInfo& info);
50 int rowCount (
const QModelIndex& p = QModelIndex ())
const;
52 int columnCount (
const QModelIndex& p = QModelIndex ())
const;
54 QVariant
data (
const QModelIndex& idx,
int role)
const;
56 QVariant
headerData (
int section, Qt::Orientation orientation,
57 int role = Qt::DisplayRole)
const;
59 void sort (
int column, Qt::SortOrder order = Qt::AscendingOrder);
61 QFileInfo
fileInfo (
const QModelIndex& p)
const;
63 QIcon
fileIcon (
const QModelIndex& p)
const;
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder)
QVariant data(const QModelIndex &idx, int role) const
QFileInfo fileInfo(const QModelIndex &p) const
QIcon fileIcon(const QModelIndex &p) const
QList< QFileInfo > m_files
void addFile(const QFileInfo &info)
~find_files_model(void)=default
int rowCount(const QModelIndex &p=QModelIndex()) const
find_files_model(QObject *p=nullptr)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QStringList m_columnNames
int columnCount(const QModelIndex &p=QModelIndex()) const