Source Code (Use browser search to find items of interest.)
Class Index
qt'QArrowWidget (./qt-2.1.0/src/widgets/qtoolbar.cpp:42)
class QArrowWidget : public QWidget
{
public:
QArrowWidget( Qt::Orientation o, QWidget *parent ) : QWidget( parent ), orient( o ) {}
protected:
void paintEvent( QPaintEvent * ) {
QPainter p( this );
QPointArray a;
if ( orient == Horizontal ) {
int h = height();
a.setPoints( 5, 0, 0, 3, h / 4, 0, h / 2, 3,3 * h / 4, 0, h );
} else {
int w = width();
a.setPoints( 5, 0, 0, w / 4, 3 , w / 2, 0 , 3 * w / 4, 3 , w, 0 );
}
p.setPen( colorGroup().light() );
p.drawPolyline( a );
if ( orient == Qt::Horizontal )
a.translate( 1, 0 );
else
a.translate( 0, 1 );
p.setPen( colorGroup().midlight() );
p.drawPolyline( a );
}
private:
Qt::Orientation orient;
};