KDE 4.9 PyKDE API Reference

- KDE's Python API

# KFilePlacesView Class Reference

`from PyKDE4.kio import *`

Inherits: QListView → QAbstractItemView → QAbstractScrollArea → QFrame → QWidget → QObject

## Detailed Description

This class allows to display a KFilePlacesModel.

## Signals
| urlChanged (KUrl url)
| urlsDropped (KUrl dest, QDropEvent event, QWidget parent)
## Methods
| __init__ (self, QWidget parent=0)
| contextMenuEvent (self, QContextMenuEvent event)
| dataChanged (self, QModelIndex topLeft, QModelIndex bottomRight)
| dragEnterEvent (self, QDragEnterEvent event)
| dragLeaveEvent (self, QDragLeaveEvent event)
| dragMoveEvent (self, QDragMoveEvent event)
| dropEvent (self, QDropEvent event)
| hideEvent (self, QHideEvent event)
bool | isAutoResizeItemsEnabled (self)
bool | isDropOnPlaceEnabled (self)
| keyPressEvent (self, QKeyEvent event)
| paintEvent (self, QPaintEvent event)
| resizeEvent (self, QResizeEvent event)
| rowsInserted (self, QModelIndex parent, int start, int end)
| setAutoResizeItemsEnabled (self, bool enabled)
| setDropOnPlaceEnabled (self, bool enabled)
| setModel (self, QAbstractItemModel model)
| setShowAll (self, bool showAll)
| setUrl (self, KUrl url)
| showEvent (self, QShowEvent event)
QSize | sizeHint (self)

## Signal Documentation

urlChanged | ( | KUrl | url
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("urlChanged(const KUrl&)"), target_slot)`

urlsDropped | ( | KUrl | dest,
|  | QDropEvent | event,
|  | QWidget | parent
| ) |  |  |

Is emitted if items are dropped on the place dest. The application has to take care itself about performing the corresponding action like copying or moving.

Signal syntax:
  `QObject.connect(source, SIGNAL("urlsDropped(const KUrl&, QDropEvent*, QWidget*)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

contextMenuEvent | ( | self, |
|  | QContextMenuEvent | event
| ) |  |  |

dataChanged | ( | self, |
|  | QModelIndex | topLeft,
|  | QModelIndex | bottomRight
| ) |  |  |

dragEnterEvent | ( | self, |
|  | QDragEnterEvent | event
| ) |  |  |

dragLeaveEvent | ( | self, |
|  | QDragLeaveEvent | event
| ) |  |  |

dragMoveEvent | ( | self, |
|  | QDragMoveEvent | event
| ) |  |  |

dropEvent | ( | self, |
|  | QDropEvent | event
| ) |  |  |

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

bool isAutoResizeItemsEnabled | ( |  | self ) |

bool isDropOnPlaceEnabled | ( |  | self ) |

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

paintEvent | ( | self, |
|  | QPaintEvent | event
| ) |  |  |

resizeEvent | ( | self, |
|  | QResizeEvent | event
| ) |  |  |

rowsInserted | ( | self, |
|  | QModelIndex | parent,
|  | int | start,
|  | int | end
| ) |  |  |

setAutoResizeItemsEnabled | ( | self, |
|  | bool | enabled
| ) |  |  |

If enabled is true (the default), items will automatically resize themselves to fill the view.

Since:
  4.1

setDropOnPlaceEnabled | ( | self, |
|  | bool | enabled
| ) |  |  |

If enabled is true, it is allowed dropping items above a place for e. g. copy or move operations. The application has to take care itself to perform the operation (see KFilePlacesView.urlsDropped()). If enabled is false, it is only possible adding items as additional place. Per default dropping on a place is disabled.

setModel | ( | self, |
|  | QAbstractItemModel | model
| ) |  |  |

setShowAll | ( | self, |
|  | bool | showAll
| ) |  |  |

setUrl | ( | self, |
|  | KUrl | url
| ) |  |  |

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

QSize sizeHint | ( |  | self ) |