File indexing completed on 2024-12-22 04:28:24
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "speechtotextmenu.h" 0008 #include <KLocalizedString> 0009 #include <QMenu> 0010 0011 using namespace TextSpeechToText; 0012 SpeechToTextMenu::SpeechToTextMenu(QObject *parent) 0013 : QObject{parent} 0014 , mMenu(new QMenu) 0015 { 0016 mMenu->setObjectName(QStringLiteral("menu")); 0017 mMenu->setTitle(i18n("Speech to Text...")); 0018 mMenu->setIcon(QIcon::fromTheme(QStringLiteral("preferences-desktop-locale"))); 0019 updateMenu(); 0020 } 0021 0022 SpeechToTextMenu::~SpeechToTextMenu() 0023 { 0024 delete mMenu; 0025 } 0026 0027 bool SpeechToTextMenu::isEmpty() const 0028 { 0029 return mMenu->isEmpty(); 0030 } 0031 0032 void SpeechToTextMenu::updateMenu() 0033 { 0034 mMenu->clear(); 0035 // TODO update from specific plugins 0036 } 0037 0038 QMenu *SpeechToTextMenu::menu() const 0039 { 0040 return mMenu; 0041 } 0042 0043 #include "moc_speechtotextmenu.cpp"