configure_general.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2016 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <functional>
  6. #include <memory>
  7. #include <QWidget>
  8. namespace Core {
  9. class System;
  10. }
  11. class ConfigureDialog;
  12. namespace ConfigurationShared {
  13. enum class CheckState;
  14. }
  15. class HotkeyRegistry;
  16. namespace Ui {
  17. class ConfigureGeneral;
  18. }
  19. class ConfigureGeneral : public QWidget {
  20. Q_OBJECT
  21. public:
  22. explicit ConfigureGeneral(const Core::System& system_, QWidget* parent = nullptr);
  23. ~ConfigureGeneral() override;
  24. void SetResetCallback(std::function<void()> callback);
  25. void ResetDefaults();
  26. void ApplyConfiguration();
  27. void SetConfiguration();
  28. private:
  29. void changeEvent(QEvent* event) override;
  30. void RetranslateUI();
  31. void SetupPerGameUI();
  32. std::function<void()> reset_callback;
  33. std::unique_ptr<Ui::ConfigureGeneral> ui;
  34. ConfigurationShared::CheckState use_speed_limit;
  35. ConfigurationShared::CheckState use_multi_core;
  36. ConfigurationShared::CheckState use_extended_memory_layout;
  37. const Core::System& system;
  38. };