|
tuned-switcher 1.1.0
Performance profile manager
|
#include <trayicon.h>
Public Member Functions | |
| TrayIcon (QWidget *parent=nullptr) | |
| void | Show () |
Private Slots | |
| void | profileSelectedEvent (QAction *) |
| void | profileAutoSelectedEvent (const bool) |
| void | profileChangedEvent (const QString &, const bool, const QString &) |
| void | serviceEnableEvent () |
| void | serviceDisableEvent () |
| void | serviceReloadEvent () |
| void | serviceShutdownEvent () |
| void | showSettingsEvent () |
| void | showAboutEvent () |
| void | exitEvent () |
Private Member Functions | |
| void | initializeSettings () |
| void | initializeNotifications () |
| void | initializeService () |
| void | initializeTuned () |
| void | tryToStartTuned () |
| void | checkServiceRunning () |
| void | checkTunedRunning () |
| void | serviceEnable () |
| void | serviceDisable () |
| void | serviceReload () |
| void | serviceShutdown () |
| void | setProfileExplicitly () |
| void | setTrayIcon () |
| void | resetCurrentProfile () |
| void | setCurrentProfile (const QString &) |
| void | markCurrentProfile () |
| void | setAutoProfileMode (const bool) |
| void | markAutoProfileMode () |
| void | markServiceMode () |
| void | setNotificationsMode () |
| void | subscribeToEvents () |
| void | exitApplication () |
| QAction * | getProfileAction (const QString &) |
| QAction * | createAutoProfileAction (QWidget *) |
| QAction * | createAboutAction (QWidget *) |
| QAction * | createSettingsAction (QWidget *) |
| QAction * | createQuitAction (QWidget *) |
| QMenu * | createServiceControlSubmenu (QWidget *) |
| QMenu * | createProfilesSubmenu (QWidget *) |
| QActionGroup * | createProfilesMenuGroup (QWidget *) |
| QMenu * | createTrayIconMenu () |
Private Attributes | |
| QSystemTrayIcon * | trayIcon |
| SettingsManager * | settings |
| NotificationsManager * | notifications |
| ServiceManager * | serviceManager |
| TunedManager * | tunedManager |
| QActionGroup * | profileActions |
| QAction * | autoProfileAction |
Class for working with the Applet application.
|
explicit |
Main constructor of the TrayIcon class.
| parent | Parent widget. |
|
private |
Check if the Tuned service is not running and try to start it with DBus methods.
|
private |
Check if the Tuned is not running and try to start it with DBus methods.
|
private |
Create a menu entry for the "Show About form" action.
| parent | Parent widget. |
|
private |
Create a menu entry for the "Auto-select profile" action.
| parent | Parent widget. |
|
private |
Enumerate and add the available Tuned profiles to the Profiles submenu.
| parent | Parent widget. |
|
private |
Build and create a submenu with the list of available Tuned profiles.
| parent | Parent widget. |
|
private |
Create a menu entry for the "Quit application" action.
| parent | Parent widget. |
|
private |
Build and create submenu for service control functions.
| parent | Parent widget. |
|
private |
Create a menu entry for the "Show settings" action.
| parent | Parent widget. |
|
private |
Build and create menu for the system tray icon.
|
private |
Exit the application immediately.
|
privateslot |
"Exit application" menu item clicked event slot (handler).
|
private |
Get the assigned Tuned profile action by name.
| profile | Profile name. |
|
private |
Initialize the NotificationsManager class instance.
|
private |
Initialize the ServiceManager class instance.
|
private |
Initialize the SettingsManager class instance.
|
private |
Initialize the TunedManager class instance.
|
private |
Check if the automatic mode is enabled and mark the special checkbox.
|
private |
Get the active Tuned profile and mark it.
|
private |
Check whether the Tuned profile is running or not and enable or disable various form controls.
|
privateslot |
"Auto-select profile" clicked event slot (handler).
| autoMode | "Auto-select profile" mode on or off. |
|
privateslot |
"Tuned profile changed" DBus event slot (handler).
| profile | Recently switched profile name. |
| result | Switch result: true - success; false - failure. |
| message | Result message (OK on success). |
|
privateslot |
"Tuned profile selected" event slot (handler).
| action | System tray menu action, caused this event. |
|
private |
Reset the active Tuned profile.
|
private |
Disable the Tuned service with DBus methods.
|
privateslot |
"Disable the service" menu item clicked event slot (handler).
|
private |
Enable the Tuned service with DBus methods.
|
privateslot |
"Enable the service" menu item clicked event slot (handler).
|
private |
Reload the Tuned service with DBus methods.
|
privateslot |
"Reload the service" menu item clicked event slot (handler).
|
private |
Shut down the Tuned service with DBus methods.
|
privateslot |
"Shut down the service" menu item clicked event slot (handler).
|
private |
Change the "Auto-select profile" mode checkbox.
| autoMode | New "Auto-select profile" mode value. |
|
private |
Set the active Tuned profile.
|
private |
Set the notifications sound mode.
|
private |
Explicitly set the active profile if it is not selected.
|
private |
Create an instance of the QSystemTrayIcon and set its properties.
| void TrayIcon::Show | ( | ) |
Show the system tray icon.
|
privateslot |
"Show About form" menu item clicked event slot (handler).
|
privateslot |
"Show settings" menu item clicked event slot (handler).
|
private |
Subscribe to DBus events.
|
private |
Try to start the Tuned service if not running.
|
private |
Stores a pointer to the "Auto-select profile" menu action.
|
private |
Stores pointer to the NotificationsManager class instance.
|
private |
Stores a pointer to a group of the Tuned profiles QMenu actions.
|
private |
Stores pointer to the ServiceManager class instance.
|
private |
Stores pointer to the SettingsManager class instance.
|
private |
Stores pointer to the QSystemTrayIcon class instance.
|
private |
Stores pointer to the TunedManager class instance.