libkdepim

kincidencechooser.h

00001 /*
00002     This file is part of libkdepim.
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 Qt, and distribute the resulting executable,
00022     without including the source code for Qt 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   public:
00046     enum mode {
00047       local, remote, newest, ask, both
00048     };
00050     KIncidenceChooser( TQWidget *parent=0, char *name=0 );
00051     ~KIncidenceChooser();
00052     //void setChooseText( TQString );
00053     void setIncidence( KCal::Incidence *, KCal::Incidence  * );
00054     KCal::Incidence *getIncidence();
00055     static int chooseMode;
00056 
00057   public slots:
00058     void useGlobalMode();
00059 
00060   protected slots:
00061     void showIncidence1();
00062     void showIncidence2();
00063     void showDiff();
00064     void takeIncidence1();
00065     void takeIncidence2();
00066     void takeBoth();
00067     void setLabels();
00068     void setSyncMode();
00069     void detailsDialogClosed();
00070 
00071   private:
00072     KPIM::HTMLDiffAlgoDisplay *mDisplayDiff;
00073     KPIM::CalendarDiffAlgo *diff;
00074     KDialogBase *mTbL, *mTbN;
00075     KCal::Incidence *mSelIncidence;
00076     KCal::Incidence *mInc1, *mInc2;
00077     TQButtonGroup *mBg;
00078     TQPushButton *mDiffBut,*mShowDetails1,*mShowDetails2;
00079     TQLabel *mInc1lab, *mInc2lab,* mInc1Sumlab, *mInc2Sumlab,*mMod1lab,*mMod2lab;
00080 
00081 };
00082 
00083 #endif