kincidencechooser.h
00001 /* 00002 This file is part of libtdepim. 00003 00004 Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program 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 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 00020 As a special exception, permission is given to link this program 00021 with any edition of TQt, and distribute the resulting executable, 00022 without including the source code for TQt in the source distribution. 00023 */ 00024 #ifndef _KINCIDENCECHOOSER_H 00025 #define _KINCIDENCECHOOSER_H 00026 00027 #include "calendardiffalgo.h" 00028 #include "htmldiffalgodisplay.h" 00029 00030 #include <kdialogbase.h> 00031 00032 namespace KCal { 00033 class Incidence; 00034 } 00035 using namespace KCal; 00036 00037 class TQButtonGroup; 00038 00042 class KDE_EXPORT KIncidenceChooser : public KDialog 00043 { 00044 Q_OBJECT 00045 00046 public: 00047 enum mode { 00048 local, remote, newest, ask, both 00049 }; 00051 KIncidenceChooser( TQWidget *parent=0, char *name=0 ); 00052 ~KIncidenceChooser(); 00053 //void setChooseText( TQString ); 00054 void setIncidence( KCal::Incidence *, KCal::Incidence * ); 00055 KCal::Incidence *getIncidence(); 00056 static int chooseMode; 00057 00058 public slots: 00059 void useGlobalMode(); 00060 00061 protected slots: 00062 void showIncidence1(); 00063 void showIncidence2(); 00064 void showDiff(); 00065 void takeIncidence1(); 00066 void takeIncidence2(); 00067 void takeBoth(); 00068 void setLabels(); 00069 void setSyncMode(); 00070 void detailsDialogClosed(); 00071 00072 private: 00073 KPIM::HTMLDiffAlgoDisplay *mDisplayDiff; 00074 KPIM::CalendarDiffAlgo *diff; 00075 KDialogBase *mTbL, *mTbN; 00076 KCal::Incidence *mSelIncidence; 00077 KCal::Incidence *mInc1, *mInc2; 00078 TQButtonGroup *mBg; 00079 TQPushButton *mDiffBut,*mShowDetails1,*mShowDetails2; 00080 TQLabel *mInc1lab, *mInc2lab,* mInc1Sumlab, *mInc2Sumlab,*mMod1lab,*mMod2lab; 00081 00082 }; 00083 00084 #endif