23 #if defined (HAVE_CONFIG_H) 27 #include <QFileIconProvider> 28 #include <QtAlgorithms> 49 val = QVariant (
f.fileName ());
53 val = QVariant (
f.absolutePath ());
66 left.toString ().compare (
right.toString (), Qt::CaseInsensitive) < 0;
77 return !
lessThan (leftval, rightval);
104 beginInsertRows (QModelIndex (),
m_files.size (),
m_files.size ());
111 if (less_than (info, *it))
136 if (role == Qt::DisplayRole)
138 switch (idx.column ())
152 else if (role == Qt::DecorationRole)
154 switch (idx.column ())
169 Qt::Orientation orientation,
172 return ((orientation == Qt::Horizontal && role == Qt::DisplayRole)
180 if (order == Qt::DescendingOrder)
201 return p.isValid () ?
m_files[
p.row ()] : QFileInfo ();
206 QFileIconProvider icon_provider;
208 return p.isValid () ? icon_provider.icon (
m_files[
p.row ()]) : QIcon ();
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
bool lessThan(const QVariant &left, const QVariant &right) const
OCTAVE_EXPORT octave_value_list column
find_file_less_than(int ord)
identity matrix If supplied two scalar respectively For allows like xample val
F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE * f
void addFile(const QFileInfo &info)
QIcon fileIcon(const QModelIndex &p) const
int columnCount(const QModelIndex &p=QModelIndex()) const
void sort(int column, Qt::SortOrder order=Qt::AscendingOrder)
in this the arguments are accumulated from left to right
QFileInfo fileInfo(const QModelIndex &p) const
QStringList m_columnNames
QList< QFileInfo > m_files
QVariant data(const QModelIndex &idx, int role) const
find_files_model(QObject *p=nullptr)
QVariant getValue(const QFileInfo &f) const
bool operator()(const QFileInfo &left, const QFileInfo &right) const
int rowCount(const QModelIndex &p=QModelIndex()) const