digiKam
Loading...
Searching...
No Matches
itemviewtooltip.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2009-04-24
7 * Description : A DItemToolTip prepared for use in QAbstractItemViews
8 *
9 * SPDX-FileCopyrightText: 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QAbstractItemView>
20
21// Local includes
22
23#include "ditemtooltip.h"
24#include "digikam_export.h"
25
26namespace Digikam
27{
28
29class DIGIKAM_EXPORT ItemViewToolTip : public DItemToolTip
30{
31 Q_OBJECT
32
33public:
34
35 explicit ItemViewToolTip(QAbstractItemView* const view);
36 ~ItemViewToolTip() override;
37
38 QAbstractItemView* view() const;
39 QAbstractItemModel* model() const;
40 QModelIndex currentIndex() const;
41
47 void show(const QStyleOptionViewItem& option, const QModelIndex& index);
48
49 void setTipContents(const QString& tipContents);
50
55 QString tipContents() override;
56
57protected:
58
59 QRect repositionRect() override;
60
61 bool eventFilter(QObject* o, QEvent* e) override;
62 void hideEvent(QHideEvent*) override;
63 void mouseMoveEvent(QMouseEvent* e) override;
64
65private:
66
67 class Private;
68 Private* const d = nullptr;
69};
70
71} // namespace Digikam
Definition ditemtooltip.h:65
Definition itemviewtooltip.h:30
Definition datefolderview.cpp:34