7#include "searchlinecommandwidget.h"
8#include "searchlinecommandflowlayout.h"
9#include <KLocalizedString>
13SearchLineCommandWidget::SearchLineCommandWidget(
QWidget *parent)
16 auto flowLayout =
new SearchLineCommandFlowLayout(
this);
17 flowLayout->setObjectName(QStringLiteral(
"flowLayout"));
18 flowLayout->setContentsMargins({});
19 flowLayout->setSpacing(0);
21 Q_ASSERT(!mButtonsList.isEmpty());
22 for (
const auto &info : std::as_const(mButtonsList)) {
23 flowLayout->addWidget(createPushButton(info.needSpace, info.i18n, info.identifier));
27SearchLineCommandWidget::~SearchLineCommandWidget() =
default;
32 pushButton->setObjectName(commandStr);
34 const QString str = commandStr + (needSpace ? QStringLiteral(
" ") :
QString());
40void SearchLineCommandWidget::fillWidgets()
43 {
false, QStringLiteral(
"subject:"),
i18n(
"Subject")},
44 {
false, QStringLiteral(
"from:"),
i18n(
"From")},
45 {
false, QStringLiteral(
"to:"),
i18n(
"To")},
46 {
false, QStringLiteral(
"cc:"),
i18n(
"Cc")},
47 {
false, QStringLiteral(
"bcc:"),
i18n(
"Bcc")},
48 {
true, QStringLiteral(
"has:attachment"),
i18n(
"Has Attachment")},
49 {
true, QStringLiteral(
"has:invitation"),
i18n(
"Has Invitation")},
50 {
true, QStringLiteral(
"is:read"),
i18n(
"Read")},
51 {
true, QStringLiteral(
"is:unread"),
i18n(
"Unread")},
52 {
true, QStringLiteral(
"is:important"),
i18n(
"Important")},
53 {
true, QStringLiteral(
"is:ignored"),
i18n(
"Ignored")},
54 {
true, QStringLiteral(
"is:ham"),
i18n(
"Ham")},
55 {
true, QStringLiteral(
"is:spam"),
i18n(
"Spam")},
56 {
true, QStringLiteral(
"is:watched"),
i18n(
"Watched")},
57 {
true, QStringLiteral(
"is:replied"),
i18n(
"Replied")},
58 {
true, QStringLiteral(
"is:forwarded"),
i18n(
"Forwarded")},
62#include "moc_searchlinecommandwidget.cpp"
QString i18n(const char *text, const TYPE &arg...)
The implementation independent part of the MessageList library.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:08:46 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.