#ifndef MENUICONOPTIONS_H
#define MENUICONOPTIONS_H

#include <View/view.h>

class MenuScreenController;

namespace Ui {
class MenuIconOptions;
}

/*!
 * \brief The MenuIconOptions class.
 */
class MenuIconOptions : public View
{
    Q_OBJECT

public:

    /*!
     * \brief MenuIconOptions constructor.
     * \param parent Menu icon option parent.
     */
    explicit MenuIconOptions(QWidget *parent = 0);
    ~MenuIconOptions();

    /*!
     * \brief setEnabledOptions Sets the enabled options.
     * \param hasTitle Wheter the interface has icon title.
     * \param isAutomatic Wheter the interface has automatic position.
     */
    void setEnabledOptions(bool hasTitle, bool isAutomatic);

    /*!
     * \brief setCurrentIcon Sets the number of the current icon.
     * \param iconRow Current icon row.
     * \param iconCol Current icon column.
     */
    void setCurrentIcon(int iconRow, int iconCol);

    /*!
     * \brief setProgress Sets the progess of the create proccess.
     * \param progress Progress.
     */
    void setProgress(int progress);

    /*!
     * \brief getIconTitle Returns the icon title.
     * \return Icon title.
     */
    QString getIconTitle();

    /*!
     * \brief clear Clears the inputs values.
     */
    void clear();

    /*!
     * \brief setController Replaces the menu screen controller.
     * \param controller Menu screen controller.
     */
    void setController(MenuScreenController *controller);

    /*!
     * \brief getTopMargin Returns the icon top margin.
     * \return Top margin.
     */
    int getTopMargin();

    /*!
     * \brief getBottomMargin Returns the icon bottom margin.
     * \return Bottom margin.
     */
    int getBottomMargin();

    /*!
     * \brief getLeftMargin Returns the icon left margin.
     * \return Left margin.
     */
    int getLeftMargin();

    /*!
     * \brief getRigthMargin Returns the icon right margin.
     * \return right margin.
     */
    int getRigthMargin();

    /*!
     * \brief showError Shows an error message.
     * \param error Message to show.
     */
    void showError(QString error);

    /*!
     * \brief showSuccess Shows a success message.
     * \param success Message to show.
     */
    void showSuccess(QString success);

    /*!
     * \brief showInfo Shows an information message.
     * \param info Message to show.
     */
    void showInfo(QString info);

    /*!
     * \brief getIconImage Returns the icon image path.
     * \return Icon image path.
     */
    QString getIconImage();

    /*!
     * \brief setIconInfo Shows the icon information.
     * \param iconPath Icon image path.
     * \param iconTitle Icon title.
     * \param top Icon top margin.
     * \param bottom Icon bottom margin.
     * \param left Icon left margin.
     * \param right Icon right margin.
     */
    void setIconInfo(QString iconPath,QString iconTitle, int top, int bottom, int left, int right);

private slots:

    /*!
     * \brief on_browseBtn_clicked This slot is executed when browse button is clicked.
     */
    void on_browseBtn_clicked();

    /*!
     * \brief on_helpBtn_clicked This slot is executed when help button is clicked.
     */
    void on_helpBtn_clicked();

    /*!
     * \brief on_titleInput_textChanged This slot is executed when title input is changed.
     */
    void on_titleInput_textChanged();

    /*!
     * \brief on_continueBtn_clicked This slot is executed when continue button is clicked.
     */
    void on_continueBtn_clicked();

    /*!
     * \brief on_titleInput_editingFinished This slot is executed when title input is changed.
     */
    void on_titleInput_editingFinished();    

    /*!
     * \brief on_homeBtn_clicked This slot is executed when home button is clicked.
     */
    void on_homeBtn_clicked();

    /*!
     * \brief on_settingsBtn_clicked This slot is executed when settings button is clicked.
     */
    void on_settingsBtn_clicked();

    /*!
     * \brief on_topMarginInput_textEdited This slot is executed when top margin input is changed.
     */
    void on_topMarginInput_textEdited();

    /*!
     * \brief on_rigthMarginInput_textEdited This slot is executed when right margin input is changed.
     */
    void on_rigthMarginInput_textEdited();

    /*!
     * \brief on_bottomMarginInput_textEdited This slot is executed when bottom margin input is changed.
     */
    void on_bottomMarginInput_textEdited();

    /*!
     * \brief on_leftMarginInput_textEdited This slot is executed when left margin input is changed.
     */
    void on_leftMarginInput_textEdited();

    /*!
     * \brief on_plusrightBtn_clicked This slot is executed when plus right margin button is clicked.
     */
    void on_plusrightBtn_clicked();

    /*!
     * \brief on_lessRightBtn_clicked This slot is executed when less right margin button is clicked.
     */
    void on_lessRightBtn_clicked();

    /*!
     * \brief on_plusTopBtn_clicked This slot is executed when plus top margin button is clicked.
     */
    void on_plusTopBtn_clicked();

    /*!
     * \brief on_lessTopBtn_clicked This slot is executed when less top margin button is clicked.
     */
    void on_lessTopBtn_clicked();

    /*!
     * \brief on_plusLeftBtn_clicked This slot is executed when plus left margin button is clicked.
     */
    void on_plusLeftBtn_clicked();

    /*!
     * \brief on_lessLeftBtn_clicked This slot is executed when less left margin button is clicked.
     */
    void on_lessLeftBtn_clicked();

    /*!
     * \brief on_plusBottomBtn_clicked This slot is executed when plus bottom margin button is clicked.
     */
    void on_plusBottomBtn_clicked();

    /*!
     * \brief on_lessBottomBtn_clicked This slot is executed when less bottom margin button is clicked.
     */
    void on_lessBottomBtn_clicked();

    /*!
     * \brief on_hpIconBtn_clicked This slot is executed when back button is clicked.
     */
    void on_hpIconBtn_clicked();

private:

    /*!
     * \brief ui
     */
    Ui::MenuIconOptions *ui;

    /*!
     * \brief setValidators Sets input validators.
     */
    void setValidators();

    /*!
     * \brief initElements Initialices the elements.
     */
    void initElements();

    /*!
     * \brief isFullFill Checks if all of the elements have a value.
     */
    void isFullFill();

    /*!
     * \brief setToolTips Sets the help of the screen buttons.
     */
    void setToolTips();

    /*!
     * \brief setIcon Sets the icon image.
     * \param path Icon image path.
     */
    void setIcon(QString path);

};

#endif // MENUICONOPTIONS_H
