X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/8c7e12b1f7ae0699c85c4a0cbf29265a13766d43..abf17941f7:/src/viewpropsprogressinfo.h diff --git a/src/viewpropsprogressinfo.h b/src/viewpropsprogressinfo.h index 6d8b8f0c1..8dfb212b4 100644 --- a/src/viewpropsprogressinfo.h +++ b/src/viewpropsprogressinfo.h @@ -15,14 +15,15 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * ***************************************************************************/ #ifndef VIEWPROPSPROGRESSINFO_H #define VIEWPROPSPROGRESSINFO_H #include +#include -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 { @@ -48,25 +52,27 @@ public: */ ViewPropsProgressInfo(QWidget* parent, const KUrl& dir, - const ViewProperties* viewProps); + const ViewProperties& viewProps); virtual ~ViewPropsProgressInfo(); +protected: + virtual void closeEvent(QCloseEvent* event); + 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; + ViewProperties* m_viewProps; + QLabel* m_label; QProgressBar* m_progressBar; - KDirSize* m_dirSizeJob; + + KIO::DirectorySizeJob* m_dirSizeJob; + ApplyViewPropsJob* m_applyViewPropsJob; QTimer* m_timer; };