Add desktop app service and VM dev session tooling
Introduces a new `core/applications` QML/C++ module (`Nebula.Applications`) to discover `.desktop` entries, expose filterable application models, and launch installed apps safely from the shell. The desktop launcher now uses real installed apps with themed icon loading and fallback glyphs, adds output-aware surface sizing via `OutputTracker`, and wires in image/icon providers. It also adds VMware-focused Sway/shell wrapper scripts, updates Sway config/session env defaults, and refreshes README docs to document the new development flow and Desktop 0.1 behavior.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "ApplicationFilterModel.hpp"
|
||||
#include "ApplicationModel.hpp"
|
||||
|
||||
#include <QJSEngine>
|
||||
#include <QObject>
|
||||
#include <QQmlEngine>
|
||||
#include <QtQml/qqmlregistration.h>
|
||||
|
||||
class ApplicationService : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
QML_SINGLETON
|
||||
Q_PROPERTY(ApplicationModel *model READ model CONSTANT)
|
||||
Q_PROPERTY(ApplicationFilterModel *filteredModel READ filteredModel CONSTANT)
|
||||
Q_PROPERTY(QString filter READ filter WRITE setFilter NOTIFY filterChanged)
|
||||
Q_PROPERTY(int count READ count NOTIFY countChanged)
|
||||
|
||||
public:
|
||||
explicit ApplicationService(QObject *parent = nullptr);
|
||||
static ApplicationService *create(QQmlEngine *engine, QJSEngine *scriptEngine);
|
||||
|
||||
ApplicationModel *model() const;
|
||||
ApplicationFilterModel *filteredModel() const;
|
||||
|
||||
QString filter() const;
|
||||
void setFilter(const QString &filter);
|
||||
int count() const;
|
||||
|
||||
Q_INVOKABLE bool launch(const QString &desktopId) const;
|
||||
Q_INVOKABLE void refresh();
|
||||
|
||||
signals:
|
||||
void filterChanged();
|
||||
void countChanged();
|
||||
|
||||
private:
|
||||
ApplicationModel *m_model = nullptr;
|
||||
ApplicationFilterModel *m_filtered = nullptr;
|
||||
};
|
||||
Reference in New Issue
Block a user