// qdatetimeedit.sip generated by MetaSIP on Thu Sep 11 18:50:32 2014
//
// This file is part of the QtGui Python extension module.
//
// Copyright (c) 2014 Riverbank Computing Limited <info@riverbankcomputing.com>
// 
// This file is part of PyQt.
// 
// This file may be used under the terms of the GNU General Public
// License versions 2.0 or 3.0 as published by the Free Software
// Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
// included in the packaging of this file.  Alternatively you may (at
// your option) use any later version of the GNU General Public
// License if such license has been publicly approved by Riverbank
// Computing Limited (or its successors, if any) and the KDE Free Qt
// Foundation. In addition, as a special exception, Riverbank gives you
// certain additional rights. These rights are described in the Riverbank
// GPL Exception version 1.1, which can be found in the file
// GPL_EXCEPTION.txt in this package.
// 
// If you are unsure which license is appropriate for your use, please
// contact the sales department at sales@riverbankcomputing.com.
// 
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


%ModuleCode
#include <qdatetimeedit.h>
%End

class QDateTimeEdit : QAbstractSpinBox
{
%TypeHeaderCode
#include <qdatetimeedit.h>
%End

public:
    enum Section
    {
        NoSection,
        AmPmSection,
        MSecSection,
        SecondSection,
        MinuteSection,
        HourSection,
        DaySection,
        MonthSection,
        YearSection,
        TimeSections_Mask,
        DateSections_Mask,
    };

    typedef QFlags<QDateTimeEdit::Section> Sections;
    explicit QDateTimeEdit(QWidget *parent /TransferThis/ = 0);
    QDateTimeEdit(const QDateTime &datetime, QWidget *parent /TransferThis/ = 0);
    QDateTimeEdit(const QDate &date, QWidget *parent /TransferThis/ = 0);
    QDateTimeEdit(const QTime &time, QWidget *parent /TransferThis/ = 0);
%If (Qt_5_0_0 -)
    virtual ~QDateTimeEdit();
%End
    QDateTime dateTime() const;
    QDate date() const;
    QTime time() const;
    QDate minimumDate() const;
    void setMinimumDate(const QDate &min);
    void clearMinimumDate();
    QDate maximumDate() const;
    void setMaximumDate(const QDate &max);
    void clearMaximumDate();
    void setDateRange(const QDate &min, const QDate &max);
    QTime minimumTime() const;
    void setMinimumTime(const QTime &min);
    void clearMinimumTime();
    QTime maximumTime() const;
    void setMaximumTime(const QTime &max);
    void clearMaximumTime();
    void setTimeRange(const QTime &min, const QTime &max);
    QFlags<QDateTimeEdit::Section> displayedSections() const;
    QDateTimeEdit::Section currentSection() const;
    void setCurrentSection(QDateTimeEdit::Section section);
    QString sectionText(QDateTimeEdit::Section s) const;
    QString displayFormat() const;
    void setDisplayFormat(const QString &format);
%If (Qt_4_2_0 -)
    bool calendarPopup() const;
%End
%If (Qt_4_2_0 -)
    void setCalendarPopup(bool enable);
%End
%If (Qt_4_2_0 -)
    void setSelectedSection(QDateTimeEdit::Section section);
%End
    virtual QSize sizeHint() const;
    virtual void clear();
    virtual void stepBy(int steps);
    virtual bool event(QEvent *e);
%If (Qt_4_3_0 -)
    QDateTimeEdit::Section sectionAt(int index) const;
%End
%If (Qt_4_3_0 -)
    int currentSectionIndex() const;
%End
%If (Qt_4_3_0 -)
    void setCurrentSectionIndex(int index);
%End
%If (Qt_4_3_0 -)
    int sectionCount() const;
%End

signals:
    void dateTimeChanged(const QDateTime &date);
    void timeChanged(const QTime &date);
    void dateChanged(const QDate &date);

public slots:
    void setDateTime(const QDateTime &dateTime);
    void setDate(const QDate &date);
    void setTime(const QTime &time);

protected:
%If (Qt_4_3_0 -)
    void initStyleOption(QStyleOptionSpinBox *option) const;
%End
    virtual void keyPressEvent(QKeyEvent *e);
    virtual void wheelEvent(QWheelEvent *e);
    virtual void focusInEvent(QFocusEvent *e);
    virtual bool focusNextPrevChild(bool next);
%If (Qt_4_2_0 -)
    virtual void mousePressEvent(QMouseEvent *event);
%End
%If (Qt_4_2_0 -)
    virtual void paintEvent(QPaintEvent *event);
%End
    virtual QValidator::State validate(QString &input /In,Out/, int &pos /In,Out/) const /API=QString:2 - /;
    virtual QValidator::State validate(QString &input /Constrained/, int &pos /In,Out/) const /API=QString: - 2/;
    virtual void fixup(QString &input /In,Out/) const /API=QString:2 - /;
    virtual void fixup(QString &input /Constrained/) const /API=QString: - 2/;
    virtual QDateTime dateTimeFromText(const QString &text) const;
    virtual QString textFromDateTime(const QDateTime &dt) const;
    virtual QFlags<QAbstractSpinBox::StepEnabledFlag> stepEnabled() const;

public:
%If (Qt_4_4_0 -)
    QDateTime minimumDateTime() const;
%End
%If (Qt_4_4_0 -)
    void clearMinimumDateTime();
%End
%If (Qt_4_4_0 -)
    void setMinimumDateTime(const QDateTime &dt);
%End
%If (Qt_4_4_0 -)
    QDateTime maximumDateTime() const;
%End
%If (Qt_4_4_0 -)
    void clearMaximumDateTime();
%End
%If (Qt_4_4_0 -)
    void setMaximumDateTime(const QDateTime &dt);
%End
%If (Qt_4_4_0 -)
    void setDateTimeRange(const QDateTime &min, const QDateTime &max);
%End
%If (Qt_4_4_0 -)
    QCalendarWidget *calendarWidget() const;
%End
%If (Qt_4_4_0 -)
    void setCalendarWidget(QCalendarWidget *calendarWidget /Transfer/);
%End
%If (Qt_4_4_0 -)
    Qt::TimeSpec timeSpec() const;
%End
%If (Qt_4_4_0 -)
    void setTimeSpec(Qt::TimeSpec spec);
%End

private:
    QDateTimeEdit(const QDateTimeEdit &);
};

class QTimeEdit : QDateTimeEdit
{
%TypeHeaderCode
#include <qdatetimeedit.h>
%End

public:
%If (Qt_5_0_0 -)
    explicit QTimeEdit(QWidget *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QTimeEdit(QWidget *parent /TransferThis/ = 0);
%End
    QTimeEdit(const QTime &time, QWidget *parent /TransferThis/ = 0);
%If (Qt_5_0_0 -)
    virtual ~QTimeEdit();
%End
};

class QDateEdit : QDateTimeEdit
{
%TypeHeaderCode
#include <qdatetimeedit.h>
%End

public:
%If (Qt_5_0_0 -)
    explicit QDateEdit(QWidget *parent /TransferThis/ = 0);
%End
%If (- Qt_5_0_0)
    QDateEdit(QWidget *parent /TransferThis/ = 0);
%End
    QDateEdit(const QDate &date, QWidget *parent /TransferThis/ = 0);
%If (Qt_5_0_0 -)
    virtual ~QDateEdit();
%End
};

QFlags<QDateTimeEdit::Section> operator|(QDateTimeEdit::Section f1, QFlags<QDateTimeEdit::Section> f2);
