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

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2014-08-26 16:33:21 +0400
committerDaniel Molkentin <danimo@owncloud.com>2014-08-26 16:33:21 +0400
commite5471d8318a7063f726a8df1abc6a7c7d1648f9a (patch)
tree8300c39f2325fdd4770a6c69d3c9b01614749ce6 /src/gui/selectivesyncdialog.h
parent902bb7a198c2fcefaf2ac741efadfc10d891fac7 (diff)
Build after merge
Diffstat (limited to 'src/gui/selectivesyncdialog.h')
-rw-r--r--src/gui/selectivesyncdialog.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/gui/selectivesyncdialog.h b/src/gui/selectivesyncdialog.h
new file mode 100644
index 000000000..0506c18f2
--- /dev/null
+++ b/src/gui/selectivesyncdialog.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) by Olivier Goffart <ogoffart@woboq.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
+
+#pragma once
+#include <QDialog>
+#include <QTreeWidget>
+
+class QTreeWidgetItem;
+class QTreeWidget;
+namespace Mirall {
+
+class Folder;
+
+class SelectiveSyncTreeView : public QTreeWidget {
+ Q_OBJECT
+public:
+ explicit SelectiveSyncTreeView(QWidget* parent = 0);
+ QStringList createBlackList(QTreeWidgetItem* root = 0) const;
+ void refreshFolders();
+ void setFolderInfo(const QString &folderPath, const QString &rootName,
+ const QStringList &oldBlackList = QStringList()) {
+ _folderPath = folderPath;
+ _rootName = rootName;
+ _oldBlackList = oldBlackList;
+ refreshFolders();
+ }
+private slots:
+ void slotUpdateDirectories(const QStringList &);
+ void slotItemExpanded(QTreeWidgetItem *);
+ void slotItemChanged(QTreeWidgetItem*,int);
+private:
+ void recursiveInsert(QTreeWidgetItem* parent, QStringList pathTrail, QString path);
+ QString _folderPath;
+ QString _rootName;
+ QStringList _oldBlackList;
+ bool _inserting = false; // set to true when we are inserting new items on the list
+};
+
+class SelectiveSyncDialog : public QDialog {
+ Q_OBJECT
+public:
+ explicit SelectiveSyncDialog(Folder *folder, QWidget* parent = 0, Qt::WindowFlags f = 0);
+
+ virtual void accept() Q_DECL_OVERRIDE;
+
+private:
+
+ SelectiveSyncTreeView *_treeView;
+
+ Folder *_folder;
+};
+
+}