1 #ifndef QXRDFILEBROWSERMODEL_H
2 #define QXRDFILEBROWSERMODEL_H
5 #include <QAbstractTableModel>
17 class QxrdFileBrowserModel :
public QAbstractTableModel,
public QEnableSharedFromThis<QxrdFileBrowserModel>
28 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
29 QVariant
data(
const QModelIndex & index,
int role = Qt::DisplayRole)
const;
30 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
31 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
35 QFileInfo
fileInfo(
const QModelIndex &index)
const;
36 QString
fileName(
const QModelIndex &index)
const;
37 QString
filePath(
const QModelIndex &index)
const;
42 bool isDir(
const QModelIndex &index)
const;
44 virtual void sort (
int column, Qt::SortOrder order = Qt::AscendingOrder );
54 void newDataAvailable(QVector<QFileInfo> dirs, QVector<QFileInfo> files,
int limit=0,
int trueSize=-1);
83 #endif // QXRDFILEBROWSERMODEL_H
QxrdFileBrowserModel(QObject *parent)
QxrdFileBrowserModelUpdaterWPtr m_Updater
QFileInfo fileInfo(const QModelIndex &index) const
QStringList nameFilters() const
QxrdFileBrowserModelUpdaterThreadPtr m_UpdaterThread
QVector< QFileInfo > m_FileList
int rowCount(const QModelIndex &parent=QModelIndex()) const
int columnCount(const QModelIndex &parent=QModelIndex()) const
void setNameFilters(QStringList filters)
void generateFileUpdates(int doIt)
QVector< QFileInfo > m_DirList
QString fileName(const QModelIndex &index) const
void newDataAvailable(QVector< QFileInfo > dirs, QVector< QFileInfo > files, int limit=0, int trueSize=-1)
QStringList m_NameFilters
QString filePath(const QModelIndex &index) const
Qt::SortOrder sortOrder() const
QAbstractTableModel inherited
bool isDir(const QModelIndex &index) const
void fileUpdated(QFileInfo file)
QWeakPointer< QxrdFileBrowserModelUpdater > QxrdFileBrowserModelUpdaterWPtr
void setRootPath(QString path)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void setNameFilterDisables(bool disables)
void rootChanged(const QString &path)
Qt::SortOrder m_SortOrder
double m_HighlightFadeTime
virtual void sort(int column, Qt::SortOrder order=Qt::AscendingOrder)
QSharedPointer< QxrdFileBrowserModelUpdaterThread > QxrdFileBrowserModelUpdaterThreadPtr
void updatedFile(QFileInfo file)
int m_HighlightSaturation
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const