//  ************************************************************************************************
//
//  BornAgain: simulate and fit reflection and scattering
//
//! @file      GUI/Model/Axis/AmplitudeAxisItem.h
//! @brief     Defines various axis items.
//!
//! @homepage  http://www.bornagainproject.org
//! @license   GNU General Public License v3 or higher (see COPYING)
//! @copyright Forschungszentrum Jülich GmbH 2018
//! @authors   Scientific Computing Group at MLZ (see CITATION, AUTHORS)
//
//  ************************************************************************************************

#ifndef BORNAGAIN_GUI_MODEL_AXIS_AMPLITUDEAXISITEM_H
#define BORNAGAIN_GUI_MODEL_AXIS_AMPLITUDEAXISITEM_H

#include "GUI/Model/Axis/BasicAxisItem.h"

class AmplitudeAxisItem : public BasicAxisItem {
    Q_OBJECT
public:
    explicit AmplitudeAxisItem(QObject* parent = nullptr);

    void writeTo(QXmlStreamWriter* w) const override;
    void readFrom(QXmlStreamReader* r) override;

    bool isLogScale() const { return m_log_scale; }
    void setLogScale(bool value);

    bool isLocked() const { return m_lock_min_max; }
    void setLocked(bool locked);

    double logRangeOrders() const { return m_log_range_orders; }
    void setLogRangeOrders(double v);
    void adjustLogRangeOrders();

signals:
    void logScaleChanged(bool isLog);

private:
    bool m_lock_min_max;
    bool m_log_scale;
    double m_log_range_orders;
};

#endif // BORNAGAIN_GUI_MODEL_AXIS_AMPLITUDEAXISITEM_H
