/usr/include/Wt/Chart/WGridData is in libwt-dev 3.3.3+dfsg-4.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2013 Emweb bvba, Leuven, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef CHART_WGRIDDATA_H
#define CHART_WGRIDDATA_H
#include <Wt/Chart/WAbstractGridData>
#include <Wt/Chart/WCartesian3DChart>
#include <Wt/WPen>
namespace Wt {
class WAbstractItemModel;
class WMemoryResource;
namespace Chart {
class WCartesian3DChart;
/*! \class WGridData
* \brief Class representing grid-based data for a 3D chart.
*
* General information can be found at WAbstractDataSeries3D. The model for
* this dataseries is structured as a table. One of the columns (by default
* index 0) contains the x-axis values, one of the rows (by default index 0)
* contains the y-axis values. All other values in the table contain the
* z-value corresponding to the x- and y-values with the same column- and
* row-index.
*
* \ingroup charts
*/
class WT_API WGridData : public WAbstractGridData {
public:
/*! \brief Constructor
*/
WGridData(WAbstractItemModel *model);
virtual ~WGridData();
virtual double minimum(Axis axis) const;
virtual double maximum(Axis axis) const;
/*! \brief Set which column in the model is used as x-axis.
*
* The default column that is used has index 0.
*/
void setXSeriesColumn(int modelColumn);
/*! \brief Returns which column in the model is used as x-axis.
*
* \sa setXSeriesColumn()
*/
int XSeriesColumn() const { return XAbscisColumn_; }
/*! \brief Set which row in the model is used as y-axis.
*
* The default row that is used has index 0.
*/
void setYSeriesRow(int modelRow);
/*! \brief Returns which row in the model is used as y-axis.
*
* \sa setYSeriesRow()
*/
int YSeriesRow() const { return YAbscisRow_; }
// below = internal API
virtual int nbXPoints();
virtual int nbYPoints();
virtual WString axisLabel(int u, Axis axis) const;
virtual boost::any data(int i, int j) const;
protected:
virtual int countSimpleData() const;
virtual void pointDataFromModel(FloatBuffer& simplePtsArray,
FloatBuffer& simplePtsSize,
FloatBuffer& coloredPtsArray,
FloatBuffer& coloredPtsSize,
FloatBuffer& coloredPtsColor);
virtual void surfaceDataFromModel(std::vector<FloatBuffer>& simplePtsArrays);
virtual void barDataFromModel(std::vector<FloatBuffer>& simplePtsArrays,
std::vector<FloatBuffer>& coloredPtsArrays,
std::vector<FloatBuffer>& coloredPtsColors);
private:
void findRange() const;
int XAbscisColumn_;
int YAbscisRow_;
};
}
}
#endif
|