libkdepim

diffalgo.cpp

00001 /*
00002     This file is part of libkdepim.
00003 
00004     Copyright (c) 2004 Tobias Koenig <tokoe@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #include <libkdepim/diffalgo.h>
00023 
00024 using namespace KPIM;
00025 
00026 void DiffAlgo::begin()
00027 {
00028   QValueList<DiffAlgoDisplay*>::Iterator it;
00029   for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
00030     (*it)->begin();
00031 }
00032 
00033 void DiffAlgo::end()
00034 {
00035   QValueList<DiffAlgoDisplay*>::Iterator it;
00036   for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
00037     (*it)->end();
00038 }
00039 
00040 void DiffAlgo::setLeftSourceTitle( const QString &title )
00041 {
00042   QValueList<DiffAlgoDisplay*>::Iterator it;
00043   for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
00044     (*it)->setLeftSourceTitle( title );
00045 }
00046 
00047 void DiffAlgo::setRightSourceTitle( const QString &title )
00048 {
00049   QValueList<DiffAlgoDisplay*>::Iterator it;
00050   for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
00051     (*it)->setRightSourceTitle( title );
00052 }
00053 
00054 void DiffAlgo::additionalLeftField( const QString &id, const QString &value )
00055 {
00056   QValueList<DiffAlgoDisplay*>::Iterator it;
00057   for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
00058     (*it)->additionalLeftField( id, value );
00059 }
00060 
00061 void DiffAlgo::additionalRightField( const QString &id, const QString &value )
00062 {
00063   QValueList<DiffAlgoDisplay*>::Iterator it;
00064   for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
00065     (*it)->additionalRightField( id, value );
00066 }
00067 
00068 void DiffAlgo::conflictField( const QString &id, const QString &leftValue,
00069                                  const QString &rightValue )
00070 {
00071   QValueList<DiffAlgoDisplay*>::Iterator it;
00072   for ( it = mDisplays.begin(); it != mDisplays.end(); ++it )
00073     (*it)->conflictField( id, leftValue, rightValue );
00074 }
00075 
00076 void DiffAlgo::addDisplay( DiffAlgoDisplay *display )
00077 {
00078   if ( mDisplays.find( display ) == mDisplays.end() )
00079     mDisplays.append( display );
00080 }
00081 
00082 void DiffAlgo::removeDisplay( DiffAlgoDisplay *display )
00083 {
00084   mDisplays.remove( display );
00085 }
KDE Home | KDE Accessibility Home | Description of Access Keys