add title-import dialog base
This commit is contained in:
parent
2773daf55b
commit
e9f686de38
|
@ -0,0 +1,139 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TitleImportDialog</class>
|
||||
<widget class="QDialog" name="TitleImportDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>495</width>
|
||||
<height>202</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Import title - melonDS</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="btnTmdBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<widget class="QRadioButton" name="rbTmdFromNUS">
|
||||
<property name="text">
|
||||
<string>Download from NUS</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Metadata (TMD):</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QRadioButton" name="rbTmdFromFile">
|
||||
<property name="text">
|
||||
<string>From file:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="txtAppFile"/>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="3">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Executable:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="txtTmdFile"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="btnAppBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="3">
|
||||
<widget class="QCheckBox" name="cbReadOnly">
|
||||
<property name="text">
|
||||
<string>Make title files read-only</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>TitleImportDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>TitleImportDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "TitleManagerDialog.h"
|
||||
#include "ui_TitleManagerDialog.h"
|
||||
#include "ui_TitleImportDialog.h"
|
||||
|
||||
|
||||
FILE* TitleManagerDialog::curNAND = nullptr;
|
||||
|
@ -80,43 +81,6 @@ TitleManagerDialog::TitleManagerDialog(QWidget* parent) : QDialog(parent), ui(ne
|
|||
item->setIcon(icon);
|
||||
ui->lstTitleList->addItem(item);
|
||||
}
|
||||
|
||||
/*{
|
||||
QPixmap boobs(32, 32);
|
||||
boobs.fill(Qt::blue);
|
||||
QIcon piss(boobs);
|
||||
|
||||
QListWidgetItem* derp = new QListWidgetItem("完全放棄宣言\nナナヲアカリ");
|
||||
derp->setIcon(piss);
|
||||
ui->lstTitleList->addItem(derp);
|
||||
}
|
||||
{
|
||||
QPixmap boobs(32, 32);
|
||||
boobs.fill(Qt::red);
|
||||
QIcon piss(boobs);
|
||||
|
||||
QListWidgetItem* derp = new QListWidgetItem("death to\ncapitalism");
|
||||
derp->setIcon(piss);
|
||||
ui->lstTitleList->addItem(derp);
|
||||
}
|
||||
{
|
||||
QPixmap boobs(32, 32);
|
||||
boobs.fill(Qt::green);
|
||||
QIcon piss(boobs);
|
||||
|
||||
QListWidgetItem* derp = new QListWidgetItem("piles of\ncontent");
|
||||
derp->setIcon(piss);
|
||||
ui->lstTitleList->addItem(derp);
|
||||
}
|
||||
{
|
||||
QPixmap boobs(32, 32);
|
||||
boobs.fill(Qt::yellow);
|
||||
QIcon piss(boobs);
|
||||
|
||||
QListWidgetItem* derp = new QListWidgetItem("trans\nrights");
|
||||
derp->setIcon(piss);
|
||||
ui->lstTitleList->addItem(derp);
|
||||
}*/
|
||||
}
|
||||
|
||||
TitleManagerDialog::~TitleManagerDialog()
|
||||
|
@ -166,3 +130,23 @@ void TitleManagerDialog::done(int r)
|
|||
|
||||
closeDlg();
|
||||
}
|
||||
|
||||
void TitleManagerDialog::on_btnImportTitle_clicked()
|
||||
{
|
||||
TitleImportDialog* importdlg = new TitleImportDialog(this);
|
||||
importdlg->open();
|
||||
}
|
||||
|
||||
|
||||
TitleImportDialog::TitleImportDialog(QWidget* parent) : QDialog(parent), ui(new Ui::TitleImportDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
// shit here
|
||||
}
|
||||
|
||||
TitleImportDialog::~TitleImportDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,13 @@
|
|||
#include <QDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
namespace Ui { class TitleManagerDialog; }
|
||||
namespace Ui
|
||||
{
|
||||
class TitleManagerDialog;
|
||||
class TitleImportDialog;
|
||||
}
|
||||
class TitleManagerDialog;
|
||||
class TitleImportDialog;
|
||||
|
||||
class TitleManagerDialog : public QDialog
|
||||
{
|
||||
|
@ -67,8 +72,25 @@ public:
|
|||
private slots:
|
||||
void done(int r);
|
||||
|
||||
void on_btnImportTitle_clicked();
|
||||
|
||||
private:
|
||||
Ui::TitleManagerDialog* ui;
|
||||
};
|
||||
|
||||
class TitleImportDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TitleImportDialog(QWidget* parent);
|
||||
~TitleImportDialog();
|
||||
|
||||
private slots:
|
||||
//
|
||||
|
||||
private:
|
||||
Ui::TitleImportDialog* ui;
|
||||
};
|
||||
|
||||
#endif // TITLEMANAGERDIALOG_H
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<widget class="QPushButton" name="btnImportTitle">
|
||||
<property name="text">
|
||||
<string>piss</string>
|
||||
<string>Import title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in New Issue