Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
blockuser.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 BLOCKUSER_H
12 #define BLOCKUSER_H
13 
14 #include <QDialog>
15 #include <QCheckBox>
16 #include <QString>
17 #include <QtXml>
18 #include <QTimer>
19 #include "core.hpp"
20 #include "apiquery.hpp"
21 #include "configuration.hpp"
22 #include "wikiuser.hpp"
23 
24 #if !PRODUCTION_BUILD
25 namespace Ui
26 {
27  class BlockUser;
28 }
29 
30 namespace Huggle
31 {
32  class WikiUser;
33 
34  //! This form can be used to block users from editing, which requires the block permission
35 
36  /// \todo This form has to send a message to user who was blocked, until that is fixed it must not be included in production build
37  class BlockUser : public QDialog
38  {
39  Q_OBJECT
40 
41  public:
42  explicit BlockUser(QWidget *parent = 0);
43  ~BlockUser();
44  void SetWikiUser(WikiUser *User);
45  private slots:
46  void on_pushButton_clicked();
47  void on_pushButton_2_clicked();
48  void onTick();
49  private:
50  Ui::BlockUser *ui;
51  /// \todo DOCUMENT ME
52  QTimer *t0;
53  WikiUser *user;
54  /// \todo DOCUMENT ME
56  /// \todo DOCUMENT ME
58  ApiQuery *dependency;
59  QString blocktoken;
60  int QueryPhase;
61  void CheckToken();
62  void GetToken();
63  void Failed(QString reason);
64  void Block();
65  void sendBlockNotice(ApiQuery *dependency);
66  };
67 }
68 
69 #endif // BLOCKUSER_H
70 #endif
This form can be used to block users from editing, which requires the block permission.
Definition: blockuser.hpp:37
ApiQuery * tb
Definition: blockuser.hpp:55
ApiQuery * b
Definition: blockuser.hpp:57
This class can be used to execute any kind of api query on any wiki.
Definition: apiquery.hpp:55