diff options
| author | Peter Penz <[email protected]> | 2006-12-07 17:22:51 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2006-12-07 17:22:51 +0000 |
| commit | ced7cbd022b68c8dedd61b5d34d27b9c1296df15 (patch) | |
| tree | 96b3098444d38fa84675364ee25cb4a033bf2c43 /src/viewpropsprogressinfo.h | |
| parent | d3611c41f4c453c81d95e013c68ddf65c94e9bc0 (diff) | |
Use a KIO Job for applying the view properties recursively to sub directories.
svn path=/trunk/playground/utils/dolphin/; revision=611325
Diffstat (limited to 'src/viewpropsprogressinfo.h')
| -rw-r--r-- | src/viewpropsprogressinfo.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/viewpropsprogressinfo.h b/src/viewpropsprogressinfo.h index 6d8b8f0c1..ac591e6bc 100644 --- a/src/viewpropsprogressinfo.h +++ b/src/viewpropsprogressinfo.h @@ -21,8 +21,9 @@ #define VIEWPROPSPROGRESSINFO_H #include <kdialog.h> +#include <kio/directorysizejob.h> -class KDirSize; +class ApplyViewPropsJob; class KJob; class KUrl; class QLabel; @@ -31,8 +32,11 @@ class QTimer; class ViewProperties; /** - * @brief Shows the progress when applying view properties recursively to - * sub directories. + * @brief Shows the progress information when applying view properties + * recursively to a given directory. + * + * It is possible to cancel the applying. In this case the already applied + * view properties won't get reverted. */ class ViewPropsProgressInfo : public KDialog { @@ -53,20 +57,19 @@ public: virtual ~ViewPropsProgressInfo(); private slots: - void countDirs(const KUrl& dir, int count); - //void updateDirCounter(); - //void slotResult(KJob* job); + void updateProgress(); void applyViewProperties(); - void showProgress(const KUrl& url, int count); + void cancelApplying(); private: - int m_dirCount; - int m_applyCount; const KUrl& m_dir; const ViewProperties* m_viewProps; + QLabel* m_label; QProgressBar* m_progressBar; - KDirSize* m_dirSizeJob; + + KIO::DirectorySizeJob* m_dirSizeJob; + ApplyViewPropsJob* m_applyViewPropsJob; QTimer* m_timer; }; |
