File indexing completed on 2025-01-05 04:49:45

0001 /*
0002    SPDX-FileCopyrightText: 2014-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QDateTime>
0010 #include <QWidget>
0011 class KTimeComboBox;
0012 class KDateComboBox;
0013 namespace MessageViewer
0014 {
0015 class EventDateTimeWidgetPrivate;
0016 class EventDateTimeWidget : public QWidget
0017 {
0018     Q_OBJECT
0019 public:
0020     explicit EventDateTimeWidget(QWidget *parent = nullptr);
0021     ~EventDateTimeWidget() override;
0022 
0023     void setMinimumDateTime(const QDateTime &dateTime);
0024     void setDateTime(const QDateTime &dateTime);
0025     [[nodiscard]] QDateTime dateTime() const;
0026 
0027     [[nodiscard]] QDate date() const;
0028     [[nodiscard]] QTime time() const;
0029     void setTime(QTime time);
0030     void setDate(QDate date);
0031 
0032 Q_SIGNALS:
0033     void dateTimeChanged(const QDateTime &dateTime);
0034 
0035 private:
0036     void slotDateTimeChanged();
0037     KDateComboBox *const mDateEdit;
0038     KTimeComboBox *const mTimeEdit;
0039 };
0040 }