Stellarium 0.11.4
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

core/modules/MeteorMgr.hpp

00001 /*
00002  * Stellarium
00003  * This file Copyright (C) 2004 Robert Spearman
00004  * 
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
00018  */
00019 
00020 #ifndef _METEORMGR_HPP_
00021 #define _METEORMGR_HPP_
00022 
00023 #include <vector>
00024 #include "StelModule.hpp"
00025 
00026 class Meteor;
00027 
00030 class MeteorMgr : public StelModule
00031 {
00032     Q_OBJECT
00033     Q_PROPERTY(int ZHR
00034            READ getZHR
00035            WRITE setZHR
00036            NOTIFY zhrChanged)
00037 
00038 public:
00043     MeteorMgr(int zhr, int maxv); 
00044     virtual ~MeteorMgr();
00045  
00047     // Methods defined in the StelModule class
00049     virtual void init();
00050     
00052     virtual void draw(StelCore* core);
00053     
00058     virtual void update(double deltaTime);
00059     
00061     virtual double getCallOrder(StelModuleActionName actionName) const;
00062     
00063 public slots:
00065     // Method callable from script and GUI
00067     int getZHR(void);
00069     void setZHR(int zhr);
00070     
00072     void setFlagShow(bool b) { flagShow = b; }
00074     bool getFlagShow(void) const { return flagShow; }
00075     
00077     void setMaxVelocity(int maxv);
00078     
00079 signals:
00080     void zhrChanged(int);
00081     
00082 private:
00083     std::vector<Meteor*> active;        // Vector containing all active meteors
00084     int ZHR;
00085     int maxVelocity;
00086     double zhrToWsr;  // factor to convert from zhr to whole earth per second rate
00087     bool flagShow;
00088 };
00089 
00090 
00091 #endif // _METEORMGR_HPP_
Generated on Sat Aug 25 22:13:29 2012 for Stellarium by  doxygen 1.6.3