26 #include <qpushbutton.h>
28 #define YUILogComponent "qt-ui"
29 #include <yui/YUILog.h>
33 #include <yui/YEvent.h>
34 #include "YQPushButton.h"
38 const std::string & label )
43 QPushButton * button =
new QPushButton( fromUTF8( label ),
this );
44 Q_CHECK_PTR( button );
48 button->setMinimumSize( 2, 2 );
49 button->move( YQButtonBorder, YQButtonBorder );
50 setMinimumSize( button->minimumSize()
51 + 2 * QSize( YQButtonBorder, YQButtonBorder ) );
53 connect( button, &pclass(button)::clicked,
54 this, &pclass(
this)::
hit );
65 return 2 * YQButtonBorder +
qPushButton()->sizeHint().width();
71 return 2 * YQButtonBorder +
qPushButton()->sizeHint().height();
77 qPushButton()->resize( newWidth - 2 * YQButtonBorder,
78 newHeight - 2 * YQButtonBorder );
79 resize( newWidth, newHeight );
89 #include "YQPushButton.moc"
void sendEvent(YEvent *event)
Widget event handlers (slots) call this when an event occured that should be the answer to a UserInpu...
static YQUI * ui()
Access the global Qt-UI.