# Namespace KStandardGuiItem

Module | kdeui
Namespace | KStandardGuiItem

Provides a set of standardized KGuiItems.

The various methods returns standardized KGuiItem's conforming to the KDE UI Standards. Use them instead of creating your own.

Author Holger Freyther <freyther@kde.org>

### enums

- BidiMode { UseRTL, IgnoreRTL }
- StandardItem { Ok, Cancel, Yes, No, Discard, Save, DontSave, SaveAs, Apply, Clear, Help, Defaults, Close, Back, Forward, Print, Continue, Open, Quit, AdminMode, Reset, Delete, Insert, Configure, Find, Stop, Add, Remove, Test, Properties, Overwrite }

enum details

### methods

- add ( )

  returns KGuiItem

  Returns the 'Add' gui item.

- adminMode ( )

  returns KGuiItem

  Returns a KGuiItem suiting for cases where code or functionality runs under root privileges. Used in conjunction with KConfig Modules.

- apply ( )

  returns KGuiItem

  Returns the 'Apply' gui item.

- back (useBidi)

  returns KGuiItem

  Argument | Type | Default
  --- | --- | ---
  useBidi | KStandardGuiItem.BidiMode | KStandardGuiItem.IgnoreRTL

  Returns the 'Back' gui item, like Konqueror's back button. This GUI item can optionally honor the user's setting for BiDi, so the icon for right-to-left languages (Hebrew and Arab) has the arrow pointing in the opposite direction. By default the arrow points in the Western 'back' direction (i.e. to the left). This is because usually you only want the Bidi aware GUI item if you also want the 'forward' item. Those two are available in the separate backAndForward() method.

- backAndForward ( )

  returns QPair<KGuiItem,KGuiItem>

  Return both a back and a forward gui item. This function always returns items that are aware of the Right-to-Left setting for Arab and Hebrew locales. If you have a reason for wanting the 'Western' back/forward buttons, please use the back() and forward() items instead.

- cancel ( )

  returns KGuiItem

  Returns the 'Cancel' gui item.

- clear ( )

  returns KGuiItem

  Returns the 'Clear' gui item.

- close ( )

  returns KGuiItem

  Returns the 'Close' gui item.

- configure ( )

  returns KGuiItem

  Returns the 'Configure' gui item.

- cont ( )

  returns KGuiItem

  Returns the 'Continue' gui item. The short name is due to 'continue' being a reserved word in the C++ language.

- defaults ( )

  returns KGuiItem

  Returns the 'Defaults' gui item.

- del ( )

  returns KGuiItem

  Returns the 'Delete' gui item. The short name is due to 'delete' being a reserved word in the C++ language.

- discard ( )

  returns KGuiItem

  Returns the 'Discard' gui item.

- dontSave ( )

  returns KGuiItem

  Returns the 'DontSave' gui item.

- find ( )

  returns KGuiItem

  Returns the 'Find' gui item.

- forward (useBidi)

  returns KGuiItem

  Argument | Type | Default
  --- | --- | ---
  useBidi | KStandardGuiItem.BidiMode | KStandardGuiItem.IgnoreRTL

  Returns the 'Forward' gui item, like Konqueror's forward button. This GUI item can optionally honor the user's setting for BiDi, so the icon for right-to-left languages (Hebrew and Arab) has the arrow pointing in the opposite direction. By default the arrow points in the Western 'forward' direction (i.e. to the right). This is because usually you only want the Bidi aware GUI item if you also want the 'back' item. Those two are available in the separate backAndForward() method.

- guiItem (id)

  returns KGuiItem

  Argument | Type | Default
  --- | --- | ---
  id | KStandardGuiItem.StandardItem |

  Returns the gui item for the given identifier id. -

  id - the identifier to search for

- help ( )

  returns KGuiItem

  Returns the 'Help' gui item.

- insert ( )

  returns KGuiItem

  Returns the 'Insert' gui item.

- no ( )

  returns KGuiItem

  Returns the 'No' gui item.

- ok ( )

  returns KGuiItem

  Returns the 'Ok' gui item.

- open ( )

  returns KGuiItem

  Returns the 'Open' gui item.

- overwrite ( )

  returns KGuiItem

  Returns the 'Overwrite' gui item.

- print ( )

  returns KGuiItem

  Returns the 'Print' gui item.

- properties ( )

  returns KGuiItem

  Returns the 'Properties' gui item.

- quit ( )

  returns KGuiItem

  Returns the 'Quit' gui item.

- remove ( )

  returns KGuiItem

  Returns the 'Remove' gui item.

- reset ( )

  returns KGuiItem

  Returns the 'Reset' gui item.

- save ( )

  returns KGuiItem

  Returns the 'Save' gui item.

- saveAs ( )

  returns KGuiItem

  Returns the 'SaveAs' gui item.

- standardItem (id)

  returns QString

  Argument | Type | Default
  --- | --- | ---
  id | KStandardGuiItem.StandardItem |

  Returns the name of the gui item for the given identifier id. -

  id - the identifier to search for

- stop ( )

  returns KGuiItem

  Returns the 'Stop' gui item.

- test ( )

  returns KGuiItem

  Returns the 'Test' gui item.

- yes ( )

  returns KGuiItem

  Returns the 'Yes' gui item.

### enums - detail

- BidiMode { UseRTL, IgnoreRTL }

  The back and forward items by default use the RTL settings for Hebrew and Arab countries. If you want those actions to ignore the RTL value and force 'Western' behavior instead, use the IgnoreRTL value instead.

  | UseRTL | - 0 | - |
  | IgnoreRTL | - | - |

- StandardItem { Ok, Cancel, Yes, No, Discard, Save, DontSave, SaveAs, Apply, Clear, Help, Defaults, Close, Back, Forward, Print, Continue, Open, Quit, AdminMode, Reset, Delete, Insert, Configure, Find, Stop, Add, Remove, Test, Properties, Overwrite }

  The back and forward items by default use the RTL settings for Hebrew and Arab countries. If you want those actions to ignore the RTL value and force 'Western' behavior instead, use the IgnoreRTL value instead.

  | Ok | - 1 | - |
  | Cancel | - | - |
  | Yes | - | - |
  | No | - | - |
  | Discard | - | - |
  | Save | - | - |
  | DontSave | - | - |
  | SaveAs | - | - |
  | Apply | - | - |
  | Clear | - | - |
  | Help | - | - |
  | Defaults | - | - |
  | Close | - | - |
  | Back | - | - |
  | Forward | - | - |
  | Print | - | - |
  | Continue | - | - |
  | Open | - | - |
  | Quit | - | - |
  | AdminMode | - | - |
  | Reset | - | - |
  | Delete | - | - |
  | Insert | - | - |
  | Configure | - | - |
  | Find | - | - |
  | Stop | - | - |
  | Add | - | - |
  | Remove | - | - |
  | Test | - | - |
  | Properties | - | - |
  | Overwrite | - | - |