mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-08 21:15:26 +00:00
27 lines
390 B
C
27 lines
390 B
C
|
|
||
|
#ifndef METRICS_H
|
||
|
#define METRICS_H
|
||
|
|
||
|
#include <QtGlobal>
|
||
|
|
||
|
class QRect;
|
||
|
class QRectF;
|
||
|
class QFontMetrics;
|
||
|
class QFontMetricsF;
|
||
|
|
||
|
template<typename T> struct Metrics {};
|
||
|
|
||
|
template<> struct Metrics<int>
|
||
|
{
|
||
|
using Rect = QRect;
|
||
|
using FontMetrics = QFontMetrics;
|
||
|
};
|
||
|
|
||
|
template<> struct Metrics<qreal>
|
||
|
{
|
||
|
using Rect = QRectF;
|
||
|
using FontMetrics = QFontMetricsF;
|
||
|
};
|
||
|
|
||
|
#endif //METRICS_H
|