Messagelib

modelinvariantindex.cpp
1/******************************************************************************
2 *
3 * SPDX-FileCopyrightText: 2008 Szymon Tomasz Stefanek <pragma@kvirc.net>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 *
7 *******************************************************************************/
8
9#include "core/modelinvariantindex.h"
10#include "core/modelinvariantindex_p.h"
11#include "core/modelinvariantrowmapper.h"
12#include "core/modelinvariantrowmapper_p.h"
13
14using namespace MessageList::Core;
15
16ModelInvariantIndex::ModelInvariantIndex()
17 : d(new ModelInvariantIndexPrivate)
18{
19}
20
21ModelInvariantIndex::~ModelInvariantIndex()
22{
23 if (d->mRowMapper) {
24 d->mRowMapper->d->indexDead(this);
25 }
26}
27
29{
30 return d->mRowMapper != nullptr;
31}
32
34{
35 if (d->mRowMapper) {
36 return d->mRowMapper->modelInvariantIndexToModelIndexRow(this);
37 }
38 return -1;
39}
bool isValid() const
Returns true if this ModelInvariantIndex is valid, that is, it has been attached to a ModelInvariantR...
int currentModelIndexRow()
Returns the current model index row for this invariant index.
The implementation independent part of the MessageList library.
Definition aggregation.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.