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 
00028 #include <kdialogbase.h>
00029 #include <qptrlist.h>
00030 #include <qmutex.h>
00031 #include <kdepimmacros.h>
00032 
00033 #include <libkcal/incidence.h>
00034 #include "htmldiffalgodisplay.h"
00035 #include "calendardiffalgo.h"
00036 
00037 
00038 class QRadioButton;
00039 class QButtonGroup;
00040 class QVBox;
00041 class QStringList;
00042 class QTextBrowser;
00043 class KDialogBase;
00044 
00048 class KDE_EXPORT KIncidenceChooser : public KDialog
00049 {
00050     Q_OBJECT
00051 public:
00052     enum mode { local, remote, newest, ask, both };
00054     KIncidenceChooser(QWidget *parent=0,char *name=0);
00055     ~KIncidenceChooser();
00056     //void setChooseText( QString );
00057     void setIncidence( KCal::Incidence*,KCal::Incidence*);
00058     KCal::Incidence* getIncidence();
00059     static int chooseMode;
00060 
00061 public slots:
00062     void useGlobalMode();
00063 
00064 protected slots:
00065     void showIncidence1();
00066     void showIncidence2();
00067     void showDiff();
00068     void takeIncidence1();
00069     void takeIncidence2();
00070     void takeBoth();
00071     void setLabels();
00072     void setSyncMode();
00073     void detailsDialogClosed();
00074 
00075 protected:
00076 private:
00077     KPIM::HTMLDiffAlgoDisplay* mDisplayDiff;
00078     KPIM::CalendarDiffAlgo* diff;
00079     KDialogBase* mTbL, *mTbN;
00080     KCal::Incidence* choosedIncidence;
00081     KCal::Incidence* mInc1, *mInc2;
00082     QButtonGroup *mBg;
00083     QPushButton *diffBut,*showDetails1,*showDetails2;
00084     QLabel* mInc1lab, *mInc2lab,* mInc1Sumlab, *mInc2Sumlab,*mMod1lab,*mMod2lab;
00085 
00086 };
00087 
00088 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys