True Initial Commit
This commit is contained in:
54
mainwindow.h
Normal file
54
mainwindow.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QTcpSocket>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QSlider>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QTimer>
|
||||
#include <QTextEdit>
|
||||
#include <QTabWidget>
|
||||
|
||||
class MainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
private slots:
|
||||
void sendTimeCommand();
|
||||
void sendSpeedCommand();
|
||||
void updateSliderLabel(int value);
|
||||
void sendCustomCommand();
|
||||
void attemptConnection();
|
||||
void updateConnectionStatus();
|
||||
void disconnectFromServer();
|
||||
void readServerOutput();
|
||||
|
||||
private:
|
||||
QLineEdit *serverEdit, *portEdit, *passwordEdit;
|
||||
QLineEdit *dayEdit, *hourEdit, *minuteEdit;
|
||||
QLineEdit *customCommandEdit;
|
||||
QSlider *speedSlider;
|
||||
QLabel *sliderLabel;
|
||||
QLabel *connectionStatusLabel;
|
||||
QTcpSocket *socket;
|
||||
QPushButton *connectButton;
|
||||
QPushButton *disconnectButton;
|
||||
QTimer *statusTimer;
|
||||
QTextEdit *historyTextEdit;
|
||||
QTextEdit *serverLogTextEdit;
|
||||
QTabWidget *tabWidget;
|
||||
bool isAuthenticated = false;
|
||||
|
||||
void sendTelnetCommand(const QString &command);
|
||||
void setupUI();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user