KStandardGuiItem

KDE 4.9 PyKDE API Reference

- KDE's Python API

# KStandardGuiItem Namespace Reference

`from PyKDE4.kdeui.KStandardGuiItem import *`

## Detailed Description

Provides a set of standardized KGuiItems.

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

Author:
  Holger Freyther <freyther@kde.org>

## Enumerations
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, CloseWindow, CloseDocument }
## Functions
KGuiItem | add ()
KGuiItem | adminMode ()
KGuiItem | apply ()
KGuiItem | back (KStandardGuiItem.BidiMode useBidi=KStandardGuiItem.IgnoreRTL)
(KGuiItem,KGuiItem) | backAndForward ()
KGuiItem | cancel ()
KGuiItem | clear ()
KGuiItem | close ()
KGuiItem | closeDocument ()
KGuiItem | closeWindow ()
KGuiItem | configure ()
KGuiItem | cont ()
KGuiItem | defaults ()
KGuiItem | del_ ()
KGuiItem | discard ()
KGuiItem | dontSave ()
KGuiItem | find ()
KGuiItem | forward (KStandardGuiItem.BidiMode useBidi=KStandardGuiItem.IgnoreRTL)
KGuiItem | guiItem (KStandardGuiItem.StandardItem id)
KGuiItem | help ()
KGuiItem | insert ()
KGuiItem | no ()
KGuiItem | ok ()
KGuiItem | open ()
KGuiItem | overwrite ()
KGuiItem | print_ ()
KGuiItem | properties ()
KGuiItem | quit ()
KGuiItem | remove ()
KGuiItem | reset ()
KGuiItem | save ()
KGuiItem | saveAs ()
QString | standardItem (KStandardGuiItem.StandardItem id)
KGuiItem | stop ()
KGuiItem | test ()
KGuiItem | yes ()

## Enumeration Documentation

BidiMode

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.

Enumerator:

  UseRTL = 0 |
  IgnoreRTL |

StandardItem

Enumerator:

  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 |
  CloseWindow |
  CloseDocument |

## Function Documentation

KGuiItem add | ( |  | ) |

Returns the 'Add' gui item.

KGuiItem adminMode | ( |  | ) |

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

KGuiItem apply | ( |  | ) |

Returns the 'Apply' gui item.

KGuiItem back | ( | KStandardGuiItem.BidiMode | useBidi=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.

(KGuiItem,KGuiItem) backAndForward | ( |  | ) |

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.

KGuiItem cancel | ( |  | ) |

Returns the 'Cancel' gui item.

KGuiItem clear | ( |  | ) |

Returns the 'Clear' gui item.

KGuiItem close | ( |  | ) |

Returns the 'Close' gui item.

KGuiItem closeDocument | ( |  | ) |

Returns the 'CloseDocument' gui item.

Since:
  4.3

KGuiItem closeWindow | ( |  | ) |

Returns the 'CloseWindow' gui item.

Since:
  4.3

KGuiItem configure | ( |  | ) |

Returns the 'Configure' gui item.

KGuiItem cont | ( |  | ) |

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

KGuiItem defaults | ( |  | ) |

Returns the 'Defaults' gui item.

KGuiItem del_ | ( |  | ) |

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

KGuiItem discard | ( |  | ) |

Returns the 'Discard' gui item.

KGuiItem dontSave | ( |  | ) |

Returns the 'DontSave' gui item.

KGuiItem find | ( |  | ) |

Returns the 'Find' gui item.

KGuiItem forward | ( | KStandardGuiItem.BidiMode | useBidi=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.

KGuiItem guiItem | ( | KStandardGuiItem.StandardItem | id
| ) |  |  |

Returns the gui item for the given identifier

Parameters:

  | id. |
  | id | the identifier to search for

KGuiItem help | ( |  | ) |

Returns the 'Help' gui item.

KGuiItem insert | ( |  | ) |

Returns the 'Insert' gui item.

KGuiItem no | ( |  | ) |

Returns the 'No' gui item.

KGuiItem ok | ( |  | ) |

Returns the 'Ok' gui item.

KGuiItem open | ( |  | ) |

Returns the 'Open' gui item.

KGuiItem overwrite | ( |  | ) |

Returns the 'Overwrite' gui item.

KGuiItem print_ | ( |  | ) |

Returns the 'Print' gui item.

KGuiItem properties | ( |  | ) |

Returns the 'Properties' gui item.

KGuiItem quit | ( |  | ) |

Returns the 'Quit' gui item.

KGuiItem remove | ( |  | ) |

Returns the 'Remove' gui item.

KGuiItem reset | ( |  | ) |

Returns the 'Reset' gui item.

KGuiItem save | ( |  | ) |

Returns the 'Save' gui item.

KGuiItem saveAs | ( |  | ) |

Returns the 'SaveAs' gui item.

QString standardItem | ( | KStandardGuiItem.StandardItem | id
| ) |  |  |

Returns the name of the gui item for the given identifier

Parameters:

  | id. |
  | id | the identifier to search for

KGuiItem stop | ( |  | ) |

Returns the 'Stop' gui item.

KGuiItem test | ( |  | ) |

Returns the 'Test' gui item.

KGuiItem yes | ( |  | ) |

Returns the 'Yes' gui item.