// bytran -|- spectral calculations for portable devices using the HITRAN database
//
// Developed by Dzianis Pliutau (Denis Plutov) and Kostya Roslyakov
// www.bytran.org | contact@bytran.org
// Copyright (c) 2016 Dzianis Pliutau
// Distributed under the MIT license
//
// The MIT License (MIT)
// Copyright (c) 2016 Dzianis Pliutau
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
// is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
// IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



// Object contains parameters responsible for the vertical axis display and scaling
#ifndef YAXIS_H
#define YAXIS_H

#include <QVector>
#include <QString>

class YAxis
{
public:

    YAxis();

    // Methods to get and set the minimum vertical axis value
    double getMinYPlot();
    void setMinYPlot(double newMinYPlot);

    // Methods to get and set the maximum vertical axis value
    double getMaxYPlot();
    void setMaxYPlot(double newMaxYPlot);

    // Methods to get and set the vertical axis plot units
    int getYPlotUnits();
    void setYPlotUnits(int newYPlotUnits);

    // Method to get the vertical axis title (current units)
    QString getYAxisTitle();

    // Method to convert the vertical axis units from the default to current
    double toCurrentFromDefault(double defaultUnitsValue);

private:

    // Parameters related to the vertical axis display and units
    double minYPlot;   // Minimum value along the vertical axis
    double maxYPlot;   // Maximum value along the vertical axis
    int yPlotUnits;    // Units to display along the verstical axis, 0 - Absorption (%), 1 - Transmission (%), 2 - Optical depth, 3 - Cross-section, m^2

    // Array with the vertical axis titles
    QVector<QString> yAxisTitles;

    // Thesea values are used to calculate the cross-section value from the optical depth value for a given molecule or composite
    // In the case of composite, the partial pressures are the sum of the partical pressures of all molecules present
//    double temp;  // Temperature
//    double partPress;   // Total partial pressure for the composite or the partial pressure for a given molecular component
//    double pathlength;  // Pathlength to scale the optical depth back to the cross-sectional values

};

#endif // YAXIS_H
