digiKam
ipfsimageslist.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-02-12
7  * Description : a tool to export images to IPFS web service
8  *
9  * Copyright (C) 2018 by Amar Lakshya <amar dot lakshya at xaviers dot edu dot in>
10  * Copyright (C) 2018-2020 by Caulier Gilles <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) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_IPFS_IMAGES_LIST_H
25 #define DIGIKAM_IPFS_IMAGES_LIST_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 
31 // Local includes
32 
33 #include "ditemslist.h"
34 #include "ipfstalker.h"
35 
36 using namespace Digikam;
37 
39 {
40 
41 class IpfsImagesListViewItem;
42 
43 class IpfsImagesList : public DItemsList
44 {
45  Q_OBJECT
46 
47 public:
48 
49  /* The different columns in a list.
50  */
51  enum FieldType
52  {
56  };
57 
58 public:
59 
60  explicit IpfsImagesList(QWidget* const parent = nullptr);
61  ~IpfsImagesList() override = default;
62 
63  QList<const IpfsImagesListViewItem*> getPendingItems() const;
64 
65 public Q_SLOTS:
66 
67  void slotAddImages(const QList<QUrl>& list) override;
68  void slotSuccess(const IpfsTalkerResult& result);
69  void slotDoubleClick(QTreeWidgetItem* element, int i);
70 };
71 
72 // -------------------------------------------------------------------------
73 
75 {
76 public:
77 
78  explicit IpfsImagesListViewItem(DItemsListView* const view, const QUrl& url);
79  ~IpfsImagesListViewItem() override = default;
80 
81  void setTitle(const QString& str);
82  QString Title() const;
83 
84  void setDescription(const QString& str);
85  QString Description() const;
86 
87  void setIpfsUrl(const QString& str);
88  QString IpfsUrl() const;
89 };
90 
91 } // namespace DigikamGenericIpfsPlugin
92 
93 #endif // DIGIKAM_IPFS_IMAGES_LIST_H
Definition: ipfsimageslist.h:44
FieldType
Definition: ipfsimageslist.h:52
Definition: ditemslist.h:59
Definition: ditemslist.h:128
@ User3
Definition: ditemslist.h:139
@ User1
Definition: ditemslist.h:137
@ User2
Definition: ditemslist.h:138
Definition: ditemslist.h:196
Definition: piwigotalker.h:48
Definition: ipfsimageslist.cpp:42
@ Title
Title: as with Dublin Core Title, Photoshop Title, IPTC Object Name.
Definition: coredbconstants.h:143
@ Description
Map language -> String.
Definition: metadatainfo.h:96
Definition: datefolderview.cpp:43