File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,24 @@ QString QuickshellScreenInfo::name() const {
4242 return this ->screen ->name ();
4343}
4444
45+ QString QuickshellScreenInfo::model () const {
46+ if (this ->screen == nullptr ) {
47+ this ->warnDangling ();
48+ return " { NULL SCREEN }" ;
49+ }
50+
51+ return this ->screen ->model ();
52+ }
53+
54+ QString QuickshellScreenInfo::serialNumber () const {
55+ if (this ->screen == nullptr ) {
56+ this ->warnDangling ();
57+ return " { NULL SCREEN }" ;
58+ }
59+
60+ return this ->screen ->serialNumber ();
61+ }
62+
4563qint32 QuickshellScreenInfo::x () const {
4664 if (this ->screen == nullptr ) {
4765 this ->warnDangling ();
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ class QuickshellScreenInfo: public QObject {
2929 // /
3030 // / Usually something like `DP-1`, `HDMI-1`, `eDP-1`.
3131 Q_PROPERTY (QString name READ name CONSTANT);
32+ // / The model of the screen as seen by the operating system.
33+ Q_PROPERTY (QString model READ model CONSTANT);
34+ // / The serial number of the screen as seen by the operating system.
35+ Q_PROPERTY (QString serialNumber READ serialNumber CONSTANT);
3236 Q_PROPERTY (qint32 x READ x NOTIFY geometryChanged);
3337 Q_PROPERTY (qint32 y READ y NOTIFY geometryChanged);
3438 Q_PROPERTY (qint32 width READ width NOTIFY geometryChanged);
@@ -49,6 +53,8 @@ class QuickshellScreenInfo: public QObject {
4953 bool operator ==(QuickshellScreenInfo& other) const ;
5054
5155 [[nodiscard]] QString name () const ;
56+ [[nodiscard]] QString model () const ;
57+ [[nodiscard]] QString serialNumber () const ;
5258 [[nodiscard]] qint32 x () const ;
5359 [[nodiscard]] qint32 y () const ;
5460 [[nodiscard]] qint32 width () const ;
You can’t perform that action at this time.
0 commit comments