summaryrefslogtreecommitdiffstats
path: root/src/core/type_conversion.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/type_conversion.h')
-rw-r--r--src/core/type_conversion.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index 96b4ecadc..7b1f1b4d6 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -172,6 +172,11 @@ inline gfx::SizeF toGfx(const QSizeF& size)
return gfx::SizeF(size.width(), size.height());
}
+inline gfx::Rect toGfx(const QRect &rect)
+{
+ return gfx::Rect(rect.x(), rect.y(), rect.width(), rect.height());
+}
+
inline QSizeF toQt(const gfx::SizeF &size)
{
return QSizeF(size.width(), size.height());