File indexing completed on 2024-05-05 05:00:07
0001 /* 0002 SPDX-FileCopyrightText: 1996 Martin R. Jones 0003 SPDX-FileCopyrightText: 1998 Bernd Wuebben 0004 0005 SPDX-FileCopyrightText: 1998 Torben Weis 0006 KControl port & modifications 0007 0008 SPDX-FileCopyrightText: 1998 David Faure 0009 End of the KControl port, added 'kfmclient configure' call. 0010 0011 SPDX-FileCopyrightText: 2000 Daniel Molkentin 0012 Cleanup and modifications for KDE 2.1 0013 0014 */ 0015 0016 #ifndef APPEARANCE_H 0017 #define APPEARANCE_H 0018 0019 #include <QWidget> 0020 #include <QMap> 0021 0022 #include <kcmodule.h> 0023 #include <KSharedConfig> 0024 0025 class QSpinBox; 0026 class QSpinBox; 0027 class QFontComboBox; 0028 class QComboBox; 0029 class QCheckBox; 0030 class CSSConfig; 0031 0032 class KAppearanceOptions : public KCModule 0033 { 0034 Q_OBJECT 0035 public: 0036 //TODO KF6: when dropping compatibility with KF5, remove QVariantList argument 0037 KAppearanceOptions(QObject *parent, const KPluginMetaData &md={}, const QVariantList &args={}); 0038 ~KAppearanceOptions() override; 0039 0040 void load() override; 0041 void save() override; 0042 void defaults() override; 0043 0044 #if QT_VERSION_MAJOR < 6 0045 void setNeedsSave(bool needs) {emit changed(needs);} 0046 #endif 0047 0048 public Q_SLOTS: 0049 void slotFontSize(int); 0050 void slotMinimumFontSize(int); 0051 void slotStandardFont(const QFont &n); 0052 void slotFixedFont(const QFont &n); 0053 void slotSerifFont(const QFont &n); 0054 void slotSansSerifFont(const QFont &n); 0055 void slotCursiveFont(const QFont &n); 0056 void slotFantasyFont(const QFont &n); 0057 void slotEncoding(const QString &n); 0058 void slotFontSizeAdjust(int value); 0059 0060 private: 0061 void updateGUI(); 0062 0063 private: 0064 CSSConfig *cssConfig; 0065 0066 QCheckBox *m_pAutoLoadImagesCheckBox; 0067 QCheckBox *m_pUnfinishedImageFrameCheckBox; 0068 QComboBox *m_pAnimationsCombo; 0069 QComboBox *m_pUnderlineCombo; 0070 QComboBox *m_pSmoothScrollingCombo; 0071 0072 KSharedConfig::Ptr m_pConfig; 0073 QString m_groupname; 0074 0075 QSpinBox *m_minSize; 0076 QSpinBox *m_MedSize; 0077 QSpinBox *m_pageDPI; 0078 QFontComboBox *m_pFonts[6]; 0079 QComboBox *m_pEncoding; 0080 QSpinBox *m_pFontSizeAdjust; 0081 0082 int fSize; 0083 int fMinSize; 0084 QStringList encodings; 0085 QStringList fonts; 0086 QStringList defaultFonts; 0087 QString encodingName; 0088 }; 0089 0090 #endif // APPEARANCE_H