digiKam
itemviewutilities.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-05-04
7  * Description : Various operation on items
8  *
9  * Copyright (C) 2002-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2009-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
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_ITEM_VIEW_UTILITIES_H
26 #define DIGIKAM_ITEM_VIEW_UTILITIES_H
27 
28 // Qt includes
29 
30 #include <QList>
31 #include <QWidget>
32 #include <QUrl>
33 
34 // Local includes
35 
36 #include "iteminfo.h"
37 #include "digikam_export.h"
38 
39 namespace Digikam
40 {
41 class Album;
42 
43 class DIGIKAM_GUI_EXPORT ItemViewUtilities : public QObject
44 {
45  Q_OBJECT
46 
47 public:
48 
50  {
52  DeleteUseTrash = 2
53  };
54 
55 public:
56 
57  explicit ItemViewUtilities(QWidget* const parentWidget);
58 
59 public Q_SLOTS:
60 
61  void copyItemsToExternalFolder(const QList<ItemInfo>& infos);
62  void createNewAlbumForInfos(const QList<ItemInfo>& infos, Album* currentAlbum);
63  bool deleteImages(const QList<ItemInfo>& infos, const DeleteMode deleteMode);
64  void deleteImagesDirectly(const QList<ItemInfo>& infos, const DeleteMode deleteMode);
65 
66  void insertToLightTableAuto(const QList<ItemInfo>& all, const QList<ItemInfo>& selected, const ItemInfo& current);
67  void insertToLightTable(const QList<ItemInfo>& list, const ItemInfo& current, bool addTo);
68 
69  void insertToQueueManager(const QList<ItemInfo>& list, const ItemInfo& currentInfo, bool newQueue);
70  void insertSilentToQueueManager(const QList<ItemInfo>& list, const ItemInfo& currentInfo, int queueid);
71 
72  void notifyFileContentChanged(const QList<QUrl>& urls);
73 
74  void openInfos(const ItemInfo& info, const QList<ItemInfo>& allInfosToOpen, Album* currentAlbum);
75  void openInfosWithDefaultApplication(const QList<ItemInfo>& allInfosToOpen);
76 
77  void rename(const QUrl& imageUrl, const QString& newName, bool overwrite = false);
78  void setAsAlbumThumbnail(Album* album, const ItemInfo& itemInfo);
79 
80  void createGroupByTimeFromInfoList(const ItemInfoList& itemInfoList);
81  void createGroupByFilenameFromInfoList(const ItemInfoList& itemInfoList);
82  void createGroupByTimelapseFromInfoList(const ItemInfoList& itemInfoList);
83 
84 Q_SIGNALS:
85 
86  void editorCurrentUrlChanged(const QUrl& url);
87  void signalImagesDeleted(const QList<qlonglong>& imageIds);
88 
89 protected:
90 
91  QWidget* m_widget;
92 };
93 
94 } // namespace Digikam
95 
97 
98 #endif // DIGIKAM_ITEM_VIEW_UTILITIES_H
Abstract base class for all album types.
Definition: album.h:67
Definition: iteminfolist.h:47
Definition: iteminfo.h:78
Definition: itemviewutilities.h:44
QWidget * m_widget
Definition: itemviewutilities.h:91
void editorCurrentUrlChanged(const QUrl &url)
DeleteMode
Definition: itemviewutilities.h:50
void signalImagesDeleted(const QList< qlonglong > &imageIds)
@ Album
Definition: coredbfields.h:58
DeleteMode
Definition: deletedialog.h:57
@ DeletePermanently
same checkbox as above, preset to permanent
Definition: deletedialog.h:62
Definition: datefolderview.cpp:43