|
Q3270
A Qt-based 3270 Terminal Emulator
|
Public Member Functions | |
| ColourStore () | |
| ColourStore::ColourStore constructor. | |
| const QStringList | themeNames () const |
| Retrieve the list of available theme names. | |
| Colours | getTheme (const QString &name) const |
| Retrieve a colour theme by name. | |
| void | saveTheme (const Colours &theme) |
| Save a colour theme. | |
| void | removeTheme (const QString &name) |
| Remove a colour theme by name. | |
| void | setTheme (const QString &name, const Colours &theme) |
| Set or update a colour theme. | |
| void | setThemes (const QMap< QString, Colours > &themes) |
| Set multiple colour themes at once. | |
| void | saveAllThemes () const |
| Save all colour themes to persistent storage. | |
| bool | exists (const QString &name) const |
| Check if a colour theme exists. | |
| ColourStore::ColourStore | ( | ) |
ColourStore::ColourStore constructor.
This class manages the storage and retrieval of colour themes.
| bool ColourStore::exists | ( | const QString & | theme | ) | const |
Check if a colour theme exists.
| name | The name of the theme to check. |
| Colours ColourStore::getTheme | ( | const QString & | name | ) | const |
Retrieve a colour theme by name.
| name | The name of the theme to retrieve. |
If the requested theme does not exist, the factory default theme is returned.
| void ColourStore::removeTheme | ( | const QString & | name | ) |
Remove a colour theme by name.
| name | The name of the theme to remove. |
This function deletes the specified theme from the internal themes map. The "Factory" theme cannot be removed.
| void ColourStore::saveAllThemes | ( | ) | const |
Save all colour themes to persistent storage.
This function iterates over all stored themes and saves them to QSettings, excluding the "Factory" theme.
| void ColourStore::saveTheme | ( | const Colours & | theme | ) |
Save a colour theme.
| theme | The Colours object representing the theme to save. |
This function saves the given theme to persistent storage. The "Factory" theme is not saved as it is built-in.
| void ColourStore::setTheme | ( | const QString & | name, |
| const Colours & | theme | ||
| ) |
Set or update a colour theme.
| name | The name of the theme to set. |
| theme | The Colours object representing the theme. |
This function adds or updates the specified theme in the internal themes map. The "Factory" theme cannot be modified.
| void ColourStore::setThemes | ( | const QMap< QString, Colours > & | newThemes | ) |
Set multiple colour themes at once.
| newThemes | A map of theme names to Colours objects. |
This function replaces the current themes with the provided set, ensuring the "Factory" theme remains intact.
| const QStringList ColourStore::themeNames | ( | ) | const |
Retrieve the list of available theme names.
The "Factory" theme is always listed first.