38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
44 #include <QPaintEvent>
71 static void paint(QPainter * painter, QPaintEvent * e,
const double & min,
const double & max,
const GridVector & grid,
73 const bool show_legend,
const String& legend,
const bool shorten_number,
74 const bool is_log,
const bool is_inverse_orientation);
83 static double scale_(
double x,
bool is_log);
Draws a coordinate axis. It has only static methods, that's why the constructor is private.
Definition: AxisPainter.h:56
std::vector< std::vector< double > > GridVector
Typedef for the grid vector.
Definition: AxisPainter.h:59
static void paint(QPainter *painter, QPaintEvent *e, const double &min, const double &max, const GridVector &grid, const Int width, const Int height, const Alignment alignment, const UInt margin, const bool show_legend, const String &legend, const bool shorten_number, const bool is_log, const bool is_inverse_orientation)
Draws an axis.
AxisPainter()
Constructor: only static methods.
static void getShortenedNumber_(QString &short_num, double number)
sets short_num to a shortened string representation ("123.4 k/M/G") of number
Alignment
Where the axis is placed.
Definition: AxisPainter.h:63
@ TOP
Definition: AxisPainter.h:64
@ BOTTOM
Definition: AxisPainter.h:65
@ LEFT
Definition: AxisPainter.h:66
static double scale_(double x, bool is_log)
Round to 8 significant digits after comma (and apply log scaling)
A more convenient string class.
Definition: String.h:60
int Int
Signed integer type.
Definition: Types.h:102
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
static String number(double d, UInt n)
Definition: StringUtils.h:217
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48