|
tuned-switcher 1.1.0
Performance profile manager
|
#include <mainwindow.h>


Public Member Functions | |
| MainWindow (QWidget *parent=nullptr) | |
| ~MainWindow () | |
Protected Member Functions | |
| void | mousePressEvent (QMouseEvent *) override |
| void | closeEvent (QCloseEvent *) override |
| void | keyPressEvent (QKeyEvent *) override |
Private Slots | |
| void | profileChangedEvent (const QString &, const bool, const QString &) |
| void | profileSelectedEvent (const QString &) |
| void | closeFormEvent () |
| void | profileAutoSelectedEvent (const bool) |
| void | serviceEnableEvent () |
| void | serviceDisableEvent () |
| void | serviceReloadEvent () |
| void | serviceShutdownEvent () |
| void | showSettingsEvent () |
| void | showAboutEvent () |
Private Member Functions | |
| void | initializeSettings () |
| void | initializeNotifications () |
| void | initializeService () |
| void | initializeTuned () |
| void | setFormEvents () |
| void | tryToStartTuned () |
| void | checkServiceRunning () |
| void | checkTunedRunning () |
| void | serviceEnable () |
| void | serviceDisable () |
| void | serviceReload () |
| void | serviceShutdown () |
| void | setProfileExplicitly () |
| void | getTunedProfiles () |
| void | subscribeToEvents () |
| void | markAutoProfileMode () |
| void | markServiceMode () |
| void | loadFormSettings () |
| void | saveFormSettings () |
| void | setDefaultFormPosition () |
| void | setSavedFormPosition () |
| void | setFormStyle () |
| void | setFormControls () |
| void | resetCurrentProfile () |
| void | setCurrentProfile (const QString &) |
| void | markCurrentProfile () |
| void | setAutoProfileMode (const bool) |
| void | setNotificationsMode () |
| void | exitApplication () |
| QMenu * | createServiceControlSubmenu (QWidget *) |
| QMenu * | createMainMenu (QWidget *) |
Private Attributes | |
| Ui::MainWindow * | ui |
| SettingsManager * | settings |
| NotificationsManager * | notifications |
| ServiceManager * | serviceManager |
| TunedManager * | tunedManager |
Class for working with the GUI application.
|
explicit |
Main constructor of the MainWindow class.
| parent | Parent widget. |
| MainWindow::~MainWindow | ( | ) |
Destructor of the MainWindow class.
|
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.
|
overrideprotected |
Form close event handler.
| event | Event object instance. |
|
privateslot |
Button "Close form" clicked event slot (handler).
|
private |
Build and create main menu.
|
private |
Build and create submenu for service control functions.
| parent | Parent widget. |
|
private |
Exit the application immediately.
|
private |
Get available Tuned profiles for internal usage.
|
private |
Initialize the NotificationsManager class instance.
|
private |
Initialize the ServiceManager class instance.
|
private |
Initialize the SettingsManager class instance.
|
private |
Initialize the TunedManager class instance.
|
overrideprotected |
Key pressed event handler.
| event | Event object instance. |
|
private |
Load form settings: position and size.
|
private |
Check if the automatic mode is enabled and mark the special checkbox.
|
private |
Get the active Tuned profile and set it on form.
|
private |
Check whether the Tuned profile is running or not and enable or disable various form controls.
|
overrideprotected |
Mouse button press event handler.
| event | Event object instance. |
|
privateslot |
Checkbox "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 |
"Profile selected" event slot (handler).
| profile | Profile name. |
|
private |
Reset the active Tuned profile.
|
private |
Save form settings: position and size.
|
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 on the form.
| autoMode | New "Auto-select profile" mode value. |
|
private |
Set the active Tuned profile on form.
|
private |
Set the default form position to the center of the screen.
|
private |
Set custom form controls: menu and its handlers.
|
private |
Initialize and connect the events for the form.
|
private |
Set custom form style: remove border, apply gradients, etc.
|
private |
Set the notifications sound mode.
|
private |
Explicitly set the active profile if it is not selected.
|
private |
Set the form position based on saved settings.
|
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 pointer to the NotificationsManager class instance.
|
private |
Stores pointer to the ServiceManager class instance.
|
private |
Stores pointer to the SettingsManager class instance.
|
private |
Stores pointer to the TunedManager class instance.
|
private |
Stores the GUI application form instance.