KTextAddons

speechtotexttoolbuttonwidget.cpp
1/*
2 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "speechtotexttoolbuttonwidget.h"
8#include "textspeechtotext/speechtotextmanager.h"
9#include <QHBoxLayout>
10#include <QToolButton>
11
12using namespace TextSpeechToText;
13SpeechToTextToolButtonWidget::SpeechToTextToolButtonWidget(QWidget *parent)
14 : QWidget{parent}
15 , mToolButton(new QToolButton(this))
16{
17 auto mainLayout = new QHBoxLayout(this);
18 mainLayout->setObjectName(QStringLiteral("mainLayout"));
19 mainLayout->setContentsMargins({});
20
21 mToolButton->setObjectName(QStringLiteral("mToolButton"));
22 mainLayout->addWidget(mToolButton);
23 connect(mToolButton, &QToolButton::clicked, this, &SpeechToTextToolButtonWidget::slotButtonClicked);
24}
25
26SpeechToTextToolButtonWidget::~SpeechToTextToolButtonWidget() = default;
27
28void SpeechToTextToolButtonWidget::slotButtonClicked()
29{
30 SpeechToTextManager::self()->speechToText();
31}
32
33#include "moc_speechtotexttoolbuttonwidget.cpp"
void clicked(bool checked)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.