#ifndef INFORMATION_H
#define INFORMATION_H
#include <Model/interfaz.h>
#include <Model/card.h>
#include <QVector>

/*!
 * \brief The Information class. Represents Information screens.
 */
class Information : public Interfaz
{
public:
    /*!
     * \brief Information constructor.
     */
    Information();

    /*!
     * \brief getCards Returns list of the information screen cards.
     * \return List of the cards.
     */
    QVector<Card*> *getCards()  ;

    /*!
     * \brief setCards Repalces information screen cards.
     * \param value List of cards.
     */
    void setCards(QVector<Card*> *value);

    /*!
     * \brief createCards Creates a list of empty cards. The size of the list is determined by the numberOfElements value of the Interfaz.
     */
    void createCards();

    /*!
     * \brief addProperty Adds new property to the specified card.
     * \param card Index of the card to add the property.
     * \param property Property name.
     * \param value Property value.
     */
    void addProperty(int card, QString property, QString value);

    /*!
     * \brief addProperty Adds new property to the specified card into the specified property index.
     * \param card Index of the card to add the property.
     * \param propertyIndex Index of the property.
     * \param property Property name.
     * \param value Property value.
     */
    void addProperty(int card, int propertyIndex, QString property, QString value);

    /*!
     * \brief removeProperty Removes the specified property at the specified card.
     * \param card Index of the card.
     * \param indexProperty Index of the property to be removed.
     */
    void removeProperty(int card, int indexProperty);

    /*!
     * \brief hasMaximumOfProoperties Returns if the card admits more properties.
     * \param card Index of the card.
     * \return \c True if the card admits more properties, \c false otherwise.
     */
    int hasMaximumOfProoperties(int card);

    /*!
     * \brief getNumberOfProperties Returns the number of properties in the specified card.
     * \param card Index of the card.
     * \return Number of properties in the specified card.
     */
    int getNumberOfProperties(int card);

    /*!
     * \brief getCardTitle Returns the title of the specified card.
     * \param card Index of the card.
     * \return Title of the specified card.
     */
    QString getCardTitle(int card);

    /*!
     * \brief setCardTitle Replaces the title of the specified card.
     * \param card Index of the card.
     * \param title Title of the card.
     */
    void setCardTitle(int card, QString title);

    /*!
     * \brief getCardImage Returns the image path of the specified card.
     * \param card Index of the card.
     * \return Image path of the specified card.
     */
    QString getCardImage(int card);

    /*!
     * \brief setCardImage Raplaces the image path of the specified card.
     * \param card Index of the card.
     * \param path Image path.
     */
    void setCardImage(int card, QString path);

    /*!
     * \brief takeProperty Returns and remove the speficied property at the card.
     * \param card Index of the card.
     * \param indexProperty Index of the property.
     * \return Property at the specified position in the card.
     */
    QStringList takeProperty(int card, int indexProperty);

    /*!
     * \brief getProperty Returns the specified property at the card.
     * \param card Index of the card.
     * \param indexProperty Index of the property.
     * \return Property at the specified position in the card.
     */
    QStringList getProperty(int card, int indexProperty);

    /*!
     * \brief getCardCols Returns the maximum number of columns in the cards.
     * \return Number of columns in the cards.
     */
    int getCardCols()  ;

    /*!
     * \brief setCardCols Raplaces the number of columns in the cards.
     * \param value Number of columns.
     */
    void setCardCols(int value);

    /*!
     * \brief getCardRows Returns the maximum number of rows in the cards.
     * \return Number of rows in the cards.
     */
    int getCardRows()  ;

    /*!
     * \brief setCardRows Replaces the number of rows in the cards.
     * \param value Number of rows.
     */
    void setCardRows(int value);

    /*!
     * \brief addEmptyLeftProperties Adds empty properties until the maximum number of properties in the card is reached.
     * \param card Index of the card.
     */
    void addEmptyLeftProperties(int card);

    /*!
     * \brief resizeNumberOfCards Appends or removes cards in order not to exceed the maximum number of cards.
     */
    void resizeNumberOfCards();

    /*!
     * \brief resizeNumberOfProperties Appends of removes properties in order not to exceed the maximum number of properties.
     */
    void resizeNumberOfProperties();

private:   

    /*!
     * \brief cardCols Maximum columns card number.
     */
    int cardCols;

    /*!
     * \brief cardRows Maximum rows card number.
     */
    int cardRows;

    /*!
     * \brief cards List of cards in the interface.
     */
    QVector<Card*> *cards;
};

#endif // INFORMATION_H
