Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
deleteform.hpp
1 //This program is free software: you can redistribute it and/or modify
2 //it under the terms of the GNU General Public License as published by
3 //the Free Software Foundation, either version 3 of the License, or
4 //(at your option) any later version.
5 
6 //This program is distributed in the hope that it will be useful,
7 //but WITHOUT ANY WARRANTY; without even the implied warranty of
8 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 //GNU General Public License for more details.
10 
11 #ifndef DELETEFORM_H
12 #define DELETEFORM_H
13 
14 #include <QDialog>
15 #include <QTimer>
16 #include <QString>
17 #include <QtXml>
18 #include <QLineEdit>
19 #include <QUrl>
20 #include "configuration.hpp"
21 #include "wikipage.hpp"
22 #include "apiquery.hpp"
23 #include "core.hpp"
24 #if !PRODUCTION_BUILD
25 
26 namespace Ui
27 {
28  class DeleteForm;
29 }
30 
31 namespace Huggle
32 {
33  class WikiPage;
34  //! This is a delete form
35 
36  /// \todo This form needs to send a message to user who created a page after it's deleted, until that is done
37  /// we must not include this class into production build
38  class DeleteForm : public QDialog
39  {
40  Q_OBJECT
41 
42  public:
43  explicit DeleteForm(QWidget *parent = 0);
44  ~DeleteForm();
45  void setPage(WikiPage *Page);
46  private slots:
47  void on_pushButton_clicked();
48  void on_pushButton_2_clicked();
49  void onTick();
50  private:
51  Ui::DeleteForm *ui;
52  WikiPage *page;
53  QString deletetoken;
54  ApiQuery *delquery;
55  ApiQuery *tokenquery;
56  //! Set the page to delete
57  QTimer *dt;
58  int delQueryPhase;
59  void getToken();
60  void Delete();
61  void checkDelToken();
62  void Failed(QString reason);
63  };
64 }
65 
66 #endif // DELETEFORM_H
67 #endif
void Failed(QString reason)
Definition: deleteform.cpp:149
QTimer * dt
Set the page to delete.
Definition: deleteform.hpp:57
Mediawiki page.
Definition: wikipage.hpp:43
This is a delete form.
Definition: deleteform.hpp:38
This class can be used to execute any kind of api query on any wiki.
Definition: apiquery.hpp:55