diff --git a/src/widget/paintable.cpp b/src/widget/paintable.cpp index 258a75201ee..a2d337687d3 100644 --- a/src/widget/paintable.cpp +++ b/src/widget/paintable.cpp @@ -15,38 +15,39 @@ // static Paintable::DrawMode Paintable::DrawModeFromString(const QString& str) { - if (str.compare("FIXED", Qt::CaseInsensitive) == 0) { - return FIXED; - } else if (str.compare("STRETCH", Qt::CaseInsensitive) == 0) { - return STRETCH; - } else if (str.compare("STRETCH_ASPECT", Qt::CaseInsensitive) == 0) { - return STRETCH_ASPECT; - } else if (str.compare("TILE", Qt::CaseInsensitive) == 0) { - return TILE; + static const QMap stringMap = { + {"FIXED", DrawMode::Fixed}, + {"STRETCH", DrawMode::Stretch}, + {"STRETCH_ASPECT", DrawMode::StretchAspect}, + {"TILE", DrawMode::Tile}}; + + auto it = stringMap.find(str.toUpper()); + if (it == stringMap.end()) { + qWarning() << "Unknown DrawMode string passed to DrawModeFromString:" + << str << "using DrawMode::Fixed as fallback"; + return DrawMode::Fixed; } - // Fall back on the implicit default from before Mixxx supported draw modes. - qWarning() << "Unknown DrawMode string in DrawModeFromString:" - << str << "using FIXED"; - return FIXED; + return it.value(); } // static QString Paintable::DrawModeToString(DrawMode mode) { - switch (mode) { - case FIXED: - return "FIXED"; - case STRETCH: - return "STRETCH"; - case STRETCH_ASPECT: - return "STRETCH_ASPECT"; - case TILE: - return "TILE"; + static const QMap modeMap = { + {DrawMode::Fixed, "FIXED"}, + {DrawMode::Stretch, "STRETCH"}, + {DrawMode::StretchAspect, "STRETCH_ASPECT"}, + {DrawMode::Tile, "TILE"}}; + + auto it = modeMap.find(mode); + if (it == modeMap.end()) { + qWarning() << "Unknown DrawMode passed to DrawModeToString " + << static_cast(mode) << "using FIXED as fallback"; + DEBUG_ASSERT(false); + return "FIXED"; } - // Fall back on the implicit default from before Mixxx supported draw modes. - qWarning() << "Unknown DrawMode in DrawModeToString " << mode - << "using FIXED"; - return "FIXED"; + + return it.value(); } Paintable::Paintable(const PixmapSource& source, DrawMode mode, double scaleFactor) @@ -72,13 +73,14 @@ Paintable::Paintable(const PixmapSource& source, DrawMode mode, double scaleFact m_pSvg.reset(pSvg.release()); #ifdef __APPLE__ // Apple does Retina scaling behind the scenes, so we also pass a - // Paintable::FIXED image. On the other targets, it is better to - // cache the pixmap. We do not do this for TILE and color schemas. + // DrawMode::Fixed image. On the other targets, it is better to + // cache the pixmap. We do not do this for Tile and color schemas. // which can result in a correct but possibly blurry picture at a // Retina display. This can be fixed when switching to QT5 - if (mode == TILE || WPixmapStore::willCorrectColors()) { + if (mode == DrawMode::Tile || WPixmapStore::willCorrectColors()) { #else - if (mode == TILE || mode == Paintable::FIXED || WPixmapStore::willCorrectColors()) { + if (mode == DrawMode::Tile || mode == DrawMode::Fixed || + WPixmapStore::willCorrectColors()) { #endif // The SVG renderer doesn't directly support tiling, so we render // it to a pixmap which will then get tiled. @@ -162,7 +164,7 @@ void Paintable::draw(const QRectF& targetRect, QPainter* pPainter, } switch (m_drawMode) { - case FIXED: { + case DrawMode::Fixed: { // Only render the minimum overlapping rectangle between the source // and target. QSizeF fixedSize(math_min(sourceRect.width(), targetRect.width()), @@ -172,7 +174,7 @@ void Paintable::draw(const QRectF& targetRect, QPainter* pPainter, drawInternal(adjustedTarget, pPainter, adjustedSource); break; } - case STRETCH_ASPECT: { + case DrawMode::StretchAspect: { qreal sx = targetRect.width() / sourceRect.width(); qreal sy = targetRect.height() / sourceRect.height(); @@ -189,10 +191,10 @@ void Paintable::draw(const QRectF& targetRect, QPainter* pPainter, } break; } - case STRETCH: + case DrawMode::Stretch: drawInternal(targetRect, pPainter, sourceRect); break; - case TILE: + case DrawMode::Tile: drawInternal(targetRect, pPainter, sourceRect); break; } @@ -201,7 +203,7 @@ void Paintable::draw(const QRectF& targetRect, QPainter* pPainter, void Paintable::drawCentered(const QRectF& targetRect, QPainter* pPainter, const QRectF& sourceRect) { switch (m_drawMode) { - case FIXED: { + case DrawMode::Fixed: { // Only render the minimum overlapping rectangle between the source // and target. QSizeF fixedSize(math_min(sourceRect.width(), targetRect.width()), @@ -214,7 +216,7 @@ void Paintable::drawCentered(const QRectF& targetRect, QPainter* pPainter, drawInternal(adjustedTarget, pPainter, adjustedSource); break; } - case STRETCH_ASPECT: { + case DrawMode::StretchAspect: { qreal sx = targetRect.width() / sourceRect.width(); qreal sy = targetRect.height() / sourceRect.height(); @@ -231,10 +233,10 @@ void Paintable::drawCentered(const QRectF& targetRect, QPainter* pPainter, } break; } - case STRETCH: + case DrawMode::Stretch: drawInternal(targetRect, pPainter, sourceRect); break; - case TILE: + case DrawMode::Tile: // TODO(XXX): What's the right behavior here? Draw the first tile at the // center point and then tile all around it based on that? drawInternal(targetRect, pPainter, sourceRect); @@ -247,7 +249,7 @@ void Paintable::drawInternal(const QRectF& targetRect, QPainter* pPainter, // qDebug() << "Paintable::drawInternal" << DrawModeToString(m_draw_mode) // << targetRect << sourceRect; if (m_pPixmap) { - if (m_drawMode == TILE) { + if (m_drawMode == DrawMode::Tile) { // TODO(rryan): Using a source rectangle doesn't make much sense // with tiling. Ignore the source rect and tile our natural size // across the target rect. What's the right general behavior here? @@ -261,7 +263,7 @@ void Paintable::drawInternal(const QRectF& targetRect, QPainter* pPainter, sourceRect.toRect()); } } else if (m_pSvg) { - if (m_drawMode == TILE) { + if (m_drawMode == DrawMode::Tile) { qWarning() << "Tiled SVG should have been rendered to pixmap!"; } else { // NOTE(rryan): QSvgRenderer render does not clip for us -- it diff --git a/src/widget/paintable.h b/src/widget/paintable.h index 1cb9d258543..d9a90c342b0 100644 --- a/src/widget/paintable.h +++ b/src/widget/paintable.h @@ -16,15 +16,15 @@ class QSvgRenderer; // high fidelity. class Paintable { public: - enum DrawMode { + enum class DrawMode { // Draw the image in its native dimensions with no stretching or tiling. - FIXED, + Fixed, // Stretch the image. - STRETCH, + Stretch, // Stretch the image maintaining its aspect ratio. - STRETCH_ASPECT, + StretchAspect, // Tile the image. - TILE + Tile }; Paintable(const PixmapSource& source, DrawMode mode, double scaleFactor); diff --git a/src/widget/wbattery.cpp b/src/widget/wbattery.cpp index d731480119a..c94fe0c8051 100644 --- a/src/widget/wbattery.cpp +++ b/src/widget/wbattery.cpp @@ -24,17 +24,17 @@ void WBattery::setup(const QDomNode& node, const SkinContext& context) { QDomElement backPath = context.selectElement(node, "BackPath"); if (!backPath.isNull()) { setPixmap(&m_pPixmapBack, - context.getPixmapSource(backPath), - context.selectScaleMode(backPath, Paintable::TILE), - context.getScaleFactor()); + context.getPixmapSource(backPath), + context.selectScaleMode(backPath, Paintable::DrawMode::Tile), + context.getScaleFactor()); } QDomElement chargedPath = context.selectElement(node, "PixmapCharged"); if (!chargedPath.isNull()) { setPixmap(&m_pPixmapCharged, - context.getPixmapSource(chargedPath), - context.selectScaleMode(chargedPath, Paintable::TILE), - context.getScaleFactor()); + context.getPixmapSource(chargedPath), + context.selectScaleMode(chargedPath, Paintable::DrawMode::Tile), + context.getScaleFactor()); } int numberStates = context.selectInt(node, "NumberStates"); @@ -50,7 +50,7 @@ void WBattery::setup(const QDomNode& node, const SkinContext& context) { // TODO(XXX) inline SVG support via context.getPixmapSource. QString chargingPath = context.nodeToString(pixmapsCharging); Paintable::DrawMode mode = context.selectScaleMode(pixmapsCharging, - Paintable::TILE); + Paintable::DrawMode::Tile); for (int i = 0; i < m_chargingPixmaps.size(); ++i) { PixmapSource source = context.getPixmapSource(chargingPath.arg(i)); setPixmap(&m_chargingPixmaps[i], source, mode, context.getScaleFactor()); @@ -62,7 +62,7 @@ void WBattery::setup(const QDomNode& node, const SkinContext& context) { // TODO(XXX) inline SVG support via context.getPixmapSource. QString dischargingPath = context.nodeToString(pixmapsDischarging); Paintable::DrawMode mode = context.selectScaleMode(pixmapsDischarging, - Paintable::TILE); + Paintable::DrawMode::Tile); for (int i = 0; i < m_dischargingPixmaps.size(); ++i) { PixmapSource source = context.getPixmapSource(dischargingPath.arg(i)); setPixmap(&m_dischargingPixmaps[i], source, mode, context.getScaleFactor()); @@ -148,7 +148,7 @@ void WBattery::setPixmap(PaintablePointer* ppPixmap, const PixmapSource& source, qDebug() << this << "Error loading pixmap:" << source.getPath(); } else { *ppPixmap = pPixmap; - if (mode == Paintable::FIXED) { + if (mode == Paintable::DrawMode::Fixed) { setFixedSize(pPixmap->size()); } } diff --git a/src/widget/wdisplay.cpp b/src/widget/wdisplay.cpp index fe1bdd8a024..bc0a28b8668 100644 --- a/src/widget/wdisplay.cpp +++ b/src/widget/wdisplay.cpp @@ -26,8 +26,8 @@ void WDisplay::setup(const QDomNode& node, const SkinContext& context) { QDomElement backPathNode = context.selectElement(node, "BackPath"); if (!backPathNode.isNull()) { setPixmapBackground(context.getPixmapSource(backPathNode), - context.selectScaleMode(backPathNode, Paintable::TILE), - context.getScaleFactor()); + context.selectScaleMode(backPathNode, Paintable::DrawMode::Tile), + context.getScaleFactor()); } // Number of states @@ -39,7 +39,7 @@ void WDisplay::setup(const QDomNode& node, const SkinContext& context) { // The implicit default in <1.12.0 was FIXED so we keep it for // backwards compatibility. Paintable::DrawMode pathMode = - context.selectScaleMode(pathNode, Paintable::FIXED); + context.selectScaleMode(pathNode, Paintable::DrawMode::Fixed); for (int i = 0; i < m_pixmaps.size(); ++i) { setPixmap(&m_pixmaps, i, context.makeSkinPath(path.arg(i)), pathMode, context.getScaleFactor()); @@ -52,7 +52,7 @@ void WDisplay::setup(const QDomNode& node, const SkinContext& context) { // The implicit default in <1.12.0 was FIXED so we keep it for // backwards compatibility. Paintable::DrawMode disabledMode = - context.selectScaleMode(disabledNode, Paintable::FIXED); + context.selectScaleMode(disabledNode, Paintable::DrawMode::Fixed); for (int i = 0; i < m_disabledPixmaps.size(); ++i) { setPixmap(&m_disabledPixmaps, i, context.makeSkinPath(disabledPath.arg(i)), @@ -108,7 +108,7 @@ void WDisplay::setPixmap( << "Error loading pixmap:" << filename; } else { (*pPixmaps)[iPos] = pPixmap; - if (mode == Paintable::FIXED) { + if (mode == Paintable::DrawMode::Fixed) { setFixedSize(pPixmap->size()); } } diff --git a/src/widget/wknobcomposed.cpp b/src/widget/wknobcomposed.cpp index 9ad576498c5..a2ba7099bf9 100644 --- a/src/widget/wknobcomposed.cpp +++ b/src/widget/wknobcomposed.cpp @@ -33,7 +33,7 @@ void WKnobComposed::setup(const QDomNode& node, const SkinContext& context) { if (!backPathElement.isNull()) { setPixmapBackground( context.getPixmapSource(backPathElement), - context.selectScaleMode(backPathElement, Paintable::STRETCH), + context.selectScaleMode(backPathElement, Paintable::DrawMode::Stretch), scaleFactor); } @@ -42,7 +42,7 @@ void WKnobComposed::setup(const QDomNode& node, const SkinContext& context) { if (!knobNode.isNull()) { setPixmapKnob( context.getPixmapSource(knobNode), - context.selectScaleMode(knobNode, Paintable::STRETCH), + context.selectScaleMode(knobNode, Paintable::DrawMode::Stretch), scaleFactor); } diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp index 8d77e5ff241..e6e54ccfbe2 100644 --- a/src/widget/wpushbutton.cpp +++ b/src/widget/wpushbutton.cpp @@ -47,7 +47,7 @@ void WPushButton::setup(const QDomNode& node, const SkinContext& context) { // backwards compatibility. setPixmapBackground( backgroundSource, - context.selectScaleMode(backPathNode, Paintable::FIXED), + context.selectScaleMode(backPathNode, Paintable::DrawMode::Fixed), context.getScaleFactor()); } } @@ -97,7 +97,7 @@ void WPushButton::setup(const QDomNode& node, const SkinContext& context) { // The implicit default in <1.12.0 was FIXED so we keep it for // backwards compatibility. Paintable::DrawMode unpressedMode = - stateContext->selectScaleMode(unpressedNode, Paintable::FIXED); + stateContext->selectScaleMode(unpressedNode, Paintable::DrawMode::Fixed); if (!pixmapSource.isEmpty()) { setPixmap(iState, false, pixmapSource, unpressedMode, context.getScaleFactor()); @@ -108,7 +108,7 @@ void WPushButton::setup(const QDomNode& node, const SkinContext& context) { // The implicit default in <1.12.0 was FIXED so we keep it for // backwards compatibility. Paintable::DrawMode pressedMode = - stateContext->selectScaleMode(pressedNode, Paintable::FIXED); + stateContext->selectScaleMode(pressedNode, Paintable::DrawMode::Fixed); if (!pixmapSource.isEmpty()) { setPixmap(iState, true, pixmapSource, pressedMode, context.getScaleFactor()); @@ -265,7 +265,7 @@ void WPushButton::setPixmap(int iState, if (!source.isEmpty()) { qDebug() << "WPushButton: Error loading pixmap:" << source.getPath(); } - } else if (mode == Paintable::FIXED) { + } else if (mode == Paintable::DrawMode::Fixed) { // Set size of widget equal to pixmap size setFixedSize(pPixmap->size()); } diff --git a/src/widget/wslidercomposed.cpp b/src/widget/wslidercomposed.cpp index c080ab9b6e3..52c6c0c60d8 100644 --- a/src/widget/wslidercomposed.cpp +++ b/src/widget/wslidercomposed.cpp @@ -63,7 +63,7 @@ void WSliderComposed::setup(const QDomNode& node, const SkinContext& context) { PixmapSource sourceSlider = context.getPixmapSource(slider); setSliderPixmap( sourceSlider, - context.selectScaleMode(slider, Paintable::FIXED), + context.selectScaleMode(slider, Paintable::DrawMode::Fixed), scaleFactor); } @@ -76,7 +76,7 @@ void WSliderComposed::setup(const QDomNode& node, const SkinContext& context) { // compatibility. setHandlePixmap( sourceHandle, - context.selectScaleMode(handle, Paintable::FIXED), + context.selectScaleMode(handle, Paintable::DrawMode::Fixed), scaleFactor); // Set up the level bar. @@ -183,7 +183,7 @@ void WSliderComposed::setSliderPixmap(const PixmapSource& sourceSlider, m_pSlider = WPixmapStore::getPaintable(sourceSlider, drawMode, scaleFactor); if (!m_pSlider) { qDebug() << "WSliderComposed: Error loading slider pixmap:" << sourceSlider.getPath(); - } else if (drawMode == Paintable::FIXED) { + } else if (drawMode == Paintable::DrawMode::Fixed) { // Set size of widget, using size of slider pixmap setFixedSize(m_pSlider->size()); } @@ -353,10 +353,10 @@ double WSliderComposed::calculateHandleLength() { Paintable::DrawMode mode = m_pHandle->drawMode(); if (m_bHorizontal) { // Stretch the pixmap to be the height of the widget. - if (mode == Paintable::FIXED || mode == Paintable::STRETCH || - mode == Paintable::TILE || m_pHandle->height() == 0.0) { + if (mode == Paintable::DrawMode::Fixed || mode == Paintable::DrawMode::Stretch || + mode == Paintable::DrawMode::Tile || m_pHandle->height() == 0.0) { return m_pHandle->width(); - } else if (mode == Paintable::STRETCH_ASPECT) { + } else if (mode == Paintable::DrawMode::StretchAspect) { const int iHeight = m_pHandle->height(); if (iHeight == 0) { qDebug() << "WSliderComposed: Invalid height."; @@ -368,10 +368,10 @@ double WSliderComposed::calculateHandleLength() { } } else { // Stretch the pixmap to be the width of the widget. - if (mode == Paintable::FIXED || mode == Paintable::STRETCH || - mode == Paintable::TILE || m_pHandle->width() == 0.0) { + if (mode == Paintable::DrawMode::Fixed || mode == Paintable::DrawMode::Stretch || + mode == Paintable::DrawMode::Tile || m_pHandle->width() == 0.0) { return m_pHandle->height(); - } else if (mode == Paintable::STRETCH_ASPECT) { + } else if (mode == Paintable::DrawMode::StretchAspect) { const int iWidth = m_pHandle->width(); if (iWidth == 0) { qDebug() << "WSliderComposed: Invalid width."; diff --git a/src/widget/wspinnybase.cpp b/src/widget/wspinnybase.cpp index 462a744c8d6..a0baf58f70e 100644 --- a/src/widget/wspinnybase.cpp +++ b/src/widget/wspinnybase.cpp @@ -146,8 +146,8 @@ void WSpinnyBase::setup(const QDomNode& node, m_pBgImage = WImageStore::getImage(context.getPixmapSource(backPathElement), context.getScaleFactor()); Paintable::DrawMode bgmode = context.selectScaleMode(backPathElement, - Paintable::FIXED); - if (m_pBgImage && !m_pBgImage->isNull() && bgmode == Paintable::FIXED) { + Paintable::DrawMode::Fixed); + if (m_pBgImage && !m_pBgImage->isNull() && bgmode == Paintable::DrawMode::Fixed) { setFixedSize(m_pBgImage->size()); } else { setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); diff --git a/src/widget/wstatuslight.cpp b/src/widget/wstatuslight.cpp index 8a2540d1966..42af3c4c06b 100644 --- a/src/widget/wstatuslight.cpp +++ b/src/widget/wstatuslight.cpp @@ -40,11 +40,11 @@ void WStatusLight::setup(const QDomNode& node, const SkinContext& context) { if (context.hasNodeSelectElement(node, nodeName, &statusLightNode) || (i == 0 && context.hasNodeSelectElement(node, "PathBack", &statusLightNode)) || (i == 1 && context.hasNodeSelectElement(node, "PathStatusLight", &statusLightNode))) { - setPixmap(i, context.getPixmapSource(statusLightNode), - context.selectScaleMode( - statusLightNode, - Paintable::FIXED), - context.getScaleFactor()); + setPixmap(i, + context.getPixmapSource(statusLightNode), + context.selectScaleMode( + statusLightNode, Paintable::DrawMode::Fixed), + context.getScaleFactor()); } else { m_pixmaps[i].reset(); } @@ -64,7 +64,7 @@ void WStatusLight::setPixmap(int iState, PaintablePointer pPixmap = WPixmapStore::getPaintable(source, mode, scaleFactor); if (pPixmap && !pPixmap->isNull()) { m_pixmaps[iState] = pPixmap; - if (mode == Paintable::FIXED) { + if (mode == Paintable::DrawMode::Fixed) { setFixedSize(pPixmap->size()); } } else { diff --git a/src/widget/wvumeterbase.cpp b/src/widget/wvumeterbase.cpp index 65ae82c0efd..c94309a7979 100644 --- a/src/widget/wvumeterbase.cpp +++ b/src/widget/wvumeterbase.cpp @@ -46,7 +46,7 @@ void WVuMeterBase::setup(const QDomNode& node, const SkinContext& context) { // compatibility. setPixmapBackground( context.getPixmapSource(backPathNode), - context.selectScaleMode(backPathNode, Paintable::FIXED), + context.selectScaleMode(backPathNode, Paintable::DrawMode::Fixed), context.getScaleFactor()); } @@ -55,7 +55,7 @@ void WVuMeterBase::setup(const QDomNode& node, const SkinContext& context) { // compatibility. setPixmaps(context.getPixmapSource(vuNode), bHorizontal, - context.selectScaleMode(vuNode, Paintable::FIXED), + context.selectScaleMode(vuNode, Paintable::DrawMode::Fixed), context.getScaleFactor()); m_iPeakHoldSize = context.selectInt(node, "PeakHoldSize"); @@ -98,7 +98,7 @@ void WVuMeterBase::setPixmapBackground( if (!m_pPixmapBack) { qDebug() << metaObject()->className() << "Error loading background pixmap:" << source.getPath(); - } else if (mode == Paintable::FIXED) { + } else if (mode == Paintable::DrawMode::Fixed) { setFixedSize(m_pPixmapBack->size()); } } diff --git a/src/widget/wvumeterlegacy.cpp b/src/widget/wvumeterlegacy.cpp index 7581cd9b2aa..cd649b0dfb4 100644 --- a/src/widget/wvumeterlegacy.cpp +++ b/src/widget/wvumeterlegacy.cpp @@ -41,7 +41,7 @@ void WVuMeterLegacy::setup(const QDomNode& node, const SkinContext& context) { // compatibility. setPixmapBackground( context.getPixmapSource(backPathNode), - context.selectScaleMode(backPathNode, Paintable::FIXED), + context.selectScaleMode(backPathNode, Paintable::DrawMode::Fixed), context.getScaleFactor()); } @@ -50,7 +50,7 @@ void WVuMeterLegacy::setup(const QDomNode& node, const SkinContext& context) { // compatibility. setPixmaps(context.getPixmapSource(vuNode), bHorizontal, - context.selectScaleMode(vuNode, Paintable::FIXED), + context.selectScaleMode(vuNode, Paintable::DrawMode::Fixed), context.getScaleFactor()); m_iPeakHoldSize = context.selectInt(node, "PeakHoldSize"); @@ -84,7 +84,7 @@ void WVuMeterLegacy::setPixmapBackground( if (!m_pPixmapBack || m_pPixmapBack->isNull()) { qDebug() << metaObject()->className() << "Error loading background pixmap:" << source.getPath(); - } else if (mode == Paintable::FIXED) { + } else if (mode == Paintable::DrawMode::Fixed) { setFixedSize(m_pPixmapBack->size()); } } diff --git a/src/widget/wwidgetgroup.cpp b/src/widget/wwidgetgroup.cpp index 497be95fa29..fa37e43c05a 100644 --- a/src/widget/wwidgetgroup.cpp +++ b/src/widget/wwidgetgroup.cpp @@ -103,7 +103,7 @@ void WWidgetGroup::setup(const QDomNode& node, const SkinContext& context) { if (!backPathNode.isNull()) { setPixmapBackground( context.getPixmapSource(backPathNode), - context.selectScaleMode(backPathNode, Paintable::TILE), + context.selectScaleMode(backPathNode, Paintable::DrawMode::Tile), context.getScaleFactor()); } @@ -113,7 +113,7 @@ void WWidgetGroup::setup(const QDomNode& node, const SkinContext& context) { if (!backPathNodeHighlighted.isNull()) { setPixmapBackgroundHighlighted( context.getPixmapSource(backPathNodeHighlighted), - context.selectScaleMode(backPathNodeHighlighted, Paintable::TILE), + context.selectScaleMode(backPathNodeHighlighted, Paintable::DrawMode::Tile), context.getScaleFactor()); }