diff options
| author | Peter Penz <[email protected]> | 2008-08-22 21:47:22 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-08-22 21:47:22 +0000 |
| commit | ad0a321b7dfd57d7d666ac87ef44813f8e16129e (patch) | |
| tree | 62927110bc4957fe22a330e7d780559b8ddc12e4 /src/tooltipmanager.h | |
| parent | aa3e271ce39e7cbbd546d5f9197a1f83ba53fcde (diff) | |
tooltip improvements (patch provided by Laurens Vanhove):
* do a slightly delayed generation of previews to avoid expensive thumbnail creation when shortly hovering items
* prevent a resizing of the tooltip if the preview cannot be generated within a specific timeout
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=851104
Diffstat (limited to 'src/tooltipmanager.h')
| -rw-r--r-- | src/tooltipmanager.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/tooltipmanager.h b/src/tooltipmanager.h index 381b1b7a4..213f95871 100644 --- a/src/tooltipmanager.h +++ b/src/tooltipmanager.h @@ -30,6 +30,7 @@ class DolphinSortFilterProxyModel; class QAbstractItemView; class QModelIndex; class QTimer; +class KToolTipItem; /** * @brief Manages the tooltips for an item view. @@ -60,16 +61,30 @@ protected: private slots: void requestToolTip(const QModelIndex& index); void hideToolTip(); - void showToolTip(); + void prepareToolTip(); + void startPreviewJob(); + void setPreviewPix(const KFileItem& item, const QPixmap& pix); + void previewFailed(const KFileItem& item); private: + void showToolTip(KToolTipItem* tip); + QAbstractItemView* m_view; DolphinModel* m_dolphinModel; DolphinSortFilterProxyModel* m_proxyModel; QTimer* m_timer; + QTimer* m_previewTimer; + QTimer* m_waitOnPreviewTimer; KFileItem m_item; QRect m_itemRect; + bool m_preview; + bool m_generatingPreview; + bool m_previewIsLate; + int m_previewPass; + KToolTipItem* m_emptyRenderedKToolTipItem; + QPixmap m_pix; + }; #endif |
