MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / InstallJavaPage

Class InstallJavaPage

launcher/ui/java/InstallJavaDialog.cpp:46–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#include "ui/widgets/VersionSelectWidget.h"
45
46class InstallJavaPage : public QWidget, public BasePage {
47 public:
48 Q_OBJECT
49 public:
50 explicit InstallJavaPage(const QString& id, const QString& iconName, const QString& name, QWidget* parent = nullptr)
51 : QWidget(parent), uid(id), iconName(iconName), name(name)
52 {
53 setObjectName(QStringLiteral("VersionSelectWidget"));
54 horizontalLayout = new QHBoxLayout(this);
55 horizontalLayout->setObjectName(QStringLiteral("horizontalLayout"));
56 horizontalLayout->setContentsMargins(0, 0, 0, 0);
57 majorVersionSelect = new VersionSelectWidget(this);
58 majorVersionSelect->selectCurrent();
59 majorVersionSelect->setEmptyString(tr("No Java versions are currently available in the meta."));
60 majorVersionSelect->setEmptyErrorString(tr("Couldn't load or download the Java version lists!"));
61 horizontalLayout->addWidget(majorVersionSelect, 1);
62
63 javaVersionSelect = new VersionSelectWidget(this);
64 javaVersionSelect->setEmptyString(tr("No Java versions are currently available for your OS."));
65 javaVersionSelect->setEmptyErrorString(tr("Couldn't load or download the Java version lists!"));
66 horizontalLayout->addWidget(javaVersionSelect, 4);
67 connect(majorVersionSelect, &VersionSelectWidget::selectedVersionChanged, this, &InstallJavaPage::setSelectedVersion);
68 connect(majorVersionSelect, &VersionSelectWidget::selectedVersionChanged, this, &InstallJavaPage::selectionChanged);
69 connect(javaVersionSelect, &VersionSelectWidget::selectedVersionChanged, this, &InstallJavaPage::selectionChanged);
70
71 QMetaObject::connectSlotsByName(this);
72 }
73 ~InstallJavaPage()
74 {
75 delete horizontalLayout;

Callers

nothing calls this directly

Calls 4

selectCurrentMethod · 0.80
QWidgetClass · 0.50
setEmptyStringMethod · 0.45
setEmptyErrorStringMethod · 0.45

Tested by

no test coverage detected