mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-05 00:09:32 -04:00
* require qwt >=6.2 (and fallback to internal 6.3 if system's qwt doesn't suffice) * debian doesn't have qwt for Qt6 and won't have it for trixie
63 lines
1.4 KiB
C++
63 lines
1.4 KiB
C++
/******************************************************************************
|
|
* 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"
|
|
|
|
/*!
|
|
Enums and methods for axes
|
|
*/
|
|
namespace QwtAxis
|
|
{
|
|
//! \brief Axis position
|
|
enum Position
|
|
{
|
|
//! Y axis left of the canvas
|
|
YLeft,
|
|
|
|
//! Y axis right of the canvas
|
|
YRight,
|
|
|
|
//! X axis below the canvas
|
|
XBottom,
|
|
|
|
//! X axis above the canvas
|
|
XTop
|
|
};
|
|
|
|
//! \brief Number of axis positions
|
|
enum { AxisPositions = XTop + 1 };
|
|
|
|
bool isValid( int axisPos );
|
|
bool isYAxis( int axisPos );
|
|
bool isXAxis( int axisPos );
|
|
}
|
|
|
|
//! \return true, when axisPos is in the valid range [ YLeft, XTop ]
|
|
inline bool QwtAxis::isValid( int axisPos )
|
|
{
|
|
return ( axisPos >= 0 && axisPos < AxisPositions );
|
|
}
|
|
|
|
//! \return true, when axisPos is XBottom or XTop
|
|
inline bool QwtAxis::isXAxis( int axisPos )
|
|
{
|
|
return ( axisPos == XBottom ) || ( axisPos == XTop );
|
|
}
|
|
|
|
//! \return true, when axisPos is YLeft or YRight
|
|
inline bool QwtAxis::isYAxis( int axisPos )
|
|
{
|
|
return ( axisPos == YLeft ) || ( axisPos == YRight );
|
|
}
|
|
|
|
#endif
|