summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/CheatCodeEditor.h
blob: 0b60a01264dcc2b5eef833b6fa863ec60e5d38d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Copyright 2018 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include <QDialog>

class QDialogButtonBox;
class QLabel;
class QLineEdit;
class QTextEdit;

namespace ActionReplay
{
struct ARCode;
}

namespace Gecko
{
class GeckoCode;
}

class CheatCodeEditor : public QDialog
{
public:
  explicit CheatCodeEditor(QWidget* parent);

  void SetARCode(ActionReplay::ARCode* code);
  void SetGeckoCode(Gecko::GeckoCode* code);

private:
  void CreateWidgets();
  void ConnectWidgets();

  bool AcceptAR();
  bool AcceptGecko();

  void accept() override;

  QLabel* m_creator_label;
  QLabel* m_notes_label;

  QLineEdit* m_name_edit;
  QLineEdit* m_creator_edit;
  QTextEdit* m_notes_edit;
  QTextEdit* m_code_edit;
  QDialogButtonBox* m_button_box;

  ActionReplay::ARCode* m_ar_code = nullptr;
  Gecko::GeckoCode* m_gecko_code = nullptr;
};