Public Member Functions | Protected Member Functions

ArrowButton Class Reference

Inheritance diagram for ArrowButton:
Inheritance graph
[legend]
Collaboration diagram for ArrowButton:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ArrowButton (QWidget *parent=0)
 ~ArrowButton ()
QSize sizeHint () const

Protected Member Functions

void paintEvent (QPaintEvent *)

Constructor & Destructor Documentation

ArrowButton::ArrowButton ( QWidget parent = 0  ) 

: QAbstractButton(parent)
{
}

ArrowButton::~ArrowButton (  ) 

{
}


Member Function Documentation

void ArrowButton::paintEvent ( QPaintEvent event  )  [protected]

Reimplemented from QAbstractButton.

{
    Q_UNUSED(event);
    QPainter p(this);
    QStyleOption opt;
    int h = sizeHint().height();
    opt.rect = QRect(0,(height()- h)/2, h, h);
    opt.palette = palette();
    opt.state = QStyle::State_Children;
    if (isChecked())
        opt.state |= QStyle::State_Open;

    style()->drawPrimitive(QStyle::PE_IndicatorBranch, &opt, &p);
    p.end();
}

QSize ArrowButton::sizeHint (  )  const [inline]

Referenced by paintEvent().

{ return QSize(16, 16); }


The documentation for this class was generated from the following file: