Source Code (Use browser search to find items of interest.)

Class Index

kdelibs'KFontStruct (./kdelibs/kdecore/kcharsets.h:171)

struct KFontStruct {
    KFontStruct();
    KFontStruct & operator = (const QFont &f);
    KFontStruct & operator = (const KFontStruct &fs);
    operator QFont();

    QString family;
    QFont::CharSet charset;
    KCharsets::FixedType fixed;
    KCharsets::WeightType weight;
    KCharsets::SlantType slant;
    bool scalable;
};

/**
 * List of @ref KFontStruct objects.
 * @internal
 * @deprecated
 */

kdelibs'KFontStruct::KFontStruct() (./kdelibs/kdecore/kcharsets.cpp:120)

KFontStruct::KFontStruct()
{
    family = QString::null;
    charset = QFont::AnyCharSet;
    fixed = KCharsets::FixedUnknown;
    slant = KCharsets::SlantUnknown;
    weight = KCharsets::WeightUnknown;
    scalable = false;
}


kdelibs'KFontStruct::QFont() (./kdelibs/kdecore/kcharsets.cpp:154)

KFontStruct::operator QFont()
{
    QFont f;
    f.setFamily(family);
    f.setCharSet(charset);
    if( fixed == KCharsets::Fixed )
       f.setFixedPitch(true);
    else
       f.setFixedPitch(false);
    if( slant == KCharsets::Italic )
       f.setItalic(true);
    else
       f.setItalic(false);
    if( weight == KCharsets::Bold )
       f.setBold(true);
    else
       f.setBold(false);

    return f;
}


// --------------------------------------------------------------------------