File indexing completed on 2025-01-05 03:53:38
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2011-02-11 0007 * Description : a tool to export images to WikiMedia web service 0008 * 0009 * SPDX-FileCopyrightText: 2011 by Alexandre Mendes <alex dot mendes1988 at gmail dot com> 0010 * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * SPDX-FileCopyrightText: 2012 by Parthasarathy Gopavarapu <gparthasarathy93 at gmail dot com> 0012 * SPDX-FileCopyrightText: 2013 by Peter Potrowl <peter dot potrowl at gmail dot com> 0013 * 0014 * SPDX-License-Identifier: GPL-2.0-or-later 0015 * 0016 * ============================================================ */ 0017 0018 #ifndef DIGIKAM_MEDIAWIKI_WINDOW_H 0019 #define DIGIKAM_MEDIAWIKI_WINDOW_H 0020 0021 // Local includes 0022 0023 #include "wstooldialog.h" 0024 #include "dinfointerface.h" 0025 0026 class QCloseEvent; 0027 0028 class KJob; 0029 0030 using namespace Digikam; 0031 0032 namespace DigikamGenericMediaWikiPlugin 0033 { 0034 0035 class MediaWikiWindow : public WSToolDialog 0036 { 0037 Q_OBJECT 0038 0039 public: 0040 0041 explicit MediaWikiWindow(DInfoInterface* const iface, QWidget* const parent); 0042 ~MediaWikiWindow() override; 0043 0044 public: 0045 0046 void reactivate(); 0047 bool prepareImageForUpload(const QString& imgPath); 0048 0049 private Q_SLOTS: 0050 0051 void slotFinished(); 0052 void slotProgressCanceled(); 0053 void slotStartTransfer(); 0054 void slotChangeUserClicked(); 0055 void slotDoLogin(const QString& login, 0056 const QString& pass, 0057 const QString& wikiName, 0058 const QUrl& wikiUrl); 0059 void slotEndUpload(); 0060 int slotLoginHandle(KJob* loginJob); 0061 0062 private: 0063 0064 bool eventFilter(QObject* obj, QEvent* event) override; 0065 void closeEvent(QCloseEvent*) override; 0066 void readSettings(); 0067 void saveSettings(); 0068 0069 private: 0070 0071 class Private; 0072 Private* const d; 0073 }; 0074 0075 } // namespace DigikamGenericMediaWikiPlugin 0076 0077 #endif // DIGIKAM_MEDIAWIKI_WINDOW_H