duckstation

duckstation, but archived from the revision just before upstream changed it to a proprietary software project, this version is the libre one
git clone https://git.neptards.moe/u3shit/duckstation.git
Log | Files | Refs | README | LICENSE

selectdiscdialog.h (939B)


      1 // SPDX-FileCopyrightText: 2019-2023 Connor McLaughlin <stenzek@gmail.com>
      2 // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0)
      3 
      4 #pragma once
      5 #include "common/timer.h"
      6 #include "common/types.h"
      7 #include "qtprogresscallback.h"
      8 #include "ui_selectdiscdialog.h"
      9 #include <QtWidgets/QDialog>
     10 #include <array>
     11 #include <memory>
     12 #include <string>
     13 
     14 class SelectDiscDialog final : public QDialog
     15 {
     16   Q_OBJECT
     17 
     18 public:
     19   SelectDiscDialog(const std::string& disc_set_name, QWidget* parent = nullptr);
     20   ~SelectDiscDialog();
     21 
     22   ALWAYS_INLINE const std::string& getSelectedDiscPath() { return m_selected_path; }
     23 
     24 protected:
     25   void resizeEvent(QResizeEvent* ev);
     26 
     27 private Q_SLOTS:
     28   void onListItemActivated(const QTreeWidgetItem* item);
     29   void updateStartEnabled();
     30   void onSelectClicked();
     31   void onCancelClicked();
     32 
     33 private:
     34   void populateList(const std::string& disc_set_name);
     35 
     36   Ui::SelectDiscDialog m_ui;
     37   std::string m_selected_path;
     38 };