com.trolltech.qt.gui
Enum QMessageBox.StandardButton

java.lang.Object
  extended by java.lang.Enum<QMessageBox.StandardButton>
      extended by com.trolltech.qt.gui.QMessageBox.StandardButton
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<QMessageBox.StandardButton>
Enclosing class:
QMessageBox

public static enum QMessageBox.StandardButton
extends java.lang.Enum<QMessageBox.StandardButton>
implements QtEnumerator

These enums describe flags for standard buttons. Each button has a defined ButtonRole.

ConstantValueDescription
Ok1024An "OK" button defined with the AcceptRole.
Open8192A "Open" button defined with the AcceptRole.
Save2048A "Save" button defined with the AcceptRole.
Cancel4194304A "Cancel" button defined with the RejectRole.
Close2097152A "Close" button defined with the RejectRole.
Discard8388608A "Discard" or "Don't Save" button, depending on the platform, defined with the DestructiveRole.
Apply33554432An "Apply" button defined with the ApplyRole.
Reset67108864A "Reset" button defined with the ResetRole.
RestoreDefaults134217728A "Restore Defaults" button defined with the ResetRole.
Help16777216A "Help" button defined with the HelpRole.
SaveAll4096A "Save All" button defined with the AcceptRole.
Yes16384A "Yes" button defined with the YesRole.
YesToAll32768A "Yes to All" button defined with the YesRole.
No65536A "No" button defined with the NoRole.
NoToAll131072A "No to All" button defined with the NoRole.
Abort262144An "Abort" button defined with the RejectRole.
Retry524288A "Retry" button defined with the AcceptRole.
Ignore1048576An "Ignore" button defined with the AcceptRole.
NoButton0An invalid button.

The following values are obsolete:

ConstantValueDescription
YesAll32768Use YesToAll instead.
NoAll131072Use NoToAll instead.
Default256Use the defaultButton argument of information, warning, etc. instead, or call setDefaultButton.
Escape512Call setEscapeButton instead.
FlagMask768 
ButtonMask769 

See Also:
ButtonRole, standardButtons

Enum Constant Summary
Abort
          An "Abort" button defined with the RejectRole.
Apply
          An "Apply" button defined with the ApplyRole.
ButtonMask
          Internal.
Cancel
          A "Cancel" button defined with the RejectRole.
Close
          A "Close" button defined with the RejectRole.
Default
          Use the defaultButton argument of information, warning, etc.
Discard
          A "Discard" or "Don't Save" button, depending on the platform, defined with the DestructiveRole.
Escape
          Call setEscapeButton instead.
FlagMask
          Internal.
Help
          A "Help" button defined with the HelpRole.
Ignore
          An "Ignore" button defined with the AcceptRole.
No
          A "No" button defined with the NoRole.
NoButton
          An invalid button.
NoToAll
          A "No to All" button defined with the NoRole.
Ok
          An "OK" button defined with the AcceptRole.
Open
          A "Open" button defined with the AcceptRole.
Reset
          A "Reset" button defined with the ResetRole.
RestoreDefaults
          A "Restore Defaults" button defined with the ResetRole.
Retry
          A "Retry" button defined with the AcceptRole.
Save
          A "Save" button defined with the AcceptRole.
SaveAll
          A "Save All" button defined with the AcceptRole.
Yes
          A "Yes" button defined with the YesRole.
YesToAll
          A "Yes to All" button defined with the YesRole.
 
Method Summary
static QMessageBox.StandardButtons createQFlags(QMessageBox.StandardButton... values)
           
static QMessageBox.StandardButton resolve(int value)
           
 int value()
           
static QMessageBox.StandardButton valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static QMessageBox.StandardButton[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NoButton

public static final QMessageBox.StandardButton NoButton

An invalid button.


Ok

public static final QMessageBox.StandardButton Ok

An "OK" button defined with the AcceptRole.


Save

public static final QMessageBox.StandardButton Save

A "Save" button defined with the AcceptRole.


SaveAll

public static final QMessageBox.StandardButton SaveAll

A "Save All" button defined with the AcceptRole.


Open

public static final QMessageBox.StandardButton Open

A "Open" button defined with the AcceptRole.


Yes

public static final QMessageBox.StandardButton Yes

A "Yes" button defined with the YesRole.


YesToAll

public static final QMessageBox.StandardButton YesToAll

A "Yes to All" button defined with the YesRole.


No

public static final QMessageBox.StandardButton No

A "No" button defined with the NoRole.


NoToAll

public static final QMessageBox.StandardButton NoToAll

A "No to All" button defined with the NoRole.


Abort

public static final QMessageBox.StandardButton Abort

An "Abort" button defined with the RejectRole.


Retry

public static final QMessageBox.StandardButton Retry

A "Retry" button defined with the AcceptRole.


Ignore

public static final QMessageBox.StandardButton Ignore

An "Ignore" button defined with the AcceptRole.


Close

public static final QMessageBox.StandardButton Close

A "Close" button defined with the RejectRole.


Cancel

public static final QMessageBox.StandardButton Cancel

A "Cancel" button defined with the RejectRole.


Discard

public static final QMessageBox.StandardButton Discard

A "Discard" or "Don't Save" button, depending on the platform, defined with the DestructiveRole.


Help

public static final QMessageBox.StandardButton Help

A "Help" button defined with the HelpRole.


Apply

public static final QMessageBox.StandardButton Apply

An "Apply" button defined with the ApplyRole.


Reset

public static final QMessageBox.StandardButton Reset

A "Reset" button defined with the ResetRole.


RestoreDefaults

public static final QMessageBox.StandardButton RestoreDefaults

A "Restore Defaults" button defined with the ResetRole.


Default

public static final QMessageBox.StandardButton Default

Use the defaultButton argument of information, warning, etc. instead, or call setDefaultButton.


Escape

public static final QMessageBox.StandardButton Escape

Call setEscapeButton instead.


FlagMask

public static final QMessageBox.StandardButton FlagMask
Internal.


ButtonMask

public static final QMessageBox.StandardButton ButtonMask
Internal.

Method Detail

values

public static final QMessageBox.StandardButton[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(QMessageBox.StandardButton c : QMessageBox.StandardButton.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static QMessageBox.StandardButton valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

value

public int value()
Specified by:
value in interface QtEnumerator

createQFlags

public static QMessageBox.StandardButtons createQFlags(QMessageBox.StandardButton... values)

resolve

public static QMessageBox.StandardButton resolve(int value)