Windows: Implement QPlatformScreen::name()

Change-Id: I04ec91b12936bdcc179b79558ac2285b70281dcd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Friedemann Kleint 2012-01-18 16:48:57 +01:00 committed by Qt by Nokia
parent 2a742eba7a
commit 114079e224
2 changed files with 3 additions and 0 deletions

View File

@ -108,6 +108,7 @@ BOOL QT_WIN_CALLBACK monitorEnumCallback(HMONITOR hMonitor, HDC, LPRECT, LPARAM
data.geometry = QRect(QPoint(info.rcMonitor.left, info.rcMonitor.top), QPoint(info.rcMonitor.right - 1, info.rcMonitor.bottom - 1));
data.availableGeometry = QRect(QPoint(info.rcWork.left, info.rcWork.top), QPoint(info.rcWork.right - 1, info.rcWork.bottom - 1));
data.primary = (info.dwFlags & MONITORINFOF_PRIMARY) != 0;
data.name = QString::fromWCharArray(info.szDevice);
result->append(data);
return TRUE;
}

View File

@ -61,6 +61,7 @@ struct QWindowsScreenData
int depth;
QImage::Format format;
bool primary;
QString name;
};
class QWindowsScreen : public QPlatformScreen
@ -76,6 +77,7 @@ public:
virtual QImage::Format format() const { return m_data.format; }
virtual QSizeF physicalSize() const { return m_data.physicalSizeMM; }
virtual QDpi logicalDpi() const { return m_data.dpi; }
virtual QString name() const { return m_data.name; }
virtual QWindow *topLevelAt(const QPoint &point) const
{ return QWindowsScreen::findTopLevelAt(point, CWP_SKIPINVISIBLE); }