Messagelib

searchlinecommandwidget.cpp
1/*
2 SPDX-FileCopyrightText: 2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#include "searchlinecommandwidget.h"
7#include "searchlinecommandbuttonswidget.h"
8#include <QLabel>
9#include <QVBoxLayout>
10
11using namespace MessageList::Core;
12SearchLineCommandWidget::SearchLineCommandWidget(QWidget *parent)
13 : QWidget{parent}
14 , mSearchLineCommandButtonsWidget(new SearchLineCommandButtonsWidget(this))
15 , mLabel(new QLabel(this))
16{
17 auto mainLayout = new QVBoxLayout(this);
18 mainLayout->setObjectName(QStringLiteral("mainLayout"));
19 mainLayout->setContentsMargins({});
20
21 mSearchLineCommandButtonsWidget->setObjectName(QStringLiteral("mSearchLineCommandButtonsWidget"));
22 mainLayout->addWidget(mSearchLineCommandButtonsWidget);
23
24 mLabel->setObjectName(QStringLiteral("mLabel"));
25 mainLayout->addWidget(mLabel);
26 mLabel->setWordWrap(true);
27
28 connect(mSearchLineCommandButtonsWidget, &SearchLineCommandButtonsWidget::insertCommand, this, &SearchLineCommandWidget::insertCommand);
29}
30
31SearchLineCommandWidget::~SearchLineCommandWidget() = default;
32
33void SearchLineCommandWidget::setLabel(const QString &str)
34{
35 mLabel->setText(str);
36}
37
38#include "moc_searchlinecommandwidget.cpp"
The implementation independent part of the MessageList library.
Definition aggregation.h:22
void setText(const QString &)
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 18 2024 12:07:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.