Messagelib

searchlinecommandbuttonswidget.h
1/*
2 SPDX-FileCopyrightText: 2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "messagelist_private_export.h"
10#include <QFrame>
11#include <QHash>
12class QPushButton;
13namespace MessageList
14{
15namespace Core
16{
17class MESSAGELIST_TESTS_EXPORT SearchLineCommandButtonsWidget : public QFrame
18{
19 Q_OBJECT
20public:
21 explicit SearchLineCommandButtonsWidget(QWidget *parent = nullptr);
22 ~SearchLineCommandButtonsWidget() override;
23
24Q_SIGNALS:
25 void insertCommand(const QString &commandStr);
26
27private:
28 MESSAGELIST_NO_EXPORT void fillWidgets();
29 MESSAGELIST_NO_EXPORT QPushButton *createPushButton(bool needSpace, const QString &i18nStr, const QString &commandStr);
30 struct ButtonInfo {
31 bool needSpace = false;
32 QString identifier;
34 };
35
36 QList<ButtonInfo> mButtonsList;
37};
38}
39}
QString i18n(const char *text, const TYPE &arg...)
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.