mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-29 08:41:20 +00:00
* Simplify archive loading and harden filesystem integration * Restore directory entry name length assertion * Keep graphics-dependent filesystem tests out of CI --------- Co-authored-by: nmzik <Nmzik@mail.ru>
48 lines
1.5 KiB
C++
48 lines
1.5 KiB
C++
#ifndef CONFIGURATION_ITEM_H
|
|
#define CONFIGURATION_ITEM_H
|
|
|
|
#include <QIcon>
|
|
#include <QObject>
|
|
#include <QTreeWidgetItem>
|
|
|
|
#include <memory>
|
|
|
|
class QComboBox;
|
|
class QLabel;
|
|
class QLineEdit;
|
|
class QTreeWidget;
|
|
class QWidget;
|
|
|
|
class Configuration;
|
|
class ConfigurationItem: public QObject, public QTreeWidgetItem {
|
|
public:
|
|
explicit ConfigurationItem(std::unique_ptr<Configuration> info, QTreeWidget* parent);
|
|
~ConfigurationItem() override;
|
|
|
|
void Update(bool reload_icon = false);
|
|
bool operator<(const QTreeWidgetItem& other) const override;
|
|
|
|
Configuration& GetInfo() { return *m_info; }
|
|
[[nodiscard]] const Configuration& GetInfo() const { return *m_info; }
|
|
// void SetInfo(Configuration* info);
|
|
void SetRunning(bool state);
|
|
void SetCompatibilityEditable(bool editable);
|
|
[[nodiscard]] bool IsRunning() const { return m_running; }
|
|
QComboBox* GetStatusCombo() { return m_status_combo; }
|
|
QLineEdit* GetCommentEdit() { return m_comment_edit; }
|
|
|
|
private:
|
|
void UpdateIcon();
|
|
void UpdateStatusIndicator();
|
|
|
|
std::unique_ptr<Configuration> m_info;
|
|
QIcon m_icon;
|
|
bool m_running = false;
|
|
QComboBox* m_status_combo = nullptr;
|
|
QLabel* m_status_indicator = nullptr;
|
|
QWidget* m_status_widget = nullptr;
|
|
QLineEdit* m_comment_edit = nullptr;
|
|
};
|
|
|
|
#endif // CONFIGURATION_ITEM_H
|