Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
protectpage.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 PROTECTPAGE_H
12 #define PROTECTPAGE_H
13 
14 #include <QDialog>
15 #include <QString>
16 #include <QtXml>
17 #include <QTimer>
18 #include "apiquery.hpp"
19 #include "core.hpp"
20 #include "configuration.hpp"
21 #include "wikipage.hpp"
22 
23 namespace Ui
24 {
25  class ProtectPage;
26 }
27 
28 namespace Huggle
29 {
30  class ApiQuery;
31  class WikiPage;
32 
33  /*!
34  * \brief The ProtectPage class display a window where user can protect a page given they have the permissions to do that
35  */
36  class ProtectPage : public QDialog
37  {
38  Q_OBJECT
39 
40  public:
41  explicit ProtectPage(QWidget *parent = 0);
42  ~ProtectPage();
43  /*!
44  * \brief set a page that is supposed to be protected, this needs to be called by owner who created this form
45  * \param Page that will be protected by user
46  */
47  void setPageToProtect(WikiPage *Page);
48  private slots:
49  void on_pushButton_clicked();
50  void on_pushButton_2_clicked();
51  void onTick();
52  private:
53  void Failed(QString reason);
54  void Protect();
55  void getTokenToProtect();
56  void checkTokenToProtect();
57  QString protecttoken;
58  //! Pointer to get first token
60  //! Pointer for second token
62  //! Pointer for protection
64  Ui::ProtectPage *ui;
65  //! DOCUMENT ME
67  //! DOCUMENT ME
68  QTimer *tt;
69  int PtQueryPhase;
70  };
71 }
72 
73 #endif // PROTECTPAGE_H
74 
void setPageToProtect(WikiPage *Page)
set a page that is supposed to be protected, this needs to be called by owner who created this form ...
Definition: protectpage.cpp:42
ApiQuery * ptkk
Pointer for second token.
Definition: protectpage.hpp:61
ProtectPage(QWidget *parent=0)
Definition: protectpage.cpp:16
QTimer * tt
DOCUMENT ME.
Definition: protectpage.hpp:68
Mediawiki page.
Definition: wikipage.hpp:43
The ProtectPage class display a window where user can protect a page given they have the permissions ...
Definition: protectpage.hpp:36
ApiQuery * ptpt
Pointer for protection.
Definition: protectpage.hpp:63
WikiPage * ptpge
DOCUMENT ME.
Definition: protectpage.hpp:66
This class can be used to execute any kind of api query on any wiki.
Definition: apiquery.hpp:55
ApiQuery * ptkq
Pointer to get first token.
Definition: protectpage.hpp:59
void Failed(QString reason)