File indexing completed on 2024-05-19 05:00:55
0001 /* 0002 SPDX-FileCopyrightText: 2000 Matthias Hoelzer-Kluepfel <hoelzer@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KCMCSS_H 0008 #define KCMCSS_H 0009 0010 #include <QMap> 0011 0012 #include <KParts/ReadOnlyPart> 0013 0014 #include "ui_csscustom.h" 0015 0016 class QDialog; 0017 class CSSConfigWidget; 0018 0019 class CSSCustomDialog: public QWidget, public Ui::CSSCustomDialog 0020 { 0021 Q_OBJECT 0022 public: 0023 CSSCustomDialog(QWidget *parent); 0024 QMap<QString, QString> cssDict(); 0025 0026 public Q_SLOTS: 0027 void slotPreview(); 0028 0029 Q_SIGNALS: 0030 void changed(); 0031 0032 private: 0033 KParts::ReadOnlyPart *part; 0034 }; 0035 0036 class CSSConfig : public QWidget 0037 { 0038 Q_OBJECT 0039 0040 public: 0041 0042 explicit CSSConfig(QWidget *parent = nullptr, const QVariantList &list = QVariantList()); 0043 0044 void load(); 0045 void save(); 0046 void defaults(); 0047 0048 public Q_SLOTS: 0049 0050 void slotCustomize(); 0051 0052 Q_SIGNALS: 0053 void changed();//connected to KCModule slot 0054 0055 private: 0056 0057 CSSConfigWidget *configWidget; 0058 QDialog *customDialogBase; 0059 CSSCustomDialog *customDialog; 0060 }; 0061 0062 #endif