Huggle  build:^490^dce1e5c
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
vandalnw.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 VANDALNW_H
12 #define VANDALNW_H
13 
14 #include <QDockWidget>
15 #include <QTimer>
16 #include "networkirc.hpp"
17 #include "wikiedit.hpp"
18 #include "configuration.hpp"
19 #include "core.hpp"
20 
21 namespace Ui
22 {
23  class VandalNw;
24 }
25 
26 namespace Huggle
27 {
28  //! Vandalism network
29 
30  //! Huggle 3 comes with a system that allows all clients to operate together in order
31  //! to be effective in reverting of vandalism
32  class VandalNw : public QDockWidget
33  {
34  Q_OBJECT
35 
36  /// \todo We should make a user list of other huggle users here
37  /// \todo Share a version of your huggle with others in sane way
38  /// \todo Hook to VERSION
39  public:
40  explicit VandalNw(QWidget *parent = 0);
41  ~VandalNw();
42  /*!
43  * \brief Insert text to window
44  * \param text is a string that will be inserted to window, must not be terminated with newline
45  */
46  void Insert(QString text);
47  void Connect();
48  void Disconnect();
49  //! This will deliver an edit to others as a good edit
50  void Good(WikiEdit *Edit);
51  //! Notify others about a rollback of edit
52  void Rollback(WikiEdit *Edit);
53  void SuspiciousWikiEdit(WikiEdit *Edit);
54  void WarningSent(WikiUser *user, int Level);
55  QString GetChannel();
56  /// \todo DOCUMENT ME - it's not really clear what this is for because the name is too weird
57  QString pref;
58  /// \todo DOCUMENT ME - it's not really clear what this is for because the name is too weird
59  QTimer *tm;
60  private:
61  Ui::VandalNw *ui;
62  IRC::NetworkIrc *Irc;
63  bool JoinedMain;
64  private slots:
65  void onTick();
66  void on_pushButton_clicked();
67  };
68 }
69 
70 #endif // VANDALNW_H
void Rollback(WikiEdit *Edit)
Notify others about a rollback of edit.
Definition: vandalnw.cpp:62
void Good(WikiEdit *Edit)
This will deliver an edit to others as a good edit.
Definition: vandalnw.cpp:57
The NetworkIrc provides connection to IRC servers.
Definition: networkirc.hpp:94
void Disconnect()
Definition: vandalnw.cpp:50
VandalNw(QWidget *parent=0)
Definition: vandalnw.cpp:16
Wiki edit.
Definition: wikiedit.hpp:67
Vandalism network.
Definition: vandalnw.hpp:32
void Insert(QString text)
Insert text to window.
Definition: vandalnw.cpp:135