mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Merge pull request #6767 from spycrab/qt_whatsthis2
Qt: Make dialogues more consistent
This commit is contained in:
commit
46236920ef
@ -137,7 +137,7 @@ void ARCodeWidget::OnCodeAddPressed()
|
|||||||
ActionReplay::ARCode ar;
|
ActionReplay::ARCode ar;
|
||||||
ar.active = true;
|
ar.active = true;
|
||||||
|
|
||||||
CheatCodeEditor ed;
|
CheatCodeEditor ed(this);
|
||||||
|
|
||||||
ed.SetARCode(&ar);
|
ed.SetARCode(&ar);
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ void ARCodeWidget::OnCodeEditPressed()
|
|||||||
|
|
||||||
ActionReplay::ARCode ar = current_ar;
|
ActionReplay::ARCode ar = current_ar;
|
||||||
|
|
||||||
CheatCodeEditor ed;
|
CheatCodeEditor ed(this);
|
||||||
|
|
||||||
ed.SetARCode(user_defined ? ¤t_ar : &ar);
|
ed.SetARCode(user_defined ? ¤t_ar : &ar);
|
||||||
ed.exec();
|
ed.exec();
|
||||||
|
@ -17,8 +17,11 @@
|
|||||||
#include "Core/ActionReplay.h"
|
#include "Core/ActionReplay.h"
|
||||||
#include "Core/GeckoCodeConfig.h"
|
#include "Core/GeckoCodeConfig.h"
|
||||||
|
|
||||||
CheatCodeEditor::CheatCodeEditor()
|
CheatCodeEditor::CheatCodeEditor(QWidget* parent) : QDialog(parent)
|
||||||
{
|
{
|
||||||
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
setWindowTitle(tr("Cheat Code Editor"));
|
||||||
|
|
||||||
CreateWidgets();
|
CreateWidgets();
|
||||||
ConnectWidgets();
|
ConnectWidgets();
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ class GeckoCode;
|
|||||||
class CheatCodeEditor : public QDialog
|
class CheatCodeEditor : public QDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit CheatCodeEditor();
|
explicit CheatCodeEditor(QWidget* parent);
|
||||||
|
|
||||||
void SetARCode(ActionReplay::ARCode* code);
|
void SetARCode(ActionReplay::ARCode* code);
|
||||||
void SetGeckoCode(Gecko::GeckoCode* code);
|
void SetGeckoCode(Gecko::GeckoCode* code);
|
||||||
|
@ -168,7 +168,7 @@ void GeckoCodeWidget::AddCode()
|
|||||||
Gecko::GeckoCode code;
|
Gecko::GeckoCode code;
|
||||||
code.enabled = true;
|
code.enabled = true;
|
||||||
|
|
||||||
CheatCodeEditor ed;
|
CheatCodeEditor ed(this);
|
||||||
ed.SetGeckoCode(&code);
|
ed.SetGeckoCode(&code);
|
||||||
|
|
||||||
if (ed.exec())
|
if (ed.exec())
|
||||||
@ -188,7 +188,7 @@ void GeckoCodeWidget::EditCode()
|
|||||||
|
|
||||||
int row = m_code_list->row(item);
|
int row = m_code_list->row(item);
|
||||||
|
|
||||||
CheatCodeEditor ed;
|
CheatCodeEditor ed(this);
|
||||||
|
|
||||||
ed.SetGeckoCode(&m_gecko_codes[row]);
|
ed.SetGeckoCode(&m_gecko_codes[row]);
|
||||||
|
|
||||||
|
@ -188,6 +188,7 @@ void InfoWidget::ComputeChecksum()
|
|||||||
QProgressDialog* progress =
|
QProgressDialog* progress =
|
||||||
new QProgressDialog(tr("Computing MD5 Checksum"), tr("Cancel"), 0, 1000, this);
|
new QProgressDialog(tr("Computing MD5 Checksum"), tr("Cancel"), 0, 1000, this);
|
||||||
progress->setWindowTitle(tr("Computing MD5 Checksum"));
|
progress->setWindowTitle(tr("Computing MD5 Checksum"));
|
||||||
|
progress->setWindowFlags(progress->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
progress->setMinimumDuration(500);
|
progress->setMinimumDuration(500);
|
||||||
progress->setWindowModality(Qt::WindowModal);
|
progress->setWindowModality(Qt::WindowModal);
|
||||||
while (read_offset < game_size)
|
while (read_offset < game_size)
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
NewPatchDialog::NewPatchDialog(PatchEngine::Patch& patch) : m_patch(patch)
|
NewPatchDialog::NewPatchDialog(QWidget* parent, PatchEngine::Patch& patch)
|
||||||
|
: QDialog(parent), m_patch(patch)
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Patch Editor"));
|
setWindowTitle(tr("Patch Editor"));
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
@ -20,7 +20,7 @@ class QPushButton;
|
|||||||
class NewPatchDialog : public QDialog
|
class NewPatchDialog : public QDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit NewPatchDialog(PatchEngine::Patch& patch);
|
explicit NewPatchDialog(QWidget* parent, PatchEngine::Patch& patch);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateWidgets();
|
void CreateWidgets();
|
||||||
|
@ -69,7 +69,7 @@ void PatchesWidget::OnAdd()
|
|||||||
PatchEngine::Patch patch;
|
PatchEngine::Patch patch;
|
||||||
patch.user_defined = true;
|
patch.user_defined = true;
|
||||||
|
|
||||||
if (NewPatchDialog(patch).exec())
|
if (NewPatchDialog(this, patch).exec())
|
||||||
{
|
{
|
||||||
m_patches.push_back(patch);
|
m_patches.push_back(patch);
|
||||||
SavePatches();
|
SavePatches();
|
||||||
@ -93,7 +93,7 @@ void PatchesWidget::OnEdit()
|
|||||||
patch.name = tr("%1 (Copy)").arg(QString::fromStdString(patch.name)).toStdString();
|
patch.name = tr("%1 (Copy)").arg(QString::fromStdString(patch.name)).toStdString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NewPatchDialog(patch).exec())
|
if (NewPatchDialog(this, patch).exec())
|
||||||
{
|
{
|
||||||
if (patch.user_defined)
|
if (patch.user_defined)
|
||||||
{
|
{
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
GameListDialog::GameListDialog(QWidget* parent) : QDialog(parent)
|
GameListDialog::GameListDialog(QWidget* parent) : QDialog(parent)
|
||||||
{
|
{
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
setWindowTitle(tr("Select a game"));
|
||||||
|
|
||||||
CreateWidgets();
|
CreateWidgets();
|
||||||
ConnectWidgets();
|
ConnectWidgets();
|
||||||
|
@ -40,6 +40,8 @@ USBDeviceAddToWhitelistDialog::USBDeviceAddToWhitelistDialog(QWidget* parent) :
|
|||||||
void USBDeviceAddToWhitelistDialog::InitControls()
|
void USBDeviceAddToWhitelistDialog::InitControls()
|
||||||
{
|
{
|
||||||
setWindowTitle(tr("Add New USB Device"));
|
setWindowTitle(tr("Add New USB Device"));
|
||||||
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
|
||||||
m_whitelist_buttonbox = new QDialogButtonBox();
|
m_whitelist_buttonbox = new QDialogButtonBox();
|
||||||
auto* add_button = new QPushButton(tr("Add"));
|
auto* add_button = new QPushButton(tr("Add"));
|
||||||
m_whitelist_buttonbox->addButton(add_button, QDialogButtonBox::AcceptRole);
|
m_whitelist_buttonbox->addButton(add_button, QDialogButtonBox::AcceptRole);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user