-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
45 lines (37 loc) · 936 Bytes
/
Copy pathmainwindow.h
File metadata and controls
45 lines (37 loc) · 936 Bytes
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
#pragma once
#include <QMainWindow>
#include <QNetworkAccessManager>
#include <QTimer>
#include <QTextEdit>
#include <QLabel>
#include <queue>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void startChecking();
void processQueue();
void handleReply(QNetworkReply *reply);
private:
void generateUsernames(QString current, int length);
void checkUsername(QString username);
void updateProgress();
Ui::MainWindow *ui;
QNetworkAccessManager *network;
QTimer rateTimer;
std::queue<QString> usernameQueue;
QTextEdit *outputTextEdit;
QLabel *progressLabel;
QLabel *statusLabel;
QString allowedChars;
int usernameLength;
int totalGenerated;
int checkedCount;
int availableCount;
bool isRunning;
};