Messagelib

remotecontentconfigurewidget.h
1/*
2 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QWidget>
10
11#include "messageviewer_private_export.h"
12#include "remotecontentinfo.h"
13#include <QTreeWidgetItem>
14class QTreeWidget;
15namespace MessageViewer
16{
17class RemoteContentStatusTypeComboBox;
18class RemoteContentInfo;
19/**
20 * @brief The RemoteContentWidgetItem class
21 * @author Laurent Montel <montel@kde.org>
22 */
23class MESSAGEVIEWER_TESTS_EXPORT RemoteContentWidgetItem : public QTreeWidgetItem
24{
25public:
26 enum ColumnType {
27 Domain = 0,
28 RuleType = 1,
29 };
30
31 explicit RemoteContentWidgetItem(QTreeWidget *parent = nullptr);
32 ~RemoteContentWidgetItem() override;
33
34 [[nodiscard]] MessageViewer::RemoteContentInfo::RemoteContentInfoStatus status() const;
35 void setStatus(MessageViewer::RemoteContentInfo::RemoteContentInfoStatus type);
36
37private:
38 MESSAGEVIEWER_NO_EXPORT void updateInfo();
39 RemoteContentStatusTypeComboBox *const mStatusTypeCombobox;
40};
41
42class MESSAGEVIEWER_TESTS_EXPORT RemoteContentConfigureWidget : public QWidget
43{
44 Q_OBJECT
45public:
46 explicit RemoteContentConfigureWidget(QWidget *parent = nullptr);
47 ~RemoteContentConfigureWidget() override;
48 void saveSettings();
49
50private:
51 MESSAGEVIEWER_NO_EXPORT void insertRemoteContentInfo(const RemoteContentInfo &info);
52 MESSAGEVIEWER_NO_EXPORT void slotCustomContextMenuRequested(const QPoint &);
53 MESSAGEVIEWER_NO_EXPORT void modifyRemoteContent(RemoteContentWidgetItem *rulesItem);
54 MESSAGEVIEWER_NO_EXPORT void slotAdd();
55 MESSAGEVIEWER_NO_EXPORT void fillContentInfo(const RemoteContentInfo &info, RemoteContentWidgetItem *item);
56 MESSAGEVIEWER_NO_EXPORT void readSettings();
57 QTreeWidget *const mTreeWidget;
58};
59}
The RemoteContentInfo class.
Q_SCRIPTABLE CaptureState status()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.