#ifndef PREPROCESSINGTAB_H
#define PREPROCESSINGTAB_H

#include "RTMTabWidget.h"

#include <QWidget>

class RTMSimulator;
class QLineEdit;
class QCheckBox;
class QDoubleValidator;

/**
 * @brief Creates a tab with several controls for the preprocessing.
 *
 * Preprocessing of the model should be done in advance of starting the simulation.
 * During preprocessing nodes can be removed by sweeping and node specific settings can be made.
 */
class PreprocessingTab : public RTMTabWidget
{
    Q_OBJECT

private:
    RTMSimulator*      m_pSimulator;
    QLineEdit* m_pSweepDistanceFactorEdit;
    QCheckBox* m_pInjectionPointCheckBox;
    QCheckBox* m_pCheckBoxShowSweptNodes;
    QCheckBox* m_pCheckBoxShowNeighbors;
    QCheckBox* m_pCheckBoxShowDirectNeighbors;
    QCheckBox* m_pCheckBoxShowPermeabilityGradient;
    QLineEdit* m_pPermeabilityLineEdit;
    QLineEdit* m_pCavityHeightLineEdit;
    QLineEdit* m_pPorosityLineEdit;
    QLineEdit* m_pInjectionPressureLineEdit;
    QLineEdit* m_pInjectionDiameterLineEdit;
    QDoubleValidator* m_pDiameterValidator;
    QDoubleValidator* m_pSweepDistanceValidator;

public:
    PreprocessingTab(RTMSimulator* simulator, QWidget* parent=0);
    void setShowSweptNodes(Qt::CheckState state);
    void setShowNeighbors(Qt::CheckState state);
    void setShowDirectNeighbors(Qt::CheckState state);
    void setShowPermeabilityGradient(Qt::CheckState state);


private slots:
    void buttonReactivateSweptNodesClicked();

};

#endif //PREPROCESSINGTAB_H
