Add *basic* interaction

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2023-03-01 21:11:04 +00:00
parent 8b897ac714
commit 0fadb5a2be
3 changed files with 55 additions and 4 deletions

View File

@ -23,6 +23,16 @@ ExportMrPackDialog::ExportMrPackDialog(InstancePtr instance, QWidget* parent)
: QDialog(parent), instance(instance), ui(new Ui::ExportMrPackDialog)
{
ui->setupUi(this);
ui->name->setText(instance->name());
}
void ExportMrPackDialog::done(int result) {
if (result != Accepted) {
QDialog::done(result);
return;
}
QDialog::done(result);
}
ExportMrPackDialog::~ExportMrPackDialog()

View File

@ -32,6 +32,8 @@ class ExportMrPackDialog : public QDialog {
explicit ExportMrPackDialog(InstancePtr instance, QWidget* parent = nullptr);
~ExportMrPackDialog();
void done(int result) override;
private:
InstancePtr instance;
Ui::ExportMrPackDialog* ui;

View File

@ -28,7 +28,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_3"/>
<widget class="QLineEdit" name="summary"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label">
@ -45,10 +45,10 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit"/>
<widget class="QLineEdit" name="name"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_2"/>
<widget class="QLineEdit" name="version"/>
</item>
</layout>
</widget>
@ -72,6 +72,45 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>name</tabstop>
<tabstop>version</tabstop>
<tabstop>summary</tabstop>
<tabstop>treeView</tabstop>
</tabstops>
<resources/>
<connections/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>ExportMrPackDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>324</x>
<y>390</y>
</hint>
<hint type="destinationlabel">
<x>324</x>
<y>206</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>ExportMrPackDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>324</x>
<y>390</y>
</hint>
<hint type="destinationlabel">
<x>324</x>
<y>206</y>
</hint>
</hints>
</connection>
</connections>
</ui>