service/greetd: add greetd service

This commit is contained in:
outfoxxed 2024-06-20 15:39:49 -07:00
parent 72956185bd
commit 3573663ab6
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
11 changed files with 522 additions and 4 deletions

View file

@ -302,6 +302,12 @@ void EngineGeneration::assignIncubationController() {
this->engine->setIncubationController(controller);
}
EngineGeneration* EngineGeneration::currentGeneration() {
if (g_generations.size() == 1) {
return *g_generations.begin();
} else return nullptr;
}
EngineGeneration* EngineGeneration::findEngineGeneration(QQmlEngine* engine) {
return g_generations.value(engine);
}

View file

@ -36,6 +36,10 @@ public:
static EngineGeneration* findEngineGeneration(QQmlEngine* engine);
static EngineGeneration* findObjectGeneration(QObject* object);
// Returns the current generation if there is only one generation,
// otherwise null.
static EngineGeneration* currentGeneration();
RootWrapper* wrapper = nullptr;
QDir rootPath;
QmlScanner scanner;
@ -57,12 +61,14 @@ signals:
void filesChanged();
void reloadFinished();
public slots:
void quit();
void exit(int code);
private slots:
void onFileChanged(const QString& name);
void onDirectoryChanged();
void incubationControllerDestroyed();
void quit();
void exit(int code);
private:
void postReload();