#ifndef MENU_H
#define MENU_H

#include <Model/interfaz.h>
#include <QColor>
#include <QVector>

/*!
 * \brief The Menu class. Represents menu screens.
 */
class Menu : public Interfaz
{    
public:

    /*!
     * \brief Menu constructor.
     */
    Menu();

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

    /*!
     * \brief isAutomaticPosition Returns if the icons in the menu have autmatic position.
     * \return \c True if the icons have automatic position, \c false otherwise.
     */
    bool isAutomaticPosition()  ;

    /*!
     * \brief setAutomaticPosition Specifies if the icons have automatic position.
     * \param value Wheter the icons have aumatic positon.
     */
    void setAutomaticPosition(bool value);

    /*!
     * \brief isTitleEnabled Returns if the icons have title.
     * \return \c True if the icons have title, \c false otherwise.
     */
    bool isTitleEnabled()  ;

    /*!
     * \brief setHasTitle Specifies if the icons have title.
     * \param value Wheter the icons have title.
     */
    void setHasTitle(bool value);

    /*!
     * \brief setIconPath Specifies the image path of the speficied icon.
     * \param positionIcon Index of the icon.
     * \param path Image path.
     */
    void setIconPath(int positionIcon, const QString path)  ;

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

    /*!
     * \brief setIconTitle Speficies the title of the speficied icon.
     * \param positionIcon Index of the icon.
     * \param title Title.
     */
    void setIconTitle(int positionIcon, QString title);

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

    /*!
     * \brief getIcons Returns icons list.
     * \return List of the menu icons.
     */
    QVector<Icon*> *getIcons()  ;

    /*!
     * \brief setIcons Replaces the icons in the menu.
     * \param value List of the menu icons.
     */
    void setIcons(QVector<Icon*> *value);

    /*!
     * \brief setIconTopMargin Replaces the top margin of the specified icon.
     * \param positionIcon Index of the icon.
     * \param topMargin Top margin.
     */
    void setIconTopMargin(int positionIcon, int topMargin);

    /*!
     * \brief getIconTopMargin Returns the top margin of the specified icon.
     * \param positionIcon Index of the icon.
     * \return Top margin.
     */
    int getIconTopMargin(int positionIcon);

    /*!
     * \brief setIconBottomMargin Replaces the bottom margin of the specified icon.
     * \param positionIcon Index of icon.
     * \param bottomMargin Bottom margin.
     */
    void setIconBottomMargin(int positionIcon, int bottomMargin);

    /*!
     * \brief getIconBottomMargin Returns the bottom margin of the specified icon.
     * \param positionIcon Index of icon.
     * \return Bottom margin.
     */
    int getIconBottomMargin(int positionIcon);

    /*!
     * \brief setIconLeftMargin Replaces the left margin of the specified icon.
     * \param positionIcon Index of icon.
     * \param leftMargin Left margin.
     */
    void setIconLeftMargin(int positionIcon, int leftMargin);

    /*!
     * \brief getIconLeftMargin Returns the left margin of the specified icon.
     * \param positionIcon Index of icon.
     * \return Left margin.
     */
    int getIconLeftMargin(int positionIcon);

    /*!
     * \brief setIconRightMargin Replaces the right margin of the specified icon.
     * \param positionIcon Index of icon.
     * \param rigthMargin Right margin.
     */
    void setIconRightMargin(int positionIcon, int rigthMargin);

    /*!
     * \brief getIconRightMargin Returns the right margin of the specified icon.
     * \param positionIcon Index of icon.
     * \return Right margin.
     */
    int getIconRightMargin(int positionIcon);

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

    /*!
     * \brief getCustomPositionModified Returns if the icons position have had modified
     * \return \c True if the position have been modified, \c false otherwise.
     */
    bool getCustomPositionModified() const;

private:

    /*!
     * \brief icons Menu icons.
     */
    QVector<Icon*> *icons;

    /*!
     * \brief automaticPosition Wheter the icons have automatic position.
     */
    bool automaticPosition;

    /*!
     * \brief customPositionModified Whether the icons position have had modified.
     */
    bool customPositionModified;

    /*!
     * \brief hasTitle Wheter the icons have title.
     */
    bool hasTitle;

};

#endif // MENU_H
