BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
RangeUtils.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/PlotUtil/RangeUtils.h
6 //! @brief Defines RangeUtils namespace
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_VIEW_PLOTUTIL_RANGEUTILS_H
16 #define BORNAGAIN_GUI_VIEW_PLOTUTIL_RANGEUTILS_H
17 
18 #include <QMap>
19 #include <QMargins>
20 #include <QString>
21 #include <qcustomplot.h>
22 
23 class IntensityDataItem;
24 class ColorMap;
25 
26 //! Provides few helper functions for ColorMapPlot.
27 
29 
30 QCPColorGradient getGradient(const QString& gradientName);
31 QCPColorGradient itemGradient(const IntensityDataItem* item);
32 
33 //! Returns x-axis range.
34 QCPRange itemXrange(const IntensityDataItem* item);
35 
36 //! Returns x-axis vizible range (zoom).
37 QCPRange itemZoomX(const IntensityDataItem* item);
38 
39 //! Returns y-axis range.
40 QCPRange itemYrange(const IntensityDataItem* item);
41 
42 //! Returns y-axis vizible range (zoom).
43 QCPRange itemZoomY(const IntensityDataItem* item);
44 
45 //! Returns z-axis data range.
46 QCPRange itemDataRange(const IntensityDataItem* item);
47 
48 //! Returns z-axis visible range (zoom).
49 QCPRange itemDataZoom(const IntensityDataItem* item);
50 
51 void setLogz(QCPColorScale* scale, bool isLogz);
52 void setLogz(QCPAxis* axis, bool isLogz);
53 
54 //! Sets default margins for axes rectangle plot.
55 void setDefaultMargins(QCustomPlot* customPlot);
56 
57 } // namespace GUI::View::RangeUtils
58 
59 #endif // BORNAGAIN_GUI_VIEW_PLOTUTIL_RANGEUTILS_H
The ColorMap class presents 2D intensity data from IntensityDataItem as color map.
Definition: ColorMap.h:36
Provides few helper functions for ColorMapPlot.
Definition: RangeUtils.h:28
QCPRange itemYrange(const IntensityDataItem *item)
Returns y-axis range.
Definition: RangeUtils.cpp:89
QCPColorGradient itemGradient(const IntensityDataItem *item)
Definition: RangeUtils.cpp:74
QCPRange itemZoomY(const IntensityDataItem *item)
Returns y-axis vizible range (zoom).
Definition: RangeUtils.cpp:94
void setLogz(QCPColorScale *scale, bool isLogz)
Definition: RangeUtils.cpp:110
QCPColorGradient getGradient(const QString &gradientName)
Definition: RangeUtils.cpp:64
void setDefaultMargins(QCustomPlot *customPlot)
Sets default margins for axes rectangle plot.
Definition: RangeUtils.cpp:138
QCPRange itemXrange(const IntensityDataItem *item)
Returns x-axis range.
Definition: RangeUtils.cpp:79
QCPRange itemDataRange(const IntensityDataItem *item)
Returns z-axis data range.
Definition: RangeUtils.cpp:99
QCPRange itemDataZoom(const IntensityDataItem *item)
Returns z-axis visible range (zoom).
Definition: RangeUtils.cpp:105
QCPRange itemZoomX(const IntensityDataItem *item)
Returns x-axis vizible range (zoom).
Definition: RangeUtils.cpp:84