- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Signals | Public Member Functions | Protected Member Functions | Properties

# QDialogButtonBox Class Reference

Search for all occurrences

## Detailed Description

Definition at line 57 of file qdialogbuttonbox.h.

`#include <qdialogbuttonbox.h>`

Inheritance diagram for QDialogButtonBox:
[legend]

List of all members.

## Public Types
enum | ButtonRole { InvalidRole = -1, AcceptRole, RejectRole, DestructiveRole, ActionRole, HelpRole, YesRole, NoRole, ResetRole, ApplyRole, NRoles }
enum | StandardButton { NoButton = 0x00000000, Ok = 0x00000400, Save = 0x00000800, SaveAll = 0x00001000, Open = 0x00002000, Yes = 0x00004000, YesToAll = 0x00008000, No = 0x00010000, NoToAll = 0x00020000, Abort = 0x00040000, Retry = 0x00080000, Ignore = 0x00100000, Close = 0x00200000, Cancel = 0x00400000, Discard = 0x00800000, Help = 0x01000000, Apply = 0x02000000, Reset = 0x04000000, RestoreDefaults = 0x08000000, FirstButton = Ok, LastButton = RestoreDefaults }
enum | ButtonLayout { WinLayout, MacLayout, KdeLayout, GnomeLayout }
## Signals
void | clicked (QAbstractButton *button)
void | accepted ()
void | helpRequested ()
void | rejected ()
## Public Member Functions
| QDialogButtonBox (QWidget *parent=0)
| QDialogButtonBox (Qt::Orientation orientation, QWidget *parent=0)
| QDialogButtonBox (StandardButtons buttons, Qt::Orientation orientation=Qt::Horizontal, QWidget *parent=0)
| ~QDialogButtonBox ()
void | setOrientation (Qt::Orientation orientation)
Qt::Orientation | orientation () const
void | addButton (QAbstractButton *button, ButtonRole role)
QPushButton * | addButton (const QString &text, ButtonRole role)
QPushButton * | addButton (StandardButton button)
void | removeButton (QAbstractButton *button)
void | clear ()
QList< QAbstractButton * > | buttons () const
ButtonRole | buttonRole (QAbstractButton *button) const
void | setStandardButtons (StandardButtons buttons)
StandardButtons | standardButtons () const
StandardButton | standardButton (QAbstractButton *button) const
QPushButton * | button (StandardButton which) const
void | setCenterButtons (bool center)
bool | centerButtons () const
## Protected Member Functions
void | changeEvent (QEvent *event)
bool | event (QEvent *event)
## Properties
Qt::Orientation | orientation
StandardButtons | standardButtons
bool | centerButtons

## Member Enumeration Documentation

enum ButtonRole

Search for all occurrences

Enumerator:

  InvalidRole | Search for all occurrences
  AcceptRole | Search for all occurrences
  RejectRole | Search for all occurrences
  DestructiveRole | Search for all occurrences
  ActionRole | Search for all occurrences
  HelpRole | Search for all occurrences
  YesRole | Search for all occurrences
  NoRole | Search for all occurrences
  ResetRole | Search for all occurrences
  ApplyRole | Search for all occurrences
  NRoles | Search for all occurrences

Definition at line 66 of file qdialogbuttonbox.h.

                        {
            // keep this in sync with QMessageBox::ButtonRole
            InvalidRole = -1,
            AcceptRole,
            RejectRole,
            DestructiveRole,
            ActionRole,
            HelpRole,
            YesRole,
            NoRole,
            ResetRole,
            ApplyRole,

            NRoles
        };

enum StandardButton

Search for all occurrences

Enumerator:

  NoButton | Search for all occurrences
  Ok | Search for all occurrences
  Save | Search for all occurrences
  SaveAll | Search for all occurrences
  Open | Search for all occurrences
  Yes | Search for all occurrences
  YesToAll | Search for all occurrences
  No | Search for all occurrences
  NoToAll | Search for all occurrences
  Abort | Search for all occurrences
  Retry | Search for all occurrences
  Ignore | Search for all occurrences
  Close | Search for all occurrences
  Cancel | Search for all occurrences
  Discard | Search for all occurrences
  Help | Search for all occurrences
  Apply | Search for all occurrences
  Reset | Search for all occurrences
  RestoreDefaults | Search for all occurrences
  FirstButton | Search for all occurrences
  LastButton | Search for all occurrences

Definition at line 82 of file qdialogbuttonbox.h.

                            {
            // keep this in sync with QMessageBox::StandardButton
            NoButton           = 0x00000000,
            Ok                 = 0x00000400,
            Save               = 0x00000800,
            SaveAll            = 0x00001000,
            Open               = 0x00002000,
            Yes                = 0x00004000,
            YesToAll           = 0x00008000,
            No                 = 0x00010000,
            NoToAll            = 0x00020000,
            Abort              = 0x00040000,
            Retry              = 0x00080000,
            Ignore             = 0x00100000,
            Close              = 0x00200000,
            Cancel             = 0x00400000,
            Discard            = 0x00800000,
            Help               = 0x01000000,
            Apply              = 0x02000000,
            Reset              = 0x04000000,
            RestoreDefaults    = 0x08000000,

    #ifndef Q_MOC_RUN
            FirstButton        = Ok,
            LastButton         = RestoreDefaults
    #endif
        };

enum ButtonLayout

Search for all occurrences

Enumerator:

  WinLayout | Search for all occurrences
  MacLayout | Search for all occurrences
  KdeLayout | Search for all occurrences
  GnomeLayout | Search for all occurrences

Definition at line 112 of file qdialogbuttonbox.h.

                          {
            WinLayout,
            MacLayout,
            KdeLayout,
            GnomeLayout
        };

## Constructor & Destructor Documentation

QDialogButtonBox | ( | QWidget * | parent = `0` | ) |

QDialogButtonBox | ( | Qt::Orientation | orientation,
|  | QWidget * | parent = `0`
| ) |  |

QDialogButtonBox | ( | StandardButtons | buttons,
|  | Qt::Orientation | orientation = `Qt::Horizontal`,
|  | QWidget * | parent = `0`
| ) |  |

~QDialogButtonBox | ( |  | ) |

## Member Function Documentation

void setOrientation | ( | Qt::Orientation | orientation | ) |

Search for all occurrences

Qt::Orientation orientation | ( |  | ) | const

Search for all occurrences

void addButton | ( | QAbstractButton * | button,
|  | ButtonRole | role
| ) |  |

Search for all occurrences

QPushButton* addButton | ( | const QString & | text,
|  | ButtonRole | role
| ) |  |

Search for all occurrences

QPushButton* addButton | ( | StandardButton | button | ) |

Search for all occurrences

void removeButton | ( | QAbstractButton * | button | ) |

Search for all occurrences

void clear | ( |  | ) |

Search for all occurrences

QList<QAbstractButton *> buttons | ( |  | ) | const

Search for all occurrences

ButtonRole buttonRole | ( | QAbstractButton * | button | ) | const

Search for all occurrences

void setStandardButtons | ( | StandardButtons | buttons | ) |

Search for all occurrences

StandardButtons standardButtons | ( |  | ) | const

Search for all occurrences

StandardButton standardButton | ( | QAbstractButton * | button | ) | const

Search for all occurrences

QPushButton* button | ( | StandardButton | which | ) | const

Search for all occurrences

void setCenterButtons | ( | bool | center | ) |

Search for all occurrences

bool centerButtons | ( |  | ) | const

Search for all occurrences

void clicked | ( | QAbstractButton * | button | ) | `[signal]`

Search for all occurrences

void accepted | ( |  | ) | `[signal]`

Search for all occurrences

void helpRequested | ( |  | ) | `[signal]`

Search for all occurrences

void rejected | ( |  | ) | `[signal]`

Search for all occurrences

void changeEvent | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

bool event | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QWidget.

## Property Documentation

Qt::Orientation orientation `[read, write]`

Search for all occurrences

Definition at line 61 of file qdialogbuttonbox.h.

StandardButtons standardButtons `[read, write]`

Search for all occurrences

Definition at line 62 of file qdialogbuttonbox.h.

bool centerButtons `[read, write]`

Search for all occurrences

Definition at line 63 of file qdialogbuttonbox.h.

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

- QtGui/qdialogbuttonbox.h

QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox
QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox QDialogButtonBox