Messagelib

delegate.cpp
1 /******************************************************************************
2  *
3  * SPDX-FileCopyrightText: 2008 Szymon Tomasz Stefanek <[email protected]>
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  *
7  *******************************************************************************/
8 
9 #include "core/delegate.h"
10 #include "core/groupheaderitem.h"
11 #include "core/messageitem.h"
12 #include "core/view.h"
13 
14 using namespace MessageList::Core;
15 
16 Delegate::Delegate(View *pParent)
17  : ThemeDelegate(pParent)
18 {
19 }
20 
21 Delegate::~Delegate() = default;
22 
23 Item *Delegate::itemFromIndex(const QModelIndex &index) const
24 {
25  return static_cast<Item *>(index.internalPointer());
26 }
The implementation independent part of the MessageList library.
Definition: aggregation.h:21
The MessageList::View is the real display of the message list.
Definition: view.h:47
void * internalPointer() const const
A single item of the MessageList tree managed by MessageList::Model.
Definition: item.h:35
The ThemeDelegate paints the message list view message and group items by using the supplied Theme...
Definition: themedelegate.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Dec 4 2021 23:12:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.