mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-27 00:00:07 -06:00
begin adding stupid dialog
This commit is contained in:
@ -11,6 +11,7 @@ SET(SOURCES_QT_SDL
|
|||||||
WifiSettingsDialog.cpp
|
WifiSettingsDialog.cpp
|
||||||
InterfaceSettingsDialog.cpp
|
InterfaceSettingsDialog.cpp
|
||||||
ROMInfoDialog.cpp
|
ROMInfoDialog.cpp
|
||||||
|
TitleManagerDialog.cpp
|
||||||
Input.cpp
|
Input.cpp
|
||||||
LAN_PCap.cpp
|
LAN_PCap.cpp
|
||||||
LAN_Socket.cpp
|
LAN_Socket.cpp
|
||||||
|
45
src/frontend/qt_sdl/TitleManagerDialog.cpp
Normal file
45
src/frontend/qt_sdl/TitleManagerDialog.cpp
Normal file
@ -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;
|
||||||
|
}
|
60
src/frontend/qt_sdl/TitleManagerDialog.h
Normal file
60
src/frontend/qt_sdl/TitleManagerDialog.h
Normal file
@ -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
|
60
src/frontend/qt_sdl/TitleManagerDialog.ui
Normal file
60
src/frontend/qt_sdl/TitleManagerDialog.ui
Normal file
@ -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 "WifiSettingsDialog.h"
|
||||||
#include "InterfaceSettingsDialog.h"
|
#include "InterfaceSettingsDialog.h"
|
||||||
#include "ROMInfoDialog.h"
|
#include "ROMInfoDialog.h"
|
||||||
|
#include "TitleManagerDialog.h"
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
@ -1379,6 +1380,12 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
|
|||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
actROMInfo = menu->addAction("ROM info");
|
actROMInfo = menu->addAction("ROM info");
|
||||||
connect(actROMInfo, &QAction::triggered, this, &MainWindow::onROMInfo);
|
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");
|
QMenu* menu = menubar->addMenu("Config");
|
||||||
@ -2391,6 +2398,11 @@ void MainWindow::onROMInfo()
|
|||||||
ROMInfoDialog* dlg = ROMInfoDialog::openDlg(this);
|
ROMInfoDialog* dlg = ROMInfoDialog::openDlg(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::onOpenTitleManager()
|
||||||
|
{
|
||||||
|
TitleManagerDialog* dlg = TitleManagerDialog::openDlg(this);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::onOpenEmuSettings()
|
void MainWindow::onOpenEmuSettings()
|
||||||
{
|
{
|
||||||
emuThread->emuPause();
|
emuThread->emuPause();
|
||||||
|
@ -236,6 +236,7 @@ private slots:
|
|||||||
void onSetupCheats();
|
void onSetupCheats();
|
||||||
void onCheatsDialogFinished(int res);
|
void onCheatsDialogFinished(int res);
|
||||||
void onROMInfo();
|
void onROMInfo();
|
||||||
|
void onOpenTitleManager();
|
||||||
|
|
||||||
void onOpenEmuSettings();
|
void onOpenEmuSettings();
|
||||||
void onEmuSettingsDialogFinished(int res);
|
void onEmuSettingsDialogFinished(int res);
|
||||||
@ -313,6 +314,7 @@ public:
|
|||||||
QAction* actEnableCheats;
|
QAction* actEnableCheats;
|
||||||
QAction* actSetupCheats;
|
QAction* actSetupCheats;
|
||||||
QAction* actROMInfo;
|
QAction* actROMInfo;
|
||||||
|
QAction* actTitleManager;
|
||||||
|
|
||||||
QAction* actEmuSettings;
|
QAction* actEmuSettings;
|
||||||
QAction* actInputConfig;
|
QAction* actInputConfig;
|
||||||
|
Reference in New Issue
Block a user