File indexing completed on 2025-01-19 03:57:46

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2011-03-22
0007  * Description : a MediaWiki C++ interface
0008  *
0009  * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2011      by Alexandre Mendes <alex dot mendes1988 at gmail dot com>
0011  * SPDX-FileCopyrightText: 2011      by Hormiere Guillaume <hormiere dot guillaume at gmail dot com>
0012  * SPDX-FileCopyrightText: 2011      by Manuel Campomanes <campomanes dot manuel at gmail dot com>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================ */
0017 
0018 #ifndef MAINWINDOW_H
0019 #define MAINWINDOW_H
0020 
0021 // Qt includes
0022 
0023 #include <QMainWindow>
0024 #include <QMessageBox>
0025 
0026 // Local includes
0027 
0028 #include "mediawiki_upload.h"
0029 #include "mediawiki_iface.h"
0030 #include "mediawiki_login.h"
0031 #include "mediawiki_queryinfo.h"
0032 #include "mediawiki_queryrevision.h"
0033 
0034 namespace Ui
0035 {
0036     class MainWindow;
0037 }
0038 
0039 using namespace MediaWiki;
0040 
0041 class MainWindow : public QMainWindow
0042 {
0043     Q_OBJECT
0044 
0045 public:
0046 
0047     explicit MainWindow(QWidget* parent = nullptr);
0048     ~MainWindow() override;
0049 
0050 private Q_SLOTS:
0051 
0052     void slot_pushButtslot_clicked();
0053     void slot_parcourir_clicked();
0054     void slot_lineEdit_textChanged(const QString&);
0055     void loginHandle(KJob* login);
0056     void uploadHandle(KJob* job);
0057     void processedUploadSize(KJob* job, qulonglong size);
0058     void TotalUploadSize(KJob* job, qulonglong size);
0059 
0060 private:
0061 
0062     void init();
0063 
0064 private:
0065 
0066     Ui::MainWindow* ui;
0067     Iface           MediaWiki;
0068 };
0069 
0070 #endif // MAINWINDOW_H