NOISSUE add button for creating empty, properly registered, components
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
|
||||
#include "dialogs/CustomMessageBox.h"
|
||||
#include "dialogs/VersionSelectDialog.h"
|
||||
#include "dialogs/NewComponentDialog.h"
|
||||
#include "dialogs/ModEditDialogCommon.h"
|
||||
|
||||
#include "dialogs/ProgressDialog.h"
|
||||
@ -402,6 +403,24 @@ void VersionPage::on_forgeBtn_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void VersionPage::on_addEmptyBtn_clicked()
|
||||
{
|
||||
NewComponentDialog compdialog(QString(), QString(), this);
|
||||
QStringList blacklist;
|
||||
for(int i = 0; i < m_profile->rowCount(); i++)
|
||||
{
|
||||
auto comp = m_profile->getComponent(i);
|
||||
blacklist.push_back(comp->getID());
|
||||
}
|
||||
compdialog.setBlacklist(blacklist);
|
||||
if (compdialog.exec())
|
||||
{
|
||||
qDebug() << "name:" << compdialog.name();
|
||||
qDebug() << "uid:" << compdialog.uid();
|
||||
m_profile->installEmpty(compdialog.uid(), compdialog.name());
|
||||
}
|
||||
}
|
||||
|
||||
void VersionPage::on_liteloaderBtn_clicked()
|
||||
{
|
||||
auto vlist = ENV.metadataIndex()->get("com.mumfrey.liteloader");
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
|
||||
private slots:
|
||||
void on_forgeBtn_clicked();
|
||||
void on_addEmptyBtn_clicked();
|
||||
void on_liteloaderBtn_clicked();
|
||||
void on_reloadBtn_clicked();
|
||||
void on_removeBtn_clicked();
|
||||
|
@ -217,6 +217,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addEmptyBtn">
|
||||
<property name="text">
|
||||
<string>Add Empty</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="reloadBtn">
|
||||
<property name="toolTip">
|
||||
@ -290,7 +297,10 @@
|
||||
<tabstop>liteloaderBtn</tabstop>
|
||||
<tabstop>modBtn</tabstop>
|
||||
<tabstop>jarmodBtn</tabstop>
|
||||
<tabstop>jarBtn</tabstop>
|
||||
<tabstop>addEmptyBtn</tabstop>
|
||||
<tabstop>reloadBtn</tabstop>
|
||||
<tabstop>tabWidget</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
Reference in New Issue
Block a user