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_edit.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* const parent = nullptr); 0048 ~MainWindow() override; 0049 0050 private Q_SLOTS: 0051 0052 void slot_plainTextEdit_textChanged(); 0053 void slot_mPageEdit_textChanged(const QString&); 0054 void slot_mWikiEdit_textChanged(const QString&); 0055 void slot_pushButton1_clicked(); 0056 void slot_pushButton2_clicked(); 0057 void loginHandle(KJob* login); 0058 void revisionHandle(const QList<Revision>& revisions); 0059 void editError(KJob* job); 0060 void revisionError(KJob* job); 0061 0062 private: 0063 0064 Ui::MainWindow* ui; 0065 Iface* MediaWiki; 0066 }; 0067 0068 #endif // MAINWINDOW_H