configure_input.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 <array>
  6. #include <memory>
  7. #include <QDialog>
  8. #include <QKeyEvent>
  9. #include "ui_configure_input.h"
  10. class QPushButton;
  11. class QString;
  12. class QTimer;
  13. namespace Ui {
  14. class ConfigureInput;
  15. }
  16. void OnDockedModeChanged(bool last_state, bool new_state);
  17. class ConfigureInput : public QDialog {
  18. Q_OBJECT
  19. public:
  20. explicit ConfigureInput(QWidget* parent = nullptr);
  21. ~ConfigureInput() override;
  22. /// Save all button configurations to settings file
  23. void ApplyConfiguration();
  24. private:
  25. void changeEvent(QEvent* event) override;
  26. void RetranslateUI();
  27. void RetranslateControllerComboBoxes();
  28. void UpdateUIEnabled();
  29. /// Load configuration settings.
  30. void LoadConfiguration();
  31. void LoadPlayerControllerIndices();
  32. /// Restore all buttons to their default values.
  33. void RestoreDefaults();
  34. std::unique_ptr<Ui::ConfigureInput> ui;
  35. std::array<QComboBox*, 8> players_controller;
  36. std::array<QPushButton*, 8> players_configure;
  37. };