qpa: Expose output names to QScreen

It can be useful for things such as effects.
This commit is contained in:
Vlad Zahorodnii 2020-09-22 19:27:10 +03:00
parent 870b411015
commit 90dce019ad
2 changed files with 6 additions and 0 deletions

View file

@ -64,5 +64,10 @@ qreal Screen::devicePixelRatio() const
return m_screen != -1 ? screens()->scale(m_screen) : 1.0;
}
QString Screen::name() const
{
return m_screen != -1 ? screens()->name(m_screen) : QString();
}
}
}

View file

@ -24,6 +24,7 @@ public:
explicit Screen(int screen);
~Screen() override;
QString name() const override;
QRect geometry() const override;
int depth() const override;
QImage::Format format() const override;