-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui.h
executable file
·137 lines (113 loc) · 3.48 KB
/
gui.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#ifndef GUI_H
#define GUI_H
#include <QMainWindow>
#include <QPlainTextEdit>
#include <QFile>
#include <QDir>
#include <QSound>
#include <QFileDialog>
#include <QMovie>
#include <fstream>
#include "setup.h"
#include "wipechan.h"
namespace Ui {
class GUI;
}
class GUI : public QMainWindow {
Q_OBJECT
public:
explicit GUI(QWidget * parent = nullptr);
~GUI();
void debug(const char &mode);
Setup setup;
private slots:
void on_startButton_clicked();
void on_closeButton_clicked();
void on_rollUpButton_clicked();
void on_peedorBarButton_clicked();
void on_noText_clicked();
void on_quoting_clicked();
void on_copying_clicked();
void on_overload_clicked();
void on_pastes_clicked();
void on_random_clicked();
void on_sage_clicked(bool checked);
void on_serverKey_clicked(bool checked);
void on_chaos_clicked(bool checked);
void on_randChaos_clicked(bool checked);
void on_musicButton_clicked();
void on_images_clicked();
void on_videos_clicked();
void on_medias_clicked();
void on_noMedia_clicked();
void on_openButton_clicked();
void on_saveButton_clicked();
void on_mainMode_clicked();
void on_shrapnelMode_clicked();
void on_complain_clicked();
void on_username_editingFinished();
void on_helpButton_clicked();
void on_anticaptcha_clicked();
void on_x_captcha_clicked();
void on_gurocaptcha_clicked();
void on_reserved_clicked();
bool eventFilter(QObject * object, QEvent * event);
private:
Ui::GUI * ui;
QFileDialog * fileDialog;
void set_layout(std::string path);
void install_filter();
bool started; // start/stop
bool start();
bool stop();
void loadData();
void updateData(const bool &chanIsCalled);
void updateConfig();
void delAll(std::ifstream &response);
void closeEvent (QCloseEvent * event);
void exposeEvent(QExposeEvent * event);
QSound * music;
bool isPlaying;
bool isPidor;
std::string username = "Аноним";
std::string totalPosts = "0";
std::string postsCount;
std::string totalBans = "0";
std::string proxiesCount;
bool met = false;
long relation = 5000;
QMovie * anima;
QPoint mpos;
void mouseMoveEvent(QMouseEvent * event);
void mousePressEvent(QMouseEvent * event);
void check_main_mode();
void check_shrapnel_mode();
void check_solver();
void check_server_key(bool checked);
void check_mode(std::string box);
void check_chaos(bool checked);
void check_rand_chaos(bool checked);
void check_sage(bool checked);
void check_media(std::string type);
};
class Term : public QPlainTextEdit {
public:
Term (QWidget * parent) {
QPalette p = palette();
p.setColor(QPalette::Base, Qt::black);
p.setColor(QPalette::Text, Qt::green);
setPalette(p);
}
void keyPressEvent(QKeyEvent *event) {
if (event->key() >= 0x20 && event->key() <= 0x7E && (event->modifiers() == Qt::NoModifier || event->modifiers() == Qt::ShiftModifier))
QPlainTextEdit::keyPressEvent(event);
if (event->key() == Qt::Key_Backspace && event->modifiers() == Qt::NoModifier)
QPlainTextEdit::keyPressEvent(event);
if (event->key() == Qt::Key_Return && event->modifiers() == Qt::NoModifier)
;
}
void mousePressEvent(QMouseEvent *) { setFocus(); }
void mouseDoubleClickEvent(QMouseEvent *) {}
void contentMenuEvent(QContextMenuEvent *) {}
};
#endif // GUI_H