mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-22 12:47:44 +00:00
Now it properly "slideshows" just like the real client, instead of being a static image like it was before. The banners are now clickable, but there's still a bug causing the controls to be reloaded twice on startup - delaying the first animation.
63 lines
No EOL
1.3 KiB
C++
63 lines
No EOL
1.3 KiB
C++
#pragma once
|
|
|
|
#include <QMainWindow>
|
|
#include <QComboBox>
|
|
#include <QCheckBox>
|
|
#include <QPushButton>
|
|
#include <QTreeWidget>
|
|
#include <QGridLayout>
|
|
#include <QFormLayout>
|
|
#include <QScrollArea>
|
|
|
|
#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:
|
|
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;
|
|
QLineEdit* usernameEdit, *passwordEdit;
|
|
QLineEdit* otpEdit;
|
|
QCheckBox* rememberUsernameBox, *rememberPasswordBox;
|
|
QPushButton* loginButton, *registerButton;
|
|
|
|
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
|
|
QAction* wineCfg;
|
|
#endif
|
|
}; |