configure_system.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 <memory>
  6. #include <QList>
  7. #include <QWidget>
  8. namespace Service::Account {
  9. class ProfileManager;
  10. struct UUID;
  11. } // namespace Service::Account
  12. class QGraphicsScene;
  13. class QStandardItem;
  14. class QStandardItemModel;
  15. class QTreeView;
  16. class QVBoxLayout;
  17. namespace Ui {
  18. class ConfigureSystem;
  19. }
  20. class ConfigureSystem : public QWidget {
  21. Q_OBJECT
  22. public:
  23. explicit ConfigureSystem(QWidget* parent = nullptr);
  24. ~ConfigureSystem() override;
  25. void applyConfiguration();
  26. void setConfiguration();
  27. private:
  28. void ReadSystemSettings();
  29. std::string GetAccountUsername(Service::Account::UUID uuid) const;
  30. void UpdateBirthdayComboBox(int birthmonth_index);
  31. void RefreshConsoleID();
  32. void PopulateUserList();
  33. void UpdateCurrentUser();
  34. void SelectUser(const QModelIndex& index);
  35. void AddUser();
  36. void RenameUser();
  37. void DeleteUser();
  38. void SetUserImage();
  39. QVBoxLayout* layout;
  40. QTreeView* tree_view;
  41. QStandardItemModel* item_model;
  42. QGraphicsScene* scene;
  43. std::vector<QList<QStandardItem*>> list_items;
  44. std::unique_ptr<Ui::ConfigureSystem> ui;
  45. bool enabled;
  46. int birthmonth, birthday;
  47. int language_index;
  48. int sound_index;
  49. std::unique_ptr<Service::Account::ProfileManager> profile_manager;
  50. };