threadedlister.h (krename-4.0.9) | : | threadedlister.h (krename-4.90.90) | ||
---|---|---|---|---|
skipping to change at line 33 | skipping to change at line 33 | |||
#include <QMutex> | #include <QMutex> | |||
#include <kfileitem.h> | #include <kfileitem.h> | |||
#include "krenamefile.h" | #include "krenamefile.h" | |||
class KRenameModel; | class KRenameModel; | |||
class QMutex; | class QMutex; | |||
class QWidget; | class QWidget; | |||
namespace KIO { | namespace KIO | |||
class Job; | { | |||
class KUDSEntry; | class Job; | |||
}; | }; | |||
class ThreadedLister : public QObject | class ThreadedLister : public QObject | |||
{ | { | |||
Q_OBJECT | Q_OBJECT | |||
public: | public: | |||
ThreadedLister( const KUrl & dirname, QWidget* cache, KRenameModel* mode | ThreadedLister(const QUrl &dirname, QWidget *cache, KRenameModel *model); | |||
l ); | ~ThreadedLister(); | |||
~ThreadedLister(); | ||||
inline void start() | ||||
inline void start() { this->run(); } | { | |||
this->run(); | ||||
/** Sets if dirnames should listed along with the filenames. | } | |||
* This is disabled by default. | ||||
* | /** Sets if dirnames should listed along with the filenames. | |||
* \param names if true dirnames are listed along with the filenames. | * This is disabled by default. | |||
*/ | * | |||
inline void setListDirnames( bool names ); | * \param names if true dirnames are listed along with the filenames. | |||
*/ | ||||
/** Sets if only dirnames should listed. | inline void setListDirnames(bool names); | |||
* This is disabled by default. | ||||
* | /** Sets if only dirnames should listed. | |||
* \param names if true only dirnames are listed. | * This is disabled by default. | |||
*/ | * | |||
inline void setListDirnamesOnly( bool names ); | * \param names if true only dirnames are listed. | |||
*/ | ||||
inline void setFilter( const QString & filter ); | inline void setListDirnamesOnly(bool names); | |||
inline void setListHidden( bool h ); | ||||
inline void setListRecursively( bool r ); | inline void setFilter(const QString &filter); | |||
inline void setListHidden(bool h); | ||||
signals: | inline void setListRecursively(bool r); | |||
void listerDone( ThreadedLister* ); | ||||
Q_SIGNALS: | ||||
protected: | void listerDone(ThreadedLister *); | |||
void run(); | ||||
protected: | ||||
private slots: | void run(); | |||
void completed(); | ||||
private Q_SLOTS: | ||||
void foundItem(KIO::Job*, const KIO::UDSEntryList & list); | void completed(); | |||
private: | void foundItem(KIO::Job *, const KIO::UDSEntryList &list); | |||
static QMutex s_mutex; ///< Mutex assuring that only one thread at a | ||||
time will work on m_model | private: | |||
static QMutex s_mutex; ///< Mutex assuring that only one thread at a tim | ||||
KUrl m_dirname; | e will work on m_model | |||
QString m_filter; | ||||
bool m_listHiddenFiles; | QUrl m_dirname; | |||
bool m_listRecursive; | QString m_filter; | |||
bool m_listDirnamesOnly; | bool m_listHiddenFiles; | |||
bool m_listDirnames; | bool m_listRecursive; | |||
bool m_listDirnamesOnly; | ||||
QWidget* m_cache; | bool m_listDirnames; | |||
KRenameModel* m_model; | ||||
KRenameFile::List m_files; | QWidget *m_cache; | |||
KRenameModel *m_model; | ||||
KRenameFile::List m_files; | ||||
ESplitMode m_eSplitMode; | ESplitMode m_eSplitMode; | |||
unsigned int m_dot; | unsigned int m_dot; | |||
}; | }; | |||
void ThreadedLister::setListDirnames( bool names ) | void ThreadedLister::setListDirnames(bool names) | |||
{ | { | |||
m_listDirnames = names; | m_listDirnames = names; | |||
} | } | |||
void ThreadedLister::setListDirnamesOnly( bool names ) | void ThreadedLister::setListDirnamesOnly(bool names) | |||
{ | { | |||
m_listDirnamesOnly = names; | m_listDirnamesOnly = names; | |||
} | } | |||
void ThreadedLister::setFilter( const QString & filter ) | void ThreadedLister::setFilter(const QString &filter) | |||
{ | { | |||
m_filter = filter; | m_filter = filter; | |||
} | } | |||
void ThreadedLister::setListHidden( bool h ) | void ThreadedLister::setListHidden(bool h) | |||
{ | { | |||
m_listHiddenFiles = h; | m_listHiddenFiles = h; | |||
} | } | |||
void ThreadedLister::setListRecursively( bool r ) | void ThreadedLister::setListRecursively(bool r) | |||
{ | { | |||
m_listRecursive = r; | m_listRecursive = r; | |||
} | } | |||
#endif | #endif | |||
End of changes. 8 change blocks. | ||||
60 lines changed or deleted | 62 lines changed or added |