Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
qwt_axis.h
1/******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10#ifndef QWT_AXIS_H
11#define QWT_AXIS_H
12
13#include "qwt_global.h"
14
18namespace QwtAxis
19{
22 {
25
28
31
33 XTop
34 };
35
37 enum { AxisPositions = XTop + 1 };
38
39 bool isValid( int axisPos );
40 bool isYAxis( int axisPos );
41 bool isXAxis( int axisPos );
42}
43
45inline bool QwtAxis::isValid( int axisPos )
46{
47 return ( axisPos >= 0 && axisPos < AxisPositions );
48}
49
51inline bool QwtAxis::isXAxis( int axisPos )
52{
53 return ( axisPos == XBottom ) || ( axisPos == XTop );
54}
55
57inline bool QwtAxis::isYAxis( int axisPos )
58{
59 return ( axisPos == YLeft ) || ( axisPos == YRight );
60}
61
62#endif
bool isYAxis(int axisPos)
Definition qwt_axis.h:57
Position
Axis position.
Definition qwt_axis.h:22
@ YRight
Y axis right of the canvas.
Definition qwt_axis.h:27
@ XTop
X axis above the canvas.
Definition qwt_axis.h:33
@ XBottom
X axis below the canvas.
Definition qwt_axis.h:30
@ YLeft
Y axis left of the canvas.
Definition qwt_axis.h:24
bool isValid(int axisPos)
Definition qwt_axis.h:45
bool isXAxis(int axisPos)
Definition qwt_axis.h:51