File indexing completed on 2025-03-09 03:58:42
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2012-22-07 0007 * Description : Icon view for import tool items 0008 * 0009 * SPDX-FileCopyrightText: 2012 by Islam Wazery <wazery at ubuntu dot com> 0010 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_IMPORT_ICON_VIEW_H 0017 #define DIGIKAM_IMPORT_ICON_VIEW_H 0018 0019 // Local includes 0020 0021 #include "importcategorizedview.h" 0022 0023 namespace Digikam 0024 { 0025 0026 class ItemViewUtilities; 0027 0028 class ImportIconView : public ImportCategorizedView 0029 { 0030 Q_OBJECT 0031 0032 public: 0033 0034 explicit ImportIconView(QWidget* const parent = nullptr); 0035 ~ImportIconView() override; 0036 0037 ItemViewUtilities* utilities() const; 0038 0039 int fitToWidthIcons(); 0040 0041 CamItemInfo camItemInfo(const QString& folder, const QString& file); 0042 CamItemInfo& camItemInfoRef(const QString& folder, const QString& file); 0043 0044 void setThumbnailSize(const ThumbnailSize& size) override; 0045 0046 public Q_SLOTS: 0047 0048 void deleteSelected(bool permanently = false); 0049 void deleteSelectedDirectly(bool permanently = false); 0050 0051 void createGroupFromSelection(); 0052 void createGroupByTimeFromSelection(); 0053 void ungroupSelected(); 0054 void removeSelectedFromGroup(); 0055 void rename(); 0056 0057 void assignTagToSelected(int tagID); 0058 void removeTagFromSelected(int tagID); 0059 0060 void assignPickLabel(const QModelIndex& index, int pickId); 0061 void assignPickLabelToSelected(int pickId); 0062 0063 void assignColorLabel(const QModelIndex& index, int colorId); 0064 void assignColorLabelToSelected(int colorId); 0065 0066 void assignRating(const QList<QModelIndex>& index, int rating); 0067 void assignRatingToSelected(int rating); 0068 0069 Q_SIGNALS: 0070 0071 void previewRequested(const CamItemInfo& info, bool downloadPreview); 0072 /* 0073 void signalPopupTagsView(); 0074 */ 0075 private Q_SLOTS: 0076 0077 void slotRotateLeft(const QList<QModelIndex>&); 0078 void slotRotateRight(const QList<QModelIndex>&); 0079 /* 0080 void slotInitProgressIndicator(); 0081 */ 0082 0083 protected: 0084 0085 void activated(const CamItemInfo& info, Qt::KeyboardModifiers modifiers) override; 0086 void showContextMenuOnInfo(QContextMenuEvent* event, const CamItemInfo& info) override; 0087 void showContextMenu(QContextMenuEvent* event) override; 0088 void slotSetupChanged() override; 0089 0090 private: 0091 0092 // Disable 0093 ImportIconView(const ImportIconView&) = delete; 0094 ImportIconView& operator=(const ImportIconView&) = delete; 0095 0096 private: 0097 0098 class Private; 0099 Private* const d; 0100 }; 0101 0102 } // namespace Digikam 0103 0104 #endif // DIGIKAM_IMPORT_ICON_VIEW_H