Merge pull request #7245 from lioncash/internal

Qt/CheatsManager: Move concealable types into the cpp file
This commit is contained in:
spycrab 2018-07-11 10:55:42 +02:00 committed by GitHub
commit d81b63f403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 33 deletions

View File

@ -40,6 +40,35 @@ constexpr u32 MAX_RESULTS = 50;
constexpr int INDEX_ROLE = Qt::UserRole; constexpr int INDEX_ROLE = Qt::UserRole;
constexpr int COLUMN_ROLE = Qt::UserRole + 1; constexpr int COLUMN_ROLE = Qt::UserRole + 1;
enum class CompareType : int
{
Equal = 0,
NotEqual = 1,
Less = 2,
LessEqual = 3,
More = 4,
MoreEqual = 5
};
enum class DataType : int
{
Byte = 0,
Short = 1,
Int = 2,
Float = 3,
Double = 4,
String = 5
};
struct Result
{
u32 address;
DataType type;
QString name;
bool locked = false;
u32 locked_value;
};
CheatsManager::CheatsManager(QWidget* parent) : QDialog(parent) CheatsManager::CheatsManager(QWidget* parent) : QDialog(parent)
{ {
setWindowTitle(tr("Cheats Manager")); setWindowTitle(tr("Cheats Manager"));
@ -56,6 +85,8 @@ CheatsManager::CheatsManager(QWidget* parent) : QDialog(parent)
Update(); Update();
} }
CheatsManager::~CheatsManager() = default;
void CheatsManager::OnStateChanged(Core::State state) void CheatsManager::OnStateChanged(Core::State state)
{ {
if (state != Core::State::Running && state != Core::State::Paused) if (state != Core::State::Running && state != Core::State::Paused)

View File

@ -15,6 +15,7 @@
class ARCodeWidget; class ARCodeWidget;
class QComboBox; class QComboBox;
class QDialogButtonBox; class QDialogButtonBox;
class QLabel;
class QLineEdit; class QLineEdit;
class QPushButton; class QPushButton;
class QRadioButton; class QRadioButton;
@ -22,52 +23,24 @@ class QSplitter;
class QTabWidget; class QTabWidget;
class QTableWidget; class QTableWidget;
class QTableWidgetItem; class QTableWidgetItem;
class QLabel; struct Result;
namespace UICommon
{
class GameFile;
}
namespace Core namespace Core
{ {
enum class State; enum class State;
} }
enum class CompareType : int namespace UICommon
{ {
Equal = 0, class GameFile;
NotEqual = 1, }
Less = 2,
LessEqual = 3,
More = 4,
MoreEqual = 5
};
enum class DataType : int
{
Byte = 0,
Short = 1,
Int = 2,
Float = 3,
Double = 4,
String = 5
};
struct Result
{
u32 address;
DataType type;
QString name;
bool locked = false;
u32 locked_value;
};
class CheatsManager : public QDialog class CheatsManager : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit CheatsManager(QWidget* parent = nullptr); explicit CheatsManager(QWidget* parent = nullptr);
~CheatsManager();
private: private:
QWidget* CreateCheatSearch(); QWidget* CreateCheatSearch();