Source Code (Use browser search to find items of interest.)

Class Index

qt'QWhatsThisButton (./qt-2.1.0/src/widgets/qwhatsthis.cpp:100)

class QWhatsThisButton: public QToolButton
{
    Q_OBJECT
    
public:
    QWhatsThisButton( QWidget * parent, const char * name );
    ~QWhatsThisButton();

public slots:
    void mouseReleased();

};


qt'QWhatsThisButton::QWhatsThisButton() (./qt-2.1.0/src/widgets/qwhatsthis.cpp:234)

QWhatsThisButton::QWhatsThisButton( QWidget * parent, const char * name )
    : QToolButton( parent, name )
{
    QPixmap p( button_image );
    setPixmap( p );
    setToggleButton( TRUE );
    setAutoRaise( TRUE );
    setFocusPolicy( NoFocus );
    setTextLabel( tr( "What's this?" ) );
    wt->buttons->insert( (void *)this, this );
    connect( this, SIGNAL( released() ),
	     this, SLOT( mouseReleased() ) );
}



qt'QWhatsThisButton::~QWhatsThisButton() (./qt-2.1.0/src/widgets/qwhatsthis.cpp:249)

QWhatsThisButton::~QWhatsThisButton()
{
    if ( wt && wt->buttons )
	wt->buttons->take( (void *)this );
}



qt'QWhatsThisButton::mouseReleased() (./qt-2.1.0/src/widgets/qwhatsthis.cpp:256)

void QWhatsThisButton::mouseReleased()
{
    if ( wt->state == QWhatsThisPrivate::Inactive && isOn() ) {
	QWhatsThisPrivate::setUpWhatsThis();
	QApplication::setOverrideCursor( *wt->cursor, FALSE );
	wt->state = QWhatsThisPrivate::Waiting;
	qApp->installEventFilter( wt );
    }
}


// the what's this manager class