• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

timezonerule.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           timezonerule.h  -  description
00003                              -------------------
00004     begin                : Tue Apr 2 2002
00005     copyright            : (C) 2002 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 TIMEZONERULE_H
00019 #define TIMEZONERULE_H
00020 
00053 #include <qstring.h>
00054 #include "kstarsdatetime.h"
00055 
00056 class TimeZoneRule {
00057 public: 
00059     TimeZoneRule();
00060 
00070     TimeZoneRule( const QString &smonth, const QString &sday, const QTime &stime, 
00071         const QString &rmonth, const QString &rday, const QTime &rtime, const double &offset=1.00 );
00072 
00074     ~TimeZoneRule();
00075 
00079     bool isDSTActive( const KStarsDateTime &date );
00080 
00082     bool isEmptyRule() { return ( HourOffset == 0.0 ); }
00083 
00087     void setDST( bool activate=true );
00088 
00091     double deltaTZ() const { return dTZ; }
00092 
00102     void reset_with_ltime( KStarsDateTime &ltime, const double TZoffset, const bool time_runs_forward,
00103                                                 const bool automaticDSTchange = false );
00104 
00107     KStarsDateTime nextDSTChange() { return next_change_utc; }
00108 
00111     KStarsDateTime nextDSTChange_LTime() { return next_change_ltime; }
00112 
00116     bool equals( TimeZoneRule *r );
00117 
00118     int StartMonth, RevertMonth;
00119 
00120 private:
00121 
00124     void nextDSTChange_LTime( const KStarsDateTime &date );
00125 
00129     void previousDSTChange_LTime( const KStarsDateTime &date );
00130 
00132     void nextDSTChange( const KStarsDateTime &local_date, const double TZoffset );
00133 
00135     void previousDSTChange( const KStarsDateTime &local_date, const double TZoffset );
00136 
00140     int initMonth( const QString &m );
00141 
00149     bool initDay( const QString &d, int &day, int &week );
00150 
00155     int findStartDay( const KStarsDateTime &d );
00156 
00161     int findRevertDay( const KStarsDateTime &d );
00162 
00163     int StartDay, RevertDay;
00164     int StartWeek, RevertWeek;
00165     QTime StartTime, RevertTime;
00166     KStarsDateTime next_change_utc, next_change_ltime;
00167     double dTZ, HourOffset;
00168     
00169 };
00170 
00171 #endif

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal