You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.1 KiB
54 lines
1.1 KiB
/* |
|
SPDX-FileCopyrightText: 2020 Mikhail Zolotukhin <zomial@protonmail.com> |
|
|
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL |
|
*/ |
|
|
|
#pragma once |
|
|
|
#include <QObject> |
|
#include <QQmlListReference> |
|
|
|
#include "gtkthemesmodel.h" |
|
|
|
#include "kdegtkconfig_interface.h" |
|
|
|
class GtkPage : public QObject |
|
{ |
|
Q_OBJECT |
|
|
|
Q_PROPERTY(GtkThemesModel *gtkThemesModel MEMBER m_gtkThemesModel NOTIFY gtkThemesModelChanged) |
|
|
|
public: |
|
GtkPage(QObject *parent = nullptr); |
|
~GtkPage() override; |
|
|
|
Q_INVOKABLE void load(); |
|
void save(); |
|
void defaults(); |
|
bool isDefaults() const; |
|
|
|
public Q_SLOTS: |
|
QString gtkThemeFromConfig(); |
|
|
|
bool gtkPreviewAvailable(); |
|
|
|
void showGtkPreview(); |
|
|
|
void installGtkThemeFromFile(const QUrl &fileUrl); |
|
|
|
void onThemeRemoved(); |
|
|
|
Q_SIGNALS: |
|
void gtkThemesModelChanged(GtkThemesModel *model); |
|
|
|
void showErrorMessage(const QString &message); |
|
void selectGtkThemeInCombobox(const QString &themeName); |
|
|
|
void gtkThemeSettingsChanged(); |
|
|
|
private: |
|
GtkThemesModel *m_gtkThemesModel; |
|
|
|
OrgKdeGtkConfigInterface m_gtkConfigInterface; |
|
};
|
|
|