quickshell/src/cpp/rootwrapper.hpp

32 lines
580 B
C++
Raw Normal View History

#pragma once
#include <qobject.h>
#include <qqmlengine.h>
#include <qtmetamacros.h>
#include <qurl.h>
2024-02-01 09:29:45 +00:00
#include "scavenge.hpp"
#include "shell.hpp"
#include "watcher.hpp"
2024-02-01 09:29:45 +00:00
class RootWrapper: public QObject, virtual public Scavengeable {
Q_OBJECT;
public:
explicit RootWrapper(QString rootPath);
2024-02-01 09:29:45 +00:00
QObject* scavengeTargetFor(QObject* child) override;
void reloadGraph(bool hard);
private slots:
void onConfigChanged();
void onWatchedFilesChanged();
private:
QString rootPath;
QQmlEngine engine;
ShellRoot* root = nullptr;
FiletreeWatcher* configWatcher = nullptr;
};