@@ -9,18 +9,37 @@ class NvidiaDetector : public QObject
99{
1010 Q_OBJECT
1111
12+ Q_PROPERTY (bool gpuFound READ gpuFound NOTIFY infoChanged)
13+ Q_PROPERTY (QString gpuName READ gpuName NOTIFY infoChanged)
14+ Q_PROPERTY (QString driverVersion READ driverVersion NOTIFY infoChanged)
15+ Q_PROPERTY (bool driverLoaded READ driverLoaded NOTIFY infoChanged)
16+ Q_PROPERTY (bool nouveauActive READ nouveauActive NOTIFY infoChanged)
17+ Q_PROPERTY (bool secureBootEnabled READ secureBootEnabled NOTIFY infoChanged)
18+
1219public:
1320 struct GpuInfo {
14- bool found; // NVIDIA GPU var mı?
15- QString name; // GPU adı (ör: "NVIDIA GeForce RTX 3060")
16- QString driverVersion; // Kurulu sürücü versiyonu (ör: "535.154.05")
17- QString vbiosVersion; // VBIOS versiyonu
18- bool driverLoaded; // nvidia.ko kernel modülü yüklü mü?
19- bool nouveauActive; // Nouveau (açık kaynak) sürücü aktif mi?
21+ bool found = false ; // NVIDIA GPU var mı?
22+ QString name; // GPU adı (ör: "NVIDIA GeForce RTX 3060")
23+ QString driverVersion; // Kurulu sürücü versiyonu (ör: "535.154.05")
24+ QString vbiosVersion; // VBIOS versiyonu
25+ bool driverLoaded = false ; // nvidia.ko kernel modülü yüklü mü?
26+ bool nouveauActive = false ; // Nouveau (açık kaynak) sürücü aktif mi?
27+ bool secureBootEnabled = false ; // UEFI Secure Boot açık mı?
2028 };
2129
2230 explicit NvidiaDetector (QObject *parent = nullptr );
2331
32+ // QML property getters
33+ bool gpuFound () const { return m_info.found ; }
34+ QString gpuName () const { return m_info.name ; }
35+ QString driverVersion () const { return m_info.driverVersion ; }
36+ bool driverLoaded () const { return m_info.driverLoaded ; }
37+ bool nouveauActive () const { return m_info.nouveauActive ; }
38+ bool secureBootEnabled () const { return m_info.secureBootEnabled ; }
39+
40+ // GPU bilgisini yeniden tara — QML'den çağrılabilir
41+ Q_INVOKABLE void refresh ();
42+
2443 // Tüm GPU bilgisini toplar ve döner
2544 GpuInfo detect () const ;
2645
@@ -29,6 +48,9 @@ class NvidiaDetector : public QObject
2948 bool isDriverInstalled () const ;
3049 QString installedDriverVersion () const ;
3150
51+ signals:
52+ void infoChanged ();
53+
3254private:
3355 // lspci çıktısından GPU adını çıkar
3456 QString detectGpuName () const ;
@@ -38,5 +60,10 @@ class NvidiaDetector : public QObject
3860
3961 // /proc/modules'dan modül durumunu kontrol et
4062 bool isModuleLoaded (const QString &moduleName) const ;
63+
64+ // mokutil ile Secure Boot durumunu kontrol et
65+ bool detectSecureBoot () const ;
66+
67+ GpuInfo m_info;
4168};
4269
0 commit comments