TDE 0.1.0
 
Loading...
Searching...
No Matches
desktop.hpp
Go to the documentation of this file.
1
12#pragma once
13
14#include <qlist.h>
15#include <qprocess.h>
16#include <qwidget.h>
17
18#include "tde/app/info.hpp"
19#include "tde/common.hpp"
20#include "tde/settings.hpp"
21
22namespace tde::widgets {
23
28class TDE_PUBLIC Desktop : public QWidget
29{
30 Q_OBJECT
31
32public:
33 constexpr static int DOCK_MARGIN = 5;
41 Desktop(const DesktopSettings& settings, QWidget* parent = nullptr);
42 ~Desktop() override = default;
43
44private:
50 void _init(const DesktopSettings& settings);
51
57 void _init_ui(const DesktopSettings& settings);
58
59signals:
65 void apps_changed(const QList<app::Info>& apps);
66
72 void dock_apps_changed(const QList<app::Info>& apps);
73
79 void request_launch_app(const app::Info& app);
80
81public slots:
87 void on_app_start(const app::Info& app);
88
95 void on_app_finish(int code, QProcess::ExitStatus status);
96};
97
98}
Desktop settings.
Definition settings.hpp:27
Desktop widget, which is the root of UI.
Definition desktop.hpp:29
void apps_changed(const QList< app::Info > &apps)
Emitted when apps changed.
void request_launch_app(const app::Info &app)
Emitted when the app is requested to be launched.
void dock_apps_changed(const QList< app::Info > &apps)
Emitted when dock apps changed.
Some utility macros.
Application information.
Desktop settings.
Application information.
Definition info.hpp:23