kstars
conjunctions.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 conjunctions.h - Conjunctions Tool 00003 ------------------- 00004 begin : Sun 20th Apr 2008 00005 copyright : (C) 2008 Akarsh Simha 00006 email : akarshsimha@gmail.com 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 /*************************************************************************** 00019 * * 00020 * Much of the code here is taken from Pablo de Vicente's * 00021 * modcalcplanets.h * 00022 * * 00023 ***************************************************************************/ 00024 00025 #ifndef CONJUNCTIONS_H_ 00026 #define CONJUNCTIONS_H_ 00027 00028 #include <QTextStream> 00029 #include <QAbstractTableModel> 00030 #include <QStandardItemModel> 00031 #include <QSortFilterProxyModel> 00032 00033 #include "ui_conjunctions.h" 00034 #include "skyobjects/skyobject.h" 00035 #include "skyobjects/ksplanetbase.h" 00036 00037 class GeoLocation; 00038 class KSPlanetBase; 00039 class dms; 00040 class QListWidgetItem; 00041 00046 class ConjunctionsTool : public QFrame, public Ui::ConjunctionsDlg { 00047 00048 Q_OBJECT 00049 00050 public: 00051 ConjunctionsTool(QWidget *p); 00052 ~ConjunctionsTool(); 00053 00054 public slots: 00055 00056 void slotLocation(); 00057 void slotCompute(); 00058 void showProgress(int); 00059 void slotFindObject(); 00060 void slotGoto(); 00061 void slotFilterType( int ); 00062 void slotClear(); 00063 void slotExport(); 00064 void slotFilterReg( const QString & ); 00065 00066 private: 00067 SkyObject *Object1; 00068 KSPlanetBase *Object2; // Second object is always a planet. 00069 00070 QHash<int, QString> pNames; // To store the names of Planets vs. values expected by KSPlanetBase::createPlanet() 00071 QMap<int, long double> outputJDList; // To store Julian Days corresponding to the row index in the output list widget 00072 00073 void showConjunctions(const QMap<long double, dms> &conjunctionlist, QString object); 00074 00075 GeoLocation *geoPlace; 00076 00077 QStandardItemModel *m_Model; 00078 QSortFilterProxyModel *m_SortModel; 00079 00080 int m_index; 00081 }; 00082 00083 #endif
KDE 4.5 API Reference