GameListDialog.h 715 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2017 Dolphin Emulator Project
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include <QDialog>
  5. #include "DolphinQt/GameList/GameListModel.h"
  6. class QVBoxLayout;
  7. class QListWidget;
  8. class QDialogButtonBox;
  9. namespace UICommon
  10. {
  11. class GameFile;
  12. }
  13. class GameListDialog : public QDialog
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit GameListDialog(const GameListModel& game_list_model, QWidget* parent);
  18. int exec() override;
  19. const UICommon::GameFile& GetSelectedGame() const;
  20. private:
  21. void CreateWidgets();
  22. void ConnectWidgets();
  23. void PopulateGameList();
  24. const GameListModel& m_game_list_model;
  25. QVBoxLayout* m_main_layout;
  26. QListWidget* m_game_list;
  27. QDialogButtonBox* m_button_box;
  28. };