mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-04 19:04:56 +11:00
24 lines
434 B
C++
24 lines
434 B
C++
#pragma once
|
|
|
|
#include <qdir.h>
|
|
#include <qfilesystemwatcher.h>
|
|
#include <qobject.h>
|
|
|
|
class FiletreeWatcher: public QObject {
|
|
Q_OBJECT;
|
|
|
|
public:
|
|
explicit FiletreeWatcher(QObject* parent = nullptr);
|
|
|
|
void addPath(const QString& path);
|
|
|
|
signals:
|
|
void fileChanged(const QString& path);
|
|
|
|
private slots:
|
|
void onDirectoryChanged(const QString& path);
|
|
void onFileChanged(const QString& path);
|
|
|
|
private:
|
|
QFileSystemWatcher watcher;
|
|
};
|