summaryrefslogtreecommitdiffstats
path: root/application/setupwizard/JavaWizardPage.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-02-18 12:39:35 +0100
committerPetr Mrázek <peterix@gmail.com>2018-02-18 12:39:35 +0100
commit06ccff0f4730ad16757eb763c4c274d78c6b569b (patch)
tree1760f0436686447da6f46fa0f710e26c42f26d71 /application/setupwizard/JavaWizardPage.h
parent65bca654895c94e83ef25008dc1c44cc822cfbab (diff)
downloadMultiMC-06ccff0f4730ad16757eb763c4c274d78c6b569b.tar
MultiMC-06ccff0f4730ad16757eb763c4c274d78c6b569b.tar.gz
MultiMC-06ccff0f4730ad16757eb763c4c274d78c6b569b.tar.lz
MultiMC-06ccff0f4730ad16757eb763c4c274d78c6b569b.tar.xz
MultiMC-06ccff0f4730ad16757eb763c4c274d78c6b569b.zip
GH-2150 Separate Java settings UI used in the wizard into a widget
Diffstat (limited to 'application/setupwizard/JavaWizardPage.h')
-rw-r--r--application/setupwizard/JavaWizardPage.h64
1 files changed, 2 insertions, 62 deletions
diff --git a/application/setupwizard/JavaWizardPage.h b/application/setupwizard/JavaWizardPage.h
index f240217e..4ea31d24 100644
--- a/application/setupwizard/JavaWizardPage.h
+++ b/application/setupwizard/JavaWizardPage.h
@@ -1,21 +1,8 @@
#pragma once
#include "BaseWizardPage.h"
-#include <BaseVersion.h>
-#include <QObjectPtr.h>
-#include <java/JavaChecker.h>
-#include <QIcon>
-class QLineEdit;
-class VersionSelectWidget;
-class QSpinBox;
-class QPushButton;
-class QVBoxLayout;
-class QHBoxLayout;
-class QGroupBox;
-class QGridLayout;
-class QLabel;
-class QToolButton;
+class JavaSettingsWidget;
class JavaWizardPage : public BaseWizardPage
{
@@ -32,58 +19,11 @@ public:
void initializePage() override;
bool validatePage() override;
- enum class JavaStatus
- {
- NotSet,
- Pending,
- Good,
- DoesNotExist,
- DoesNotStart,
- ReturnedInvalidData
- } javaStatus = JavaStatus::NotSet;
-
-protected slots:
- void memoryValueChanged(int);
- void javaPathEdited(const QString &path);
- void javaVersionSelected(BaseVersionPtr version);
- void on_javaBrowseBtn_clicked();
- void on_javaStatusBtn_clicked();
- void checkFinished(JavaCheckResult result);
-
protected: /* methods */
- void checkJavaPathOnEdit(const QString &path);
- void checkJavaPath(const QString &path);
- void setJavaStatus(JavaStatus status);
void setupUi();
void retranslate() override;
private: /* data */
- VersionSelectWidget *m_versionWidget = nullptr;
- QVBoxLayout *m_verticalLayout = nullptr;
-
- QLineEdit * m_javaPathTextBox = nullptr;
- QPushButton * m_javaBrowseBtn = nullptr;
- QToolButton * m_javaStatusBtn = nullptr;
- QHBoxLayout *m_horizontalLayout = nullptr;
-
- QGroupBox *m_memoryGroupBox = nullptr;
- QGridLayout *m_gridLayout_2 = nullptr;
- QSpinBox *m_maxMemSpinBox = nullptr;
- QLabel *m_labelMinMem = nullptr;
- QLabel *m_labelMaxMem = nullptr;
- QSpinBox *m_minMemSpinBox = nullptr;
- QLabel *m_labelPermGen = nullptr;
- QSpinBox *m_permGenSpinBox = nullptr;
- QIcon goodIcon;
- QIcon yellowIcon;
- QIcon badIcon;
-
- int observedMinMemory = 0;
- int observedMaxMemory = 0;
- int observedPermGenMemory = 0;
- QString queuedCheck;
- uint64_t m_availableMemory = 0ull;
- shared_qobject_ptr<JavaChecker> m_checker;
- JavaCheckResult m_result;
+ JavaSettingsWidget *m_java_widget = nullptr;
};