// qfont.sip generated by MetaSIP on Sun Nov  9 16:48:00 2014
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2014 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt.
// 
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file.  Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
// 
// If you are unsure which license is appropriate for your use, please
// contact the sales department at sales@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%ModuleCode
#include <qfont.h>
%End

class QFont
{
%TypeHeaderCode
#include <qfont.h>
%End

public:
    enum StyleHint
    {
        Helvetica,
        SansSerif,
        Times,
        Serif,
        Courier,
        TypeWriter,
        OldEnglish,
        Decorative,
        System,
        AnyStyle,
%If (Qt_4_7_0 -)
        Cursive,
%End
%If (Qt_4_7_0 -)
        Monospace,
%End
%If (Qt_4_7_0 -)
        Fantasy,
%End
    };

    enum StyleStrategy
    {
        PreferDefault,
        PreferBitmap,
        PreferDevice,
        PreferOutline,
        ForceOutline,
        PreferMatch,
        PreferQuality,
        PreferAntialias,
        NoAntialias,
        OpenGLCompatible,
%If (Qt_4_2_0 -)
        NoFontMerging,
%End
%If (Qt_4_7_0 -)
        ForceIntegerMetrics,
%End
    };

    enum Weight
    {
        Light,
        Normal,
        DemiBold,
        Bold,
        Black,
    };

    enum Style
    {
        StyleNormal,
        StyleItalic,
        StyleOblique,
    };

    enum Stretch
    {
        UltraCondensed,
        ExtraCondensed,
        Condensed,
        SemiCondensed,
        Unstretched,
        SemiExpanded,
        Expanded,
        ExtraExpanded,
        UltraExpanded,
    };

    QFont();
    QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false);
    QFont(const QFont &, QPaintDevice *pd);
    QFont(const QFont &);
    QFont(const QVariant &variant) /NoDerived/;
%MethodCode
        #if QT_VERSION >= 0x050000
        sipCpp = new QFont(a0->value<QFont>());
        #else
        sipCpp = new QFont(qVariantValue<QFont>(*a0));
        #endif
%End

    ~QFont();
    QString family() const;
    void setFamily(const QString &);
    int pointSize() const;
    void setPointSize(int);
    qreal pointSizeF() const;
    void setPointSizeF(qreal);
    int pixelSize() const;
    void setPixelSize(int);
    int weight() const;
    void setWeight(int);
    void setStyle(QFont::Style style);
    QFont::Style style() const;
    bool underline() const;
    void setUnderline(bool);
    bool overline() const;
    void setOverline(bool);
    bool strikeOut() const;
    void setStrikeOut(bool);
    bool fixedPitch() const;
    void setFixedPitch(bool);
    bool kerning() const;
    void setKerning(bool);
    QFont::StyleHint styleHint() const;
    QFont::StyleStrategy styleStrategy() const;
    void setStyleHint(QFont::StyleHint hint, QFont::StyleStrategy strategy = QFont::PreferDefault);
    void setStyleStrategy(QFont::StyleStrategy s);
    int stretch() const;
    void setStretch(int);
    bool rawMode() const;
    void setRawMode(bool);
    bool exactMatch() const;
    bool operator==(const QFont &) const;
    bool operator!=(const QFont &) const;
    bool operator<(const QFont &) const;
    bool isCopyOf(const QFont &) const;
%If (- Qt_5_0_0)
%If (WS_WIN)
    HFONT handle() const;
%End
%End
%If (- Qt_5_0_0)
%If (WS_X11 || WS_MACX || WS_PM)
    Qt::HANDLE handle() const;
%End
%End
    void setRawName(const QString &);
    QString rawName() const;
    QString key() const;
    QString toString() const;
    bool fromString(const QString &);
    static QString substitute(const QString &);
    static QStringList substitutes(const QString &);
    static QStringList substitutions();
    static void insertSubstitution(const QString &, const QString &);
    static void insertSubstitutions(const QString &, const QStringList &);
%If (Qt_5_0_0 -)
    static void removeSubstitutions(const QString &);
%End
%If (PyQt_Deprecated_5_0)
    static void removeSubstitution(const QString &);
%End
    static void initialize();
    static void cleanup();
    static void cacheStatistics();
    QString defaultFamily() const;
    QString lastResortFamily() const;
    QString lastResortFont() const;
    QFont resolve(const QFont &) const;
    bool bold() const;
    void setBold(bool enable);
    bool italic() const;
    void setItalic(bool b);
%If (Qt_4_4_0 -)

    enum Capitalization
    {
        MixedCase,
        AllUppercase,
        AllLowercase,
        SmallCaps,
        Capitalize,
    };

%End
%If (Qt_4_4_0 -)

    enum SpacingType
    {
        PercentageSpacing,
        AbsoluteSpacing,
    };

%End
%If (Qt_4_4_0 -)
    qreal letterSpacing() const;
%End
%If (Qt_4_4_0 -)
    QFont::SpacingType letterSpacingType() const;
%End
%If (Qt_4_4_0 -)
    void setLetterSpacing(QFont::SpacingType type, qreal spacing);
%End
%If (Qt_4_4_0 -)
    qreal wordSpacing() const;
%End
%If (Qt_4_4_0 -)
    void setWordSpacing(qreal spacing);
%End
%If (Qt_4_4_0 -)
    void setCapitalization(QFont::Capitalization);
%End
%If (Qt_4_4_0 -)
    QFont::Capitalization capitalization() const;
%End
%If (Qt_4_8_0 -)

    enum HintingPreference
    {
        PreferDefaultHinting,
        PreferNoHinting,
        PreferVerticalHinting,
        PreferFullHinting,
    };

%End
%If (Qt_4_8_0 -)
    QString styleName() const;
%End
%If (Qt_4_8_0 -)
    void setStyleName(const QString &styleName);
%End
%If (Qt_4_8_0 -)
    void setHintingPreference(QFont::HintingPreference hintingPreference);
%End
%If (Qt_4_8_0 -)
    QFont::HintingPreference hintingPreference() const;
%End
%If (Qt_5_0_0 -)
    void swap(QFont &other);
%End
};

QDataStream &operator<<(QDataStream &, const QFont & /Constrained/);
QDataStream &operator>>(QDataStream &, QFont & /Constrained/);
