Messagelib

remotecontentconfigurewidget.h
1 /*
2  SPDX-FileCopyrightText: 2020-2021 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 readSettings();
56  QTreeWidget *const mTreeWidget;
57 };
58 }
59 
The RemoteContentInfo class.
PartitionTable::TableType type
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Nov 30 2021 23:05:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.