diff --git a/src/colorschemer.h b/src/colorschemer.h index bec8d6dd9..b3848b993 100644 --- a/src/colorschemer.h +++ b/src/colorschemer.h @@ -8,18 +8,53 @@ class QAbstractItemModel; class KColorSchemeManager; +/** + * @class ColorSchemer + * + * A class to provide a wrapper around KColorSchemeManager to make it available in + * QML. + * + * @sa KColorSchemeManager + */ class ColorSchemer : public QObject { Q_OBJECT + + /** + * @brief A QAbstractItemModel of all available color schemes. + * + * @sa QAbstractItemModel + */ Q_PROPERTY(QAbstractItemModel *model READ model CONSTANT) + public: ColorSchemer(QObject *parent = nullptr); ~ColorSchemer(); QAbstractItemModel *model() const; + + /** + * @brief Activates the KColorScheme identified by the provided index. + * + * @sa KColorScheme + */ Q_INVOKABLE void apply(int idx); + + /** + * @brief Activates the KColorScheme with the given name. + * + * @sa KColorScheme + */ Q_INVOKABLE void apply(const QString &name); + + /** + * @brief Returns the index for the scheme with the given name. + */ Q_INVOKABLE int indexForScheme(const QString &name) const; + + /** + * @brief Returns the name for the scheme with the given index. + */ Q_INVOKABLE QString nameForIndex(int index) const; private: