blob: 801281dad3cfc43e8f794038378c19b2ccecd377 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#ifndef MIRALL_FOLDER_H
#define MIRALL_FOLDER_H
#include <QObject>
#include <QString>
#include <QStringList>
class QAction;
namespace Mirall {
class FolderWatcher;
class Folder : public QObject
{
Q_OBJECT
public:
Folder(const QString &path, QObject *parent = 0L);
virtual ~Folder();
/**
* local folder path
*/
QString path() const;
QAction *openAction() const;
/**
* starts a sync operation
* requests are serialized
*/
virtual void startSync(const QStringList &pathList) = 0;
/**
* True if the folder is busy and can't initiate
* a synchronization
*/
virtual bool isBusy() const = 0;
signals:
void syncStarted();
void syncFinished();
protected:
FolderWatcher *_watcher;
private:
QString _path;
QAction *_openAction;
protected slots:
/* called when the watcher detect a list of changed
paths */
void slotChanged(const QStringList &pathList);
void slotOpenFolder();
void slotSyncStarted();
void slotSyncFinished();
};
}
#endif
|