VoiceAssistant  main
Resource-efficient, customizable voice assistant
Loading...
Searching...
No Matches
SettingsWidget Class Referenceabstract

#include <settingswidget.h>

Inheritance diagram for SettingsWidget:
[legend]
Collaboration diagram for SettingsWidget:
[legend]

Public Member Functions

 SettingsWidget (QWidget *parent=nullptr)
 SettingsWidget constructor.
 
 ~SettingsWidget ()=default
 SettingsWidget destructor.
 
virtual void apply ()=0
 apply applies the changes made in the settings widget.
 
virtual void finish ()=0
 finish writes the settings to storage.
 
QString displayName () const
 displayName returns the display name of the settings widget.
 
QString displayCategory () const
 displayCategory returns the display category of the settings widget.
 
const QIcon & categoryIcon () const
 categoryIcon returns the icon of the settings widget category.
 
const QStringList & keyWords ()
 keyWords returns the keywords associated with the settings widget.
 
virtual void setSettings (QSettings *settings) final
 setSettings sets the QSettings object to be used by the settings widget.
 

Protected Member Functions

void setDisplayName (const QString &displayName)
 setDisplayName sets the display name of the settings widget.
 
void setDisplayCategory (const QString &displayCategory)
 setDisplayCategory sets the display category of the settings widget.
 
void setCategoryIcon (const QIcon &categoryIcon)
 setCategoryIcon sets the icon of the settings widget category.
 
QSettings * settings ()
 settings returns the QSettings object used by the settings widget.
 

Detailed Description

Definition at line 15 of file settingswidget.h.

Constructor & Destructor Documentation

◆ SettingsWidget()

SettingsWidget::SettingsWidget ( QWidget *  parent = nullptr)
inlineexplicit

SettingsWidget constructor.

Parameters
parentThe parent widget.

Definition at line 23 of file settingswidget.h.

◆ ~SettingsWidget()

SettingsWidget::~SettingsWidget ( )
default

SettingsWidget destructor.

The destructor is responsible for cleaning up the object.

Member Function Documentation

◆ apply()

virtual void SettingsWidget::apply ( )
pure virtual

apply applies the changes made in the settings widget.

This function is called when the apply button is pressed in the settings widget. Subclasses should implement this function to apply the changes made by the user.

◆ categoryIcon()

const QIcon & SettingsWidget::categoryIcon ( ) const
inline

categoryIcon returns the icon of the settings widget category.

Returns
The category icon.

This function returns the icon of the settings widget category, which is displayed in the list.

Definition at line 71 of file settingswidget.h.

◆ displayCategory()

QString SettingsWidget::displayCategory ( ) const
inline

displayCategory returns the display category of the settings widget.

Returns
The display category.

This function returns the display category of the settings widget, which is used as the name in the list.

Definition at line 63 of file settingswidget.h.

◆ displayName()

QString SettingsWidget::displayName ( ) const
inline

displayName returns the display name of the settings widget.

Returns
The display name.

This function returns the display name of the settings widget, which is used as the tab name.

Definition at line 55 of file settingswidget.h.

◆ finish()

virtual void SettingsWidget::finish ( )
pure virtual

finish writes the settings to storage.

This function is called when the settings are about to be saved. Subclasses should implement this function to write the settings to the appropriate storage.

◆ keyWords()

const QStringList & SettingsWidget::keyWords ( )
inline

keyWords returns the keywords associated with the settings widget.

Returns
The list of keywords.

This function returns the keywords associated with the settings widget. The keywords are used for searching within the settings.

Definition at line 80 of file settingswidget.h.

◆ setCategoryIcon()

void SettingsWidget::setCategoryIcon ( const QIcon &  categoryIcon)
inlineprotected

setCategoryIcon sets the icon of the settings widget category.

Parameters
categoryIconThe category icon.

This function sets the icon of the settings widget category. The category icon is displayed in the list for the settings widget.

Definition at line 135 of file settingswidget.h.

◆ setDisplayCategory()

void SettingsWidget::setDisplayCategory ( const QString &  displayCategory)
inlineprotected

setDisplayCategory sets the display category of the settings widget.

Parameters
displayCategoryThe display category.

This function sets the display category of the settings widget. The display category is used as the name in the list for the settings widget.

Definition at line 126 of file settingswidget.h.

◆ setDisplayName()

void SettingsWidget::setDisplayName ( const QString &  displayName)
inlineprotected

setDisplayName sets the display name of the settings widget.

Parameters
displayNameThe display name.

This function sets the display name of the settings widget. The display name is used as the tab name for the settings widget.

Definition at line 117 of file settingswidget.h.

◆ setSettings()

virtual void SettingsWidget::setSettings ( QSettings *  settings)
inlinefinalvirtual

setSettings sets the QSettings object to be used by the settings widget.

Parameters
settingsThe QSettings object.

This function sets the QSettings object to be used by the settings widget. The settings object is used for storing and retrieving the settings values.

Definition at line 107 of file settingswidget.h.

◆ settings()

QSettings * SettingsWidget::settings ( )
inlineprotected

settings returns the QSettings object used by the settings widget.

Returns
The QSettings object.

This function returns the QSettings object used by the settings widget. The settings object is used for storing and retrieving the settings values.

Definition at line 144 of file settingswidget.h.


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