libtdepim

diffalgo.cpp
1 /*
2  This file is part of libtdepim.
3 
4  Copyright (c) 2004 Tobias Koenig <tokoe@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #include <libtdepim/diffalgo.h>
23 
24 using namespace KPIM;
25 
26 void DiffAlgo::begin()
27 {
28  TQValueList<DiffAlgoDisplay*>::Iterator it;
29  for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
30  (*it)->begin();
31 }
32 
33 void DiffAlgo::end()
34 {
35  TQValueList<DiffAlgoDisplay*>::Iterator it;
36  for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
37  (*it)->end();
38 }
39 
40 void DiffAlgo::setLeftSourceTitle( const TQString &title )
41 {
42  TQValueList<DiffAlgoDisplay*>::Iterator it;
43  for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
44  (*it)->setLeftSourceTitle( title );
45 }
46 
47 void DiffAlgo::setRightSourceTitle( const TQString &title )
48 {
49  TQValueList<DiffAlgoDisplay*>::Iterator it;
50  for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
51  (*it)->setRightSourceTitle( title );
52 }
53 
54 void DiffAlgo::additionalLeftField( const TQString &id, const TQString &value )
55 {
56  TQValueList<DiffAlgoDisplay*>::Iterator it;
57  for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
58  (*it)->additionalLeftField( id, value );
59 }
60 
61 void DiffAlgo::additionalRightField( const TQString &id, const TQString &value )
62 {
63  TQValueList<DiffAlgoDisplay*>::Iterator it;
64  for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
65  (*it)->additionalRightField( id, value );
66 }
67 
68 void DiffAlgo::conflictField( const TQString &id, const TQString &leftValue,
69  const TQString &rightValue )
70 {
71  TQValueList<DiffAlgoDisplay*>::Iterator it;
72  for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
73  (*it)->conflictField( id, leftValue, rightValue );
74 }
75 
76 void DiffAlgo::addDisplay( DiffAlgoDisplay *display )
77 {
78  if ( mDisplays.find( display ) == mDisplays.end() )
79  mDisplays.append( display );
80 }
81 
82 void DiffAlgo::removeDisplay( DiffAlgoDisplay *display )
83 {
84  mDisplays.remove( display );
85 }
DiffAlgo and DiffAlgoDisplay work together for displaying differences between two PIM objects like co...
Definition: diffalgo.h:38
TDEPIM classes for drag and drop of mails.