myproject 0.0.0
%%description%%
Loading...
Searching...
No Matches
myproject::Settings Class Reference

The Settings class is a singleton that manages the application settings. More...

#include <settings.h>

Inheritance diagram for myproject::Settings:
[legend]
Collaboration diagram for myproject::Settings:
[legend]

Signals

void languageChanged ()
 Emitted when the language is changed.
 
void windowOpacityChanged ()
 Emitted when the window opacity is changed.
 
void fpsVisibleChanged ()
 Emitted when the FPS visibility is changed.
 
void appThemeChanged ()
 Emitted when the app theme is changed.
 
void newShortcutChanged ()
 Emitted when the new shortcut is changed.
 
void openShortcutChanged ()
 Emitted when the open shortcut is changed.
 
void saveShortcutChanged ()
 Emitted when the save shortcut is changed.
 
void saveAsShortcutChanged ()
 Emitted when the save as shortcut is changed.
 
void quitShortcutChanged ()
 Emitted when the quit shortcut is changed.
 
void undoShortcutChanged ()
 Emitted when the undo shortcut is changed.
 
void redoShortcutChanged ()
 Emitted when the redo shortcut is changed.
 
void copyShortcutChanged ()
 Emitted when the copy shortcut is changed.
 
void cutShortcutChanged ()
 Emitted when the cut shortcut is changed.
 
void pasteShortcutChanged ()
 Emitted when the paste shortcut is changed.
 
void optionsShortcutChanged ()
 Emitted when the options shortcut is changed.
 
void fullScreenShortcutChanged ()
 Emitted when the full screen shortcut is changed.
 

Public Member Functions

 Settings (QObject *parent=nullptr)
 
 Settings (const QString &organization, const QString &application, QObject *parent=nullptr)
 
QString defaultLanguage () const
 Returns the default language for the application.
 
QString language () const
 Returns the current language for the application.
 
void setLanguage (const QString &language)
 Sets the current language for the application.
 
qreal defaultWindowOpacity () const
 Returns the default window opacity for the application.
 
qreal windowOpacity () const
 Returns the current window opacity for the application.
 
void setWindowOpacity (const qreal opacity)
 Sets the current window opacity for the application.
 
bool defaultFpsVisible () const
 Returns the default FPS visibility for the application.
 
bool isFpsVisible () const
 Returns the current FPS visibility for the application.
 
void setFpsVisible (const bool fps_visible)
 Sets the current FPS visibility for the application.
 
QString defaultAppTheme () const
 Returns the default app theme for the application.
 
QString appTheme () const
 Returns the current app theme for the application.
 
void setAppTheme (const QString &theme)
 Sets the current app theme for the application.
 
Q_INVOKABLE void resetShortcutsToDefaults ()
 Resets all shortcuts to their default values.
 
QString defaultNewShortcut () const
 Returns the default new shortcut for the application.
 
QString newShortcut () const
 Returns the current new shortcut for the application.
 
void setNewShortcut (const QString &shortcut)
 Sets the current new shortcut for the application.
 
QString defaultOpenShortcut () const
 Returns the default open shortcut for the application.
 
QString openShortcut () const
 Returns the current open shortcut for the application.
 
void setOpenShortcut (const QString &shortcut)
 Sets the current open shortcut for the application.
 
QString defaultSaveShortcut () const
 Returns the default save shortcut for the application.
 
QString saveShortcut () const
 Returns the current save shortcut for the application.
 
void setSaveShortcut (const QString &shortcut)
 Sets the current save shortcut for the application.
 
QString defaultSaveAsShortcut () const
 Returns the default save as shortcut for the application.
 
QString saveAsShortcut () const
 Returns the current save as shortcut for the application.
 
void setSaveAsShortcut (const QString &shortcut)
 Sets the current save as shortcut for the application.
 
QString defaultQuitShortcut () const
 Returns the default quit shortcut for the application.
 
QString quitShortcut () const
 Returns the current quit shortcut for the application.
 
void setQuitShortcut (const QString &shortcut)
 Sets the current quit shortcut for the application.
 
QString defaultUndoShortcut () const
 Returns the default undo shortcut for the application.
 
QString undoShortcut () const
 Returns the current undo shortcut for the application.
 
void setUndoShortcut (const QString &shortcut)
 Sets the current undo shortcut for the application.
 
QString defaultRedoShortcut () const
 Returns the default redo shortcut for the application.
 
QString redoShortcut () const
 Returns the current redo shortcut for the application.
 
void setRedoShortcut (const QString &shortcut)
 Sets the current redo shortcut for the application.
 
QString defaultCopyShortcut () const
 Returns the default copy shortcut for the application.
 
QString copyShortcut () const
 Returns the current copy shortcut for the application.
 
void setCopyShortcut (const QString &shortcut)
 Sets the current copy shortcut for the application.
 
QString defaultCutShortcut () const
 Returns the default cut shortcut for the application.
 
QString cutShortcut () const
 Returns the current cut shortcut for the application.
 
void setCutShortcut (const QString &shortcut)
 Sets the current cut shortcut for the application.
 
QString defaultPasteShortcut () const
 Returns the default paste shortcut for the application.
 
QString pasteShortcut () const
 Returns the current paste shortcut for the application.
 
void setPasteShortcut (const QString &shortcut)
 Sets the current paste shortcut for the application.
 
QString defaultOptionsShortcut () const
 Returns the default options shortcut for the application.
 
QString optionsShortcut () const
 Returns the current options shortcut for the application.
 
void setOptionsShortcut (const QString &shortcut)
 Sets the current options shortcut for the application.
 
QString defaultFullScreenShortcut () const
 Returns the default full screen shortcut for the application.
 
QString fullScreenShortcut () const
 Returns the current full screen shortcut for the application.
 
void setFullScreenShortcut (const QString &shortcut)
 Sets the current full screen shortcut for the application.
 

Properties

QString language
 
qreal windowOpacity
 
bool fpsVisible
 
QString appTheme
 
QString newShortcut
 
QString openShortcut
 
QString saveShortcut
 
QString saveAsShortcut
 
QString quitShortcut
 
QString undoShortcut
 
QString redoShortcut
 
QString copyShortcut
 
QString cutShortcut
 
QString pasteShortcut
 
QString optionsShortcut
 
QString fullScreenShortcut
 

Detailed Description

The Settings class is a singleton that manages the application settings.

Constructor & Destructor Documentation

◆ Settings() [1/2]

myproject::Settings::Settings ( QObject * parent = nullptr)
explicit

◆ Settings() [2/2]

myproject::Settings::Settings ( const QString & organization,
const QString & application,
QObject * parent = nullptr )

Member Function Documentation

◆ appTheme()

QString myproject::Settings::appTheme ( ) const
nodiscard

Returns the current app theme for the application.

Returns
The current app theme.
Here is the call graph for this function:

◆ appThemeChanged

void myproject::Settings::appThemeChanged ( )
signal

Emitted when the app theme is changed.

Here is the caller graph for this function:

◆ copyShortcut()

QString myproject::Settings::copyShortcut ( ) const
nodiscard

Returns the current copy shortcut for the application.

Returns
The current copy shortcut.
Here is the call graph for this function:

◆ copyShortcutChanged

void myproject::Settings::copyShortcutChanged ( )
signal

Emitted when the copy shortcut is changed.

Here is the caller graph for this function:

◆ cutShortcut()

QString myproject::Settings::cutShortcut ( ) const
nodiscard

Returns the current cut shortcut for the application.

Returns
The current cut shortcut.
Here is the call graph for this function:

◆ cutShortcutChanged

void myproject::Settings::cutShortcutChanged ( )
signal

Emitted when the cut shortcut is changed.

Here is the caller graph for this function:

◆ defaultAppTheme()

QString myproject::Settings::defaultAppTheme ( ) const
nodiscard

Returns the default app theme for the application.

Returns
The default app theme.
Here is the caller graph for this function:

◆ defaultCopyShortcut()

QString myproject::Settings::defaultCopyShortcut ( ) const
nodiscard

Returns the default copy shortcut for the application.

Returns
The default copy shortcut.
Here is the caller graph for this function:

◆ defaultCutShortcut()

QString myproject::Settings::defaultCutShortcut ( ) const
nodiscard

Returns the default cut shortcut for the application.

Returns
The default cut shortcut.
Here is the caller graph for this function:

◆ defaultFpsVisible()

bool myproject::Settings::defaultFpsVisible ( ) const
nodiscard

Returns the default FPS visibility for the application.

Returns
The default FPS visibility.
Here is the caller graph for this function:

◆ defaultFullScreenShortcut()

QString myproject::Settings::defaultFullScreenShortcut ( ) const
nodiscard

Returns the default full screen shortcut for the application.

Returns
The default full screen shortcut.
Here is the caller graph for this function:

◆ defaultLanguage()

QString myproject::Settings::defaultLanguage ( ) const
nodiscard

Returns the default language for the application.

Returns
The default language.
Here is the caller graph for this function:

◆ defaultNewShortcut()

QString myproject::Settings::defaultNewShortcut ( ) const
nodiscard

Returns the default new shortcut for the application.

Returns
The default new shortcut.
Here is the caller graph for this function:

◆ defaultOpenShortcut()

QString myproject::Settings::defaultOpenShortcut ( ) const
nodiscard

Returns the default open shortcut for the application.

Returns
The default open shortcut.
Here is the caller graph for this function:

◆ defaultOptionsShortcut()

QString myproject::Settings::defaultOptionsShortcut ( ) const
nodiscard

Returns the default options shortcut for the application.

Returns
The default options shortcut.
Here is the caller graph for this function:

◆ defaultPasteShortcut()

QString myproject::Settings::defaultPasteShortcut ( ) const
nodiscard

Returns the default paste shortcut for the application.

Returns
The default paste shortcut.
Here is the caller graph for this function:

◆ defaultQuitShortcut()

QString myproject::Settings::defaultQuitShortcut ( ) const
nodiscard

Returns the default quit shortcut for the application.

Returns
The default quit shortcut.
Here is the caller graph for this function:

◆ defaultRedoShortcut()

QString myproject::Settings::defaultRedoShortcut ( ) const
nodiscard

Returns the default redo shortcut for the application.

Returns
The default redo shortcut.
Here is the caller graph for this function:

◆ defaultSaveAsShortcut()

QString myproject::Settings::defaultSaveAsShortcut ( ) const
nodiscard

Returns the default save as shortcut for the application.

Returns
The default save as shortcut.
Here is the caller graph for this function:

◆ defaultSaveShortcut()

QString myproject::Settings::defaultSaveShortcut ( ) const
nodiscard

Returns the default save shortcut for the application.

Returns
The default save shortcut.
Here is the caller graph for this function:

◆ defaultUndoShortcut()

QString myproject::Settings::defaultUndoShortcut ( ) const
nodiscard

Returns the default undo shortcut for the application.

Returns
The default undo shortcut.
Here is the caller graph for this function:

◆ defaultWindowOpacity()

qreal myproject::Settings::defaultWindowOpacity ( ) const
nodiscard

Returns the default window opacity for the application.

Returns
The default window opacity.
Here is the caller graph for this function:

◆ fpsVisibleChanged

void myproject::Settings::fpsVisibleChanged ( )
signal

Emitted when the FPS visibility is changed.

Here is the caller graph for this function:

◆ fullScreenShortcut()

QString myproject::Settings::fullScreenShortcut ( ) const
nodiscard

Returns the current full screen shortcut for the application.

Returns
The current full screen shortcut.
Here is the call graph for this function:

◆ fullScreenShortcutChanged

void myproject::Settings::fullScreenShortcutChanged ( )
signal

Emitted when the full screen shortcut is changed.

Here is the caller graph for this function:

◆ isFpsVisible()

bool myproject::Settings::isFpsVisible ( ) const
nodiscard

Returns the current FPS visibility for the application.

Returns
The current FPS visibility.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ language()

QString myproject::Settings::language ( ) const
nodiscard

Returns the current language for the application.

Returns
The current language.
Here is the call graph for this function:

◆ languageChanged

void myproject::Settings::languageChanged ( )
signal

Emitted when the language is changed.

Here is the caller graph for this function:

◆ newShortcut()

QString myproject::Settings::newShortcut ( ) const
nodiscard

Returns the current new shortcut for the application.

Returns
The current new shortcut.
Here is the call graph for this function:

◆ newShortcutChanged

void myproject::Settings::newShortcutChanged ( )
signal

Emitted when the new shortcut is changed.

Here is the caller graph for this function:

◆ openShortcut()

QString myproject::Settings::openShortcut ( ) const
nodiscard

Returns the current open shortcut for the application.

Returns
The current open shortcut.
Here is the call graph for this function:

◆ openShortcutChanged

void myproject::Settings::openShortcutChanged ( )
signal

Emitted when the open shortcut is changed.

Here is the caller graph for this function:

◆ optionsShortcut()

QString myproject::Settings::optionsShortcut ( ) const
nodiscard

Returns the current options shortcut for the application.

Returns
The current options shortcut.
Here is the call graph for this function:

◆ optionsShortcutChanged

void myproject::Settings::optionsShortcutChanged ( )
signal

Emitted when the options shortcut is changed.

Here is the caller graph for this function:

◆ pasteShortcut()

QString myproject::Settings::pasteShortcut ( ) const
nodiscard

Returns the current paste shortcut for the application.

Returns
The current paste shortcut.
Here is the call graph for this function:

◆ pasteShortcutChanged

void myproject::Settings::pasteShortcutChanged ( )
signal

Emitted when the paste shortcut is changed.

Here is the caller graph for this function:

◆ quitShortcut()

QString myproject::Settings::quitShortcut ( ) const
nodiscard

Returns the current quit shortcut for the application.

Returns
The current quit shortcut.
Here is the call graph for this function:

◆ quitShortcutChanged

void myproject::Settings::quitShortcutChanged ( )
signal

Emitted when the quit shortcut is changed.

Here is the caller graph for this function:

◆ redoShortcut()

QString myproject::Settings::redoShortcut ( ) const
nodiscard

Returns the current redo shortcut for the application.

Returns
The current redo shortcut.
Here is the call graph for this function:

◆ redoShortcutChanged

void myproject::Settings::redoShortcutChanged ( )
signal

Emitted when the redo shortcut is changed.

Here is the caller graph for this function:

◆ resetShortcutsToDefaults()

void myproject::Settings::resetShortcutsToDefaults ( )

Resets all shortcuts to their default values.

Here is the caller graph for this function:

◆ saveAsShortcut()

QString myproject::Settings::saveAsShortcut ( ) const
nodiscard

Returns the current save as shortcut for the application.

Returns
The current save as shortcut.
Here is the call graph for this function:

◆ saveAsShortcutChanged

void myproject::Settings::saveAsShortcutChanged ( )
signal

Emitted when the save as shortcut is changed.

Here is the caller graph for this function:

◆ saveShortcut()

QString myproject::Settings::saveShortcut ( ) const
nodiscard

Returns the current save shortcut for the application.

Returns
The current save shortcut.
Here is the call graph for this function:

◆ saveShortcutChanged

void myproject::Settings::saveShortcutChanged ( )
signal

Emitted when the save shortcut is changed.

Here is the caller graph for this function:

◆ setAppTheme()

void myproject::Settings::setAppTheme ( const QString & theme)

Sets the current app theme for the application.

Parameters
themeThe new app theme.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCopyShortcut()

void myproject::Settings::setCopyShortcut ( const QString & shortcut)

Sets the current copy shortcut for the application.

Parameters
shortcutThe new copy shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCutShortcut()

void myproject::Settings::setCutShortcut ( const QString & shortcut)

Sets the current cut shortcut for the application.

Parameters
shortcutThe new cut shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFpsVisible()

void myproject::Settings::setFpsVisible ( const bool fps_visible)

Sets the current FPS visibility for the application.

Parameters
fps_visibleThe new FPS visibility.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFullScreenShortcut()

void myproject::Settings::setFullScreenShortcut ( const QString & shortcut)

Sets the current full screen shortcut for the application.

Parameters
shortcutThe new full screen shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLanguage()

void myproject::Settings::setLanguage ( const QString & language)

Sets the current language for the application.

Parameters
languageThe new language.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNewShortcut()

void myproject::Settings::setNewShortcut ( const QString & shortcut)

Sets the current new shortcut for the application.

Parameters
shortcutThe new new shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOpenShortcut()

void myproject::Settings::setOpenShortcut ( const QString & shortcut)

Sets the current open shortcut for the application.

Parameters
shortcutThe new open shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOptionsShortcut()

void myproject::Settings::setOptionsShortcut ( const QString & shortcut)

Sets the current options shortcut for the application.

Parameters
shortcutThe new options shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPasteShortcut()

void myproject::Settings::setPasteShortcut ( const QString & shortcut)

Sets the current paste shortcut for the application.

Parameters
shortcutThe new paste shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setQuitShortcut()

void myproject::Settings::setQuitShortcut ( const QString & shortcut)

Sets the current quit shortcut for the application.

Parameters
shortcutThe new quit shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRedoShortcut()

void myproject::Settings::setRedoShortcut ( const QString & shortcut)

Sets the current redo shortcut for the application.

Parameters
shortcutThe new redo shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSaveAsShortcut()

void myproject::Settings::setSaveAsShortcut ( const QString & shortcut)

Sets the current save as shortcut for the application.

Parameters
shortcutThe new save as shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSaveShortcut()

void myproject::Settings::setSaveShortcut ( const QString & shortcut)

Sets the current save shortcut for the application.

Parameters
shortcutThe new save shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setUndoShortcut()

void myproject::Settings::setUndoShortcut ( const QString & shortcut)

Sets the current undo shortcut for the application.

Parameters
shortcutThe new undo shortcut.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWindowOpacity()

void myproject::Settings::setWindowOpacity ( const qreal opacity)

Sets the current window opacity for the application.

Parameters
opacityThe new window opacity.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ undoShortcut()

QString myproject::Settings::undoShortcut ( ) const
nodiscard

Returns the current undo shortcut for the application.

Returns
The current undo shortcut.
Here is the call graph for this function:

◆ undoShortcutChanged

void myproject::Settings::undoShortcutChanged ( )
signal

Emitted when the undo shortcut is changed.

Here is the caller graph for this function:

◆ windowOpacity()

qreal myproject::Settings::windowOpacity ( ) const
nodiscard

Returns the current window opacity for the application.

Returns
The current window opacity.
Here is the call graph for this function:

◆ windowOpacityChanged

void myproject::Settings::windowOpacityChanged ( )
signal

Emitted when the window opacity is changed.

Here is the caller graph for this function:

Property Documentation

◆ appTheme

QString myproject::Settings::appTheme
readwrite

◆ copyShortcut

QString myproject::Settings::copyShortcut
readwrite

◆ cutShortcut

QString myproject::Settings::cutShortcut
readwrite

◆ fpsVisible

bool myproject::Settings::fpsVisible
readwrite

◆ fullScreenShortcut

QString myproject::Settings::fullScreenShortcut
read

◆ language

QString myproject::Settings::language
readwrite

◆ newShortcut

QString myproject::Settings::newShortcut
readwrite

◆ openShortcut

QString myproject::Settings::openShortcut
readwrite

◆ optionsShortcut

QString myproject::Settings::optionsShortcut
read

◆ pasteShortcut

QString myproject::Settings::pasteShortcut
readwrite

◆ quitShortcut

QString myproject::Settings::quitShortcut
readwrite

◆ redoShortcut

QString myproject::Settings::redoShortcut
readwrite

◆ saveAsShortcut

QString myproject::Settings::saveAsShortcut
readwrite

◆ saveShortcut

QString myproject::Settings::saveShortcut
readwrite

◆ undoShortcut

QString myproject::Settings::undoShortcut
readwrite

◆ windowOpacity

qreal myproject::Settings::windowOpacity
readwrite

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