~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/gui/widgets/qdatetimeedit_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-10-12 23:14:14 UTC
  • mto: (15.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20061012231414-y2oqbom5dy389os0
Tags: upstream-4.2.0
ImportĀ upstreamĀ versionĀ 4.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************
 
2
**
 
3
** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.
 
4
**
 
5
** This file is part of the QtGui module of the Qt Toolkit.
 
6
**
 
7
** This file may be used under the terms of the GNU General Public
 
8
** License version 2.0 as published by the Free Software Foundation
 
9
** and appearing in the file LICENSE.GPL included in the packaging of
 
10
** this file.  Please review the following information to ensure GNU
 
11
** General Public Licensing requirements will be met:
 
12
** http://www.trolltech.com/products/qt/opensource.html
 
13
**
 
14
** If you are unsure which license is appropriate for your use, please
 
15
** review the following information:
 
16
** http://www.trolltech.com/products/qt/licensing.html or contact the
 
17
** sales department at sales@trolltech.com.
 
18
**
 
19
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 
20
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
21
**
 
22
****************************************************************************/
 
23
 
 
24
#ifndef QDATETIMEEDIT_P_H
 
25
#define QDATETIMEEDIT_P_H
 
26
 
 
27
//
 
28
//  W A R N I N G
 
29
//  -------------
 
30
//
 
31
// This file is not part of the Qt API.  It exists purely as an
 
32
// implementation detail.  This header file may change from version to
 
33
// version without notice, or even be removed.
 
34
//
 
35
// We mean it.
 
36
//
 
37
 
 
38
#include "QtGui/qcombobox.h"
 
39
#include "QtGui/qcalendarwidget.h"
 
40
#include "QtGui/qspinbox.h"
 
41
#include "QtGui/qtoolbutton.h"
 
42
#include "QtGui/qmenu.h"
 
43
#include "QtGui/qlabel.h"
 
44
#include "qdebug.h"
 
45
 
 
46
#ifndef QT_NO_DATETIMEEDIT
 
47
 
 
48
class QCalendarPopup : public QWidget
 
49
{
 
50
    Q_OBJECT
 
51
public:
 
52
    QCalendarPopup(const QDate &date, QWidget *parent = 0);
 
53
    QDate selectedDate() { return calendar->selectedDate(); }
 
54
    void setDate(const QDate &date);
 
55
    void setDateRange(const QDate &min, const QDate &max);
 
56
 
 
57
Q_SIGNALS:
 
58
    void activated(const QDate &date);
 
59
    void newDateSelected(const QDate &newDate);
 
60
    void hidingCalendar(const QDate &oldDate);
 
61
    void resetButton();
 
62
 
 
63
private Q_SLOTS:
 
64
    void dateSelected(const QDate &date);
 
65
    void dateSelectionChanged();
 
66
 
 
67
protected:
 
68
    void hideEvent(QHideEvent *);
 
69
    void mousePressEvent(QMouseEvent *e); 
 
70
    void mouseReleaseEvent(QMouseEvent *);
 
71
    bool event(QEvent *e);
 
72
 
 
73
private:
 
74
    QCalendarWidget *calendar;
 
75
    QDate oldDate;
 
76
    bool dateChanged;
 
77
 
 
78
};
 
79
 
 
80
#endif // QT_NO_DATETIMEEDIT
 
81
 
 
82
#endif // QDATETIMEEDIT_P_H