summaryrefslogtreecommitdiffstats
path: root/kstars/kstars/fov.h
blob: 11d3d76961601f448eab1877d9cf922bf4c3984c (plain)
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
/***************************************************************************
                          fov.h  -  description
                             -------------------
    begin                : Fri 05 Sept 2003
    copyright            : (C) 2003 by Jason Harris
    email                : kstars@30doradus.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 FOV_H
#define FOV_H

#include <qstring.h>
#include <klocale.h>

/**@class FOV A simple class encapulating a Field-of-View symbol
	*@author Jason Harris
	*@version 1.0
	*/

class QPainter;

class FOV {
	public:
		FOV();
		FOV( QString name );  //in this case, read params from fov.dat
		FOV( QString name, float size, int shape=0, QString color="#FFFFFF" );
		~FOV() {}

//			enum SHAPE { FOV_SQUARE=0, FOV_CIRCLE=1, FOV_CROSSHAIRS=2, FOV_BULLSEYE=3, FOV_UNKNOWN };

		QString name() const { return Name; }
		void setName( const QString &n ) { Name = n; }
		int shape() const { return Shape; }
		void setShape( int s ) { Shape = s; }
		float size() const { return Size; }
		void setSize( float s ) { Size = s; }
		QString color() const { return Color; }
		void setColor( const QString &c ) { Color = c; }

	/**@short draw the FOV symbol on a QPainter
		*@param p reference to the target QPainter.  The painter should already be started.
		*@param size the size of the target symbol, in pixels.
		*/
		void draw( QPainter &p, float size );

	private:
		QString Name, Color;
		float Size;
		int Shape;
};

#endif