MCPcopy Create free account
hub / github.com/MultiMC/Launcher / NewComponentDialog

Method NewComponentDialog

launcher/ui/dialogs/NewComponentDialog.cpp:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35#include <meta/VersionList.h>
36
37NewComponentDialog::NewComponentDialog(const QString & initialName, const QString & initialUid, QWidget *parent)
38 : QDialog(parent), ui(new Ui::NewComponentDialog)
39{
40 ui->setupUi(this);
41 resize(minimumSizeHint());
42
43 ui->nameTextBox->setText(initialName);
44 ui->uidTextBox->setText(initialUid);
45
46 connect(ui->nameTextBox, &QLineEdit::textChanged, this, &NewComponentDialog::updateDialogState);
47 connect(ui->uidTextBox, &QLineEdit::textChanged, this, &NewComponentDialog::updateDialogState);
48
49 auto groups = APPLICATION->instances()->getGroups().toSet();
50 ui->nameTextBox->setFocus();
51
52 originalPlaceholderText = ui->uidTextBox->placeholderText();
53 updateDialogState();
54}
55
56NewComponentDialog::~NewComponentDialog()
57{

Callers

nothing calls this directly

Calls 4

getGroupsMethod · 0.80
instancesMethod · 0.80
setupUiMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected