12 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
18 #include <QPaintEvent>
45 static void paint(QPainter * painter, QPaintEvent * e,
const double & min,
const double & max,
const GridVector & grid,
47 const bool show_legend,
const String& legend,
const bool shorten_number,
48 const bool is_log,
const bool is_inverse_orientation);
57 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:30
std::vector< std::vector< double > > GridVector
Typedef for the grid vector.
Definition: AxisPainter.h:33
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:37
@ TOP
Definition: AxisPainter.h:38
@ BOTTOM
Definition: AxisPainter.h:39
@ LEFT
Definition: AxisPainter.h:40
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:34
int Int
Signed integer type.
Definition: Types.h:76
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
static String number(double d, UInt n)
Definition: StringUtils.h:191
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22