~ubuntu-branches/debian/sid/kde-baseapps/sid

« back to all changes in this revision

Viewing changes to dolphin/src/views/tooltips/tooltipmanager.h

  • Committer: Package Import Robot
  • Author(s): Modestas Vainius, Eshat Cakar, Pino Toscano
  • Date: 2012-06-09 22:18:08 UTC
  • mfrom: (4.2.1) (6.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20120609221808-h1l0ekd5qmb8nefr
Tags: 4:4.8.4-1
* New upstream release.

[ Eshat Cakar ]
* Add watch file.
* Bump kde-sc-dev-latest build dependency to version 4:4.8.4.
* Update installed files.

[ Pino Toscano ]
* Move files of the konqueror documentation from kde-baseapps-data to
  konqueror itself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    Q_OBJECT
45
45
 
46
46
public:
47
 
    explicit ToolTipManager(QAbstractItemView* parent,
48
 
                            DolphinSortFilterProxyModel* model);
 
47
    explicit ToolTipManager(QWidget* parent);
49
48
    virtual ~ToolTipManager();
50
49
 
51
 
public slots:
52
 
    /**
53
 
     * Hides the currently shown tooltip. Invoking this method is
54
 
     * only needed when the tooltip should be hidden although
55
 
     * an item is hovered.
 
50
    /**
 
51
     * Triggers the showing of the tooltip for the item \p item
 
52
     * where the item has the maximum boundaries of \p itemRect.
 
53
     * The tooltip manager takes care that the tooltip is shown
 
54
     * slightly delayed.
 
55
     */
 
56
    void showToolTip(const KFileItem& item, const QRectF& itemRect);
 
57
 
 
58
    /**
 
59
     * Hides the currently shown tooltip.
56
60
     */
57
61
    void hideToolTip();
58
62
 
59
 
protected:
60
 
    virtual bool eventFilter(QObject* watched, QEvent* event);
61
 
 
62
63
private slots:
63
 
    void requestToolTip(const QModelIndex& index);
64
64
    void startContentRetrieval();
65
65
    void setPreviewPix(const KFileItem& item, const QPixmap& pix);
66
66
    void previewFailed();
68
68
    void showToolTip();
69
69
 
70
70
private:
71
 
    QAbstractItemView* m_view;
72
 
    DolphinModel* m_dolphinModel;
73
 
    DolphinSortFilterProxyModel* m_proxyModel;
74
 
 
75
71
    /// Timeout from requesting a tooltip until the tooltip
76
72
    /// should be shown
77
73
    QTimer* m_showToolTipTimer;
85
81
    bool m_toolTipRequested;
86
82
    bool m_metaDataRequested;
87
83
    bool m_appliedWaitCursor;
 
84
    int m_margin;
88
85
    KFileItem m_item;
89
86
    QRect m_itemRect;
90
87
};