KColorScheme
kcolorschememanager.cpp
34 // hint for plasma-integration to synchronize the color scheme with the window manager/compositor
41 qApp->setPalette(KColorScheme::createApplicationPalette(KSharedConfig::openConfig(colorSchemePath)));
46// On Windows and macOS we automatically apply Breeze/Breeze Dark depending on the system preference
51 const QString colorSchemeId = m_colorSchemeWatcher.systemPreference() == KColorSchemeWatcher::PreferDark ? getDarkColorScheme() : getLightColorScheme();
99 connect(&d->m_colorSchemeWatcher, &KColorSchemeWatcher::systemPreferenceChanged, this, [this]() {
QAbstractItemModel * model() const
A QAbstractItemModel of all available color schemes.
Definition kcolorschememanager.cpp:138
QString activeSchemeId() const
Returns the id of the currently active scheme or an empty string if the default scheme is active.
Definition kcolorschememanager.cpp:201
QModelIndex indexForScheme(const QString &name) const
Returns the model index for the scheme with the given name.
Definition kcolorschememanager.cpp:159
void activateScheme(const QModelIndex &index)
Activates the KColorScheme identified by the provided index.
Definition kcolorschememanager.cpp:174
void saveSchemeToConfigFile(const QString &schemeName) const
Saves the color scheme to config file.
Definition kcolorschememanager.cpp:193
void setAutosaveChanges(bool autosaveChanges)
Sets color scheme autosaving.
Definition kcolorschememanager.cpp:154
A model listing the KColorSchemes available in the system.
Definition kcolorschememodel.h:27
PreferDark
void systemPreferenceChanged()
static QPalette createApplicationPalette(const KSharedConfigPtr &config)
Used to obtain the QPalette that will be used to set the application palette from KDE Platform theme.
Definition kcolorscheme.cpp:580
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
bool sync() override
SimpleConfig
static QString removeAcceleratorMarker(const QString &label)
void addPixmap(const QPixmap &pixmap, Mode mode, State state)
QVariant data(int role) const const
bool isValid() const const
const QAbstractItemModel * model() const const
bool begin(QPaintDevice *device)
bool end()
void fillRect(const QRect &rectangle, QGradient::Preset preset)
Active
QChar * data()
bool isEmpty() const const
black
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:50:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:50:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.