kstars
moonphasecalendarwidget.cpp
Go to the documentation of this file.
58 ( qRound( suggestedMoonImageSize + 4 + 12 ) * numWeekRows ) ); // FIXME: Using hard-coded fontsize
77 MoonImageSize = ( (cellWidth > cellHeight - 12) ? cellHeight - 12 : cellWidth ) - 2; // FIXME: Using hard-coded fontsize
85 setGeometry( r.x(), r.y(), r.width(), r.height() ); // FIXME: +1 / -1 pixel compensation. Not required at the moment.
115 void MoonPhaseCalendar::paintCell( QPainter *painter, int row, int col, const KColorScheme &colorScheme )
225 //If the cell day is the day of religious observance, then always color text red unless Custom overrides
264 painter->drawPixmap( ( drawRect.width() - MoonImageSize )/2, 12 + (( drawRect.height() - 12 ) - MoonImageSize)/2, m_Images[ iPhase ] ); // FIXME: Using hard coded fon
277 painter->drawText( cell, (row == 0) ? Qt::AlignCenter : (Qt::AlignTop | Qt::AlignHCenter), cellText, &cell );
297 KSPlanet earth( I18N_NOOP( "Earth" ), QString(), QColor( "white" ), 12756.28 /*diameter in km*/ );
300 m_Sun.findPosition( &num, 0, 0, &earth ); // Find position is overkill for this purpose. Wonder if it is worth making findGeocentricPosition public instead of protected.
void findPosition(const KSNumbers *num, const dms *lat=0, const dms *LST=0, const KSPlanetBase *Earth=0)
Find position, including correction for Figure-of-the-Earth.
Definition: ksplanetbase.cpp:122
A subclass of KSPlanetBase for seven of the major planets in the solar system (Earth and Pluto have t...
Definition: ksplanet.h:40
void computeMoonImageSize()
Computes the optimum moon image size.
Definition: moonphasecalendarwidget.cpp:73
virtual void paintEvent(QPaintEvent *e)
Overrides KDateTable::paintEvent() to draw moon phases on the calendar cells by calling this->paintCe...
Definition: moonphasecalendarwidget.cpp:89
virtual void setGeometry(int x, int y, int w, int h)
Set the geometry of the moon phase calendar (overloaded from QWidget).
Definition: moonphasecalendarwidget.cpp:80
static const QImage & getImage(const QString &name)
Return texture image.
Definition: texturemanager.cpp:44
virtual void findPhase(const KSSun *Sun=0)
Determine the phase angle of the moon, and assign the appropriate moon image.
Definition: ksmoon.cpp:243
MoonPhaseCalendar(KSMoon &moon, KSSun &sun, QWidget *parent=0)
Constructor.
Definition: moonphasecalendarwidget.cpp:41
Extension of KDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day...
Definition: kstarsdatetime.h:45
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
A subclass of SkyObject that provides information needed for the Moon.
Definition: ksmoon.h:36
virtual QSize sizeHint() const
Definition: moonphasecalendarwidget.cpp:55
void loadImages()
Loads the moon images, appropriately resized depending on the current cell size.
Definition: moonphasecalendarwidget.cpp:61
virtual bool findGeocentricPosition(const KSNumbers *num, const KSPlanetBase *)
Reimplemented from KSPlanetBase, this function employs unique algorithms for estimating the lunar coo...
Definition: ksmoon.cpp:147
void paintCell(QPainter *painter, int row, int col, const KColorScheme &colorScheme)
Replaces KDateTable::paintCell() to draw moon phases on the calendar cells.
Definition: moonphasecalendarwidget.cpp:115
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.