Ananas Library
0.9.5
Main Page
Classes
Files
File List
src
acalendar.h
1
/****************************************************************************
2
** $Id: acalendar.h,v 1.2 2008/07/05 12:43:48 app Exp $
3
**
4
** Copyright (C) 2008 Dmitry Kruglikov (dkr)
5
** Copyright (C) 2008 Ananas Project
6
**
7
** This file is part of the Ananas
8
** automation accounting system.
9
**
10
** This file may be distributed and/or modified under the terms of the
11
** GNU General Public License version 2 as published by the Free Software
12
** Foundation and appearing in the file LICENSE.GPL included in the
13
** packaging of this file.
14
**
15
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17
**
18
**
19
**********************************************************************/
20
21
#ifndef CALENDAR_H
22
#define CALENDAR_H
23
24
#include <qwidget.h>
25
#include <qwidgetplugin.h>
26
#include <qpushbutton.h>
27
#include <qlabel.h>
28
#include "ananas.h"
29
40
class
PopupCalendar
:
public
QDialog
41
{
42
Q_OBJECT
43
public
:
44
PopupCalendar
(
const
QDate &day = QDate::currentDate(),
45
QPoint pos = QPoint(), QWidget *parent = 0,
const
char
*name = 0);
46
47
static
QDate
getDate
(QWidget *parent = 0,
const
QDate &day = QDate::currentDate(),
48
QPoint pos = QPoint());
49
50
const
QDate& day()
const
{
return
today; }
51
void
setDay
(
const
QDate &day);
52
QSize sizeHint()
const
;
53
54
protected
:
55
void
mousePressEvent
(QMouseEvent *event);
56
void
mouseDoubleClickEvent
(QMouseEvent *event);
57
void
keyPressEvent
(QKeyEvent *event);
58
void
paintEvent
(QPaintEvent *event);
59
60
private
:
61
enum
{ ROWS = 7, COLS = 7 };
62
QFont smallFont;
63
QDate today;
64
const
QDate original;
65
};
66
67
#endif
PopupCalendar
Definition
acalendar.h:41
PopupCalendar::getDate
static QDate getDate(QWidget *parent=0, const QDate &day=QDate::currentDate(), QPoint pos=QPoint())
Definition
acalendar.cpp:42
PopupCalendar::keyPressEvent
void keyPressEvent(QKeyEvent *event)
Definition
acalendar.cpp:128
PopupCalendar::PopupCalendar
PopupCalendar(const QDate &day=QDate::currentDate(), QPoint pos=QPoint(), QWidget *parent=0, const char *name=0)
Definition
acalendar.cpp:247
PopupCalendar::setDay
void setDay(const QDate &day)
Definition
acalendar.cpp:234
PopupCalendar::mouseDoubleClickEvent
void mouseDoubleClickEvent(QMouseEvent *event)
Definition
acalendar.cpp:198
PopupCalendar::paintEvent
void paintEvent(QPaintEvent *event)
Definition
acalendar.cpp:58
PopupCalendar::mousePressEvent
void mousePressEvent(QMouseEvent *event)
Definition
acalendar.cpp:160
Generated by
1.12.0