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

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • widgets
genericcalendarwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  genericcalendarwidget.h - K Desktop Planetarium
3  -------------------
4  begin : Mon Jun 28 2010
5  copyright : (C) 2010 by Akarsh Simha
6  email : akarshsimha@gmail.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef _GENERICCALENDARWIDGET_H_
19 #define _GENERICCALENDARWIDGET_H_
20 
21 #include "ui_genericcalendarwidget.h"
22 
23 #include <KDateTable>
24 
25 #include <QDate>
26 
38 class GenericCalendarWidget : public QWidget, public Ui::GenericCalendarWidgetUi {
39 
40  Q_OBJECT
41 
42  public:
46  explicit GenericCalendarWidget( KDateTable &dateTable, QWidget *parent = 0 );
47 
51  ~GenericCalendarWidget() { }
52 
56  const QDate &date() const;
57 
58  public slots:
63  bool setMonth( int month );
64 
69  bool setYear( int year );
70 
75  bool setDate( int date_ );
76 
81  bool setDate( const QDate &date_ );
82 
83  signals:
88  void dateChanged( const QDate &date_ );
89 
90  private slots:
91 
95  void previousYearClicked();
96  void nextYearClicked();
97  void previousMonthClicked();
98  void nextMonthClicked();
99 
103  void yearChanged( int year );
104 
108  void monthChanged( int month );
109 
114  void dateChangedSlot( const QDate &date_ );
115 
116  private:
117  KDateTable &m_DateTable;
118 
122  void populateMonthNames();
123 
127  const KCalendarSystem *calendar() const;
128 
129  QDate m_Date;
130 };
131 
132 #endif
133 
KDateTable
QWidget
GenericCalendarWidget::setYear
bool setYear(int year)
Set the year.
Definition: genericcalendarwidget.cpp:151
GenericCalendarWidget::date
const QDate & date() const
Returns the selected date.
Definition: genericcalendarwidget.cpp:72
GenericCalendarWidget::setDate
bool setDate(int date_)
Set the selected day of month.
Definition: genericcalendarwidget.cpp:159
GenericCalendarWidget::~GenericCalendarWidget
~GenericCalendarWidget()
Empty destructor.
Definition: genericcalendarwidget.h:51
GenericCalendarWidget::dateChanged
void dateChanged(const QDate &date_)
Emitted when the date has been changed.
GenericCalendarWidget
Uses any KDateTable subclass for the date table and provides a calendar with options to choose a mont...
Definition: genericcalendarwidget.h:38
GenericCalendarWidget::GenericCalendarWidget
GenericCalendarWidget(KDateTable &dateTable, QWidget *parent=0)
Constructor.
Definition: genericcalendarwidget.cpp:25
GenericCalendarWidget::setMonth
bool setMonth(int month)
Set the month.
Definition: genericcalendarwidget.cpp:155
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 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