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) : QDialog(parent), instance(instance), ui(new Ui::ExportMrPackDialog)
{ {
ui->setupUi(this); 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() ExportMrPackDialog::~ExportMrPackDialog()

View File

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

View File

@ -28,7 +28,7 @@
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="3" column="1">
<widget class="QLineEdit" name="lineEdit_3"/> <widget class="QLineEdit" name="summary"/>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label"> <widget class="QLabel" name="label">
@ -45,10 +45,10 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QLineEdit" name="lineEdit"/> <widget class="QLineEdit" name="name"/>
</item> </item>
<item row="1" column="1"> <item row="1" column="1">
<widget class="QLineEdit" name="lineEdit_2"/> <widget class="QLineEdit" name="version"/>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -72,6 +72,45 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<tabstops>
<tabstop>name</tabstop>
<tabstop>version</tabstop>
<tabstop>summary</tabstop>
<tabstop>treeView</tabstop>
</tabstops>
<resources/> <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> </ui>