- // check if it is a fade effect
- if (effectId == "fadein") {
- needRepaint = true;
- if (m_effectList.hasEffect(QString(), "fade_from_black") == -1) {
- if (e.attribute("name") == "out") fade += e.attribute("value").toInt();
- else if (e.attribute("name") == "in") fade -= e.attribute("value").toInt();
- } else {
- QDomElement fadein = m_effectList.getEffectByTag(QString(), "fade_from_black");
- if (fadein.attribute("name") == "out") fade += fadein.attribute("value").toInt();
- else if (fadein.attribute("name") == "in") fade -= fadein.attribute("value").toInt();
- }
- } else if (effectId == "fade_from_black") {
- needRepaint = true;
- if (m_effectList.hasEffect(QString(), "fadein") == -1) {
- if (e.attribute("name") == "out") fade += e.attribute("value").toInt();
- else if (e.attribute("name") == "in") fade -= e.attribute("value").toInt();
- } else {
- QDomElement fadein = m_effectList.getEffectByTag(QString(), "fadein");
- if (fadein.attribute("name") == "out") fade += fadein.attribute("value").toInt();
- else if (fadein.attribute("name") == "in") fade -= fadein.attribute("value").toInt();
- }
- } else if (effectId == "fadeout") {
- needRepaint = true;
- if (m_effectList.hasEffect(QString(), "fade_to_black") == -1) {
- if (e.attribute("name") == "out") fade -= e.attribute("value").toInt();
- else if (e.attribute("name") == "in") fade += e.attribute("value").toInt();
- } else {
- QDomElement fadeout = m_effectList.getEffectByTag(QString(), "fade_to_black");
- if (fadeout.attribute("name") == "out") fade -= fadeout.attribute("value").toInt();
- else if (fadeout.attribute("name") == "in") fade += fadeout.attribute("value").toInt();
- }
- } else if (effectId == "fade_to_black") {
- needRepaint = true;
- if (m_effectList.hasEffect(QString(), "fadeout") == -1) {
- if (e.attribute("name") == "out") fade -= e.attribute("value").toInt();
- else if (e.attribute("name") == "in") fade += e.attribute("value").toInt();
- } else {
- QDomElement fadeout = m_effectList.getEffectByTag(QString(), "fadeout");
- if (fadeout.attribute("name") == "out") fade -= fadeout.attribute("value").toInt();
- else if (fadeout.attribute("name") == "in") fade += fadeout.attribute("value").toInt();
- }
- }