added spicy new segfaults

This commit is contained in:
fourtf
2017-01-11 01:08:20 +01:00
parent a8c2b1151f
commit 580a411e9d
22 changed files with 472 additions and 111 deletions
+19
View File
@@ -9,6 +9,13 @@ QFont* Fonts::small = new QFont(DEFAULT_FONT);
QFont* Fonts::large = new QFont(DEFAULT_FONT);
QFont* Fonts::veryLarge = new QFont(DEFAULT_FONT);
QFontMetrics* Fonts::metricsMedium = new QFontMetrics(*medium );
QFontMetrics* Fonts::metricsMediumBold = new QFontMetrics(*mediumBold );
QFontMetrics* Fonts::metricsMediumItalic = new QFontMetrics(*mediumItalic);
QFontMetrics* Fonts::metricsSmall = new QFontMetrics(*small );
QFontMetrics* Fonts::metricsLarge = new QFontMetrics(*large );
QFontMetrics* Fonts::metricsVeryLarge = new QFontMetrics(*veryLarge );
Fonts::Fonts()
{
@@ -25,3 +32,15 @@ QFont& Fonts::getFont(Type type)
return *medium;
}
QFontMetrics& Fonts::getFontMetrics(Type type)
{
if (type == Medium ) return *metricsMedium ;
if (type == MediumBold ) return *metricsMediumBold ;
if (type == MediumItalic) return *metricsMediumItalic;
if (type == Small ) return *metricsSmall ;
if (type == Large ) return *metricsLarge ;
if (type == VeryLarge ) return *metricsVeryLarge ;
return *metricsMedium;
}