begin adding stupid dialog
This commit is contained in:
parent
f4fe9e5a8e
commit
b49d75d1bb
|
@ -11,6 +11,7 @@ SET(SOURCES_QT_SDL
|
|||
WifiSettingsDialog.cpp
|
||||
InterfaceSettingsDialog.cpp
|
||||
ROMInfoDialog.cpp
|
||||
TitleManagerDialog.cpp
|
||||
Input.cpp
|
||||
LAN_PCap.cpp
|
||||
LAN_Socket.cpp
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
Copyright 2016-2021 Arisotura
|
||||
|
||||
This file is part of melonDS.
|
||||
|
||||
melonDS is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation, either version 3 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with melonDS. If not, see http://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "types.h"
|
||||
#include "Platform.h"
|
||||
#include "Config.h"
|
||||
#include "PlatformConfig.h"
|
||||
|
||||
#include "TitleManagerDialog.h"
|
||||
#include "ui_TitleManagerDialog.h"
|
||||
|
||||
|
||||
TitleManagerDialog* TitleManagerDialog::currentDlg = nullptr;
|
||||
|
||||
|
||||
TitleManagerDialog::TitleManagerDialog(QWidget* parent) : QDialog(parent), ui(new Ui::TitleManagerDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
TitleManagerDialog::~TitleManagerDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
Copyright 2016-2021 Arisotura
|
||||
|
||||
This file is part of melonDS.
|
||||
|
||||
melonDS is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation, either version 3 of the License, or (at your option)
|
||||
any later version.
|
||||
|
||||
melonDS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with melonDS. If not, see http://www.gnu.org/licenses/.
|
||||
*/
|
||||
|
||||
#ifndef TITLEMANAGERDIALOG_H
|
||||
#define TITLEMANAGERDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui { class TitleManagerDialog; }
|
||||
class TitleManagerDialog;
|
||||
|
||||
class TitleManagerDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TitleManagerDialog(QWidget* parent);
|
||||
~TitleManagerDialog();
|
||||
|
||||
static TitleManagerDialog* currentDlg;
|
||||
static TitleManagerDialog* openDlg(QWidget* parent)
|
||||
{
|
||||
if (currentDlg)
|
||||
{
|
||||
currentDlg->activateWindow();
|
||||
return currentDlg;
|
||||
}
|
||||
|
||||
currentDlg = new TitleManagerDialog(parent);
|
||||
currentDlg->open();
|
||||
return currentDlg;
|
||||
}
|
||||
static void closeDlg()
|
||||
{
|
||||
currentDlg = nullptr;
|
||||
}
|
||||
|
||||
private slots:
|
||||
// shit
|
||||
|
||||
private:
|
||||
Ui::TitleManagerDialog* ui;
|
||||
};
|
||||
|
||||
#endif // TITLEMANAGERDIALOG_H
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>TitleManagerDialog</class>
|
||||
<widget class="QDialog" name="TitleManagerDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>608</width>
|
||||
<height>466</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>DSi title manager - melonDS</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>piss</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="lstTitleList"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -58,6 +58,7 @@
|
|||
#include "WifiSettingsDialog.h"
|
||||
#include "InterfaceSettingsDialog.h"
|
||||
#include "ROMInfoDialog.h"
|
||||
#include "TitleManagerDialog.h"
|
||||
|
||||
#include "types.h"
|
||||
#include "version.h"
|
||||
|
@ -1379,6 +1380,12 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
|
|||
menu->addSeparator();
|
||||
actROMInfo = menu->addAction("ROM info");
|
||||
connect(actROMInfo, &QAction::triggered, this, &MainWindow::onROMInfo);
|
||||
|
||||
// TODO: menu item should be disabled:
|
||||
// * if no DSi NAND is specified
|
||||
// * if something is running (even paused)
|
||||
actTitleManager = menu->addAction("Manage DSi titles");
|
||||
connect(actTitleManager, &QAction::triggered, this, &MainWindow::onOpenTitleManager);
|
||||
}
|
||||
{
|
||||
QMenu* menu = menubar->addMenu("Config");
|
||||
|
@ -2391,6 +2398,11 @@ void MainWindow::onROMInfo()
|
|||
ROMInfoDialog* dlg = ROMInfoDialog::openDlg(this);
|
||||
}
|
||||
|
||||
void MainWindow::onOpenTitleManager()
|
||||
{
|
||||
TitleManagerDialog* dlg = TitleManagerDialog::openDlg(this);
|
||||
}
|
||||
|
||||
void MainWindow::onOpenEmuSettings()
|
||||
{
|
||||
emuThread->emuPause();
|
||||
|
|
|
@ -236,6 +236,7 @@ private slots:
|
|||
void onSetupCheats();
|
||||
void onCheatsDialogFinished(int res);
|
||||
void onROMInfo();
|
||||
void onOpenTitleManager();
|
||||
|
||||
void onOpenEmuSettings();
|
||||
void onEmuSettingsDialogFinished(int res);
|
||||
|
@ -313,6 +314,7 @@ public:
|
|||
QAction* actEnableCheats;
|
||||
QAction* actSetupCheats;
|
||||
QAction* actROMInfo;
|
||||
QAction* actTitleManager;
|
||||
|
||||
QAction* actEmuSettings;
|
||||
QAction* actInputConfig;
|
||||
|
|
Loading…
Reference in New Issue