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

libkholidays

lunarphase.h

Go to the documentation of this file.
00001 /*
00002   This file is part of the kholidays library.
00003 
00004   Copyright (c) 2004,2007 Allen Winter <winter@kde.org>
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Library General Public
00008   License as published by the Free Software Foundation; either
00009   version 2 of the License, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014   GNU Library General Public License for more details.
00015 
00016   You should have received a copy of the GNU Library General Public License
00017   along with this library; see the file COPYING.LIB.  If not, write to the
00018   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019   Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KHOLIDAYS_LUNARPHASE_H
00023 #define KHOLIDAYS_LUNARPHASE_H
00024 
00025 #include "kholidays_export.h"
00026 #include <QString>
00027 
00028 class QDate;
00029 
00030 namespace LibKHolidays {
00031 
00054 class KHOLIDAYS_EXPORT LunarPhase
00055 {
00056   public:
00062     enum Phase {
00063       NewMoon,
00064       FirstQuarter,
00065       LastQuarter,
00066       FullMoon,
00067       None
00068     };
00069 
00074     LunarPhase();
00075 
00079     ~LunarPhase();
00080 
00088     Phase phase( const QDate &date ) const;
00089 
00097     QString phaseStr( const QDate &date ) const;
00098 
00104     static QString phaseName( Phase phase );
00105 
00106   private:
00114     double percentFull( uint t ) const;
00115 
00123     double degreesToRadians( double degree ) const;
00124 
00130     void adj360( double *degree ) const;
00131 };
00132 
00133 }
00134 
00135 #endif

libkholidays

Skip menu "libkholidays"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
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