added spicy new segfaults
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user