File indexing completed on 2025-01-19 03:53:15
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2018-06-29 0007 * Description : a tool to export images to Twitter social network 0008 * 0009 * SPDX-FileCopyrightText: 2018 by Tarek Talaat <tarektalaat93 at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_TWITTER_WINDOW_H 0016 #define DIGIKAM_TWITTER_WINDOW_H 0017 0018 // Qt includes 0019 0020 #include <QList> 0021 0022 // Local includes 0023 0024 #include "dinfointerface.h" 0025 #include "wstooldialog.h" 0026 0027 using namespace Digikam; 0028 0029 class QCloseEvent; 0030 class QUrl; 0031 0032 namespace DigikamGenericTwitterPlugin 0033 { 0034 0035 class TwAlbum; 0036 0037 class TwWindow : public WSToolDialog 0038 { 0039 Q_OBJECT 0040 0041 public: 0042 0043 explicit TwWindow(DInfoInterface* const iface, QWidget* const parent); 0044 ~TwWindow() override; 0045 0046 void reactivate(); 0047 0048 void setItemsList(const QList<QUrl>& urls); 0049 0050 private: 0051 0052 void readSettings(); 0053 void writeSettings(); 0054 0055 void uploadNextPhoto(); 0056 0057 void buttonStateChange(bool state); 0058 void closeEvent(QCloseEvent*) override; 0059 0060 private Q_SLOTS: 0061 0062 void slotImageListChanged(); 0063 void slotUserChangeRequest(); 0064 void slotNewAlbumRequest(); 0065 /* 0066 void slotReloadAlbumsRequest(); 0067 */ 0068 void slotStartTransfer(); 0069 0070 void slotBusy(bool); 0071 void slotSignalLinkingFailed(); 0072 void slotSignalLinkingSucceeded(); 0073 void slotSetUserName(const QString& msg); 0074 void slotListAlbumsFailed(const QString& msg); 0075 void slotListAlbumsDone(const QList<QPair<QString, QString> >& list); 0076 void slotCreateFolderFailed(const QString& msg); 0077 void slotCreateFolderSucceeded(); 0078 void slotAddPhotoFailed(const QString& msg); 0079 void slotAddPhotoSucceeded(); 0080 void slotTransferCancel(); 0081 0082 void slotFinished(); 0083 0084 private: 0085 0086 class Private; 0087 Private* const d; 0088 }; 0089 0090 } // namespace DigikamGenericTwitterPlugin 0091 0092 #endif // DIGIKAM_TWITTER_WINDOW_H