File indexing completed on 2025-01-05 03:53:45
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2017-06-27 0007 * Description : a tool to export items to web services. 0008 * 0009 * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2018 by Thanh Trung Dinh <dinhthanhtrung1996 at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_WS_WIZARD_H 0017 #define DIGIKAM_WS_WIZARD_H 0018 0019 // Qt includes 0020 0021 #include <QList> 0022 #include <QUrl> 0023 #include <QSettings> 0024 0025 // Local includes 0026 0027 #include "dwizarddlg.h" 0028 #include "dinfointerface.h" 0029 #include "o0settingsstore.h" 0030 #include "wssettings.h" 0031 #include "wsauthentication.h" 0032 0033 using namespace Digikam; 0034 0035 namespace DigikamGenericUnifiedPlugin 0036 { 0037 0038 class WSWizard : public DWizardDlg 0039 { 0040 Q_OBJECT 0041 0042 public: 0043 0044 explicit WSWizard(DInfoInterface* const iface, QWidget* const parent); 0045 ~WSWizard(); 0046 0047 bool validateCurrentPage() override; 0048 int nextId() const override; 0049 0050 DInfoInterface* iface() const; 0051 WSSettings* settings() const; 0052 0053 /* 0054 * Instance of WSAuthentication (which wraps instance of WSTalker) and correspondent QSettings 0055 * are initialized only once in WSWizard. 0056 * 0057 * These 2 methods below are getters, used in other pages of wizard so as to facilitate 0058 * access to WSAuthentication instance and its settings. 0059 */ 0060 WSAuthentication* wsAuth() const; 0061 QSettings* oauthSettings() const; 0062 O0SettingsStore* oauthSettingsStore() const; 0063 0064 void setItemsList(const QList<QUrl>& urls); 0065 0066 public Q_SLOTS: 0067 0068 void slotBusy(bool val); 0069 0070 private: 0071 0072 class Private; 0073 Private* const d; 0074 }; 0075 0076 } // namespace DigikamGenericUnifiedPlugin 0077 0078 #endif // DIGIKAM_WS_WIZARD_H