void LegendItem::applyDefaults() { _auto = dialogDefaults().value(defaultsGroupName()+"/auto",true).toBool(); _color = dialogDefaults().value(defaultsGroupName()+"/color",QColor(Qt::black)).value<QColor>(); QFont font; font.fromString(dialogDefaults().value(defaultsGroupName()+"/font",font.toString()).toString()); setLegendFont(font); setFontScale(dialogDefaults().value(defaultsGroupName()+"/fontScale", 12.0).toDouble()); _verticalDisplay = dialogDefaults().value(defaultsGroupName()+"/verticalDisplay",true).toBool(); }
QFontEngineS60::QFontEngineS60(const QFontDef &request, const QFontEngineS60Extensions *extensions) : m_extensions(extensions) , m_originalFont(0) , m_originalFontSizeInPixels((request.pixelSize >= 0)? request.pixelSize:pointsToPixels(request.pointSize)) , m_scaledFont(0) , m_scaledFontSizeInPixels(0) , m_activeFont(0) { QFontEngine::fontDef = request; setFontScale(1.0); cache_cost = sizeof(QFontEngineS60); }
void Amarok::OSD::applySettings() { DEBUG_BLOCK setAlignment( static_cast<OSDWidget::Alignment>( AmarokConfig::osdAlignment() ) ); setDuration( AmarokConfig::osdDuration() ); setEnabled( AmarokConfig::osdEnabled() ); setOffset( AmarokConfig::osdYOffset() ); setScreen( AmarokConfig::osdScreen() ); setFontScale( AmarokConfig::osdFontScaling() ); setHideWhenFullscreenWindowIsActive( AmarokConfig::osdHideOnFullscreen() ); if( AmarokConfig::osdUseCustomColors() ) setTextColor( AmarokConfig::osdTextColor() ); else unsetColors(); setTranslucent( AmarokConfig::osdUseTranslucency() ); }
void LegendItem::setFont(const QFont &f, const QColor &c) { setLegendColor(c); setLegendFont(f); setFontScale(f.pointSize()); }
void GLText::setFontSize(int size) { fontSize = size; setFontScale(size/100.0, size/100.0); }
/*************************** Methods of class GLText: ***************************/ GLText::GLText(void) :fontType(FL_SCREEN),fontSize(12) { setFontColor(0.0, 0.0, 0.0); setFontScale(0.1, 0.1); }