File indexing completed on 2024-12-15 04:54:40

0001 /******************************************************************************
0002  *
0003  *  SPDX-FileCopyrightText: 2008 Szymon Tomasz Stefanek <pragma@kvirc.net>
0004  *
0005  *  SPDX-License-Identifier: GPL-2.0-or-later
0006  *
0007  *******************************************************************************/
0008 
0009 #pragma once
0010 
0011 #include "core/modelinvariantindex.h"
0012 
0013 namespace MessageList
0014 {
0015 namespace Core
0016 {
0017 class ModelInvariantIndex::ModelInvariantIndexPrivate
0018 {
0019 public:
0020     int mModelIndexRow; ///< The row that this index referenced at the time it was emitted
0021     uint mRowMapperSerial; ///< The serial that was current in the RowMapper at the time the invariant index was emitted
0022     ModelInvariantRowMapper *mRowMapper = nullptr; ///< The mapper that this invariant index is attached to
0023 
0024     int modelIndexRow() const
0025     {
0026         return mModelIndexRow;
0027     }
0028 
0029     uint rowMapperSerial() const
0030     {
0031         return mRowMapperSerial;
0032     }
0033 
0034     void setModelIndexRowAndRowMapperSerial(int modelIndexRow, uint rowMapperSerial)
0035     {
0036         mModelIndexRow = modelIndexRow;
0037         mRowMapperSerial = rowMapperSerial;
0038     }
0039 
0040     ModelInvariantRowMapper *rowMapper() const
0041     {
0042         return mRowMapper;
0043     }
0044 
0045     void setRowMapper(ModelInvariantRowMapper *mapper)
0046     {
0047         mRowMapper = mapper;
0048     }
0049 };
0050 } // namespace Core
0051 } // namespace MessageList