File indexing completed on 2024-05-12 16:27:12

0001 /*
0002    SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QPointer>
0010 #include <QWidget>
0011 
0012 #include "libruqolawidgets_private_export.h"
0013 class QCheckBox;
0014 class QComboBox;
0015 class Room;
0016 class RocketChatAccount;
0017 class LIBRUQOLAWIDGETS_TESTS_EXPORT AutoTranslateConfigureWidget : public QWidget
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit AutoTranslateConfigureWidget(RocketChatAccount *account, QWidget *parent = nullptr);
0022     ~AutoTranslateConfigureWidget() override;
0023 
0024     [[nodiscard]] Room *room() const;
0025     void setRoom(Room *room);
0026 
0027 private:
0028     LIBRUQOLAWIDGETS_NO_EXPORT void slotAutoTranslateChanged();
0029     LIBRUQOLAWIDGETS_NO_EXPORT void slotChangeAutoTranslate(bool status);
0030     LIBRUQOLAWIDGETS_NO_EXPORT void slotLanguageChanged(int index);
0031     LIBRUQOLAWIDGETS_NO_EXPORT void slotAutoTranslateLanguageChanged();
0032     QCheckBox *const mAutoTranslate;
0033     QComboBox *const mLanguageComboBox;
0034     QPointer<Room> mRoom;
0035     RocketChatAccount *const mRocketChatAccount;
0036 };