Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2015-06-02 20:45:23 +0300
committerOlivier Goffart <ogoffart@woboq.com>2015-06-02 20:45:23 +0300
commit984434c7289ad2382092dc00ce293525286ff26e (patch)
treebea7c257f1cbb1e143acddef2c047d1a0ed9eb1a /src/gui/folderstatusmodel.h
parent28a66cb393d9041792b91935a242e35b4d9bec8f (diff)
AccountSettings: move the progress handling in FolderStatusModel
This is required to compile with Qt4 because signals were protected. And the logic anyway belongs to the model
Diffstat (limited to 'src/gui/folderstatusmodel.h')
-rw-r--r--src/gui/folderstatusmodel.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h
index 9658e477e..650a4aa5e 100644
--- a/src/gui/folderstatusmodel.h
+++ b/src/gui/folderstatusmodel.h
@@ -26,6 +26,7 @@
namespace OCC {
class Folder;
+class ProgressInfo;
class FolderStatusModel : public QAbstractItemModel
{
@@ -57,6 +58,16 @@ public:
QVector<SubFolderInfo> _subs;
Qt::CheckState _checked = Qt::Checked;
Folder *_folder;
+
+ struct Progress {
+ bool isNull() const
+ { return _progressString.isEmpty() && _warningCount == 0 && _overallSyncString.isEmpty(); }
+ QString _progressString;
+ QString _overallSyncString;
+ int _warningCount = 0;
+ int _overallPercent = 0;
+ };
+ Progress _progress;
};
QVector<SubFolderInfo> _folders;
@@ -68,23 +79,16 @@ public:
// If the selective sync check boxes were changed
bool isDirty() { return _dirty; }
- struct ProgressInfo {
- bool isNull() const
- { return _progressString.isEmpty() && _warningCount == 0 && _overallSyncString.isEmpty(); }
- QString _progressString;
- QString _overallSyncString;
- int _warningCount = 0;
- int _overallPercent = 0;
- };
- QVector<ProgressInfo> _progresses;
-
-
public slots:
+ void slotUpdateFolderState(Folder *);
void slotApplySelectiveSync();
void resetFolders();
+ void slotSetProgress(const ProgressInfo &progress);
private slots:
void slotUpdateDirectories(const QStringList &);
+ void slotHideProgress();
+ void slotFolderSyncStateChange();
private:
QStringList createBlackList(OCC::FolderStatusModel::SubFolderInfo* root,