mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 12:47:44 +00:00
This is useful for users who choose to not use OTP, and the layout is improved so the field is automatically hidden for Sapphire servers, which don't support OTP. The register button is also hidden automatically for Square Enix accounts, instead of simply disabling the button.
54 lines
No EOL
1.1 KiB
C++
54 lines
No EOL
1.1 KiB
C++
#pragma once
|
|
|
|
#include <QMainWindow>
|
|
#include <QComboBox>
|
|
#include <QCheckBox>
|
|
#include <QPushButton>
|
|
#include <QTreeWidget>
|
|
#include <QGridLayout>
|
|
#include <QFormLayout>
|
|
|
|
#include "launchercore.h"
|
|
#include "headline.h"
|
|
|
|
class LauncherWindow : public QMainWindow {
|
|
Q_OBJECT
|
|
public:
|
|
explicit LauncherWindow(LauncherCore& core, QWidget* parent = nullptr);
|
|
|
|
ProfileSettings currentProfile() const;
|
|
ProfileSettings& currentProfile();
|
|
|
|
void openPath(const QString path);
|
|
|
|
public slots:
|
|
void reloadControls();
|
|
|
|
private:
|
|
LauncherCore& core;
|
|
|
|
Headline headline;
|
|
|
|
bool currentlyReloadingControls = false;
|
|
|
|
QGridLayout* layout;
|
|
QFormLayout* loginLayout;
|
|
|
|
QLabel* bannerImageView;
|
|
QTreeWidget* newsListView;
|
|
|
|
QAction* launchOfficial;
|
|
QAction* launchSysInfo;
|
|
QAction* launchCfgBackup;
|
|
QAction* openGameDir;
|
|
|
|
QComboBox* profileSelect;
|
|
QLineEdit* usernameEdit, *passwordEdit;
|
|
QLineEdit* otpEdit;
|
|
QCheckBox* rememberUsernameBox, *rememberPasswordBox;
|
|
QPushButton* loginButton, *registerButton;
|
|
|
|
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
|
|
QAction* wineCfg;
|
|
#endif
|
|
}; |