File indexing completed on 2025-01-19 04:46:47

0001 /*
0002    SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <PimCommon/CustomToolsViewInterface>
0010 class KActionCollection;
0011 namespace TextTranslator
0012 {
0013 class TranslatorWidget;
0014 }
0015 class TranslatorView : public PimCommon::CustomToolsViewInterface
0016 {
0017     Q_OBJECT
0018 public:
0019     explicit TranslatorView(KActionCollection *ac, QWidget *parent);
0020     ~TranslatorView() override;
0021     KToggleAction *action() const override;
0022 
0023     void setText(const QString &text) override;
0024 
0025 private:
0026     void slotActivateTranslator(bool state);
0027     void createAction(KActionCollection *ac);
0028     KToggleAction *mAction = nullptr;
0029     TextTranslator::TranslatorWidget *const mTranslatorWidget;
0030 };