File indexing completed on 2024-04-28 16:01:21

0001 /** ===========================================================
0002  * @file
0003  *
0004  * This file is a part of KDE project
0005  * <a href="https://commits.kde.org/libmediawiki">libmediawiki</a>
0006  *
0007  * @date   2011-03-22
0008  * @brief  a MediaWiki C++ interface for KDE
0009  *
0010  * @author Copyright (C) 2011 by Gilles Caulier
0011  *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
0012  * @author Copyright (C) 2010 by Alexandre Mendes
0013  *         <a href="mailto:alex dot mendes1988 at gmail dot com">alex dot mendes1988 at gmail dot com</a>
0014  *
0015  * This program is free software; you can redistribute it
0016  * and/or modify it under the terms of the GNU General
0017  * Public License as published by the Free Software Foundation;
0018  * either version 2, or (at your option)
0019  * any later version.
0020  *
0021  * This program is distributed in the hope that it will be useful,
0022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0024  * GNU General Public License for more details.
0025  *
0026  * ============================================================ */
0027 
0028 #ifndef MAINWINDOW_H
0029 #define MAINWINDOW_H
0030 
0031 #include <QMainWindow>
0032 #include <QMessageBox>
0033 
0034 #include <MediaWiki/Upload>
0035 #include <MediaWiki/MediaWiki>
0036 #include <MediaWiki/Login>
0037 #include <MediaWiki/QueryInfo>
0038 #include <MediaWiki/QueryRevision>
0039 
0040 namespace Ui
0041 {
0042     class MainWindow;
0043 }
0044 
0045 using namespace mediawiki;
0046 
0047 class MainWindow : public QMainWindow
0048 {
0049     Q_OBJECT
0050 
0051 public:
0052 
0053     explicit MainWindow(QWidget* parent = nullptr);
0054     ~MainWindow();
0055 
0056 private Q_SLOTS:
0057 
0058     void on_pushButton_clicked();
0059     void on_parcourir_clicked();
0060     void on_lineEdit_textChanged(QString);
0061     void loginHandle(KJob* login);
0062     void uploadHandle(KJob* job);
0063     void processedUploadSize(KJob* job, qulonglong size);
0064     void TotalUploadSize(KJob* job, qulonglong size);
0065 
0066 private:
0067 
0068     void init();
0069 
0070 private:
0071 
0072     Ui::MainWindow* ui;
0073     MediaWiki       mediawiki;
0074 };
0075 
0076 #endif // MAINWINDOW_H