#ifndef SETTINGS_H
#define SETTINGS_H

#include <View/view.h>

namespace Ui {
class Settings;
}

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

public:

    /*!
     * \brief Settings contructor.
     * \param parent Settings parent widget.
     */
    explicit Settings(QWidget *parent = 0);
    ~Settings();

    /*!
     * \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 getDefaultDir Returns the default folder path.
     * \return Folder path.
     */
    QString getDefaultDir();

    /*!
     * \brief setDefaultDir Sets the default folder path.
     * \param path Folder path.
     */
    void setDefaultDir(QString path);

    /*!
     * \brief setAlwaysAsk Sets always ask value.
     * \param value Whether always ask is checked.
     */
    void setAlwaysAsk(bool value);

    /*!
     * \brief getAlwaysAsk Returns if the always ask is checked.
     * \return \c True if always ask is checked, \c false otherwise.
     */
    bool getAlwaysAsk();

    /*!
     * \brief retranslate Retranslates setttings view.
     */
    void retranslate();

    /*!
     * \brief setSpanishLanguage Sets spanish language as default language
     */
    void setSpanishLanguage();

    /*!
     * \brief setEnglishLanguage Sets english language as default language
     */
    void setEnglishLanguage();


private slots:

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

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

    /*!
     * \brief on_alwaysAskRadio_clicked  This slot is executed when always ask button is clicked.
     * \param checked Whether always ask button is checked.
     */
    void on_alwaysAskRadio_clicked(bool checked);

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

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

    /*!
     * \brief on_browserDirInput_textEdited  This slot is executed when browse folder input is edited.
     */
    void on_browserDirInput_textEdited();

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

    /*!
     * \brief on_spanishRadio_clicked  This slot is executed when spanish radio button is clicked.
     */
    void on_spanishRadio_clicked();

    /*!
     * \brief on_englishRadio_clicked This slot is executed when english radio button is clicked.
     */
    void on_englishRadio_clicked();

private:

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

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

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

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

    /*!
     * \brief alwaysAskOptions Sets always ask options
     * \param checked Whether always ask is checked.
     */
    void alwaysAskOptions(bool checked);

    /*!
     * \brief setToolTips Sets buttons help.
     */
    void setToolTips();
};

#endif // SETTINGS_H
