digiKam
smugwidget.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 : 2008-12-01
7  * Description : a tool to export images to Smugmug web service
8  *
9  * Copyright (C) 2008-2009 by Luka Renko <lure at kubuntu dot org>
10  * Copyright (C) 2008-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) 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_SMUG_WIDGET_H
25 #define DIGIKAM_SMUG_WIDGET_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 
31 // Local includes
32 
33 #include "dinfointerface.h"
34 #include "dprogresswdg.h"
35 #include "ditemslist.h"
36 
37 class QLabel;
38 class QSpinBox;
39 class QCheckBox;
40 class QRadioButton;
41 class QPushButton;
42 class QComboBox;
43 class QLineEdit;
44 
45 using namespace Digikam;
46 
48 {
49 
50 class SmugWidget : public QWidget
51 {
52  Q_OBJECT
53 
54 public:
55 
56  explicit SmugWidget(QWidget* const parent,
57  DInfoInterface* const iface,
58  bool import);
59  ~SmugWidget() override;
60 
61 public:
62 
63  void updateLabels(const QString& email = QString(),
64  const QString& name = QString(),
65  const QString& nick = QString());
66 
67  bool isAnonymous() const;
68  void setAnonymous(bool checked);
69 
70  QString getNickName() const;
71  void setNickName(const QString& nick);
72 
73  QString getSitePassword() const;
74  QString getAlbumPassword() const;
75  QString getDestinationPath() const;
76 
77  DItemsList* imagesList() const;
78  DProgressWdg* progressBar() const;
79 
80 Q_SIGNALS:
81 
82  void signalUserChangeRequest(bool anonymous);
83 
84 private Q_SLOTS:
85 
86  void slotAnonymousToggled(bool checked);
87  void slotChangeUserClicked();
88  void slotResizeChecked();
89 
90 private:
91 
92  QLabel* m_headerLbl;
93  QLabel* m_userNameLbl;
94  QLabel* m_userName;
95  QLabel* m_emailLbl;
96  QLabel* m_email;
97  QLabel* m_nickNameLbl;
98  QLabel* m_sitePasswordLbl;
99  QLabel* m_albumPasswordLbl;
100 
101  QRadioButton* m_anonymousRBtn;
102  QRadioButton* m_accountRBtn;
103 
104  QCheckBox* m_resizeChB;
105 
106  QSpinBox* m_dimensionSpB;
107  QSpinBox* m_imageQualitySpB;
108 
109  QComboBox* m_albumsCoB;
110 
111  QPushButton* m_newAlbumBtn;
112  QPushButton* m_reloadAlbumsBtn;
113  QPushButton* m_changeUserBtn;
114 
115  QLineEdit* m_albumPasswordEdt;
116  QLineEdit* m_nickNameEdt;
117  QLineEdit* m_sitePasswordEdt;
118 
119  DInfoInterface* m_iface;
120  DProgressWdg* m_progressBar;
121  DItemsList* m_imgList;
122  QWidget* m_uploadWidget;
123 
124  friend class SmugWindow;
125 };
126 
127 } // namespace DigikamGenericSmugPlugin
128 
129 #endif // DIGIKAM_SMUG_WIDGET_H
Definition: smugwidget.h:51
void signalUserChangeRequest(bool anonymous)
Definition: smugwindow.h:48
Definition: dinfointerface.h:56
Definition: ditemslist.h:196
Definition: dprogresswdg.h:39
Definition: smugitem.h:33
Definition: datefolderview.cpp:43