Warning, file /system/dolphin/src/settings/viewpropsprogressinfo.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * SPDX-FileCopyrightText: 2006 Peter Penz <peter.penz@gmx.at>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 #ifndef VIEWPROPSPROGRESSINFO_H
0007 #define VIEWPROPSPROGRESSINFO_H
0008 
0009 #include <kio/directorysizejob.h>
0010 
0011 #include <QDialog>
0012 #include <QUrl>
0013 
0014 class ApplyViewPropsJob;
0015 class QLabel;
0016 class QProgressBar;
0017 class QTimer;
0018 class ViewProperties;
0019 
0020 /**
0021  * @brief Shows the progress information when applying view properties
0022  *        recursively to a given directory.
0023  *
0024  * It is possible to cancel the applying. In this case the already applied
0025  * view properties won't get reverted.
0026  */
0027 class ViewPropsProgressInfo : public QDialog
0028 {
0029     Q_OBJECT
0030 
0031 public:
0032     /**
0033      * @param parent    Parent widget of the dialog.
0034      * @param dir       Directory where the view properties should be applied to
0035      *                  (including sub directories).
0036      * @param viewProps View properties for the directory \a dir including its
0037      *                  sub directories.
0038      */
0039     ViewPropsProgressInfo(QWidget *parent, const QUrl &dir, const ViewProperties &viewProps);
0040 
0041     ~ViewPropsProgressInfo() override;
0042 
0043 protected:
0044     void closeEvent(QCloseEvent *event) override;
0045 
0046 public Q_SLOTS:
0047     void reject() override;
0048 
0049 private Q_SLOTS:
0050     void updateProgress();
0051     void applyViewProperties();
0052 
0053 private:
0054     QUrl m_dir;
0055     ViewProperties *m_viewProps;
0056 
0057     QLabel *m_label;
0058     QProgressBar *m_progressBar;
0059 
0060     KIO::DirectorySizeJob *m_dirSizeJob;
0061     ApplyViewPropsJob *m_applyViewPropsJob;
0062     QTimer *m_timer;
0063 };
0064 
0065 #endif