File indexing completed on 2024-11-24 04:16:56
0001 /* 0002 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QDialog> 0010 class LibreTranslateEngineConfigureWidget; 0011 class LibreTranslateEngineConfigureDialog : public QDialog 0012 { 0013 Q_OBJECT 0014 public: 0015 explicit LibreTranslateEngineConfigureDialog(QWidget *parent = nullptr); 0016 ~LibreTranslateEngineConfigureDialog() override; 0017 0018 [[nodiscard]] QString serverUrl() const; 0019 void setServerUrl(const QString &serverUrl); 0020 0021 [[nodiscard]] QString apiKey() const; 0022 void setApiKey(const QString &key); 0023 0024 [[nodiscard]] bool serverRequiredApiKey() const; 0025 void setServerRequiredApiKey(bool state); 0026 0027 private: 0028 LibreTranslateEngineConfigureWidget *const mConfigureWidget; 0029 };