This file is indexed.

/usr/include/magics/MgQLayoutItem.h is in libmagics++-dev 2.22.7.dfsg.1-4.

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
/******************************** LICENSE ********************************


 Copyright 2007 European Centre for Medium-Range Weather Forecasts (ECMWF)
 
 Licensed under the Apache License, Version 2.0 (the "License"); 
 you may not use this file except in compliance with the License. 
 You may obtain a copy of the License at 
 
 	http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software 
 distributed under the License is distributed on an "AS IS" BASIS, 
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 See the License for the specific language governing permissions and 
 limitations under the License.


 ******************************** LICENSE ********************************/

/*!
    \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;};

	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_;
	//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