This file is indexed.

/usr/include/magics/MgQLayoutItem.h is in libmagics++-dev 3.0.0-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
 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
/*
 * (C) Copyright 1996-2016 ECMWF.
 * 
 * This software is licensed under the terms of the Apache Licence Version 2.0
 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. 
 * In applying this licence, ECMWF does not waive the privileges and immunities 
 * granted to it by virtue of its status as an intergovernmental organisation nor
 * does it submit to any jurisdiction.
 */

/*!
    \file MgQLayoutItem.h
    \brief Definition of MgQLayoutItem.
    \author Graphics Section, ECMWF

    Started: February 2010
*/

#ifndef _MgQLayoutItem_H
#define _MgQLayoutItem_H

#include <magics.h>
#include "Layout.h"
#include <PaperPoint.h>

#include "MgQ.h"

//namespace magics 
//{

class MgQLayoutItem : public QGraphicsItem
{
public:
	enum {Type = MgQ::LayoutItemType}; 
	
	//OpenGLLayoutItem();
	MgQLayoutItem(const Layout &);
	MgQLayoutItem(const MgQLayoutItem &);

	virtual int type() const {return Type;}
	virtual QRectF boundingRect() const;
	void paint(QPainter *, const QStyleOptionGraphicsItem *,
                QWidget *);
	
	const Layout& layout() {return layout_;};
	AnimationRules* animationRules() {return layout_.animationRules();};
	//void animationRules(AnimationRules *anr) {animationRules_=anr;};

    bool clipped() const {return clipped_;}
    
	void  coordRatioX(double f) {coordRatioX_=f;};	 
	void  coordRatioY(double f) {coordRatioY_=f;};
	double coordRatioX() {return coordRatioX_;};	 
	double coordRatioY() {return coordRatioY_;};

	void  dimensionX(double f) {dimensionX_=f;};	 
	void  dimensionY(double f) {dimensionY_=f;};
	double dimensionX() {return dimensionX_;};	 
	double dimensionY() {return dimensionY_;};

	double projectedMinX() {return projectedMinX_;}
	void  projectedMinX(double f) {projectedMinX_=f;}
	double projectedMinY() {return projectedMinY_;}
	void  projectedMinY(double f) {projectedMinY_=f;}

	double projectedMaxX() {return projectedMaxX_;}
	void  projectedMaxX(double f) {projectedMaxX_=f;}
	double projectedMaxY() {return projectedMaxY_;}
	void  projectedMaxY(double f) {projectedMaxY_=f;}

	void  mapFromSceneToProjectionCoords(QPointF&,QPointF&) ;
	string  mapFromSceneToTransformationDefinition(QPointF&,QPointF&) ;
	void  mapFromSceneToGeoCoords(const QPointF&,QPointF&); 
	void  mapFromSceneToGeoCoords(QRectF&,QList<QPointF>&); 
	void  mapFromGeoToSceneCoords(const QPointF&,QPointF&);

	bool containsSceneCoords(QPointF&);
	bool containsGeoCoords(QPointF&);
	bool containsPoint(QPointF&, qreal tolerance=0.0001);

	QGraphicsItem* parentItemInMainScene() {return parentItemInMainScene_;}
	void setParentItemInMainScene(QGraphicsItem* p) {parentItemInMainScene_=p;}

	void addToMainScene();
	

protected:
	const Layout& layout_;	

	double coordRatioX_;
	double coordRatioY_;
	
	double dimensionX_;	
	double dimensionY_;

	double projectedMinX_;
	double projectedMinY_;
	double projectedMaxX_;
	double projectedMaxY_;

	QGraphicsItem *parentItemInMainScene_;
    bool clipped_;
	//AnimationRules *animationRules_;			
};


class MgQPreviewLayoutItem : public MgQLayoutItem
{
public:
	enum {Type = MgQ::PreviewLayoutItemType}; 

	MgQPreviewLayoutItem(const Layout &l) : MgQLayoutItem(l)  {};
	int type() const {return Type;}
};

class MgQMagnifierLayoutItem : public MgQLayoutItem
{
public:
	enum {Type = MgQ::MagnifierLayoutItemType}; 
	
	MgQMagnifierLayoutItem(MgQLayoutItem*);
	MgQMagnifierLayoutItem(const Layout &l) : MgQLayoutItem(l) {}; 
	const MagnifierLayout& layout() {return (MagnifierLayout&) layout_;};
	void clearPlotContents();

	const QVector<QPointF>& area() const {return area_;}
	double resolutionX() {return resolutionY_;}
	double resolutionY() {return resolutionY_;}
	AnimationStep* step() {return step_;}
	double zoomFactor() {return zoomFactor_;}

	void setArea(const QVector<QPointF> area) {area_=area;}
	void setResolutionX(double r) {resolutionX_=r;}
	void setResolutionY(double r) {resolutionY_=r;}
	void setStep(AnimationStep *step) {step_=step;}
	void setZoomFactor(double zoomFactor) {zoomFactor_=zoomFactor;}

	QRectF boundingRect() const;
	int type() const {return Type;}	

protected:
	QVector<QPointF> area_;
	double resolutionX_;
	double resolutionY_;
	AnimationStep *step_;	
	double zoomFactor_;
};


//}


#endif