Debian Codegraph @

core/showfoto/thumbbar/showfotocoordinatesoverlay.h

raw symbols SCIP
1 /* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2014-05-28
7 * Description : overlay for GPS location indicator
8 *
9 * SPDX-FileCopyrightText: 2014-2026 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15 #pragma once
16
17 // Qt includes
18
19 #include <QAbstractButton>
20 #include <QAbstractItemView>
21
22 // Local includes
23
24 #include "itemviewhoverbutton.h"
25 #include "itemdelegateoverlay.h"
26 #include "showfotoitemviewdelegate.h"
27
28 using namespace Digikam;
29
30 namespace ShowFoto
31 {
32
33 class ShowfotoCoordinatesOverlayWidget : public QAbstractButton
34 {
35 Q_OBJECT
36
37 public:
38
39 explicit ShowfotoCoordinatesOverlayWidget(QWidget* const parent = nullptr);
40
41 protected:
42
43 void paintEvent(QPaintEvent*) override;
44 };
45
46 // ----------------------------------------------------------------------
47
48 class ShowfotoCoordinatesOverlay : public AbstractWidgetDelegateOverlay
49 {
50 Q_OBJECT
51 REQUIRE_DELEGATE(ShowfotoItemViewDelegate)
52
53 public:
54
55 explicit ShowfotoCoordinatesOverlay(QObject* const parent);
56 ShowfotoCoordinatesOverlayWidget* buttonWidget() const;
57
58 protected:
59
60 void updatePosition();
61
62 QWidget* createWidget() override;
63 void setActive(bool active) override;
64 void visualChange() override;
65 bool checkIndex(const QModelIndex& index) const override;
66 void slotEntered(const QModelIndex& index) override;
67
68 protected:
69
70 QPersistentModelIndex m_index;
71 };
72
73 } // namespace ShowFoto