#ifndef INFORMATIONSCREEN_H
#define INFORMATIONSCREEN_H

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

class InformationScreenController;

namespace Ui {
class InformationScreen;
}

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

public:
    /*!
     * \brief InformationScreen constructor.
     * \param parent Information screen parent widget.
     */
    explicit InformationScreen(QWidget *parent = 0);

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

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

    /*!
     * \brief getHasIcons Returns if the screen has icons.
     * \return \c True if the screen has icons, \c false otherwise.
     */
    bool getHasIcons();

    /*!
     * \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 Returns the screen height.
     * \return Screen height.
     */
    int getHeightView();

    /*!
     * \brief getBackgroundColor Returns screen background color.
     * \return Background color.
     */
    QColor getBackgroundColor();

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

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

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

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

    /*!
     * \brief setEditModel Specifies the values of the information screen properties.
     * \param interfaz Interface model.
     */
    void setEditModel(Interfaz *interfaz);

    /*!
     * \brief changePositionCombo Changes the index of the position combo.
     * \param pos Index to change.
     * \param row Number of rows.
     * \param col Number of columns.
     */
    void changePositionCombo(int pos, int row, int col);

    /*!
     * \brief getCardRows Returns the number of card rows.
     * \return Card rows.
     */
    int getCardRows();

    /*!
     * \brief getCardCols Returns the number of card columns.
     * \return Card columns.
     */
    int getCardCols();

private slots:

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

    /*!
     * \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_continueBtn_clicked This slot is executed when the continue button is clicked.
     */
    void on_continueBtn_clicked();

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

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

    /*!
     * \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_rowInput_textEdited This slot is executed when the number of rows is edited.
     */
    void on_rowInput_textEdited();

    /*!
     * \brief on_colInput_textEdited This slot is executed when the number of columns is edited.
     */
    void on_colInput_textEdited();

    /*!
     * \brief on_iconPositiveOption_clicked This slot is executed when the positive icon button is clicked.
     */
    void on_iconPositiveOption_clicked();

    /*!
     * \brief on_iconNegativeOption_clicked This slot is executed when the negative icon button is clicked.
     */
    void on_iconNegativeOption_clicked();        

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

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

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

    /*!
     * \brief on_heightInput_textEdited This slot is executed when the height is edited.
     * \param arg1
     */
    void on_heightInput_textEdited(const QString &arg1);

    /*!
     * \brief on_widthInput_textEdited This slot is executed when the width is edited.
     * \param arg1
     */
    void on_widthInput_textEdited(const QString &arg1);

    /*!
     * \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 hideSizeElements Hides size elements.
     */
    void hideSizeElements();

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

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

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

    /*!
     * \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 setValidators Sets the validators of the screen inputs.
     */
    void setValidators();

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

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

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

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

private:

    /*!
     * \brief ui
     */
    Ui::InformationScreen *ui;
};

#endif // INFORMATIONSCREEN_H
