qwt_axis.h
/******************************************************************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef QWT_AXIS_H
#define QWT_AXIS_H
#include "qwt_global.h"
namespace QwtAxis
{
enum Position
{
YLeft,
YRight,
XBottom,
XTop
};
enum { AxisPositions = XTop + 1 };
bool isValid( int axisPos );
bool isYAxis( int axisPos );
bool isXAxis( int axisPos );
}
inline bool QwtAxis::isValid( int axisPos )
{
return ( axisPos >= 0 && axisPos < AxisPositions );
}
inline bool QwtAxis::isXAxis( int axisPos )
{
return ( axisPos == XBottom ) || ( axisPos == XTop );
}
inline bool QwtAxis::isYAxis( int axisPos )
{
return ( axisPos == YLeft ) || ( axisPos == YRight );
}
#endif
QwtAxis
Definition: qwt_axis.h:19
QwtAxis::isYAxis
bool isYAxis(int axisPos)
Definition: qwt_axis.h:57
QwtAxis::Position
Position
Axis position.
Definition: qwt_axis.h:22
QwtAxis::YRight
@ YRight
Y axis right of the canvas.
Definition: qwt_axis.h:27
QwtAxis::XTop
@ XTop
X axis above the canvas.
Definition: qwt_axis.h:33
QwtAxis::XBottom
@ XBottom
X axis below the canvas.
Definition: qwt_axis.h:30
QwtAxis::YLeft
@ YLeft
Y axis left of the canvas.
Definition: qwt_axis.h:24
QwtAxis::isValid
bool isValid(int axisPos)
Definition: qwt_axis.h:45
QwtAxis::isXAxis
bool isXAxis(int axisPos)
Definition: qwt_axis.h:51