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 "speechtotexttoolbuttonwidget.h" 0008 #include "textspeechtotext/speechtotextmanager.h" 0009 #include <QHBoxLayout> 0010 #include <QToolButton> 0011 0012 using namespace TextSpeechToText; 0013 SpeechToTextToolButtonWidget::SpeechToTextToolButtonWidget(QWidget *parent) 0014 : QWidget{parent} 0015 , mToolButton(new QToolButton(this)) 0016 { 0017 auto mainLayout = new QHBoxLayout(this); 0018 mainLayout->setObjectName(QStringLiteral("mainLayout")); 0019 mainLayout->setContentsMargins({}); 0020 0021 mToolButton->setObjectName(QStringLiteral("mToolButton")); 0022 mainLayout->addWidget(mToolButton); 0023 connect(mToolButton, &QToolButton::clicked, this, &SpeechToTextToolButtonWidget::slotButtonClicked); 0024 } 0025 0026 SpeechToTextToolButtonWidget::~SpeechToTextToolButtonWidget() = default; 0027 0028 void SpeechToTextToolButtonWidget::slotButtonClicked() 0029 { 0030 SpeechToTextManager::self()->speechToText(); 0031 } 0032 0033 #include "moc_speechtotexttoolbuttonwidget.cpp"