/usr/include/vtkQtChartSeriesLayer.h is in libvtk5-qt4-dev 5.8.0-17.5.
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 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkQtChartSeriesLayer.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*-------------------------------------------------------------------------
Copyright 2008 Sandia Corporation.
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/
/// \file vtkQtChartSeriesLayer.h
/// \date February 14, 2008
#ifndef _vtkQtChartSeriesLayer_h
#define _vtkQtChartSeriesLayer_h
#include "vtkQtChartExport.h"
#include "vtkQtChartLayer.h"
#include <QPixmap> // needed for return type
class vtkQtChartContentsArea;
class vtkQtChartSeriesModel;
class vtkQtChartSeriesOptions;
class vtkQtChartSeriesOptionsModel;
class vtkQtChartSeriesSelection;
class vtkQtChartSeriesSelectionModel;
class QPointF;
class QRectF;
/// \class vtkQtChartSeriesLayer
/// \brief
/// The vtkQtChartSeriesLayer class is the base class for chart
/// layers that use the chart series model.
///
/// It stores the pointer to the chart series model and the list of
/// options for the series.
class VTKQTCHART_EXPORT vtkQtChartSeriesLayer : public vtkQtChartLayer
{
Q_OBJECT
public:
enum {Type = vtkQtChart_SeriesLayerType};
public:
vtkQtChartSeriesLayer(bool useContents=true);
virtual ~vtkQtChartSeriesLayer() {}
/// \brief
/// Sets the chart area for the chart layer.
///
/// If the model is set before the chart layer is added to a chart
/// area, series options will not be available. Setting the chart
/// area will create the series options for the model in this case.
/// Subclasses can extend this method to handle the new options.
///
/// \param area The new chart area.
virtual void setChartArea(vtkQtChartArea *area);
/// \brief
/// Gets the chart series model.
/// \return
/// A pointer to the chart series model.
vtkQtChartSeriesModel *getModel() const {return this->Model;}
/// \brief
/// Sets the chart series model.
/// \param model The new chart series model.
virtual void setModel(vtkQtChartSeriesModel *model);
/// \brief
/// Gets the chart series options model.
/// \return
/// A pointer to the current chart series options model.
vtkQtChartSeriesOptionsModel* getOptionsModel() const
{ return this->Options; }
/// \brief
/// Sets the chart series options model.
/// \param model The new chart series options model.
virtual void setOptionsModel(vtkQtChartSeriesOptionsModel* model);
/// \brief
/// Gets the drawing options for the given series.
/// \param series The index of the series.
/// \return
/// A pointer to the drawing options for the given series.
vtkQtChartSeriesOptions *getSeriesOptions(int series) const;
/// \brief
/// Gets the index for the given series options.
/// \param options The series options object.
/// \return
/// The index for the given series options.
int getSeriesOptionsIndex(vtkQtChartSeriesOptions *options) const;
/// \brief
/// Gets the icon for a given series.
///
/// The icon is used by the chart legend.
///
/// \param series The index of the series.
/// \return
/// A pixmap representation of the series.
virtual QPixmap getSeriesIcon(int series) const;
/// \brief
/// Gets the chart series selection model.
/// \return
/// A pointer to the chart series selection model.
vtkQtChartSeriesSelectionModel *getSelectionModel() const;
/// \brief
/// Gets the list of series at a given position.
/// \param point The position in scene coordinates.
/// \param selection Used to return the list of series.
virtual void getSeriesAt(const QPointF &point,
vtkQtChartSeriesSelection &selection) const;
/// \brief
/// Gets the list of points at a given position.
/// \param point The position in scene coordinates.
/// \param selection Used to return the list of points.
virtual void getPointsAt(const QPointF &point,
vtkQtChartSeriesSelection &selection) const;
/// \brief
/// Gets the list of series in a given area.
/// \param area The rectangle in scene coordinates.
/// \param selection Used to return the list of series.
virtual void getSeriesIn(const QRectF &area,
vtkQtChartSeriesSelection &selection) const;
/// \brief
/// Gets the list of points in a given area.
/// \param area The rectangle in scene coordinates.
/// \param selection Used to return the list of points.
virtual void getPointsIn(const QRectF &area,
vtkQtChartSeriesSelection &selection) const;
public slots:
/// \brief
/// Sets the contents x-axis offset.
/// \param offset The new x-axis offset.
void setXOffset(float offset);
/// \brief
/// Sets the contents y-axis offset.
/// \param offset The new y-axis offset.
void setYOffset(float offset);
signals:
/// \brief
/// Emitted when the series model is changed.
/// \param previous The previous series model.
/// \param current The current series model.
void modelChanged(vtkQtChartSeriesModel *previous,
vtkQtChartSeriesModel *current);
/// \brief
/// Emitted when the name or icon changes for a set of series.
/// \param first The first series index of the range.
/// \param last The last series index of the range.
void modelSeriesChanged(int first, int last);
protected slots:
/// \brief
/// Called when any of the series options are changed.
/// Default implementation fires the modelSeriesChanged() signal.
/// \param options The options that fired the dataChanged() signal.
/// \param type Type of the option that was changed.
/// \param newValue The new value for the option.
/// \param oldValue The previous value for the option, if any.
virtual void handleOptionsChanged(vtkQtChartSeriesOptions*,
int type, const QVariant& newvalue, const QVariant& oldvalue);
protected:
/// \brief
/// Sets up the default values for the series options object.
///
/// The style manager should be used to help set up the series options.
/// Subclass must call this method every time a new series options is set up.
///
/// \param options The newly created series options.
virtual void setupOptions(vtkQtChartSeriesOptions *options);
/// \brief
/// Cleans up the options by deallocating the style reservation for the
/// option. Subclass must call this method before a series options object is
/// cleaned up.
virtual void cleanupOptions(vtkQtChartSeriesOptions* options);
protected:
/// Stores the series/point selection.
vtkQtChartSeriesSelectionModel *Selection;
vtkQtChartSeriesModel *Model; ///< Stores the series model.
vtkQtChartContentsArea *Contents; ///< Used for panning.
vtkQtChartSeriesOptionsModel* Options; ///< Stores the series options.
private:
vtkQtChartSeriesLayer(const vtkQtChartSeriesLayer &);
vtkQtChartSeriesLayer &operator=(const vtkQtChartSeriesLayer &);
};
#endif
|