1 | /* |
2 | This file is part of libkdepim. |
3 | |
4 | Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> |
5 | |
6 | This program is free software; you can redistribute it and/or modify |
7 | it under the terms of the GNU General Public License as published by |
8 | the Free Software Foundation; either version 2 of the License, or |
9 | (at your option) any later version. |
10 | |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. |
15 | |
16 | You should have received a copy of the GNU General Public License along |
17 | with this program; if not, write to the Free Software Foundation, Inc., |
18 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
19 | |
20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. |
23 | */ |
24 | #ifndef KDEPIM_KINCIDENCECHOOSER_H |
25 | #define KDEPIM_KINCIDENCECHOOSER_H |
26 | |
27 | #include "libkdepim-copy_export.h" |
28 | #include "calendardiffalgo.h" |
29 | #include "htmldiffalgodisplay.h" |
30 | |
31 | #include <kcalcore/incidence.h> |
32 | |
33 | #include <KDialog> |
34 | |
35 | class QButtonGroup; |
36 | class QLabel; |
37 | |
38 | namespace KPIM { |
39 | |
40 | /** |
41 | @brief |
42 | Dialog to change the korganizer configuration. |
43 | */ |
44 | |
45 | class KDEPIM_COPY_EXPORT KIncidenceChooser : public KDialog |
46 | { |
47 | Q_OBJECT |
48 | public: |
49 | enum mode { |
50 | local, |
51 | remote, |
52 | newest, |
53 | ask, |
54 | both |
55 | }; |
56 | |
57 | /** Initialize dialog and pages */ |
58 | KIncidenceChooser( QWidget *parent = 0 ); |
59 | ~KIncidenceChooser(); |
60 | void setIncidence( const KCalCore::Incidence::Ptr &, |
61 | const KCalCore::Incidence::Ptr & ); |
62 | KCalCore::Incidence::Ptr getIncidence(); |
63 | static int chooseMode; |
64 | |
65 | public Q_SLOTS: |
66 | void useGlobalMode(); |
67 | |
68 | protected Q_SLOTS: |
69 | void showIncidence1(); |
70 | void showIncidence2(); |
71 | void showDiff(); |
72 | void takeIncidence1(); |
73 | void takeIncidence2(); |
74 | void takeBoth(); |
75 | void setLabels(); |
76 | void setSyncMode(); |
77 | void detailsDialogClosed(); |
78 | |
79 | private: |
80 | HTMLDiffAlgoDisplay *mDisplayDiff; |
81 | CalendarDiffAlgo *diff; |
82 | KDialog *mTbL, *mTbN; |
83 | KCalCore::Incidence::Ptr mSelIncidence; |
84 | KCalCore::Incidence::Ptr mInc1, mInc2; |
85 | QButtonGroup *mBg; |
86 | QPushButton *mDiffBut, *mShowDetails1, *mShowDetails2; |
87 | QLabel *mInc1lab, *mInc2lab, *mInc1Sumlab, *mInc2Sumlab, *mMod1lab, *mMod2lab; |
88 | }; |
89 | |
90 | } |
91 | |
92 | #endif |
93 | |