File indexing completed on 2024-11-24 04:16:54
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 #pragma once 0007 #include "libbergamot_private_export.h" 0008 #include "managermodeltranslator.h" 0009 #include <QWidget> 0010 class QTreeView; 0011 class TranslatorModel; 0012 class QLineEdit; 0013 class TranslatorProxyModel; 0014 class QProgressBar; 0015 class QLabel; 0016 class LIBBERGAMOT_TESTS_EXPORT BergamotEngineLanguageWidget : public QWidget 0017 { 0018 Q_OBJECT 0019 public: 0020 explicit BergamotEngineLanguageWidget(QWidget *parent = nullptr); 0021 ~BergamotEngineLanguageWidget() override; 0022 0023 private: 0024 void slotTextChanged(const QString &str); 0025 void slotDownLoad(const QString &url, const QString &checkSum); 0026 void slotDelete(const QString &identifier); 0027 void slotUpdateListLanguage(); 0028 void slotError(const QString &str); 0029 void updateListModel(); 0030 void slotProgressInfo(const ManagerModelTranslator::ProgressInfo &info); 0031 QTreeView *const mTreeView; 0032 QLineEdit *const mSearchLineEdit; 0033 TranslatorModel *const mTranslatorModel; 0034 TranslatorProxyModel *const mTranslatorProxyModel; 0035 QProgressBar *const mProgressBar; 0036 QLabel *const mProgressBarLabel; 0037 QWidget *const mProgressBarWidget; 0038 };