TDE 0.1.0
 
Loading...
Searching...
No Matches
appitem.hpp
Go to the documentation of this file.
1
12#pragma once
13
14#include <qtoolbutton.h>
15
16#include "tde/app/info.hpp"
17#include "tde/common.hpp"
18
19namespace tde::widgets {
20
25class TDE_PUBLIC AppItem : public QToolButton
26{
27 Q_OBJECT
28
29public:
30 constexpr static int ICON_SIZE =
31 48;
33private:
34 QString _exec;
35
36public:
43 AppItem(const app::Info& app, QWidget* parent = nullptr);
44 ~AppItem() override = default;
45
51 [[nodiscard]] TDE_INLINE auto& exec() const { return _exec; }
52
58 [[nodiscard]] app::Info to_app_info() const;
59
60signals:
66 void request_launch_app(const app::Info& app);
67
68private slots:
73 void _on_released();
74};
75
76}
Application item widget.
Definition appitem.hpp:26
TDE_INLINE auto & exec() const
Get the exec command.
Definition appitem.hpp:51
void request_launch_app(const app::Info &app)
Emitted when the app is requested to be launched.
Some utility macros.
Application information.
Application information.
Definition info.hpp:23