Source: kstyle.h


Annotated List
Files
Globals
Hierarchy
Index
/*
 * (C) Copyright 1999, Daniel M. Duley <mosfet@kde.org>
 */
#ifndef __KSTYLE_H
#define __KSTYLE_H

#include <qplatinumstyle.h>
#include <qfont.h>
#include <qpalette.h>
#include <qpixmap.h>

class QMenuItem;
class QPixmap;

/**
 * Extends the QStyle class with virtual methods to draw KDE widgets.
 *
 * @author Daniel M. Duley <mosfet@kde.org>
 */
class KStyle : public QPlatinumStyle
{
    Q_OBJECT
public:
    enum KToolButtonType{Icon=0, IconTextRight, Text, IconTextBottom};
    KStyle() : QPlatinumStyle(){;}
    /**
     * Draws a toolbar.
     */
    virtual void drawKToolBar(QPainter *p, int x, int y, int w, int h,
                              const QColorGroup &g, bool floating = false);
    /**
     * Draws a menu or toolbar handle.
     */
    virtual void drawKBarHandle(QPainter *p, int x, int y, int w, int h,
                                const QColorGroup &g, bool horizontal=false,
                                QBrush *fill=NULL);
    /**
     * Draws a toolbar button.
     */
    virtual void drawKToolBarButton(QPainter *p, int x, int y, int w, int h,
                                    const QColorGroup &g, bool sunken=false,
                                    bool raised = true, bool enabled = true,
                                    bool popup = false,
                                    KToolButtonType icontext = Icon,
                                    const QString& btext=QString::null,
                                    const QPixmap *icon=NULL,
                                    QFont *font=NULL);
    /**
     * Draws a menubar.
     */
    virtual void drawKMenuBar(QPainter *p, int x, int y, int w, int h,
                              const QColorGroup &g, QBrush *fill=NULL);
    /**
     * Draws a item in the menubar.
     */
    virtual void drawKMenuItem(QPainter *p, int x, int y, int w, int h,
                               const QColorGroup &g, bool active,
                               QMenuItem *item, QBrush *fill=NULL);
    /**
     * Draws the KProgress bar.
     */
    virtual void drawKProgressBlock(QPainter *p, int x, int y, int w, int h,
                                    const QColorGroup &g, QBrush *fill);

    // this isn't a drawXXX method due to KProgress implementation
    /**
     * Retrieves the background used in progress indicators.
     */
    virtual void getKProgressBackground(const QColorGroup &g, QBrush &bg);
    /**
     * Internal method for use in the new OpenParts implementation. You should
     * not override this but drawKToolBar instead.
     */
    virtual void drawOPToolBar(QPainter *p, int x, int y, int w, int h,
                                const QColorGroup &g, QBrush *fill=NULL);
};

#endif
    
    

Generated by: root@localhost.localdomain on Fri Dec 17 18:55:36 1999, using kdoc 2.0a22.