mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 11:03:56 +00:00
Edit configure_cpu.h
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QString> // Added for stylesheet property
|
||||
#include <QWidget>
|
||||
#include "citron/configuration/configuration_shared.h"
|
||||
#include "citron/configuration/shared_translation.h"
|
||||
@@ -12,20 +14,23 @@
|
||||
class QComboBox;
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Ui {
|
||||
class ConfigureCpu;
|
||||
class ConfigureCpu;
|
||||
}
|
||||
|
||||
namespace ConfigurationShared {
|
||||
class Builder;
|
||||
class Builder;
|
||||
}
|
||||
|
||||
class ConfigureCpu : public ConfigurationShared::Tab {
|
||||
Q_OBJECT
|
||||
|
||||
// This property allows the main UI file to pass its stylesheet to this widget
|
||||
Q_PROPERTY(QString templateStyleSheet READ GetTemplateStyleSheet WRITE SetTemplateStyleSheet NOTIFY TemplateStyleSheetChanged)
|
||||
|
||||
public:
|
||||
explicit ConfigureCpu(const Core::System& system_,
|
||||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
|
||||
@@ -35,6 +40,13 @@ public:
|
||||
void ApplyConfiguration() override;
|
||||
void SetConfiguration() override;
|
||||
|
||||
// These functions get and set the stylesheet property
|
||||
QString GetTemplateStyleSheet() const;
|
||||
void SetTemplateStyleSheet(const QString& sheet);
|
||||
|
||||
signals:
|
||||
void TemplateStyleSheetChanged();
|
||||
|
||||
private:
|
||||
void changeEvent(QEvent* event) override;
|
||||
void RetranslateUI();
|
||||
@@ -52,4 +64,7 @@ private:
|
||||
|
||||
QComboBox* accuracy_combobox;
|
||||
QComboBox* backend_combobox;
|
||||
|
||||
// This variable will hold the raw stylesheet string
|
||||
QString m_template_style_sheet;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user