Qt logo

qpushbutton.h


This is the verbatim text of the qpushbutton.h include file. It is is provided only for illustration; the copyright remains with Troll Tech.
/****************************************************************************
** $Id: qpushbutton.h,v 2.9.2.2 1998/08/21 19:13:26 hanord Exp $
**
** Definition of QPushButton class
**
** Created : 940221
**
** Copyright (C) 1992-1998 Troll Tech AS.  All rights reserved.
**
** This file is part of Troll Tech's internal development tree for Qt.
**
** This header text will be replaced by an appropriate text by the
** mkdist script which generates external distributions.
**
** If you are using the Qt Professional Edition or the Qt Free Edition,
** please notify Troll Tech at <info@troll.no> if you see this text.
**
** To Troll Tech developers: This header was generated by the script
** fixcopyright-int. It has the same number of text lines as the free
** and professional editions to avoid line number inconsistency.
**
*****************************************************************************/

#ifndef QPUSHBUTTON_H
#define QPUSHBUTTON_H

#ifndef QT_H
#include "qbutton.h"
#endif // QT_H


class Q_EXPORT QPushButton : public QButton
{
friend class QDialog;
    Q_OBJECT
public:
    QPushButton( QWidget *parent=0, const char *name=0 );
    QPushButton( const char *text, QWidget *parent=0, const char *name=0 );

    void        setToggleButton( bool );

    bool        autoDefault()   const   { return autoDefButton; }
    void        setAutoDefault( bool autoDef );
    bool        isDefault()     const   { return defButton; }
    void        setDefault( bool def );

    void        setIsMenuButton( bool );
    bool        isMenuButton() const;
    
    QSize       sizeHint() const;

    void        move( int x, int y );
    void        move( const QPoint &p );
    void        resize( int w, int h );
    void        resize( const QSize & );
    void        setGeometry( int x, int y, int w, int h );
    void        setGeometry( const QRect & );

public slots:
    void        setOn( bool );
    void        toggle();

protected:
    void        drawButton( QPainter * );
    void        drawButtonLabel( QPainter * );
    void        focusInEvent( QFocusEvent * );

private:
    void        init();

    uint        autoDefButton   : 1;
    uint        defButton       : 1;
    uint        lastDown        : 1;
    uint        lastDef         : 1;
    uint        lastEnabled     : 1;
    uint        hasMenuArrow    : 1;

private:        // Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
    QPushButton( const QPushButton & );
    QPushButton &operator=( const QPushButton & );
#endif
};


#endif // QPUSHBUTTON_H


Copyright © 1998 Troll TechTrademarks
Qt version 1.41