1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YQWizardButton.cc
15 Author: Stefan Hundhammer <sh@suse.de>
20 #include <qpushbutton.h>
22 #define y2log_component "qt-ui"
23 #include <ycp/y2log.h>
27 #include "YQWizardButton.h"
31 YQWizardButton::YQWizardButton( YQWizard * wizard,
32 QWidget * buttonParent,
35 : YQGenericButton( wizard, label )
38 QPushButton * button = new QPushButton( fromUTF8( label ), buttonParent );
39 Q_CHECK_PTR( button );
41 setQPushButton( button );
42 setWidgetRep( button );
47 connect( button, SIGNAL( clicked() ),
48 this, SIGNAL( clicked() ) );
51 // This widget itself will never be visible, only its button - which is not
52 // a child of this widget.
57 YQWizardButton::~YQWizardButton()
59 // Don't delete qPushButton() here - its parent (buttonParent) will take
64 void YQWizardButton::hide()
67 qPushButton()->hide();
71 void YQWizardButton::show()
74 qPushButton()->show();
78 bool YQWizardButton::isShown() const
81 return qPushButton()->isShown();
87 bool YQWizardButton::isHidden() const
93 int YQWizardButton::preferredWidth()
95 // This widget doesn't have a YWidget-based visual representation, it's
96 // only a YWidget for shortcut checking etc.
102 int YQWizardButton::preferredHeight()
104 // This widget doesn't have a YWidget-based visual representation, it's
105 // only a YWidget for shortcut checking etc.
111 void YQWizardButton::setSize( int newWidth, int newHeight )
118 #include "YQWizardButton.moc"