libyui-qt  2.46.13
YQGenericButton Class Reference

Abstract base class for push button and similar widgets - all that can become a YQDialog's "default button". More...

#include <YQGenericButton.h>

Inheritance diagram for YQGenericButton:
Collaboration diagram for YQGenericButton:

Public Slots

void activate ()
 Activate (animated) this button.
 

Public Member Functions

virtual ~YQGenericButton ()
 Destructor.
 
virtual void setEnabled (bool enabled)
 Set enabled/disabled state. More...
 
bool isEnabled () const
 Returns 'true' if this button is enabled, 'false' otherwise.
 
void setLabel (const QString &label)
 Changes the label (the text) of the button.
 
virtual void setLabel (const std::string &label)
 Changes the label (the text) of the button. More...
 
void showAsDefault (bool show=true)
 Show this button as the dialog's default button. More...
 
bool isShownAsDefault () const
 Returns 'true' if this button is shown as a default button - which may mean that this really is the dialogs's default button or it is the dialog's focus button (a button that currently has the keyboard focus). More...
 
virtual bool setKeyboardFocus ()
 Accept the keyboard focus.
 
virtual void setIcon (const std::string &iconName)
 Set this button's icon. More...
 
QString text () const
 Returns the button's text (label) - useful for log messages etc.
 
QPushButton * qPushButton () const
 Returns the internal Qt PushButton.
 
YQDialogyQDialog () const
 Returns the internal parent dialog.
 

Protected Member Functions

 YQGenericButton (YWidget *parent, const std::string &label)
 Constructor.
 
void setQPushButton (QPushButton *pb)
 Set the corresponding QPushButton.
 
bool eventFilter (QObject *obj, QEvent *event)
 Redirect events from the _qPushButton member to this object. More...
 
YQDialogdialog ()
 Returns the corresponding YQDialog. More...
 
void forgetDialog ()
 

Friends

class YQDialog
 

Detailed Description

Abstract base class for push button and similar widgets - all that can become a YQDialog's "default button".

Definition at line 44 of file YQGenericButton.h.

Member Function Documentation

YQDialog * YQGenericButton::dialog ( )
protected

Returns the corresponding YQDialog.

Throws an exception if there is none.

Definition at line 83 of file YQGenericButton.cc.

bool YQGenericButton::eventFilter ( QObject *  obj,
QEvent *  event 
)
protected

Redirect events from the _qPushButton member to this object.

Overwritten from QObject.

Definition at line 194 of file YQGenericButton.cc.

Here is the call graph for this function:

bool YQGenericButton::isShownAsDefault ( ) const

Returns 'true' if this button is shown as a default button - which may mean that this really is the dialogs's default button or it is the dialog's focus button (a button that currently has the keyboard focus).

Don't confuse this with YPushButton::isDefaultButton()!

Definition at line 174 of file YQGenericButton.cc.

void YQGenericButton::setEnabled ( bool  enabled)
virtual

Set enabled/disabled state.

Reimplemented from YWidget.

Definition at line 99 of file YQGenericButton.cc.

void YQGenericButton::setIcon ( const std::string &  iconName)
virtual

Set this button's icon.

Reimplemented from YPushButton.

Definition at line 114 of file YQGenericButton.cc.

Here is the call graph for this function:

void YQGenericButton::setLabel ( const std::string &  label)
virtual

Changes the label (the text) of the button.

Reimplemented from YWidget.

Definition at line 152 of file YQGenericButton.cc.

void YQGenericButton::showAsDefault ( bool  show = true)

Show this button as the dialog's default button.

The button never calls this by itself - the parent dialog is responsible for that.

Definition at line 163 of file YQGenericButton.cc.


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