tuned-switcher 1.1.0
Performance profile manager
Loading...
Searching...
No Matches
SettingsManager Class Reference

#include <settingsmanager.h>

Inheritance diagram for SettingsManager:
Collaboration diagram for SettingsManager:

Public Member Functions

bool IsGeometrySavingSupported () const
 
bool GetGeometrySavingEnabled () const
 
void SetGeometrySavingEnabled (const bool)
 
QByteArray GetWidgetGeometry () const
 
void SetWidgetGeometry (const QByteArray &)
 
QByteArray GetSettingsGeometry () const
 
void SetSettingsGeometry (const QByteArray &)
 
QByteArray GetAboutGeometry () const
 
void SetAboutGeometry (const QByteArray &)
 
bool GetSoundEnabled () const
 
void SetSoundEnabled (const bool)
 
bool IsAutorunSupported () const
 
bool GetAutorunEnabled () const
 
void SetAutorunEnabled (const bool) const
 
void Reset () const
 
void ResetGeometry () const
 
 SettingsManager (QObject *parent=nullptr)
 

Private Attributes

QSettings * Settings
 
AutorunManagerAutorun
 
bool IsWayland
 
const QString GeometrySavingEnabledName = QStringLiteral("common/saveGeometry")
 
const QString WidgetGeometryName = QStringLiteral("widget/geometry")
 
const QString SettingsGeometryName = QStringLiteral("settings/geometry")
 
const QString AboutGeometryName = QStringLiteral("about/geometry")
 
const QString AutorunEnabledName = QStringLiteral("common/autorunEnabled")
 
const QString SoundEnabledName = QStringLiteral("common/soundEnabled")
 

Detailed Description

Class for working with program settings.

Constructor & Destructor Documentation

◆ SettingsManager()

SettingsManager::SettingsManager ( QObject * parent = nullptr)
explicit

Main constructor of the SettingsManager class.

Parameters
parentParent.

Member Function Documentation

◆ GetAboutGeometry()

QByteArray SettingsManager::GetAboutGeometry ( ) const

Get the geometry of the About form.

Returns
Geometry of the About form.

◆ GetAutorunEnabled()

bool SettingsManager::GetAutorunEnabled ( ) const

Get whether the autorun feature is enabled.

Returns
Whether the autorun feature is enabled.

◆ GetGeometrySavingEnabled()

bool SettingsManager::GetGeometrySavingEnabled ( ) const

Get whether saving the form geometry is enabled.

Returns
Whether saving the form geometry is enabled.

◆ GetSettingsGeometry()

QByteArray SettingsManager::GetSettingsGeometry ( ) const

Get the geometry of the settings form.

Returns
Geometry of the settings form.

◆ GetSoundEnabled()

bool SettingsManager::GetSoundEnabled ( ) const

Get the notification sound configuration.

Returns
Notification sound configuration.

◆ GetWidgetGeometry()

QByteArray SettingsManager::GetWidgetGeometry ( ) const

Get the geometry of the widget form.

Returns
Geometry of the widget form.

◆ IsAutorunSupported()

bool SettingsManager::IsAutorunSupported ( ) const

Get whether the autorun feature is supported.

Returns
Whether the autorun feature is supported.

◆ IsGeometrySavingSupported()

bool SettingsManager::IsGeometrySavingSupported ( ) const

Get whether saving the form geometry is supported.

Returns
Whether saving the form geometry is supported.

◆ Reset()

void SettingsManager::Reset ( ) const

Reset all settings to default values.

◆ ResetGeometry()

void SettingsManager::ResetGeometry ( ) const

Reset the geometry settings to default values.

◆ SetAboutGeometry()

void SettingsManager::SetAboutGeometry ( const QByteArray & value)

Set the geometry of the About form.

Parameters
valueNew About form geometry value.

◆ SetAutorunEnabled()

void SettingsManager::SetAutorunEnabled ( const bool value) const

Set whether the autorun feature is enabled.

Parameters
valueEnable or disable the autorun feature.

◆ SetGeometrySavingEnabled()

void SettingsManager::SetGeometrySavingEnabled ( const bool value)

Set whether saving the form geometry is enabled.

Parameters
valueEnable or disable saving the form geometry.

◆ SetSettingsGeometry()

void SettingsManager::SetSettingsGeometry ( const QByteArray & value)

Set the geometry of the settings form.

Parameters
valueNew settings form geometry value.

◆ SetSoundEnabled()

void SettingsManager::SetSoundEnabled ( const bool value)

Set the notification sound configuration.

Parameters
valueNew notification sound configuration value.

◆ SetWidgetGeometry()

void SettingsManager::SetWidgetGeometry ( const QByteArray & value)

Set the geometry of the widget form.

Parameters
valueNew widget form geometry value.

Member Data Documentation

◆ AboutGeometryName

const QString SettingsManager::AboutGeometryName = QStringLiteral("about/geometry")
private

Stores the geometry of the About form option name.

◆ Autorun

AutorunManager* SettingsManager::Autorun
private

Stores a pointer to the AutorunManager class instance.

◆ AutorunEnabledName

const QString SettingsManager::AutorunEnabledName = QStringLiteral("common/autorunEnabled")
private

Stores whether the autorun feature is enabled.

◆ GeometrySavingEnabledName

const QString SettingsManager::GeometrySavingEnabledName = QStringLiteral("common/saveGeometry")
private

Stores whether saving the form geometry is enabled.

◆ IsWayland

bool SettingsManager::IsWayland
private

Stores whether the application is running on Wayland platform.

◆ Settings

QSettings* SettingsManager::Settings
private

Stores a pointer to the QSettings class instance.

◆ SettingsGeometryName

const QString SettingsManager::SettingsGeometryName = QStringLiteral("settings/geometry")
private

Stores the geometry of the settings form option name.

◆ SoundEnabledName

const QString SettingsManager::SoundEnabledName = QStringLiteral("common/soundEnabled")
private

Stores the notification sound configuration option name.

◆ WidgetGeometryName

const QString SettingsManager::WidgetGeometryName = QStringLiteral("widget/geometry")
private

Stores the geometry of the widget form option name.


The documentation for this class was generated from the following files: