nextcloud-desktop/src/mirall/folder.h

58 lines
904 B
C
Raw Normal View History

2011-02-17 02:21:45 +03:00
#ifndef MIRALL_FOLDER_H
#define MIRALL_FOLDER_H
#include <QObject>
#include <QString>
#include <QStringList>
2011-02-17 02:21:45 +03:00
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;
2011-02-17 02:21:45 +03:00
/**
* starts a sync operation
* requests are serialized
*/
virtual void startSync(const QStringList &pathList) = 0;
2011-02-17 02:21:45 +03:00
virtual bool isSyncing() const = 0;
2011-02-17 02:21:45 +03:00
signals:
void syncStarted();
void syncFinished();
protected:
private:
QString _path;
FolderWatcher *_watcher;
QAction *_openAction;
2011-02-17 02:21:45 +03:00
private slots:
void slotChanged(const QStringList &pathList);
2011-02-17 02:21:45 +03:00
void slotOpenFolder();
void slotSyncStarted();
void slotSyncFinished();
2011-02-17 02:21:45 +03:00
};
}
#endif