digiKam
importiconview.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 : 2012-22-07
7  * Description : Icon view for import tool items
8  *
9  * Copyright (C) 2012 by Islam Wazery <wazery at ubuntu dot com>
10  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_IMPORT_ICON_VIEW_H
26 #define DIGIKAM_IMPORT_ICON_VIEW_H
27 
28 // Local includes
29 
30 #include "importcategorizedview.h"
31 
32 namespace Digikam
33 {
34 
35 class ItemViewUtilities;
36 
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit ImportIconView(QWidget* const parent = nullptr);
44  ~ImportIconView() override;
45 
47 
48  int fitToWidthIcons();
49 
50  CamItemInfo camItemInfo(const QString& folder, const QString& file);
51  CamItemInfo& camItemInfoRef(const QString& folder, const QString& file);
52 
53  void setThumbnailSize(const ThumbnailSize& size) override;
54 
55 public Q_SLOTS:
56 
57  void deleteSelected(bool permanently = false);
58  void deleteSelectedDirectly(bool permanently = false);
59 
62  void ungroupSelected();
64  void rename();
65 
66  void assignTagToSelected(int tagID);
67  void removeTagFromSelected(int tagID);
68 
69  void assignPickLabel(const QModelIndex& index, int pickId);
70  void assignPickLabelToSelected(int pickId);
71 
72  void assignColorLabel(const QModelIndex& index, int colorId);
73  void assignColorLabelToSelected(int colorId);
74 
75  void assignRating(const QList<QModelIndex>& index, int rating);
76  void assignRatingToSelected(int rating);
77 
78 Q_SIGNALS:
79 
80  void previewRequested(const CamItemInfo& info, bool downloadPreview);
81 /*
82  void signalPopupTagsView();
83 */
84 private Q_SLOTS:
85 
86  void slotRotateLeft(const QList<QModelIndex>&);
87  void slotRotateRight(const QList<QModelIndex>&);
88 /*
89  void slotInitProgressIndicator();
90 */
91 
92 protected:
93 
94  void activated(const CamItemInfo& info, Qt::KeyboardModifiers modifiers) override;
95  void showContextMenuOnInfo(QContextMenuEvent* event, const CamItemInfo& info) override;
96  void showContextMenu(QContextMenuEvent* event) override;
97  void slotSetupChanged() override;
98 
99 private:
100 
101  // Disable
102  ImportIconView(const ImportIconView&) = delete;
103  ImportIconView& operator=(const ImportIconView&) = delete;
104 
105 private:
106 
107  class Private;
108  Private* const d;
109 };
110 
111 } // namespace Digikam
112 
113 #endif // DIGIKAM_IMPORT_ICON_VIEW_H
Definition: camiteminfo.h:48
Definition: importcategorizedview.h:44
Definition: importiconview_p.h:45
Definition: importiconview.h:38
void previewRequested(const CamItemInfo &info, bool downloadPreview)
void showContextMenuOnInfo(QContextMenuEvent *event, const CamItemInfo &info) override
Definition: importiconview.cpp:338
void assignRating(const QList< QModelIndex > &index, int rating)
Definition: importiconview.cpp:503
CamItemInfo & camItemInfoRef(const QString &folder, const QString &file)
Definition: importiconview.cpp:167
ItemViewUtilities * utilities() const
Definition: importiconview.cpp:137
void rename()
Definition: importiconview.cpp:188
void removeTagFromSelected(int tagID)
Definition: importiconview.cpp:463
ImportIconView(QWidget *const parent=nullptr)
Definition: importiconview.cpp:51
void createGroupFromSelection()
Definition: importiconview.cpp:235
CamItemInfo camItemInfo(const QString &folder, const QString &file)
Definition: importiconview.cpp:152
~ImportIconView() override
Definition: importiconview.cpp:132
void setThumbnailSize(const ThumbnailSize &size) override
Definition: importiconview.cpp:142
void deleteSelectedDirectly(bool permanently=false)
Definition: importiconview.cpp:224
void removeSelectedFromGroup()
Definition: importiconview.cpp:275
void showContextMenu(QContextMenuEvent *event) override
Definition: importiconview.cpp:438
void assignPickLabel(const QModelIndex &index, int pickId)
Definition: importiconview.cpp:473
void deleteSelected(bool permanently=false)
Definition: importiconview.cpp:211
void activated(const CamItemInfo &info, Qt::KeyboardModifiers modifiers) override
Reimplement these in a subclass.
Definition: importiconview.cpp:313
void assignTagToSelected(int tagID)
Definition: importiconview.cpp:453
void assignPickLabelToSelected(int pickId)
Definition: importiconview.cpp:478
void createGroupByTimeFromSelection()
Definition: importiconview.cpp:245
void slotSetupChanged() override
Definition: importiconview.cpp:178
void ungroupSelected()
Definition: importiconview.cpp:267
int fitToWidthIcons()
Definition: importiconview.cpp:147
void assignColorLabel(const QModelIndex &index, int colorId)
Definition: importiconview.cpp:488
void assignRatingToSelected(int rating)
Definition: importiconview.cpp:514
void assignColorLabelToSelected(int colorId)
Definition: importiconview.cpp:493
Definition: itemviewutilities.h:44
Definition: thumbnailsize.h:42
Definition: datefolderview.cpp:43