digiKam
imgurimageslist.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-02-04
7  * Description : a tool to export images to Imgur web service
8  *
9  * Copyright (C) 2010-2012 by Marius Orcsik <marius at habarnam dot ro>
10  * Copyright (C) 2013-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_IMGUR_IMAGES_LIST_H
25 #define DIGIKAM_IMGUR_IMAGES_LIST_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 
31 // Local includes
32 
33 #include "ditemslist.h"
34 #include "imgurtalker.h"
35 
36 using namespace Digikam;
37 
39 {
40 
41 class ImgurImageListViewItem;
42 
44 {
45  Q_OBJECT
46 
47 public:
48 
50  enum FieldType
51  {
55  DeleteURL = DItemsListView::User4
56  };
57 
58 public:
59 
60  explicit ImgurImagesList(QWidget* const parent = nullptr);
61  ~ImgurImagesList() override = default;
62 
63  QList<const ImgurImageListViewItem*> getPendingItems();
64 
65 public Q_SLOTS:
66 
67  void slotAddImages(const QList<QUrl>& list) override;
68  void slotSuccess(const ImgurTalkerResult& result);
69  void slotDoubleClick(QTreeWidgetItem* element, int i);
70 };
71 
72 // -------------------------------------------------------------------------
73 
75 {
76 public:
77 
78  explicit ImgurImageListViewItem(DItemsListView* const view, const QUrl& url);
79  ~ImgurImageListViewItem() 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 setImgurUrl(const QString& str);
88  QString ImgurUrl() const;
89 
90  void setImgurDeleteUrl(const QString& str);
91  QString ImgurDeleteUrl() const;
92 };
93 
94 } // namespace DigikamGenericImgUrPlugin
95 
96 #endif // DIGIKAM_IMGUR_IMAGES_LIST_H
Definition: imgurimageslist.h:44
FieldType
The different columns in a list.
Definition: imgurimageslist.h:51
Definition: ditemslist.h:59
Definition: ditemslist.h:128
@ User3
Definition: ditemslist.h:139
@ User1
Definition: ditemslist.h:137
@ User4
Definition: ditemslist.h:140
@ User2
Definition: ditemslist.h:138
Definition: ditemslist.h:196
Definition: piwigotalker.h:48
Definition: imgurimageslist.cpp:47
@ 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