kstars
fov.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 fov.h - description 00003 ------------------- 00004 begin : Fri 05 Sept 2003 00005 copyright : (C) 2003 by Jason Harris 00006 email : kstars@30doradus.org 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef FOV_H 00019 #define FOV_H 00020 00021 #include <qstring.h> 00022 #include <klocale.h> 00023 00029 class QPainter; 00030 00031 class FOV { 00032 public: 00033 FOV(); 00034 FOV( QString name ); //in this case, read params from fov.dat 00035 FOV( QString name, float size, int shape=0, QString color="#FFFFFF" ); 00036 ~FOV() {} 00037 00038 // enum SHAPE { FOV_SQUARE=0, FOV_CIRCLE=1, FOV_CROSSHAIRS=2, FOV_BULLSEYE=3, FOV_UNKNOWN }; 00039 00040 QString name() const { return Name; } 00041 void setName( const QString &n ) { Name = n; } 00042 int shape() const { return Shape; } 00043 void setShape( int s ) { Shape = s; } 00044 float size() const { return Size; } 00045 void setSize( float s ) { Size = s; } 00046 QString color() const { return Color; } 00047 void setColor( const QString &c ) { Color = c; } 00048 00053 void draw( QPainter &p, float size ); 00054 00055 private: 00056 QString Name, Color; 00057 float Size; 00058 int Shape; 00059 }; 00060 00061 #endif