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

messagelist

  • sources
  • kde-4.12
  • kdepim
  • messagelist
  • core
modelinvariantrowmapper_p.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright 2008 Szymon Tomasz Stefanek <pragma@kvirc.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  *******************************************************************************/
20 
21 #ifndef __MESSAGELIST_CORE_MODELINVARIANTROWMAPPER_P_H__
22 #define __MESSAGELIST_CORE_MODELINVARIANTROWMAPPER_P_H__
23 
24 #include "core/modelinvariantrowmapper.h"
25 
26 #include <QTimer>
27 #include <QTime>
28 
29 #include <KDebug>
30 
31 namespace MessageList
32 {
33 
34 namespace Core
35 {
36 
37 class ModelInvariantRowMapperPrivate
38 {
39 public:
40  explicit ModelInvariantRowMapperPrivate( ModelInvariantRowMapper *owner ) : q( owner ) { }
41 
45  void updateModelInvariantIndex( int modelIndexRow, ModelInvariantIndex * invariantToFill );
46 
50  ModelInvariantIndex * modelIndexRowToModelInvariantIndexInternal( int modelIndexRow, bool updateIfNeeded );
51 
55  void killFirstRowShift();
56 
61  void indexDead( ModelInvariantIndex * index );
62 
66  void slotPerformLazyUpdate();
67 
68  ModelInvariantRowMapper * const q;
69 
70  QList< RowShift * > * mRowShiftList;
71  QHash< int, ModelInvariantIndex * > * mCurrentInvariantHash;
72  uint mCurrentShiftSerial;
73  uint mRemovedShiftCount;
74  int mLazyUpdateChunkInterval;
75  int mLazyUpdateIdleInterval;
76  QTimer * mUpdateTimer;
77 };
78 
79 } // Core
80 
81 } // MessageList
82 
83 #endif
84 
MessageList::Core::ModelInvariantRowMapperPrivate::mRowShiftList
QList< RowShift * > * mRowShiftList
The ordered list of RowShifts, most recent at the end.
Definition: modelinvariantrowmapper_p.h:70
MessageList::Core::ModelInvariantRowMapperPrivate::slotPerformLazyUpdate
void slotPerformLazyUpdate()
Internal: Performs a lazy update step.
Definition: modelinvariantrowmapper.cpp:598
MessageList::Core::ModelInvariantRowMapperPrivate::mLazyUpdateIdleInterval
int mLazyUpdateIdleInterval
Msecs: how much time we idle between lazy update chunks.
Definition: modelinvariantrowmapper_p.h:75
MessageList::Core::ModelInvariantRowMapperPrivate::mCurrentShiftSerial
uint mCurrentShiftSerial
Current model change serial: FIXME: it explodes at 2^32 :D.
Definition: modelinvariantrowmapper_p.h:72
MessageList::Core::ModelInvariantRowMapperPrivate::killFirstRowShift
void killFirstRowShift()
Internal: Removes the first RowShift from the list.
Definition: modelinvariantrowmapper.cpp:101
MessageList::Core::ModelInvariantRowMapperPrivate::updateModelInvariantIndex
void updateModelInvariantIndex(int modelIndexRow, ModelInvariantIndex *invariantToFill)
Internal.
Definition: modelinvariantrowmapper.cpp:150
MessageList::Core::ModelInvariantRowMapperPrivate::q
ModelInvariantRowMapper *const q
Definition: modelinvariantrowmapper_p.h:68
MessageList::Core::ModelInvariantRowMapper
This class is an optimizing helper for dealing with large flat QAbstractItemModel objects...
Definition: modelinvariantrowmapper.h:93
MessageList::Core::ModelInvariantRowMapperPrivate::indexDead
void indexDead(ModelInvariantIndex *index)
This is called from the ModelInvariantIndex destructor.
Definition: modelinvariantrowmapper.cpp:117
modelinvariantrowmapper.h
MessageList::Core::ModelInvariantRowMapperPrivate::ModelInvariantRowMapperPrivate
ModelInvariantRowMapperPrivate(ModelInvariantRowMapper *owner)
Definition: modelinvariantrowmapper_p.h:40
MessageList::Core::ModelInvariantRowMapperPrivate::modelIndexRowToModelInvariantIndexInternal
ModelInvariantIndex * modelIndexRowToModelInvariantIndexInternal(int modelIndexRow, bool updateIfNeeded)
Internal.
Definition: modelinvariantrowmapper.cpp:182
MessageList::Core::ModelInvariantRowMapperPrivate::mLazyUpdateChunkInterval
int mLazyUpdateChunkInterval
Msecs: how much time we spend inside a lazy update chunk.
Definition: modelinvariantrowmapper_p.h:74
MessageList::Core::ModelInvariantRowMapperPrivate::mCurrentInvariantHash
QHash< int, ModelInvariantIndex * > * mCurrentInvariantHash
The up-to-date invariants.
Definition: modelinvariantrowmapper_p.h:71
MessageList::Core::ModelInvariantRowMapperPrivate::mRemovedShiftCount
uint mRemovedShiftCount
The number of shifts that we have completely processed.
Definition: modelinvariantrowmapper_p.h:73
MessageList::Core::ModelInvariantRowMapperPrivate
Definition: modelinvariantrowmapper_p.h:37
MessageList::Core::ModelInvariantRowMapperPrivate::mUpdateTimer
QTimer * mUpdateTimer
Background lazy update timer.
Definition: modelinvariantrowmapper_p.h:76
MessageList::Core::ModelInvariantIndex
An invariant index that can be ALWAYS used to reference an item inside a QAbstractItemModel.
Definition: modelinvariantindex.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:32 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messagelist

Skip menu "messagelist"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

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

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