BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
PlotConstants.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/PlotUtil/PlotConstants.h
6 //! @brief Defines various constants for plotting
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_PLOTCONSTANTS_H
16 #define BORNAGAIN_GUI_VIEW_PLOTUTIL_PLOTCONSTANTS_H
17 
19 #include <QSize>
20 
21 namespace GUI::Constants {
22 
24 {
25  return GUI::Util::Style::SystemPointSize() * 0.9;
26 }
27 
29 {
31 }
32 
33 inline int plot_colorbar_size()
34 {
35  return GUI::Util::Style::SizeOfLetterM().width();
36 }
37 
38 } // namespace GUI::Constants
39 
40 #endif // BORNAGAIN_GUI_VIEW_PLOTUTIL_PLOTCONSTANTS_H
Defines GUI::StyleUtils namespace.
int plot_tick_label_size()
Definition: PlotConstants.h:23
int plot_colorbar_size()
Definition: PlotConstants.h:33
int plot_axes_label_size()
Definition: PlotConstants.h:28
int SystemPointSize()
Returns size in points of default system font.
Definition: StyleUtils.cpp:119
QSize SizeOfLetterM(const QWidget *widget=nullptr)
Returns size of largest letter of default system font.
Definition: StyleUtils.cpp:113