mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
Exclude QtQuick for now
This commit is contained in:
parent
cea65ba9b2
commit
3177e76229
@ -7,7 +7,7 @@ ccache -S
|
||||
|
||||
cmake -GNinja \
|
||||
-DUSE_CCACHE=ON \
|
||||
-DWITH_QUICK=ON \
|
||||
-DWITH_QUICK=OFF \
|
||||
-DWITH_3D=ON \
|
||||
-DWITH_STAGED_PLUGINS=ON \
|
||||
-DWITH_GRASS=OFF \
|
||||
|
@ -14,8 +14,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include <QApplication>
|
||||
#include <QWindow>
|
||||
#include <QScreen>
|
||||
#include <QDesktopWidget>
|
||||
#include <QString>
|
||||
|
||||
#include "qgis.h"
|
||||
@ -335,12 +334,11 @@ void QgsQuickUtils::formatToUSCSDistance( double srcDistance,
|
||||
|
||||
QString QgsQuickUtils::dumpScreenInfo() const
|
||||
{
|
||||
// take the first top level window
|
||||
QScreen *screen = QGuiApplication::topLevelWindows().at( 0 )->screen();
|
||||
double dpiX = screen->physicalDotsPerInchX();
|
||||
double dpiY = screen->physicalDotsPerInchY();
|
||||
int height = screen->geometry().height();
|
||||
int width = screen->geometry().width();
|
||||
QRect rec = QApplication::desktop()->screenGeometry();
|
||||
int dpiX = QApplication::desktop()->physicalDpiX();
|
||||
int dpiY = QApplication::desktop()->physicalDpiY();
|
||||
int height = rec.height();
|
||||
int width = rec.width();
|
||||
double sizeX = static_cast<double>( width ) / dpiX * 25.4;
|
||||
double sizeY = static_cast<double>( height ) / dpiY * 25.4;
|
||||
|
||||
@ -393,9 +391,8 @@ qreal QgsQuickUtils::screenDensity() const
|
||||
qreal QgsQuickUtils::calculateScreenDensity()
|
||||
{
|
||||
// calculate screen density for calculation of real pixel sizes from density-independent pixels
|
||||
QScreen *screen = QGuiApplication::topLevelWindows().at( 0 )->screen();
|
||||
double dpiX = screen->physicalDotsPerInchX();
|
||||
double dpiY = screen->physicalDotsPerInchY();
|
||||
int dpiX = QApplication::desktop()->physicalDpiX();
|
||||
int dpiY = QApplication::desktop()->physicalDpiY();
|
||||
int dpi = dpiX < dpiY ? dpiX : dpiY; // In case of asymmetrical DPI. Improbable
|
||||
return dpi / 160.; // 160 DPI is baseline for density-independent pixels in Android
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user