~ubuntu-branches/ubuntu/vivid/goldencheetah/vivid-proposed

« back to all changes in this revision

Viewing changes to qwt/src/qwt_scale_map_table.h

  • Committer: Package Import Robot
  • Author(s): Bhavani Shankar
  • Date: 2014-11-16 14:54:01 UTC
  • mfrom: (16.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20141116145401-89v8lm2rayldamnr
Tags: 3.1.0-1ubuntu1
* Resync on debian unstable. Remaining changes:
  + Use libgcrypt11-dev than libgcrypt-dev as it no longer exists.
    (Closes: #769754)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
 
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_SCALE_MAP_TABLE_H
 
11
#define QWT_SCALE_MAP_TABLE_H
 
12
 
 
13
#include "qwt_global.h"
 
14
#include "qwt_scale_map.h"
 
15
#include "qwt_plot.h"
 
16
#include "qwt_axis_id.h"
 
17
#include <qlist.h>
 
18
 
 
19
class QWT_EXPORT QwtScaleMapTable
 
20
{
 
21
public:
 
22
    bool isValid( QwtAxisId ) const;
 
23
    const QwtScaleMap &map( QwtAxisId ) const;
 
24
 
 
25
    QList< QwtScaleMap > maps[ QwtAxis::PosCount ];
 
26
};
 
27
 
 
28
inline bool QwtScaleMapTable::isValid( QwtAxisId axisId ) const
 
29
{
 
30
    if ( axisId.pos >= 0 && axisId.pos < QwtAxis::PosCount && axisId.id >= 0 )
 
31
        return maps[ axisId.pos ].size() > axisId.id;
 
32
 
 
33
    return false;
 
34
}
 
35
 
 
36
inline const QwtScaleMap &QwtScaleMapTable::map( QwtAxisId axisId ) const
 
37
{
 
38
    return maps[ axisId.pos ].at( axisId.id );
 
39
}
 
40
 
 
41
#endif