Hydra 0.20
desktop::FileList Class Reference

#include <FileList.h>

List of all members.

Public Member Functions

 FileList (FileEntryCache *_cache)
 constructor
virtual ~FileList ()
 destructor
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
virtual QVariant data (const QModelIndex &index, int role) const
virtual void sort (int column, Qt::SortOrder order=Qt::AscendingOrder)
FileListpeer (void) const
void setPeer (FileList *peer)
const QString & baseDir (void) const
bool isBaseRecurse (void) const
bool isBaseShuffle (void) const
bool hasBaseQuery (void) const
const QString & baseQueryString (void) const
std::shared_ptr< hydra::TokenbaseQueryToken (void) const
bool isValid (int index) const
bool isValid (void) const
const FileEntryfileAt (int index) const
FileEntryfileAt (int index)
const FileEntryfileAt (const QModelIndex &index) const
FileEntryfileAt (const QModelIndex &index)
int numFiles (void) const
int selectedFileIndex (void) const
FileEntryselectedFile (void)
int findFileIndexByName (const QString &fullfilename) const
void setSelectedFile (int index)
void addListener (FileListListener *v)
void removeListener (FileListListener *v)
void emitBaseChange (FileListListener *source=0)
void emitImageChange (int fileIndex, FileListListener *source=0)
QItemSelectionModel * selectionModel (void)
void emitChangedTagsAll (void)
void emitChangedTagsOne (int idx)
void flushJobs (void)
 signals all the jobs to die quickly
void enqueueLoad (const QString &fullfilename, int idx)

Friends

class desktop::FileListLoader
class desktop::FileListReloader

Detailed Description

Holds a file (image) list. Not all the images may be loaded. Can be backed by a FileMonitor.

Author:
Aleksander Demko

Member Function Documentation

void desktop::FileList::emitBaseChange ( FileListListener source = 0)

Calls onBaseChange on all the Views that are listenting to the FileList.

This works through thr FileListListener system.

Author:
Aleksander Demko
void desktop::FileList::emitChangedTagsAll ( void  )

Smits a signal for the data model that all the tags changed. This translates into a QAbstractListModel::dataChanged() call.

This works through the QAbstractListModel system.

Author:
Aleksander Demko
void desktop::FileList::emitChangedTagsOne ( int  idx)

Smits a signal for the data model that all the tags changed for this particular index. This translates into a QAbstractListModel::dataChanged() call.

This works through the QAbstractListModel system.

Author:
Aleksander Demko
void desktop::FileList::emitImageChange ( int  fileIndex,
FileListListener source = 0 
)

Calls onImageChange on all the Views that are listenting to the FileList.

This is usually called when the image is changed, usually because its rotation has been changed.

This works through thr FileListListener system.

Author:
Aleksander Demko
void desktop::FileList::enqueueLoad ( const QString &  fullfilename,
int  idx 
)

Using the worker/background thread pool system, enqueue a file info load for the given file.

Upon completion, a tag emit event will be sent.

Author:
Aleksander Demko
const FileEntry& desktop::FileList::fileAt ( int  index) const [inline]

Return the FileEntry at the given index

Author:
Aleksander Demko
FileEntry& desktop::FileList::fileAt ( int  index) [inline]

Return the FileEntry at the given index

Author:
Aleksander Demko
const FileEntry& desktop::FileList::fileAt ( const QModelIndex &  index) const [inline]

Return the FileEntry at the given QModelIndex

Author:
Aleksander Demko
FileEntry& desktop::FileList::fileAt ( const QModelIndex &  index) [inline]

Return the FileEntry at the given QModelIndex

Author:
Aleksander Demko
int desktop::FileList::findFileIndexByName ( const QString &  fullfilename) const

Finds the file index that has the given fullfilename. Returns -1 on failure.

Author:
Aleksander Demko
bool desktop::FileList::isValid ( void  ) const [inline]

Is there a currently selected file?

Author:
Aleksander Demko
bool desktop::FileList::isValid ( int  index) const [inline]

Does the given index refer to a valid file entry?

Author:
Aleksander Demko
int desktop::FileList::numFiles ( void  ) const [inline]

Returns the number of files in the list (basically a size() function)

Author:
Aleksander Demko
FileEntry& desktop::FileList::selectedFile ( void  ) [inline]

Returns the currently selected file index, which must be valid.

Also a helper for selectionModel()

Author:
Aleksander Demko
int desktop::FileList::selectedFileIndex ( void  ) const

Returns the currently selected file's index. Returns -1 if nothing is currently selected

helper for selectionModel.

Author:
Aleksander Demko
QItemSelectionModel* desktop::FileList::selectionModel ( void  ) [inline]

Returns the internal selection model. This keeps tracks of which files are selected (often more than one.) Use isSelected(fileList()->index(x,0)) to test.

Author:
Aleksander Demko
void desktop::FileList::setSelectedFile ( int  index)

Sets the currently selected file. Will do nothing if the index is out of range, or is already the current file. This will fire an event if the current file is changed.

Helper for selectionModel()

Author:
Aleksander Demko

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables