Messagelib

mimeparttreeview.h
1 /*
2  SPDX-FileCopyrightText: 2014-2021 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <KMime/Message>
10 #include <QTreeView>
11 
12 namespace MessageViewer
13 {
14 class MimeTreeModel;
15 class MimePartTreeView : public QTreeView
16 {
17  Q_OBJECT
18 public:
19  explicit MimePartTreeView(QWidget *parent = nullptr);
20  ~MimePartTreeView() override;
21 
22  MessageViewer::MimeTreeModel *mimePartModel() const;
23 
24  void clearModel();
25  void setRoot(KMime::Content *root);
26 
27  Q_REQUIRED_RESULT KMime::Content::List selectedContents() const;
28 
29 private:
30  void slotMimePartDestroyed();
31  void saveMimePartTreeConfig();
32  void restoreMimePartTreeConfig();
33  MimeTreeModel *const mMimePartModel;
34 };
35 }
36 
A model representing the mime part tree of a message.
Definition: mimetreemodel.h:21
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:04:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.