| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/app/systray.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "core/iprofile.h"cxx . . $ `<file>/src/core/iprofile.h`/ |
| 7 | #include <QAction> |
| 8 | #include <QMenu> |
| 9 | #include <QObject> |
| 10 | #include <QString> |
| 11 | #include <QSystemTrayIcon> |
| 12 | #include <QVariant> |
| 13 | #include <memory> |
| 14 | #include <optional> |
| 15 | #include <string> |
| 16 | |
| 17 | class IProfileManagercxx . . $ IProfileManager#; |
| 18 | class ISessioncxx . . $ ISession#; |
| 19 | |
| 20 | class SysTraycxx . . $ SysTray# : public QObjectcxx . . $ QObject# |
| 21 | { |
| 22 | Q_OBJECTcxx . . $ SysTray#qt_staticMetaObjectContent. |
| 23 | public: |
| 24 | explicit SysTraycxx . . $ SysTray#SysTray(89e3b8547c1c2b46).(ISessioncxx . . $ ISession# *session, QObjectcxx . . $ QObject# *parent = nullptr); |
| 25 | |
| 26 | Q_INVOKABLEcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:78:9`! bool isAvailablecxx . . $ SysTray#isAvailable(50ce9a9e25b4a850).() const; |
| 27 | Q_INVOKABLEcxx . . $ `<external>/4830994369567095248/qtmetamacros.h:78:9`! bool isVisiblecxx . . $ SysTray#isVisible(50ce9a9e25b4a850).() const; |
| 28 | |
| 29 | signalscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:43:14`!: |
| 30 | void activatedcxx . . $ SysTray#activated(49f6e7a06ebc5aa8).(); |
| 31 | void quitcxx . . $ SysTray#quit(49f6e7a06ebc5aa8).(); |
| 32 | void showMainWindowToggledcxx . . $ SysTray#showMainWindowToggled(b45ddcbc8423892c).(bool visible); |
| 33 | |
| 34 | public slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 35 | void showcxx . . $ SysTray#show(49f6e7a06ebc5aa8).(); |
| 36 | void hidecxx . . $ SysTray#hide(49f6e7a06ebc5aa8).(); |
| 37 | void settingChangedcxx . . $ SysTray#settingChanged(1c60a90c724e6bfb).(QStringcxx . . $ QString# const &key, QVariantcxx . . $ QVariant# const &value); |
| 38 | void onMainWindowVisibleChangedcxx . . $ SysTray#onMainWindowVisibleChanged(b45ddcbc8423892c).(bool isVisible); |
| 39 | |
| 40 | private slotscxx . . $ `<external>/4830994369567095248/qtmetamacros.h:42:14`!: |
| 41 | void onTrayIconActivatedcxx . . $ SysTray#onTrayIconActivated(dc7279b31293a212).(QSystemTrayIconcxx . . $ QSystemTrayIcon#::ActivationReasoncxx . . $ QSystemTrayIcon#ActivationReason# reason); |
| 42 | void onShowMainWindowActionTriggeredcxx . . $ SysTray#onShowMainWindowActionTriggered(49f6e7a06ebc5aa8).(); |
| 43 | |
| 44 | private: |
| 45 | void profileAddedcxx . . $ SysTray#profileAdded(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &profileName); |
| 46 | void profileRemovedcxx . . $ SysTray#profileRemoved(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &profileName); |
| 47 | void profileInfoChangedcxx . . $ SysTray#profileInfoChanged(1acf29b044426ccc).(IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# const &oldInfo, |
| 48 | IProfilecxx . . $ IProfile#::Infocxx . . $ IProfile#Info# const &newInfo); |
| 49 | void manualProfileToggledcxx . . $ SysTray#manualProfileToggled(a3b17e0268c60856).(stdcxx . . $ std/::stringcxx . . $ std/string# const &profileName, bool active); |
| 50 | |
| 51 | QSystemTrayIconcxx . . $ QSystemTrayIcon# *createSystemTrayIconcxx . . $ SysTray#createSystemTrayIcon(ff24298194fb9bae).(); |
| 52 | QMenucxx . . $ QMenu# *menucxx . . $ SysTray#menu(fe0a096c13a48705).(); |
| 53 | QActioncxx . . $ QAction# *createManualProfileActioncxx . . $ SysTray#createManualProfileAction(fddc7be664403c97).(QMenucxx . . $ QMenu# *menu, stdcxx . . $ std/::stringcxx . . $ std/string# const &profileName); |
| 54 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<QActioncxx . . $ QAction# *> findManualProfileActioncxx . . $ SysTray#findManualProfileAction(8c55afb0602b2e45).(stdcxx . . $ std/::stringcxx . . $ std/string# const &profileName); |
| 55 | QActioncxx . . $ QAction# *findNextManualProfileActionPositioncxx . . $ SysTray#findNextManualProfileActionPosition(cb2f121c73164b5d).(stdcxx . . $ std/::stringcxx . . $ std/string# const &profileName); |
| 56 | void addManualProfilesTocxx . . $ SysTray#addManualProfilesTo(cb52c12b49e9b51b).(QMenucxx . . $ QMenu# *menu); |
| 57 | void onManualProfileMenuTriggeredcxx . . $ SysTray#onManualProfileMenuTriggered(3520e46b33348bf6).(QStringcxx . . $ QString# const &profile); |
| 58 | |
| 59 | ISessioncxx . . $ ISession# *session_cxx . . $ SysTray#session_.; |
| 60 | IProfileManagercxx . . $ IProfileManager# *profileManager_cxx . . $ SysTray#profileManager_.; |
| 61 | QSystemTrayIconcxx . . $ QSystemTrayIcon# *sysTray_cxx . . $ SysTray#sysTray_.{nullptr}; |
| 62 | QMenucxx . . $ QMenu# menu_cxx . . $ SysTray#menu_.; |
| 63 | QMenucxx . . $ QMenu# *manualProfileMenu_cxx . . $ SysTray#manualProfileMenu_.{nullptr}; |
| 64 | QActioncxx . . $ QAction# *showMainWindowAction_cxx . . $ SysTray#showMainWindowAction_.{nullptr}; |
| 65 | bool showMainWindow_cxx . . $ SysTray#showMainWindow_.; |
| 66 | |
| 67 | class ProfileManagerObservercxx . . $ SysTray#ProfileManagerObserver#; |
| 68 | stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<ProfileManagerObservercxx . . $ SysTray#ProfileManagerObserver#> profileManagerObserver_cxx . . $ SysTray#profileManagerObserver_.; |
| 69 | |
| 70 | class ManualProfileObservercxx . . $ SysTray#ManualProfileObserver#; |
| 71 | stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<ManualProfileObservercxx . . $ SysTray#ManualProfileObserver#> manualProfileObserver_cxx . . $ SysTray#manualProfileObserver_.; |
| 72 | }; |