2021-12-26 11:57:02 +00:00
|
|
|
/******************************************************************************
|
|
|
|
* QSkinny - Copyright (C) 2016 Uwe Rathmann
|
|
|
|
* This file may be used under the terms of the QSkinny License, Version 1.0
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef QSK_PLATFORM_H
|
|
|
|
#define QSK_PLATFORM_H
|
|
|
|
|
|
|
|
#include "QskGlobal.h"
|
|
|
|
|
|
|
|
class QScreen;
|
|
|
|
class QPlatformIntegration;
|
2023-04-05 07:52:23 +00:00
|
|
|
class QPlatformTheme;
|
2021-12-26 11:57:02 +00:00
|
|
|
class QRect;
|
|
|
|
|
|
|
|
QSK_EXPORT qreal qskGlobalScaleFactor();
|
|
|
|
|
|
|
|
QSK_EXPORT bool qskMaybeDesktopPlatform();
|
|
|
|
QSK_EXPORT QRect qskPlatformScreenGeometry( const QScreen* );
|
|
|
|
|
2023-04-05 07:52:23 +00:00
|
|
|
QSK_EXPORT const QPlatformIntegration* qskPlatformIntegration();
|
|
|
|
QSK_EXPORT const QPlatformTheme* qskPlatformTheme();
|
|
|
|
|
2023-03-05 10:52:42 +00:00
|
|
|
/*
|
|
|
|
One dp is a virtual pixel unit that's roughly equal to one pixel
|
|
|
|
on a medium-density screen ( 160 dpi ).
|
|
|
|
|
|
|
|
see: https://en.wikipedia.org/wiki/Device-independent_pixel
|
|
|
|
*/
|
|
|
|
|
|
|
|
QSK_EXPORT qreal qskDpToPixelsFactor();
|
|
|
|
|
|
|
|
inline qreal qskDpToPixels( qreal value )
|
|
|
|
{
|
|
|
|
static qreal factor = -1.0;
|
|
|
|
|
|
|
|
if ( factor < 0.0 )
|
|
|
|
factor = qskDpToPixelsFactor();
|
|
|
|
|
|
|
|
return value * factor;
|
|
|
|
}
|
|
|
|
|
2021-12-26 11:57:02 +00:00
|
|
|
#endif
|