Tons of crap
This commit is contained in:
75
mainwindow.h
75
mainwindow.h
@@ -3,10 +3,13 @@
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QTcpSocket>
|
||||
#include <QComboBox>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QSlider>
|
||||
#include <QLabel>
|
||||
#include <QListWidget>
|
||||
#include <QMap>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QGroupBox>
|
||||
@@ -22,6 +25,19 @@ public:
|
||||
~MainWindow();
|
||||
|
||||
private slots:
|
||||
void saveServerEntry();
|
||||
void loadSelectedServer();
|
||||
void deleteSelectedServer();
|
||||
void refreshUsers();
|
||||
void displaySelectedUserInfo(int row);
|
||||
void kickSelectedUser();
|
||||
void banSelectedUser();
|
||||
void refreshBans();
|
||||
void displaySelectedBanInfo(int row);
|
||||
void removeSelectedBan();
|
||||
void lockServerTime();
|
||||
void unlockServerTime();
|
||||
void resendLockedServerTime();
|
||||
void sendTimeCommand();
|
||||
void sendSpeedCommand();
|
||||
void updateSliderLabel(int value);
|
||||
@@ -32,22 +48,79 @@ private slots:
|
||||
void readServerOutput();
|
||||
|
||||
private:
|
||||
struct SavedServerEntry {
|
||||
QString name;
|
||||
QString server;
|
||||
QString port;
|
||||
QString password;
|
||||
};
|
||||
|
||||
struct UserEntry {
|
||||
QString playerId;
|
||||
QString username;
|
||||
QString position;
|
||||
QString rotation;
|
||||
QString remoteState;
|
||||
QString health;
|
||||
QString deaths;
|
||||
QString zombies;
|
||||
QString players;
|
||||
QString score;
|
||||
QString level;
|
||||
QString platformId;
|
||||
QString eosId;
|
||||
QString ipAddress;
|
||||
QString ping;
|
||||
};
|
||||
|
||||
struct BanEntry {
|
||||
QString bannedUntil;
|
||||
QString userId;
|
||||
QString username;
|
||||
QString reason;
|
||||
};
|
||||
|
||||
QLineEdit *serverEdit, *portEdit, *passwordEdit;
|
||||
QLineEdit *dayEdit, *hourEdit, *minuteEdit;
|
||||
QLineEdit *customCommandEdit;
|
||||
QComboBox *savedServersCombo;
|
||||
QListWidget *usersListWidget;
|
||||
QListWidget *bansListWidget;
|
||||
QMap<QString, QLabel *> userInfoValueLabels;
|
||||
QMap<QString, QLabel *> banInfoValueLabels;
|
||||
QSlider *speedSlider;
|
||||
QLabel *sliderLabel;
|
||||
QLabel *connectionStatusLabel;
|
||||
QLabel *serverTimeStatusLabel;
|
||||
QPushButton *serverTimeLockButton;
|
||||
QTcpSocket *socket;
|
||||
QPushButton *connectButton;
|
||||
QPushButton *disconnectButton;
|
||||
QTimer *statusTimer;
|
||||
QTimer *lockedTimeTimer;
|
||||
QTextEdit *historyTextEdit;
|
||||
QTextEdit *serverLogTextEdit;
|
||||
QTabWidget *tabWidget;
|
||||
QList<SavedServerEntry> savedServers;
|
||||
QList<UserEntry> users;
|
||||
QList<BanEntry> bans;
|
||||
bool isAuthenticated = false;
|
||||
bool isServerTimeLocked = false;
|
||||
bool awaitingUsersResponse = false;
|
||||
bool awaitingBansResponse = false;
|
||||
QString usersResponseBuffer;
|
||||
QString bansResponseBuffer;
|
||||
|
||||
void sendTelnetCommand(const QString &command);
|
||||
QString serverConfigFilePath() const;
|
||||
void clearUserInfo();
|
||||
void clearBanInfo();
|
||||
void loadSavedServers();
|
||||
void parseUsersResponse(const QString &text);
|
||||
void parseBansResponse(const QString &text);
|
||||
bool writeSavedServers() const;
|
||||
bool sendValidatedTimeCommand();
|
||||
void updateServerTimeLockState(bool locked);
|
||||
bool sendTelnetCommand(const QString &command);
|
||||
void setupUI();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user