KDE 4.2 PyKDE API Reference

- KDE's Python API

# Dialog Class Reference

`from PyKDE4.plasma import *`

Inherits: QWidget → QObject
Namespace: Plasma

## Detailed Description

Dialog plasma/dialog.h <Plasma/Dialog>

A dialog that uses the Plasma style

Dialog provides a dialog-like widget that can be used to display additional information.

Dialog uses the plasma theme, and usually has no window decoration. It's meant as an interim solution to display widgets as extension to plasma applets, for example when you click on an applet like the devicenotifier or the clock, the widget that is then displayed, is a Dialog.

## Enumerations

ResizeCorner | { NoCorner, NorthEast, SouthEast, NorthWest, SouthWest, All }

## Signals

| dialogResized ()
| dialogVisible (bool status)

## Methods

| __init__ (self, QWidget parent=0, Qt.WindowFlags f=Qt.Window)
| dialogResized (self)
| dialogVisible (self, bool status)
bool | event (self, QEvent event)
bool | eventFilter (self, QObject watched, QEvent event)
QGraphicsWidget | graphicsWidget (self)
| hideEvent (self, QHideEvent event)
bool | inControlArea (self, QPoint point)
| keyPressEvent (self, QKeyEvent event)
| mouseMoveEvent (self, QMouseEvent event)
| mousePressEvent (self, QMouseEvent event)
| mouseReleaseEvent (self, QMouseEvent event)
| paintEvent (self, QPaintEvent e)
Plasma.Dialog.ResizeCorners | resizeCorners (self)
| resizeEvent (self, QResizeEvent e)
| setGraphicsWidget (self, QGraphicsWidget widget)
| setResizeHandleCorners (self, Plasma.Dialog.ResizeCorners corners)
| showEvent (self, QShowEvent event)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0,
|  | Qt.WindowFlags | f=Qt.Window
| ) |  |  |

@arg parent the parent widget, for plasmoids, this is usually 0. @arg f the Qt.WindowFlags, default is to not show a windowborder.

dialogResized | ( |  | self ) |

Fires when the dialog automatically resizes.

Signal syntax:
  `QObject.connect(source, SIGNAL("dialogResized()"), target_slot)`

dialogVisible | ( | self, |
|  | bool | status
| ) |  |  |

Emit a signal when the dialog become visible/invisible

Signal syntax:
  `QObject.connect(source, SIGNAL("dialogVisible(bool)"), target_slot)`

bool event | ( | self, |
|  | QEvent | event
| ) |  |  |

bool eventFilter | ( | self, |
|  | QObject | watched,
|  | QEvent | event
| ) |  |  |

QGraphicsWidget graphicsWidget | ( |  | self ) |

hideEvent | ( | self, |
|  | QHideEvent | event
| ) |  |  |

bool inControlArea | ( | self, |
|  | QPoint | point
| ) |  |  |

Convenience method to know whether the point is in a control area (e.g. resize area) or not.

Returns:
  true if the point is in the control area.

keyPressEvent | ( | self, |
|  | QKeyEvent | event
| ) |  |  |

mouseMoveEvent | ( | self, |
|  | QMouseEvent | event
| ) |  |  |

mousePressEvent | ( | self, |
|  | QMouseEvent | event
| ) |  |  |

mouseReleaseEvent | ( | self, |
|  | QMouseEvent | event
| ) |  |  |

paintEvent | ( | self, |
|  | QPaintEvent | e
| ) |  |  |

Reimplemented from QWidget

Plasma.Dialog.ResizeCorners resizeCorners | ( |  | self ) |

Convenience method to get the enabled resize corners.

Returns:
  which resize corners are active.

resizeEvent | ( | self, |
|  | QResizeEvent | e
| ) |  |  |

setGraphicsWidget | ( | self, |
|  | QGraphicsWidget | widget
| ) |  |  |

setResizeHandleCorners | ( | self, |
|  | Plasma.Dialog.ResizeCorners | corners
| ) |  |  |

@arg corners the corners the resize handlers should be placed in.

showEvent | ( | self, |
|  | QShowEvent | event
| ) |  |  |

## Enumeration Documentation

ResizeCorner

Use these flags to choose the active resize corners.

Enumerator:

  NoCorner = 0 |
  NorthEast = 1 |
  SouthEast = 2 |
  NorthWest = 4 |
  SouthWest = 8 |
  All = NorthEast|SouthEast|NorthWest|SouthWest |