/* This file is part of the KDE project
 * SPDX-FileCopyrightText: 2008 Jan Hambrecht <jaham@gmx.net>
 *
 * SPDX-License-Identifier: LGPL-2.0-or-later
 */

#include "BarnVeeWipeEffectFactory.h"

#include <klocalizedstring.h>

#include "BarnVeeWipeStrategy.h"

#define BarnVeeWipeEffectId "BarnVeeWipeEffect"

BarnVeeWipeEffectFactory::BarnVeeWipeEffectFactory()
: KPrPageEffectFactory( BarnVeeWipeEffectId, i18n( "Barn Vee" ) )
{
    addStrategy( new BarnVeeWipeStrategy( FromTop, "down", false ) );
    addStrategy( new BarnVeeWipeStrategy( FromRight, "left", false ) );
    addStrategy( new BarnVeeWipeStrategy( FromBottom, "top", false ) );
    addStrategy( new BarnVeeWipeStrategy( FromLeft, "right", false ) );
}

BarnVeeWipeEffectFactory::~BarnVeeWipeEffectFactory()
{
}

static const char* const s_subTypes[] = {
    I18N_NOOP( "From Top" ),
    I18N_NOOP( "From Right" ),
    I18N_NOOP( "From Bottom" ),
    I18N_NOOP( "From Left" )
};

QString BarnVeeWipeEffectFactory::subTypeName(int subType) const
{
    if (subType >= 0 && (uint)subType < sizeof s_subTypes / sizeof s_subTypes[0]) {
        return i18n( s_subTypes[subType] );
    } else {
        return i18n( "Unknown subtype" );
    }
}
