File indexing completed on 2024-12-22 04:45:36
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 #pragma once 0007 #include "libruqolawidgets_private_export.h" 0008 #include <QDateTime> 0009 #include <QDebug> 0010 #include <QWidget> 0011 class QDateEdit; 0012 class QToolButton; 0013 class LIBRUQOLAWIDGETS_TESTS_EXPORT AdministratorModerationRangeWidget : public QWidget 0014 { 0015 Q_OBJECT 0016 public: 0017 struct DateTimeRange { 0018 QDateTime fromDate; 0019 QDateTime toDate; 0020 }; 0021 explicit AdministratorModerationRangeWidget(QWidget *parent = nullptr); 0022 ~AdministratorModerationRangeWidget() override; 0023 0024 [[nodiscard]] DateTimeRange range() const; 0025 0026 Q_SIGNALS: 0027 void rangeChanged(); 0028 0029 private: 0030 LIBRUQOLAWIDGETS_NO_EXPORT void initializeMenu(); 0031 LIBRUQOLAWIDGETS_NO_EXPORT void slotRangeChanged(); 0032 QDateEdit *const mFromDate; 0033 QDateEdit *const mToDate; 0034 QToolButton *const mFilterDate; 0035 }; 0036 LIBRUQOLAWIDGETS_EXPORT QDebug operator<<(QDebug d, const AdministratorModerationRangeWidget::DateTimeRange &t);