diff --git a/kdeui/fonts/kfontchooser.cpp b/kdeui/fonts/kfontchooser.cpp index 5a4863dc..bb9d26b7 100644 --- a/kdeui/fonts/kfontchooser.cpp +++ b/kdeui/fonts/kfontchooser.cpp @@ -35,7 +35,6 @@ Boston, MA 02110-1301, USA. #include #include #include -#include #include #include #include @@ -106,7 +105,6 @@ public: void _k_size_chosen_slot(const QString&); void _k_style_chosen_slot(const QString&); void _k_displaySample(const QFont &font); - void _k_showXLFDArea(bool); void _k_size_value_slot(double); KFontChooser *q; @@ -119,7 +117,6 @@ public: KDoubleNumInput *sizeOfFont; SampleEdit *sampleEdit; - KLineEdit *xlfdEdit; QLabel *familyLabel; QLabel *styleLabel; @@ -161,7 +158,7 @@ KFontChooser::KFontChooser( QWidget *parent, setWhatsThis(i18nc("@info:whatsthis", "Here you can choose the font to be used." )); // The top layout is divided vertically into a splitter with font - // attribute widgets and preview on the top, and XLFD data at the bottom. + // attribute widgets and preview on the top, and fonts at the bottom. QVBoxLayout *topLayout = new QVBoxLayout( this ); topLayout->setMargin( 0 ); int checkBoxGap = KDialog::spacingHint() / 2; @@ -397,7 +394,7 @@ KFontChooser::KFontChooser( QWidget *parent, // // Finished setting up the splitter. - // Add XLFD data below the font attributes/preview splitter. + // Add fonts below the font attributes/preview splitter. // QVBoxLayout *vbox; if( flags & DisplayFrame ) @@ -417,8 +414,6 @@ KFontChooser::KFontChooser( QWidget *parent, vbox->addWidget( label ); } - d->xlfdEdit = new KLineEdit( page ); - vbox->addWidget( d->xlfdEdit ); // // Finished setting up the chooser layout. @@ -429,9 +424,6 @@ KFontChooser::KFontChooser( QWidget *parent, if( sizeIsRelativeState && d->sizeIsRelativeCheckBox ) setSizeIsRelative( *sizeIsRelativeState ); - KConfigGroup cg(KGlobal::config(), QLatin1String("General")); - d->_k_showXLFDArea(cg.readEntry(QLatin1String("fontSelectorShowXLFD"), false)); - // Set focus to the size list as this is the most commonly changed property d->sizeListBox->setFocus(); } @@ -797,17 +789,10 @@ void KFontChooser::Private::_k_size_value_slot(double dval) void KFontChooser::Private::_k_displaySample( const QFont& font ) { sampleEdit->setFont(font); - //sampleEdit->setCursorPosition(0); + // sampleEdit->setCursorPosition(0); -#ifndef QT_KATIE - // Katie has no support for raw X11 fonts - xlfdEdit->setText(font.rawName()); -#endif - xlfdEdit->setCursorPosition(0); - - //QFontInfo a = QFontInfo(font); - //kDebug() << "font: " << a.family () << ", " << a.pointSize (); - //kDebug() << " (" << font.toString() << ")\n"; + // QFontInfo a = QFontInfo(font); + // kDebug() << "font:" << font.toString(); } int KFontChooser::Private::nearestSizeRow (qreal val, bool customize) @@ -1048,18 +1033,6 @@ void KFontChooser::Private::fillFamilyListBox(bool onlyFixedFonts) setFamilyBoxItems(fontList); } -void KFontChooser::Private::_k_showXLFDArea(bool show) -{ - if( show ) - { - xlfdEdit->parentWidget()->show(); - } - else - { - xlfdEdit->parentWidget()->hide(); - } -} - // Human-readable style identifiers returned by QFontDatabase::styleString() // do not always survive round trip of QFont serialization/deserialization, // causing wrong style in the style box to be highlighted when diff --git a/kdeui/fonts/kfontchooser.h b/kdeui/fonts/kfontchooser.h index 08a0b4ea..2a0999cd 100644 --- a/kdeui/fonts/kfontchooser.h +++ b/kdeui/fonts/kfontchooser.h @@ -100,10 +100,8 @@ public: * * @param parent The parent widget. * @param flags Defines how the font chooser is displayed. @see DisplayFlags - * @param fontList A list of fonts to display, in XLFD format. If - * no list is formatted, the internal KDE font list is used. - * If that has not been created, X is queried, and all fonts - * available on the system are displayed. + * @param fontList A list of fonts families to display. If the list is + * empty, all fonts available on the system are displayed. * @param visibleListSize The minimum number of visible entries in the * fontlists. * @param sizeIsRelativeState If not zero the widget will show a @@ -259,7 +257,6 @@ private: Q_PRIVATE_SLOT(d, void _k_size_chosen_slot(const QString&)) Q_PRIVATE_SLOT(d, void _k_style_chosen_slot(const QString&)) Q_PRIVATE_SLOT(d, void _k_displaySample(const QFont &font)) - Q_PRIVATE_SLOT(d, void _k_showXLFDArea(bool)) Q_PRIVATE_SLOT(d, void _k_size_value_slot(double)) };