1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
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
*****************************************************************************/
10
#ifndef QWT_SCALE_MAP_TABLE_H
11
#define QWT_SCALE_MAP_TABLE_H
13
#include "qwt_global.h"
14
#include "qwt_scale_map.h"
16
#include "qwt_axis_id.h"
19
class QWT_EXPORT QwtScaleMapTable
22
bool isValid( QwtAxisId ) const;
23
const QwtScaleMap &map( QwtAxisId ) const;
25
QList< QwtScaleMap > maps[ QwtAxis::PosCount ];
28
inline bool QwtScaleMapTable::isValid( QwtAxisId axisId ) const
30
if ( axisId.pos >= 0 && axisId.pos < QwtAxis::PosCount && axisId.id >= 0 )
31
return maps[ axisId.pos ].size() > axisId.id;
36
inline const QwtScaleMap &QwtScaleMapTable::map( QwtAxisId axisId ) const
38
return maps[ axisId.pos ].at( axisId.id );