Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
uaareport.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 UAAREPORT_H
12 #define UAAREPORT_H
13 
14 #include <QDialog>
15 #include <QString>
16 #include <QtXml>
17 #include <QTimer>
18 #include <QUrl>
19 #include "core.hpp"
20 #include "configuration.hpp"
21 #include "wikiuser.hpp"
22 #include "wikipage.hpp"
23 #include "apiquery.hpp"
24 
25 namespace Ui
26 {
27  class UAAReport;
28 }
29 
30 namespace Huggle
31 {
32  class WikiUser;
33  class WikiPage;
34  class ApiQuery;
35  //! Form to report users to UAA
36  class UAAReport : public QDialog
37  {
38  Q_OBJECT
39  public:
40  explicit UAAReport(QWidget *parent = 0);
41  ~UAAReport();
42  //! I don't have much of a clue why this is here lol, but I know the dialog can't be initialised from mainwindow without this
43  void setUserForUAA(WikiUser *user);
44  private slots:
45  void on_pushButton_clicked();
46  void on_pushButton_2_clicked();
47  void on_pushButton_3_clicked();
48  void onTick();
49  void onStartOfSearch();
50  private:
51  Ui::UAAReport *ui;
52  WikiUser *User;
53  QString contentsOfUAA;
54  //! Whole contents of UAA page
55  QString dr;
56  //! String that represents what is in the line edit
57  QString optionalreason;
58  //! UAA template
59  QString ta;
60  //! Reason for report
61  QString uaaReportReason;
62  //! Pointer to WikiUser
64  //! Pointer to get UAA contents (we don't want replace the page with our content, do we?)
66  //! Timer pointer that allows us to do magical things
67  QTimer *uT;
68  //! Timer that does other magical things
69  QTimer *cuT;
70  //! Pointer that also gets UAA contents; this time it is used for checking if a user is reported or not
72  //! Function to decide what we are reporting
73  void whatToReport();
74  //! Check if user is reported
75  bool checkIfReported();
76  //! Get page contents (reason for this is above)
77  void getPageContents();
78  //! Function to that allows us to properly insert what we need to insert
79  void insertUsername();
80  //! Message box, if anything fails
81  void failed(QString reason);
82  };
83 }
84 
85 #endif // UAAREPORT_H
QString dr
Whole contents of UAA page.
Definition: uaareport.hpp:55
bool checkIfReported()
Check if user is reported.
Definition: uaareport.cpp:196
QTimer * uT
Timer pointer that allows us to do magical things.
Definition: uaareport.hpp:67
void setUserForUAA(WikiUser *user)
I don&#39;t have much of a clue why this is here lol, but I know the dialog can&#39;t be initialised from mai...
Definition: uaareport.cpp:41
void failed(QString reason)
Message box, if anything fails.
Definition: uaareport.cpp:144
QString optionalreason
String that represents what is in the line edit.
Definition: uaareport.hpp:57
void on_pushButton_clicked()
Definition: uaareport.cpp:155
ApiQuery * qUAApage
Pointer to get UAA contents (we don&#39;t want replace the page with our content, do we?)
Definition: uaareport.hpp:65
Mediawiki page.
Definition: wikipage.hpp:43
void whatToReport()
Function to decide what we are reporting.
Definition: uaareport.cpp:122
QString uaaReportReason
Reason for report.
Definition: uaareport.hpp:61
void getPageContents()
Get page contents (reason for this is above)
Definition: uaareport.cpp:46
ApiQuery * qChUAApage
Pointer that also gets UAA contents; this time it is used for checking if a user is reported or not...
Definition: uaareport.hpp:71
QString ta
UAA template.
Definition: uaareport.hpp:59
Form to report users to UAA.
Definition: uaareport.hpp:36
WikiPage * page
Pointer to WikiUser.
Definition: uaareport.hpp:63
This class can be used to execute any kind of api query on any wiki.
Definition: apiquery.hpp:55
QTimer * cuT
Timer that does other magical things.
Definition: uaareport.hpp:69
void insertUsername()
Function to that allows us to properly insert what we need to insert.
Definition: uaareport.cpp:113