libyui-qt
Loading...
Searching...
No Matches
YQGenericButton Class Reference

#include <YQGenericButton.h>

Inheritance diagram for YQGenericButton:
Collaboration diagram for YQGenericButton:

Public Slots

void activate ()
 

Public Member Functions

virtual ~YQGenericButton ()
 
virtual void setEnabled (bool enabled)
 
bool isEnabled () const
 
void setLabel (const QString &label)
 
virtual void setLabel (const std::string &label)
 
void showAsDefault (bool show=true)
 
bool isShownAsDefault () const
 
virtual bool setKeyboardFocus ()
 
virtual void setIcon (const std::string &iconName)
 
QString text () const
 
QPushButton * qPushButton () const
 
YQDialogyQDialog () const
 
void setShortcut (const QKeySequence &key)
 

Protected Member Functions

 YQGenericButton (YWidget *parent, const std::string &label)
 
void setQPushButton (QPushButton *pb)
 
bool eventFilter (QObject *obj, QEvent *event)
 
YQDialogdialog ()
 
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".

Constructor & Destructor Documentation

◆ YQGenericButton()

YQGenericButton::YQGenericButton ( YWidget * parent,
const std::string & label )
protected

Constructor.

◆ ~YQGenericButton()

YQGenericButton::~YQGenericButton ( )
virtual

Destructor.

Member Function Documentation

◆ activate

void YQGenericButton::activate ( )
slot

Activate (animated) this button.

◆ dialog()

YQDialog * YQGenericButton::dialog ( )
protected

Returns the corresponding YQDialog. Throws an exception if there is none.

◆ eventFilter()

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

Redirect events from the _qPushButton member to this object.

Overwritten from QObject.

◆ isEnabled()

bool YQGenericButton::isEnabled ( ) const

Returns 'true' if this button is enabled, 'false' otherwise.

◆ isShownAsDefault()

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()!

◆ qPushButton()

QPushButton * YQGenericButton::qPushButton ( ) const
inline

Returns the internal Qt PushButton.

◆ setEnabled()

void YQGenericButton::setEnabled ( bool enabled)
virtual

Set enabled/disabled state.

Reimplemented from YWidget.

◆ setIcon()

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

Set this button's icon.

Reimplemented from YPushButton.

◆ setKeyboardFocus()

bool YQGenericButton::setKeyboardFocus ( )
virtual

Accept the keyboard focus.

◆ setLabel() [1/2]

void YQGenericButton::setLabel ( const QString & label)

Changes the label (the text) of the button.

◆ setLabel() [2/2]

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

Changes the label (the text) of the button.

Reimplemented from YWidget.

◆ setQPushButton()

void YQGenericButton::setQPushButton ( QPushButton * pb)
protected

Set the corresponding QPushButton.

◆ setShortcut()

void YQGenericButton::setShortcut ( const QKeySequence & key)

Set the keyboard shortcut (e.g. F1 for help)

◆ showAsDefault()

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.

◆ text()

QString YQGenericButton::text ( ) const

Returns the button's text (label) - useful for log messages etc.

◆ yQDialog()

YQDialog * YQGenericButton::yQDialog ( ) const
inline

Returns the internal parent dialog.


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