1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-21 20:27:45 +00:00
astra/launcher/desktop/include/launcherwindow.h

62 lines
1.3 KiB
C
Raw Normal View History

#pragma once
#include <QCheckBox>
2022-08-15 11:14:37 -04:00
#include <QComboBox>
#include <QFormLayout>
2022-08-15 11:14:37 -04:00
#include <QGridLayout>
#include <QMainWindow>
#include <QPushButton>
#include <QScrollArea>
2022-08-15 11:14:37 -04:00
#include <QTreeWidget>
#include "headline.h"
2022-08-15 11:14:37 -04:00
#include "launchercore.h"
class LauncherWindow : public QMainWindow {
Q_OBJECT
public:
2022-10-13 13:20:09 -04:00
explicit LauncherWindow(LauncherCore& new_headline, QWidget* parent = nullptr);
ProfileSettings& currentProfile();
2022-09-05 17:26:26 -04:00
void openPath(const QString& path);
public slots:
void reloadControls();
private:
void reloadNews();
LauncherCore& core;
Headline headline;
bool currentlyReloadingControls = false;
QGridLayout* layout;
QFormLayout* loginLayout;
QScrollArea* bannerScrollArea;
QWidget* bannerParentWidget;
QHBoxLayout* bannerLayout;
QTreeWidget* newsListView;
QTimer* bannerTimer = nullptr;
int currentBanner = 0;
std::vector<QLabel*> bannerWidgets;
QAction* launchOfficial;
QAction* launchSysInfo;
QAction* launchCfgBackup;
QAction* openGameDir;
QComboBox* profileSelect;
2022-08-15 11:14:37 -04:00
QLineEdit *usernameEdit, *passwordEdit;
QLineEdit* otpEdit;
2022-08-15 11:14:37 -04:00
QCheckBox *rememberUsernameBox, *rememberPasswordBox;
QPushButton *loginButton, *registerButton;
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
QAction* wineCfg;
#endif
};