#include "card.h"

Card::Card()
{

}

void Card::addProperty(QString name, QString value)
{
    propertyNames.append(name);
    propertyValues.append(value);
}

void Card::editProperty(int index, QString name, QString value)
{
    propertyNames.replace(index, name);
    propertyValues.replace(index, value);
}

void Card::removeProperty(int indexProperty)
{
    propertyNames.removeAt(indexProperty);
    propertyValues.removeAt(indexProperty);
}

QStringList Card::getProperty(int indexProperty)
{
    QStringList property;

    property.append(propertyNames.at(indexProperty));
    property.append(propertyValues.at(indexProperty));

    return property;
}

QStringList Card::takeProperty(int indexProperty)
{
    QStringList property = getProperty(indexProperty);
    removeProperty(indexProperty);
    return property;
}

QString Card::getTitle() const
{
    return title;
}

void Card::setTitle(const  QString &value)
{
    title = value;
}

int Card::getNumberOfProperties()
{
    return propertyNames.size();
}

QString Card::getIconImage() const
{
    return iconImage;
}

void Card::setIconImage(const QString &value)
{
    iconImage = value;
}

