digiKam
Loading...
Searching...
No Matches
gpsitemlist.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 : 2010-03-22
7 * Description : A view to display a list of items with GPS info.
8 *
9 * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2010 by Michael G. Hansen <mike at mghansen dot de>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QTreeView>
21
22// Local includes
23
24#include "gpsitemmodel.h"
26#include "digikam_export.h"
27
28class QWheelEvent;
29class KConfigGroup;
30
31namespace Digikam
32{
33
34class ItemListDragDropHandler;
35
36class DIGIKAM_EXPORT GPSItemList : public QTreeView
37{
38 Q_OBJECT
39
40public:
41
42 explicit GPSItemList(QWidget* const parent = nullptr);
43 ~GPSItemList() override;
44
45 void setModelAndSelectionModel(GPSItemModel* const model, QItemSelectionModel* const selectionModel);
46 GPSItemModel* getModel() const;
47 QItemSelectionModel* getSelectionModel() const;
48 void setDragDropHandler(ItemListDragDropHandler* const dragDropHandler);
49 void setThumbnailSize(const int size);
50 GPSItemSortProxyModel* getSortProxyModel() const;
51
52 void saveSettingsToGroup(KConfigGroup* const group);
53 void readSettingsFromGroup(const KConfigGroup* const group);
54 void setEditEnabled(const bool state);
55 void setDragEnabled(const bool state);
56
57Q_SIGNALS:
58
59 void signalImageActivated(const QModelIndex& index);
60
61public Q_SLOTS:
62
63 void slotIncreaseThumbnailSize();
64 void slotDecreaseThumbnailSize();
65 void slotUpdateActionsEnabled();
66
67private Q_SLOTS:
68
69 void slotInternalTreeViewImageActivated(const QModelIndex& current, const QModelIndex& previous);
70 void slotThumbnailFromModel(const QPersistentModelIndex& index, const QPixmap& pixmap);
71 void slotColumnVisibilityActionTriggered(QAction* action);
72
73protected:
74
75 bool eventFilter(QObject* watched, QEvent* event) override;
76 void startDrag(Qt::DropActions supportedActions) override;
77 void wheelEvent(QWheelEvent* we) override;
78
79private:
80
81 class Private;
82 Private* const d = nullptr;
83};
84
85} // namespace Digikam
Definition gpsitemlist.h:37
void signalImageActivated(const QModelIndex &index)
Definition gpsitemmodel.h:33
Definition gpsitemsortproxymodel.h:34
Definition gpsitemlistdragdrophandler.h:31
Definition datefolderview.cpp:34