mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-28 16:13:53 +03:00
47 lines
671 B
C
47 lines
671 B
C
|
#ifndef MIRALL_FOLDER_H
|
||
|
#define MIRALL_FOLDER_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QString>
|
||
|
|
||
|
class QAction;
|
||
|
|
||
|
namespace Mirall {
|
||
|
|
||
|
class FolderWatcher;
|
||
|
|
||
|
class Folder : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
Folder(const QString &path, QObject *parent = 0L);
|
||
|
virtual ~Folder();
|
||
|
|
||
|
QAction *action() const;
|
||
|
|
||
|
/**
|
||
|
* starts a sync operation
|
||
|
* requests are serialized
|
||
|
*/
|
||
|
virtual void startSync() = 0;
|
||
|
|
||
|
signals:
|
||
|
void syncStarted();
|
||
|
void syncFinished();
|
||
|
|
||
|
protected:
|
||
|
|
||
|
private:
|
||
|
QString _path;
|
||
|
FolderWatcher *_watcher;
|
||
|
QAction *_action;
|
||
|
private slots:
|
||
|
void slotChanged(const QString &path);
|
||
|
void slotOpenFolder();
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|