#ifndef MENUSCREEN_H
#define MENUSCREEN_H

#include <QColor>
#include <QPushButton>
#include <View/view.h>


class MenuScreenController;

namespace Ui {
class MenuScreen;
}

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

public:

    /*!
     * \brief MenuScreen constructor.
     * \param parent Menu screen parent.
     */
    explicit MenuScreen(QWidget *parent = 0);

    /*!
     * \brief MenuScreen constructor.
     * \param controller Menu screen controller.
     * \param parent Menu screen parent.
     */
    MenuScreen(Controller *controller, QWidget *parent = 0);
    ~MenuScreen();

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

    /*!
     * \brief isTitleOption Returns if the menu has title option.
     * \return \c True if the menu has title position, \c false otherwise.
     */
    bool isTitleOption();

    /*!
     * \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 getBackgroundColor Returns screen background color.
     * \return Background color.
     */
    QString getBackgroundColor();

    /*!
     * \brief getBackgroundImage Returns screen background image.
     * \return Background image.
     */
    QString getBackgroundImage();

    /*!
     * \brief getNumberOfRows Returns the number of rows.
     * \return Number of rows.
     */
    int getNumberOfRows();

    /*!
     * \brief getNumberOfCols Returns the number of columns.
     * \return Number of columns.
     */
    int getNumberOfCols();

    /*!
     * \brief getNumberOfIcons Return the number of icons.
     * \return Number of icons.
     */
    int getNumberOfIcons();

    /*!
     * \brief getWidthView Return the screen width.
     * \return Screen width.
     */
    int getWidthView();

    /*!
     * \brief getHeightView
     * \return
     */
    int getHeightView();

    /*!
     * \brief setEditModel Returns the screen height.
     * \param interfaz Screen height.
     */
    void setEditModel(Interfaz *interfaz);

    /*!
     * \brief finish
     */
    void finish();

private slots:

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

    /*!
     * \brief on_titlePositiveOption_clicked This slot is executed when the title positive radio button is clicked.
     */
    void on_titlePositiveOption_clicked();

    /*!
     * \brief on_titleNegativeOption_clicked This slot is executed when the title negative radio button is clicked.
     */
    void on_titleNegativeOption_clicked();

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

    /*!
     * \brief on_automaticPositionRadio_clicked This slot is executed when the automatic position radio button is clicked.
     */
    void on_automaticPositionRadio_clicked();

    /*!
     * \brief on_customizePositionRadio_clicked This slot is executed when the customize position radio button is clicked.
     */
    void on_customizePositionRadio_clicked();

    /*!
     * \brief on_rowInput_textEdited This slot is executed when the row input is edited.
     */
    void on_rowInput_textEdited();

    /*!
     * \brief on_colInput_textEdited This slot is executed when the column input is edited.
     */
    void on_colInput_textEdited();

    /*!
     * \brief on_plusBtn_clicked This slot is executed when the plus button is clicked.
     */
    void on_plusBtn_clicked();

    /*!
     * \brief on_lessBtn_clicked This slot is executed when the less button is clicked.
     */
    void on_lessBtn_clicked();

    /*!
     * \brief on_heightInput_textEdited This slot is executed when the height input is edited.
     */
    void on_heightInput_textEdited();

    /*!
     * \brief on_widthInput_textEdited This slot is executed when the width input is edited.
     */
    void on_widthInput_textEdited();    

    /*!
     * \brief on_colorBackgroundBtn_clicked This slot is executed when the color background button is clicked.
     * \param checked
     */
    void on_colorBackgroundBtn_clicked(bool checked);

    /*!
     * \brief on_imageBackgroundBtn_clicked This slot is executed when the image background button is clicked.
     * \param checked
     */
    void on_imageBackgroundBtn_clicked(bool checked);    

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

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

    /*!
     * \brief on_numberIconsBox_textEdited This slot is executed when the number of icons are edited.
     * \param arg1
     */
    void on_numberIconsBox_textEdited(const QString &arg1);

    /*!
     * \brief on_positionCombo_activated This slot is executed when the index of combo is edited.
     * \param index
     */
    void on_positionCombo_activated(int index);

private:

    /*!
     * \brief setValidators Sets the validators of the screen inputs.
     */
    void setValidators();    

    /*!
     * \brief hideSizeElements Hides size elements.
     */
    void hideSizeElements();

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

    /*!
     * \brief showSizeElements Shows size elements.
     */
    void showSizeElements();

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

    /*!
     * \brief checkNumberIcons Checks if the number of icons are correct.
     * \param numberOfIcons Number of icons
     */
    void checkNumberIcons(int numberOfIcons);   

    /*!
     * \brief setDefaultIcons Set default icons.
     */
    void setDefaultIcons();

    /*!
     * \brief setDefaultIcon Set default icon.
     * \param button Button to set the icon.
     * \param iconPathOn Path of the button on image.
     * \param iconPathOff Path of the button off image.
     */
    void setDefaultIcon(QPushButton *button, QString iconPathOn, QString iconPathOff);

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

private:

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

};

#endif // MENUSCREEN_H
