diffalgo.h
00001 /* 00002 This file is part of libtdepim. 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 #ifndef DIFFALGO_H 00023 #define DIFFALGO_H 00024 00025 #include <tqvaluelist.h> 00026 #include <tdepimmacros.h> 00027 00028 namespace KPIM { 00029 00037 class DiffAlgoDisplay 00038 { 00039 public: 00040 00044 virtual void begin() = 0; 00045 00049 virtual void end() = 0; 00050 00054 virtual void setLeftSourceTitle( const TQString &title ) = 0; 00055 00059 virtual void setRightSourceTitle( const TQString &title ) = 0; 00060 00064 virtual void additionalLeftField( const TQString &id, const TQString &value ) = 0; 00065 00069 virtual void additionalRightField( const TQString &id, const TQString &value ) = 0; 00070 00074 virtual void conflictField( const TQString &id, const TQString &leftValue, 00075 const TQString &rightValue ) = 0; 00076 }; 00077 00078 00079 class KDE_EXPORT DiffAlgo 00080 { 00081 public: 00085 virtual ~DiffAlgo() {} 00086 00090 virtual void run() = 0; 00091 00095 void begin(); 00096 00100 void end(); 00101 00105 void setLeftSourceTitle( const TQString &title ); 00106 00110 void setRightSourceTitle( const TQString &title ); 00111 00115 void additionalLeftField( const TQString &id, const TQString &value ); 00116 00120 void additionalRightField( const TQString &id, const TQString &value ); 00121 00125 void conflictField( const TQString &id, const TQString &leftValue, 00126 const TQString &rightValue ); 00127 00128 void addDisplay( DiffAlgoDisplay *display ); 00129 void removeDisplay( DiffAlgoDisplay *display ); 00130 00131 00132 private: 00133 TQValueList<DiffAlgoDisplay*> mDisplays; 00134 }; 00135 00136 } 00137 00138 #endif