1 //-----------------------------------------------------------------------------
5 // Copyright (c) Mark Donohoe 1997
16 #include <kfontdialog.h>
17 #include <kfontrequester.h>
19 #include "kxftconfig.h"
23 class KDoubleNumInput
;
26 class FontUseItem
: public KFontRequester
31 FontUseItem(QWidget
* parent
, const QString
&name
, const QString
&grp
,
32 const QString
&key
, const QString
&rc
, const QFont
&default_fnt
,
38 void applyFontDiff(const QFont
&fnt
, int fontDiffFlags
);
40 const QString
& rcFile() { return _rcfile
; }
41 const QString
& rcGroup() { return _rcgroup
; }
42 const QString
& rcKey() { return _rckey
; }
51 class FontAASettings
: public KDialog
57 #ifdef HAVE_FONTCONFIG
58 FontAASettings(QWidget
*parent
);
60 bool save( bool useAA
);
63 int getIndex(KXftConfig::SubPixel::Type spType
);
64 KXftConfig::SubPixel::Type
getSubPixelType();
65 int getIndex(KXftConfig::Hint::Style hStyle
);
66 KXftConfig::Hint::Style
getHintStyle();
75 #ifdef HAVE_FONTCONFIG
78 QCheckBox
*excludeRange
;
79 QCheckBox
*useSubPixel
;
80 KDoubleNumInput
*excludeFrom
;
81 KDoubleNumInput
*excludeTo
;
82 QComboBox
*subPixelType
;
83 QComboBox
*hintingStyle
;
84 QLabel
*excludeToLabel
;
90 * The Desktop/fonts tab in kcontrol.
92 class KFonts
: public KCModule
97 KFonts(QWidget
*parent
, const QVariantList
&);
102 virtual void defaults();
106 void slotApplyFontDiff();
107 void slotUseAntiAliasing();
111 #ifdef HAVE_FONTCONFIG
112 enum AASetting
{ AAEnabled
, AASystem
, AADisabled
};
113 AASetting useAA
, useAA_original
;
115 QPushButton
*aaSettingsButton
;
116 FontAASettings
*aaSettings
;
119 enum DPISetting
{ DPINone
, DPI96
, DPI120
};
120 DPISetting dpi_original
;
121 QComboBox
* comboForceDpi
;
122 QList
<FontUseItem
*> fontUseList
;