game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
system_readiness_widget.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// ==============================================================================
3// system_readiness_widget.h
4// ==============================================================================
5// Compact system readiness dashboard showing gaming optimization status
6// ==============================================================================
7// Displays a quick overview of system gaming readiness:
8// - Sync method status (NTSync/Fsync/Esync)
9// - Performance tools availability
10// - GPU optimization status
11// - Kernel parameters status
12//
13// Designed for embedding in MainWindow status bar or sidebar.
14// ==============================================================================
15
16#pragma once
17
19
20#include <QFrame>
21#include <QLabel>
22#include <QWidget>
23
24class QPushButton;
25class QHBoxLayout;
26class ThemeManager;
27
28/**
29 * @class SystemReadinessWidget
30 * @brief Compact widget showing system gaming readiness at a glance
31 *
32 * Shows color-coded indicators for key gaming optimization factors.
33 * Click to expand or open full system info dialog.
34 */
35class SystemReadinessWidget : public QFrame
36{
37 Q_OBJECT
38
39 public:
40 explicit SystemReadinessWidget(QWidget* parent = nullptr, ThemeManager* themeManager = nullptr);
41 ~SystemReadinessWidget() override = default;
42
43 /// Refresh the readiness status
44 void refresh();
45
46 /// Get overall readiness score (0-100)
48 {
49 return readinessScore_;
50 }
51
52 signals:
53 /// Emitted when user clicks to see more details
55
56 private slots:
57 void applyTheme();
58
59 private:
60 void setupUI();
61 void updateIndicators();
62 QString getStatusIcon(bool good) const;
63 QString getScoreColor(int score) const;
64
65 // UI components
66 QLabel* scoreLabel_ = nullptr;
67 QLabel* syncLabel_ = nullptr;
68 QLabel* toolsLabel_ = nullptr;
69 QLabel* kernelLabel_ = nullptr;
70 QPushButton* detailsBtn_ = nullptr;
71
72 // Cached state
73 int readinessScore_ = 0;
74
75 ThemeManager* themeManager_;
76};
void detailsRequested()
Emitted when user clicks to see more details.
~SystemReadinessWidget() override=default
void refresh()
Refresh the readiness status.
SystemReadinessWidget(QWidget *parent=nullptr, ThemeManager *themeManager=nullptr)
int getReadinessScore() const
Get overall readiness score (0-100).