• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Public Slots | Public Member Functions | Protected Member Functions | List of all members
MoonPhaseCalendar Class Reference

#include <moonphasecalendarwidget.h>

Inheritance diagram for MoonPhaseCalendar:
Inheritance graph
[legend]

Public Slots

virtual void setGeometry (int x, int y, int w, int h)
 
virtual void setGeometry (const QRect &r)
 

Public Member Functions

 MoonPhaseCalendar (KSMoon &moon, KSSun &sun, QWidget *parent=0)
 
 ~MoonPhaseCalendar ()
 
virtual QSize sizeHint () const
 

Protected Member Functions

void computeMoonImageSize ()
 
void loadImages ()
 
void paintCell (QPainter *painter, int row, int col, const KColorScheme &colorScheme)
 
virtual void paintEvent (QPaintEvent *e)
 

Detailed Description

Definition at line 28 of file moonphasecalendarwidget.h.

Constructor & Destructor Documentation

MoonPhaseCalendar::MoonPhaseCalendar ( KSMoon &  moon,
KSSun &  sun,
QWidget *  parent = 0 
)
explicit

Constructor.

Parameters
moonA reference to a (non-const) KSMoon object, that will be updated
sunA reference to a (non-const) KSSun object, that will be updated

Definition at line 41 of file moonphasecalendarwidget.cpp.

MoonPhaseCalendar::~MoonPhaseCalendar ( )

Definition at line 52 of file moonphasecalendarwidget.cpp.

Member Function Documentation

void MoonPhaseCalendar::computeMoonImageSize ( )
protected

Computes the optimum moon image size.

Definition at line 73 of file moonphasecalendarwidget.cpp.

void MoonPhaseCalendar::loadImages ( )
protected

Loads the moon images, appropriately resized depending on the current cell size.

Note
This method is very slow and one must avoid calling it more than once.

Definition at line 61 of file moonphasecalendarwidget.cpp.

void MoonPhaseCalendar::paintCell ( QPainter *  painter,
int  row,
int  col,
const KColorScheme &  colorScheme 
)
protected

Replaces KDateTable::paintCell() to draw moon phases on the calendar cells.

Note
Most of this code is copied from KDateTable::paintCell()

Definition at line 115 of file moonphasecalendarwidget.cpp.

void MoonPhaseCalendar::paintEvent ( QPaintEvent *  e)
protectedvirtual

Overrides KDateTable::paintEvent() to draw moon phases on the calendar cells by calling this->paintCell()

Note
Most of this code is copied from KDateTable::paintEvent()

Definition at line 89 of file moonphasecalendarwidget.cpp.

void MoonPhaseCalendar::setGeometry ( int  x,
int  y,
int  w,
int  h 
)
virtualslot

Set the geometry of the moon phase calendar (overloaded from QWidget).

Resizes the cells so as to fill the space of the calendar.

Note
This is called automatically by resize events. x the x-position of the widget y the y-position of the widget w the width of the widget h the height of the widget

Definition at line 80 of file moonphasecalendarwidget.cpp.

void MoonPhaseCalendar::setGeometry ( const QRect &  r)
virtualslot

Definition at line 84 of file moonphasecalendarwidget.cpp.

QSize MoonPhaseCalendar::sizeHint ( ) const
virtual
Returns
a suggested size for the widget

Definition at line 55 of file moonphasecalendarwidget.cpp.


The documentation for this class was generated from the following files:
  • moonphasecalendarwidget.h
  • moonphasecalendarwidget.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal