Debian Codegraph @

Source/Core/DolphinQt/Config/NewPatchDialog.h

raw symbols SCIP
1 // Copyright 2018 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <memory>
7 #include <vector>
8
9 #include <QDialog>
10 #include <QWidget>
11
12 namespace PatchEngine
13 {
14 struct Patch;
15 struct PatchEntry;
16 } // namespace PatchEngine
17
18 class QDialogButtonBox;
19 class QGroupBox;
20 class QLineEdit;
21 class QVBoxLayout;
22 class QPushButton;
23
24 struct NewPatchEntry;
25
26 class NewPatchDialog : public QDialog
27 {
28 public:
29 explicit NewPatchDialog(QWidget* parent, PatchEngine::Patch& patch);
30 ~NewPatchDialog() override;
31
32 private:
33 void CreateWidgets();
34 void ConnectWidgets();
35 void AddEntry();
36
37 void accept() override;
38
39 QGroupBox* CreateEntry(const PatchEngine::PatchEntry& entry);
40
41 QLineEdit* m_name_edit;
42 QWidget* m_entry_widget;
43 QVBoxLayout* m_entry_layout;
44 QPushButton* m_add_button;
45 QDialogButtonBox* m_button_box;
46
47 std::vector<std::unique_ptr<NewPatchEntry>> m_entries;
48
49 PatchEngine::Patch& m_patch;
50 };