diff options
| author | Peter Penz <[email protected]> | 2008-09-21 20:19:31 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-09-21 20:19:31 +0000 |
| commit | 5fe847f61438c5535fc1f0143e80583a5f7012bd (patch) | |
| tree | 4a976bd5b9f49209ae3dcd222c2718faf483a83c /src/kfilepreviewgenerator.h | |
| parent | 4d886d083ca6cb2d635da2d29efb804b2680b6de (diff) | |
* documentation updates
* don't trigger an assertion if no icon size is spezified by the view, just don't generate a preview in this case
svn path=/trunk/KDE/kdebase/apps/; revision=863328
Diffstat (limited to 'src/kfilepreviewgenerator.h')
| -rw-r--r-- | src/kfilepreviewgenerator.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/kfilepreviewgenerator.h b/src/kfilepreviewgenerator.h index 47aff66a7..6d720fefc 100644 --- a/src/kfilepreviewgenerator.h +++ b/src/kfilepreviewgenerator.h @@ -34,7 +34,7 @@ class KMimeTypeResolver; class QAbstractItemView; /** - * @brief Manages the icon state of a directory model. + * @brief Generates previews for files of an item view. * * Per default a preview is generated for each item. * Additionally the clipboard is checked for cut items. @@ -54,22 +54,34 @@ class KFilePreviewGenerator : public QObject Q_OBJECT public: + /** + * @param parent Item view containing the file items where previews should + * be generated. It is mandatory that the item view specifies + * an icon size by QAbstractItemView::setIconSize(), otherwise + * no previews will be generated. + * @param model Model of the item view. + */ KFilePreviewGenerator(QAbstractItemView* parent, KDirSortFilterProxyModel* model); virtual ~KFilePreviewGenerator(); + + /** + * If \a show is set to true, a preview is generated for each item. If \a show + * is false, the MIME type icon of the item is shown instead. Per default showing + * of the preview is turned on. Note that it is mandatory that the item view + * specifies an icon size by QAbstractItemView::setIconSize(), otherwise + * KFilePreviewGenerator::showPreview() will always return false. + */ void setShowPreview(bool show); bool showPreview() const; /** - * Updates the previews for all already available items. It is only necessary - * to invoke this method when the icon size of the abstract item view has - * been changed. + * Updates the previews for all already available items. Usually It is only + * necessary to invoke this method when the icon size of the abstract item view + * has been changed by QAbstractItemView::setIconSize(). */ void updatePreviews(); - /** - * Cancels all pending previews. Should be invoked when the URL of the item - * view has been changed. - */ + /** Cancels all pending previews. */ void cancelPreviews(); private slots: |
