/usr/include/vtkQtLineChart.h is in libvtk5-qt4-dev 5.8.0-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: vtkQtLineChart.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 vtkQtLineChart.h
/// \date February 14, 2008
#ifndef _vtkQtChartLineLayer_h
#define _vtkQtChartLineLayer_h
#include "vtkQtChartExport.h"
#include "vtkQtChartSeriesLayer.h"
class vtkQtLineChartInternal;
class vtkQtLineChartOptions;
/// \class vtkQtLineChart
/// \brief
/// The vtkQtLineChart class is used to display a line chart.
class VTKQTCHART_EXPORT vtkQtLineChart : public vtkQtChartSeriesLayer
{
Q_OBJECT
public:
enum {Type = vtkQtChart_LineChartType};
public:
vtkQtLineChart();
virtual ~vtkQtLineChart();
/// \name Setup Methods
//@{
virtual void setChartArea(vtkQtChartArea *area);
virtual void setModel(vtkQtChartSeriesModel *model);
//@}
/// \name Drawing Parameters
//@{
/// \brief
/// Gets the line chart drawing options.
/// \return
/// A pointer to the line chart drawing options.
vtkQtLineChartOptions *getOptions() const {return this->Options;}
/// \brief
/// Sets the line chart drawing options.
///
/// This method sets all the options at once, which can prevent
/// unnecessary view updates.
///
/// \param options The new line chart drawing options.
void setOptions(const vtkQtLineChartOptions &options);
virtual QPixmap getSeriesIcon(int series) const;
//@}
/// \name Layout Methods
//@{
virtual void getLayerDomain(vtkQtChartLayerDomain &domain) const;
virtual void layoutChart(const QRectF &area);
virtual bool getHelpText(const QPointF &point, QString &text);
/// \brief
/// Notifies the chart layer that a resize interaction has finished.
///
/// The chart search trees are not updated while the chart is in an
/// interactive state. It is updated in this method if needed.
virtual void finishInteractiveResize();
//@}
/// \name Selection Methods
//@{
virtual void getSeriesAt(const QPointF &point,
vtkQtChartSeriesSelection &selection) const;
virtual void getPointsAt(const QPointF &point,
vtkQtChartSeriesSelection &selection) const;
virtual void getSeriesIn(const QRectF &area,
vtkQtChartSeriesSelection &selection) const;
virtual void getPointsIn(const QRectF &area,
vtkQtChartSeriesSelection &selection) const;
//@}
/// \name QGraphicsItem Methods
//@{
virtual QRectF boundingRect() const;
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget);
//@}
public slots:
/// \brief
/// Refreshes the line chart data from the model.
///
/// The currently displayed data is cleaned up. If a model is set,
/// it is used to populate the line chart.
void reset();
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);
/// Called when this layer fires the layoutNeeded() signal is fired.
void handleLayoutNeeded();
private slots:
/// \brief
/// Prepares the line chart for a series insertion.
/// \param first The first series index to be added.
/// \param last The last series index to be added.
void prepareSeriesInsert(int first, int last);
/// \brief
/// Inserts line chart series at the given indexes.
/// \param first The first series index to be added.
/// \param last The last series index to be added.
void insertSeries(int first, int last);
/// \brief
/// Removes the specified series from the chart.
/// \param first The first series index to be removed.
/// \param last The last series index to be removed.
void startSeriesRemoval(int first, int last);
/// \brief
/// Finishes removing the series by updating the layout.
/// \param first The first series index to be removed.
/// \param last The last series index to be removed.
void finishSeriesRemoval(int first, int last);
/// \brief
/// Changes the series visibility.
///
/// The signal sender is used to determine which series has changed.
///
/// \param visible True if the series should be shown.
void handleSeriesVisibilityChange(
vtkQtChartSeriesOptions* options, bool visible);
/// \brief
/// Changes the series axes corner.
///
/// Both of the domains are updated for the change.
///
/// \param corner The new axes corner.
/// \param previous The previous axes corner.
void handleSeriesAxesCornerChange(
vtkQtChartSeriesOptions* options, int corner, int previous);
/// Changes the series point marker.
void handleSeriesPointMarkerChange(vtkQtChartSeriesOptions*);
/// \brief
/// Called to update the highlights.
///
/// The update request is ignored if the model is being changed.
void updateHighlights();
private:
/// \brief
/// Adds the domain for the given series to the given domain.
/// \param series The series index.
/// \param corner Which domain set to update.
/// \param seriesGroup Used to return the domain group.
/// \return
/// True if the domain was modified.
bool addSeriesDomain(int series, vtkQtChartLayer::AxesCorner corner,
int *seriesGroup);
/// \brief
/// Calculates the domain for the given series group.
/// \param seriesGroup The series group index.
/// \param corner Which domain set to update.
void calculateDomain(int seriesGroup, vtkQtChartLayer::AxesCorner corner);
/// Builds the search trees for the line chart.
void buildTree();
private:
vtkQtLineChartInternal *Internal; ///< Stores the view data.
vtkQtLineChartOptions *Options; ///< Stores the drawing options.
bool InModelChange; ///< Used for selection changes.
bool BuildNeeded; ///< Used when resizing interactively.
};
#endif
|