36 lines
761 B
C++
36 lines
761 B
C++
#pragma once
|
|
|
|
#include <QDialog>
|
|
#include <QLineEdit>
|
|
#include <QPushButton>
|
|
#include <QSpinBox>
|
|
|
|
namespace scar {
|
|
|
|
class LoginDialog : public QDialog {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit LoginDialog(const QString& lastUsername = "",
|
|
const QString& lastServer = "localhost",
|
|
uint16_t lastPort = 8443,
|
|
QWidget* parent = nullptr);
|
|
|
|
QString username() const;
|
|
QString server() const;
|
|
uint16_t port() const;
|
|
QString password() const;
|
|
|
|
private:
|
|
void setupUI();
|
|
|
|
QLineEdit* usernameEdit_;
|
|
QLineEdit* passwordEdit_;
|
|
QLineEdit* serverEdit_;
|
|
QSpinBox* portSpinBox_;
|
|
QPushButton* connectButton_;
|
|
QPushButton* cancelButton_;
|
|
};
|
|
|
|
} // namespace scar
|