- }
-}
-
-wipeInfo EffectStackEdit::getWipeInfo(QString value)
-{
- wipeInfo info;
- QString start = value.section(';', 0, 0);
- QString end = value.section(';', 1, 1).section('=', 1, 1);
-
- if (start.startsWith("-100%,0"))
- info.start = LEFT;
- else if (start.startsWith("100%,0"))
- info.start = RIGHT;
- else if (start.startsWith("0%,100%"))
- info.start = DOWN;
- else if (start.startsWith("0%,-100%"))
- info.start = UP;
- else
- info.start = CENTER;
-
- if (start.count(':') == 2)
- info.startTransparency = start.section(':', -1).toInt();
- else
- info.startTransparency = 100;
-
- if (end.startsWith("-100%,0"))
- info.end = LEFT;
- else if (end.startsWith("100%,0"))
- info.end = RIGHT;
- else if (end.startsWith("0%,100%"))
- info.end = DOWN;
- else if (end.startsWith("0%,-100%"))
- info.end = UP;
- else
- info.end = CENTER;
-
- if (end.count(':') == 2)
- info.endTransparency = end.section(':', -1).toInt();
- else
- info.endTransparency = 100;
-
- return info;
-}
-
-QString EffectStackEdit::getWipeString(wipeInfo info)
-{
-
- QString start;
- QString end;
- switch (info.start) {
- case LEFT:
- start = "-100%,0%:100%x100%";
- break;
- case RIGHT:
- start = "100%,0%:100%x100%";
- break;
- case DOWN:
- start = "0%,100%:100%x100%";
- break;
- case UP:
- start = "0%,-100%:100%x100%";
- break;
- default:
- start = "0%,0%:100%x100%";
- break;
- }
- start.append(':' + QString::number(info.startTransparency));
-
- switch (info.end) {
- case LEFT:
- end = "-100%,0%:100%x100%";
- break;
- case RIGHT:
- end = "100%,0%:100%x100%";
- break;
- case DOWN:
- end = "0%,100%:100%x100%";
- break;
- case UP:
- end = "0%,-100%:100%x100%";
- break;
- default:
- end = "0%,0%:100%x100%";
- break;
- }
- end.append(':' + QString::number(info.endTransparency));
- return QString(start + ";-1=" + end);