File indexing completed on 2024-12-08 04:34:38
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "libruqolawidgets_private_export.h" 0010 #include <QWidget> 0011 class QComboBox; 0012 class LIBRUQOLAWIDGETS_TESTS_EXPORT WhatsNewComboBoxWidget : public QWidget 0013 { 0014 Q_OBJECT 0015 public: 0016 enum VersionType { 0017 AllVersion, 0018 Version2_0, 0019 Version2_1, 0020 }; 0021 Q_ENUM(VersionType) 0022 0023 explicit WhatsNewComboBoxWidget(QWidget *parent = nullptr); 0024 ~WhatsNewComboBoxWidget() override; 0025 0026 void initializeVersion(VersionType type); 0027 0028 [[nodiscard]] static QString convertVersionEnumToString(WhatsNewComboBoxWidget::VersionType type); 0029 0030 Q_SIGNALS: 0031 void versionChanged(WhatsNewComboBoxWidget::VersionType type); 0032 0033 private: 0034 LIBRUQOLAWIDGETS_NO_EXPORT void fillCombobox(); 0035 LIBRUQOLAWIDGETS_NO_EXPORT void slotCurrentIndexChanged(int index); 0036 QComboBox *const mVersionComboBox; 0037 };