• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • sources
  • kde-4.14
  • kdepim
  • messageviewer
  • viewer
  • mimeparttree
mimetreemodel.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2007 Volker Krause <vkrause@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef MAILVIEWER_MIMETREEMODEL_H
21 #define MAILVIEWER_MIMETREEMODEL_H
22 
23 #include <QAbstractItemModel>
24 
25 namespace KMime {
26 class Content;
27 }
28 
29 namespace MessageViewer {
30 
34 class MimeTreeModel : public QAbstractItemModel
35 {
36  Q_OBJECT
37 
38 public:
39  enum Role {
40  ContentIndexRole = Qt::UserRole + 1,
41  ContentRole,
42  MimeTypeRole,
43  MainBodyPartRole,
44  AlternativeBodyPartRole,
45  UserRole = Qt::UserRole + 100
46  };
47  explicit MimeTreeModel( QObject *parent = 0 );
48  ~MimeTreeModel();
49 
50  void setRoot( KMime::Content *root );
51 
52  KMime::Content* root();
53 
54  QModelIndex index( int row, int column, const QModelIndex &parent = QModelIndex() ) const;
55  QModelIndex parent( const QModelIndex &index ) const;
56  int rowCount( const QModelIndex &parent = QModelIndex() ) const;
57  int columnCount( const QModelIndex &parent = QModelIndex() ) const;
58  QVariant data( const QModelIndex &index, int role = Qt::DisplayRole ) const;
59  QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
60 
61 private:
62  class Private;
63  Private* const d;
64 };
65 
66 }
67 
68 
69 #endif
QModelIndex
MessageViewer::MimeTreeModel::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: mimetreemodel.cpp:181
MessageViewer::MimeTreeModel::Role
Role
Definition: mimetreemodel.h:39
MessageViewer::MimeTreeModel
A model representing the mime part tree of a message.
Definition: mimetreemodel.h:34
MessageViewer::MimeTreeModel::root
KMime::Content * root()
Definition: mimetreemodel.cpp:140
MessageViewer::MimeTreeModel::~MimeTreeModel
~MimeTreeModel()
Definition: mimetreemodel.cpp:129
MessageViewer::MimeTreeModel::AlternativeBodyPartRole
Definition: mimetreemodel.h:44
MessageViewer::MimeTreeModel::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: mimetreemodel.cpp:199
QObject
MessageViewer::MimeTreeModel::ContentRole
Definition: mimetreemodel.h:41
MessageViewer::MimeTreeModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Definition: mimetreemodel.cpp:243
MessageViewer::MimeTreeModel::MimeTypeRole
Definition: mimetreemodel.h:42
MessageViewer::MimeTreeModel::setRoot
void setRoot(KMime::Content *root)
Definition: mimetreemodel.cpp:134
MessageViewer::MimeTreeModel::MimeTreeModel
MimeTreeModel(QObject *parent=0)
Definition: mimetreemodel.cpp:123
MessageViewer::MimeTreeModel::index
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Definition: mimetreemodel.cpp:146
MessageViewer::MimeTreeModel::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const
Definition: mimetreemodel.cpp:193
QAbstractItemModel
MessageViewer::MimeTreeModel::MainBodyPartRole
Definition: mimetreemodel.h:43
QObject::parent
QObject * parent() const
MessageViewer::MimeTreeModel::UserRole
Definition: mimetreemodel.h:45
QVariant
MessageViewer::MimeTreeModel::ContentIndexRole
Definition: mimetreemodel.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal