QXRD
0.11.16
|
#include <qxrdfilebrowsermodel.h>
Public Types | |
typedef QAbstractTableModel | inherited |
Public Slots | |
void | newDataAvailable (QVector< QFileInfo > dirs, QVector< QFileInfo > files, int limit=0, int trueSize=-1) |
void | updatedFile (QFileInfo file) |
Signals | |
void | rootChanged (const QString &path) |
void | fileUpdated (QFileInfo file) |
Public Member Functions | |
QxrdFileBrowserModel (QObject *parent) | |
~QxrdFileBrowserModel () | |
void | initialize () |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
void | setNameFilters (QStringList filters) |
void | setNameFilterDisables (bool disables) |
QFileInfo | fileInfo (const QModelIndex &index) const |
QString | fileName (const QModelIndex &index) const |
QString | filePath (const QModelIndex &index) const |
void | setRootPath (QString path) |
QString | rootPath () const |
bool | isDir (const QModelIndex &index) const |
virtual void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
void | refresh () |
QStringList | nameFilters () const |
int | sortedColumn () const |
Qt::SortOrder | sortOrder () const |
void | generateFileUpdates (int doIt) |
Private Member Functions | |
void | updateModel () |
Private Attributes | |
QMutex | m_Mutex |
QxrdFileBrowserModelUpdaterThreadPtr | m_UpdaterThread |
QxrdFileBrowserModelUpdaterWPtr | m_Updater |
QString | m_RootPath |
QStringList | m_NameFilters |
QVector< QFileInfo > | m_DirList |
QVector< QFileInfo > | m_FileList |
int | m_SortedColumn |
Qt::SortOrder | m_SortOrder |
int | m_Limit |
int | m_TrueSize |
double | m_HighlightOnTime |
double | m_HighlightFadeTime |
int | m_HighlightSaturation |
int | m_HighlightHue |
QTimer * | m_Timer |
Definition at line 17 of file qxrdfilebrowsermodel.h.
typedef QAbstractTableModel QxrdFileBrowserModel::inherited |
Definition at line 26 of file qxrdfilebrowsermodel.h.
|
explicit |
Definition at line 14 of file qxrdfilebrowsermodel.cpp.
QxrdFileBrowserModel::~QxrdFileBrowserModel | ( | ) |
Definition at line 30 of file qxrdfilebrowsermodel.cpp.
int QxrdFileBrowserModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Definition at line 158 of file qxrdfilebrowsermodel.cpp.
QVariant QxrdFileBrowserModel::data | ( | const QModelIndex & | index, |
int | role = Qt::DisplayRole |
||
) | const |
Definition at line 78 of file qxrdfilebrowsermodel.cpp.
References fileInfo(), m_HighlightFadeTime, m_HighlightHue, m_HighlightOnTime, m_HighlightSaturation, and m_Mutex.
QFileInfo QxrdFileBrowserModel::fileInfo | ( | const QModelIndex & | index | ) | const |
Definition at line 187 of file qxrdfilebrowsermodel.cpp.
References m_DirList, m_FileList, m_Limit, m_Mutex, and m_TrueSize.
Referenced by data(), fileName(), filePath(), and isDir().
QString QxrdFileBrowserModel::fileName | ( | const QModelIndex & | index | ) | const |
Definition at line 209 of file qxrdfilebrowsermodel.cpp.
References fileInfo(), and m_Mutex.
QString QxrdFileBrowserModel::filePath | ( | const QModelIndex & | index | ) | const |
Definition at line 216 of file qxrdfilebrowsermodel.cpp.
References fileInfo(), and m_Mutex.
|
signal |
Referenced by QxrdFileBrowser::QxrdFileBrowser(), and updatedFile().
void QxrdFileBrowserModel::generateFileUpdates | ( | int | doIt | ) |
Definition at line 330 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, and m_Updater.
QVariant QxrdFileBrowserModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role = Qt::DisplayRole |
||
) | const |
Definition at line 53 of file qxrdfilebrowsermodel.cpp.
References m_Mutex.
void QxrdFileBrowserModel::initialize | ( | ) |
Definition at line 41 of file qxrdfilebrowsermodel.cpp.
References m_Updater, and m_UpdaterThread.
bool QxrdFileBrowserModel::isDir | ( | const QModelIndex & | index | ) | const |
Definition at line 280 of file qxrdfilebrowsermodel.cpp.
References fileInfo(), and m_Mutex.
QStringList QxrdFileBrowserModel::nameFilters | ( | ) | const |
Definition at line 241 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, and m_NameFilters.
|
slot |
Definition at line 303 of file qxrdfilebrowsermodel.cpp.
References m_DirList, m_FileList, m_Limit, m_Mutex, and m_TrueSize.
void QxrdFileBrowserModel::refresh | ( | ) |
Definition at line 262 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, and updateModel().
|
signal |
Referenced by QxrdFileBrowserModelUpdater::QxrdFileBrowserModelUpdater(), and setRootPath().
QString QxrdFileBrowserModel::rootPath | ( | ) | const |
Definition at line 234 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, and m_RootPath.
int QxrdFileBrowserModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Definition at line 163 of file qxrdfilebrowsermodel.cpp.
References m_DirList, m_FileList, m_Limit, and m_Mutex.
void QxrdFileBrowserModel::setNameFilterDisables | ( | bool | disables | ) |
Definition at line 183 of file qxrdfilebrowsermodel.cpp.
void QxrdFileBrowserModel::setNameFilters | ( | QStringList | filters | ) |
Definition at line 174 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, m_NameFilters, and updateModel().
void QxrdFileBrowserModel::setRootPath | ( | QString | path | ) |
Definition at line 223 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, m_RootPath, rootChanged(), and updateModel().
|
virtual |
Definition at line 287 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, m_SortedColumn, m_SortOrder, and m_Updater.
int QxrdFileBrowserModel::sortedColumn | ( | ) | const |
Definition at line 248 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, and m_SortedColumn.
Qt::SortOrder QxrdFileBrowserModel::sortOrder | ( | ) | const |
Definition at line 255 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, and m_SortOrder.
|
slot |
Definition at line 317 of file qxrdfilebrowsermodel.cpp.
References fileUpdated().
|
private |
Definition at line 269 of file qxrdfilebrowsermodel.cpp.
References m_Mutex, and m_Updater.
Referenced by refresh(), setNameFilters(), and setRootPath().
|
private |
Definition at line 70 of file qxrdfilebrowsermodel.h.
Referenced by fileInfo(), newDataAvailable(), and rowCount().
|
private |
Definition at line 71 of file qxrdfilebrowsermodel.h.
Referenced by fileInfo(), newDataAvailable(), and rowCount().
|
private |
Definition at line 77 of file qxrdfilebrowsermodel.h.
Referenced by data().
|
private |
Definition at line 79 of file qxrdfilebrowsermodel.h.
Referenced by data().
|
private |
Definition at line 76 of file qxrdfilebrowsermodel.h.
Referenced by data().
|
private |
Definition at line 78 of file qxrdfilebrowsermodel.h.
Referenced by data().
|
private |
Definition at line 74 of file qxrdfilebrowsermodel.h.
Referenced by fileInfo(), newDataAvailable(), and rowCount().
|
mutableprivate |
Definition at line 65 of file qxrdfilebrowsermodel.h.
Referenced by data(), fileInfo(), fileName(), filePath(), generateFileUpdates(), headerData(), isDir(), nameFilters(), newDataAvailable(), refresh(), rootPath(), rowCount(), setNameFilters(), setRootPath(), sort(), sortedColumn(), sortOrder(), and updateModel().
|
private |
Definition at line 69 of file qxrdfilebrowsermodel.h.
Referenced by nameFilters(), and setNameFilters().
|
private |
Definition at line 68 of file qxrdfilebrowsermodel.h.
Referenced by rootPath(), and setRootPath().
|
private |
Definition at line 72 of file qxrdfilebrowsermodel.h.
Referenced by sort(), and sortedColumn().
|
private |
Definition at line 73 of file qxrdfilebrowsermodel.h.
Referenced by sort(), and sortOrder().
|
private |
Definition at line 80 of file qxrdfilebrowsermodel.h.
|
private |
Definition at line 75 of file qxrdfilebrowsermodel.h.
Referenced by fileInfo(), and newDataAvailable().
|
private |
Definition at line 67 of file qxrdfilebrowsermodel.h.
Referenced by generateFileUpdates(), initialize(), sort(), and updateModel().
|
private |
Definition at line 66 of file qxrdfilebrowsermodel.h.
Referenced by initialize().