# class KDialogButtonBox

###

Module | kdeui
Namespace |
Class | KDialogButtonBox
Inherits | QDialogButtonBox

Container widget for buttons.

An extension of QDialogButtonBox which allow the use of KGuiItem and conveniance slot connection.

Author Mario Weilguni <mweilguni@sime.com> Author Olivier Goffart <ogoffart@kde.org>

### methods

- KDialogButtonBox (parent, _orientation)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget |
  _orientation | Qt.Orientation | Qt.Horizontal

  Create an empty container for buttons.

  If _orientation is Vertical, the buttons inserted with addButton() are laid out from top to bottom, otherwise they are laid out from left to right.

- KDialogButtonBox (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget |
  a1 | Qt.Orientation | Qt.Horizontal

- addButton (text, role, a0, a1)

  returns QPushButton

  Argument | Type | Default
  --- | --- | ---
  text | QString |
  role | QDialogButtonBox.ButtonRole |
  a0 | SIP_RXOBJ_CON |
  a1 | SIP_SLOT_CON () |

  Creates a push button with the given text, adds it to the button box for the specified role, and returns the corresponding push button. If role is invalid, no button is created, and zero is returned.

  The clicked signal of the button is automatically connected to the slot

  text - the text of the button to add.

  role - the button role

  receiver - An object to connect to.

  slot - A Qt slot to connect the 'clicked()' signal to.

  Returns A pointer to the new button.

- addButton (guiitem, role, a0, a1)

  returns KPushButton

  Argument | Type | Default
  --- | --- | ---
  guiitem | KGuiItem |
  role | QDialogButtonBox.ButtonRole |
  a0 | SIP_RXOBJ_CON |
  a1 | SIP_SLOT_CON () |

  Creates a push button with the given KUiItem, adds it to the button box for the specified role, and returns the corresponding push button. If role is invalid, the button is created, but not added.

  The clicked signal of the button is automatically connected to the slot

  guiitem - text and icon on the button

  role - the button role

  receiver - An object to connect to.

  slot - A Qt slot to connect the 'clicked()' signal to.

  Returns A pointer to the new button.