Messagelib

remotecontentconfigurewidget.h
1 /*
2  SPDX-FileCopyrightText: 2020-2023 Laurent Montel <[email protected]>
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>
14 class QTreeWidget;
15 namespace MessageViewer
16 {
17 class RemoteContentStatusTypeComboBox;
18 class RemoteContentInfo;
19 /**
20  * @brief The RemoteContentWidgetItem class
21  * @author Laurent Montel <[email protected]>
22  */
23 class MESSAGEVIEWER_TESTS_EXPORT RemoteContentWidgetItem : public QTreeWidgetItem
24 {
25 public:
26  enum ColumnType {
27  Domain = 0,
28  RuleType = 1,
29  };
30 
31  explicit RemoteContentWidgetItem(QTreeWidget *parent = nullptr);
32  ~RemoteContentWidgetItem() override;
33 
34  Q_REQUIRED_RESULT MessageViewer::RemoteContentInfo::RemoteContentInfoStatus status() const;
35  void setStatus(MessageViewer::RemoteContentInfo::RemoteContentInfoStatus type);
36 
37 private:
38  void updateInfo();
39  RemoteContentStatusTypeComboBox *const mStatusTypeCombobox;
40 };
41 
42 class MESSAGEVIEWER_TESTS_EXPORT RemoteContentConfigureWidget : public QWidget
43 {
44  Q_OBJECT
45 public:
46  explicit RemoteContentConfigureWidget(QWidget *parent = nullptr);
47  ~RemoteContentConfigureWidget() override;
48  void saveSettings();
49 
50 private:
51  void insertRemoteContentInfo(const RemoteContentInfo &info);
52  void slotCustomContextMenuRequested(const QPoint &);
53  void modifyRemoteContent(RemoteContentWidgetItem *rulesItem);
54  void slotAdd();
55  void fillContentInfo(const RemoteContentInfo &info, RemoteContentWidgetItem *item);
56  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-2023 The KDE developers.
Generated on Fri Sep 29 2023 04:01:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.