This file is indexed.

/usr/include/odinqt/plot.h is in libodin-dev 1.8.4-1ubuntu2.

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
/***************************************************************************
                          plot.h  -  description
                             -------------------
    begin                : Mon Aug 1 2005
    copyright            : (C) 2000 by Thies Jochimsen
    email                : jochimse@cns.mpg.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef PLOT_H
#define PLOT_H

#include <qobject.h> // Include Qt stuff first to avoid ambiguities with 'debug' symbol

#include "odinqt.h"

 // forward declarations
class QwtPlot;
class QwtPlotCurve;
class QwtPlotMarker;
class QwtPlotGrid;
class QRect;
class QwtWheel;
class QwtScaleDraw;

class GuiPlotPicker;


// work around different declarations of QwtDoubleRect
#if QT_VERSION >= 0x040000
class QRectF;
typedef QRectF QwtDoubleRect;
#else
class QwtDoubleRect;
#endif



/////////////////////////////////////////////////

/**
  *  Abstraction of a plotting widget
  */
class GuiPlot : public QObject {
   Q_OBJECT

 public:
  GuiPlot(QWidget *parent, bool fixed_size=false, int width=_ARRAY_WIDGET_WIDTH_-20, int height=_ARRAY_WIDGET_HEIGHT_-20);
  ~GuiPlot();

  void set_x_axis_label(const char *xAxisLabel, bool omit=false);
  void set_y_axis_label(const char *yAxisLabelLeft, const char *yAxisLabelRight=0);

  long insert_curve(bool use_right_y_axis=false, bool draw_spikes=false, bool baseline=false);

  long insert_marker(const char* label, double x, bool outline=false, bool horizontal=false, bool animate=false);

  void remove_marker(long id);

  void set_marker_pos(long id, double x);

  // memory NOT managed by GuiPlot
  void set_curve_data(long curveid, const double* x, const double* y, int n, bool symbol=false);

  void replot();

  void autoscale();

  void autoscale_y(double& maxBound);

  void rescale_y(double maxBound);

  void clear();

  void remove_markers();

  double get_x(int x_pixel) const;
  double get_y(int y_pixel, bool right_axes=false) const;

  long closest_curve(int x, int y, int& dist) const;

  void highlight_curve(long id, bool flag);

  void set_x_axis_scale(double lbound, double ubound);
  void set_y_axis_scale(double lbound, double ubound, bool right_axes=false);

  void set_curve_pen(long id, const char* color, int width=1);

  void set_rect_outline_style();
  void set_line_outline_style(bool horizontal);

  void enable_axes(bool flag);
  void enable_grid(bool flag);

  void print(QPainter* painter, const QRect& rect) const;


  QWidget* get_widget();

 signals:
  void plotMousePressed(const QMouseEvent&);
  void plotMouseReleased(const QMouseEvent&);
  void plotMouseMoved(const QMouseEvent&);

 private slots:
  void emit_plotMousePressed(const QMouseEvent& qme);
  void emit_plotMouseReleased(const QMouseEvent& qme);
  void emit_plotMouseMoved(const QMouseEvent& qme);


 private:
  friend class GuiPlotPicker;

  void set_axis_label(int axisId, const char* label, bool omit, int alignment);

  QwtPlot* qwtplotter;

  GuiPlotPicker* picker;


  // Use functions with check to access curve_map/marker_map
  QwtPlotCurve* get_curve(long id);
  QwtPlotMarker* get_marker(long id);


  // to emulate Qwt4 behaviour on Qwt5
  STD_map<long,QwtPlotCurve*>  curve_map;
  STD_map<long,QwtPlotMarker*> marker_map;

  QwtPlotGrid* plotgrid;

  int canvas_framewidth;

  long baseline_id_cache;
};

////////////////////////////////////////////////////////////


/**
  *  Abstraction of a slider wheel
  */
class GuiWheel : public QObject {
   Q_OBJECT

 public:
  GuiWheel(QWidget *parent);
  ~GuiWheel();

  void set_range(double min, double max);

  void set_value(double newval);

  QWidget* get_widget();

 signals:
  void valueChanged(double);

 private slots:
  void emit_valueChanged(double newval);

 private:
  QwtWheel* wheel;

};


#endif