summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneralevent.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /korganizer/koeditorgeneralevent.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'korganizer/koeditorgeneralevent.h') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneralevent.h108
1 files changed, 108 insertions, 0 deletions
diff --git a/korganizer/koeditorgeneralevent.h b/korganizer/koeditorgeneralevent.h
new file mode 100644
index 0000000..188dc93
--- a/dev/null
+++ b/korganizer/koeditorgeneralevent.h
@@ -0,0 +1,108 @@
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution.
22*/
23#ifndef _KOEDITORGENERALEVENT_H
24#define _KOEDITORGENERALEVENT_H
25
26#include <qframe.h>
27#include <qlabel.h>
28#include <qcheckbox.h>
29#include <qpushbutton.h>
30#include <qgroupbox.h>
31#include <qlineedit.h>
32#include <qcombobox.h>
33#include <qmultilineedit.h>
34#include <qlistview.h>
35#include <qradiobutton.h>
36
37#include <krestrictedline.h>
38
39#include "koeditorgeneral.h"
40
41#include "ktimeedit.h"
42
43class KDateEdit;
44
45using namespace KCal;
46
47class KOEditorGeneralEvent : public KOEditorGeneral
48{
49 Q_OBJECT
50 public:
51 KOEditorGeneralEvent (QObject* parent=0,const char* name=0);
52 virtual ~KOEditorGeneralEvent();
53
54 void initTime(QWidget *,QBoxLayout *);
55 void initClass(QWidget *,QBoxLayout *);
56
57 void finishSetup();
58
59 /** Set widgets to default values */
60 void setDefaults(QDateTime from,QDateTime to,bool allDay);
61 /**
62 Read event object and setup widgets accordingly. If templ is true, the
63 event is read as template, i.e. the time and date information isn't set.
64 */
65 void readEvent( Event *, bool tmpl = false );
66 /** Write event settings to event object */
67 void writeEvent(Event *);
68
69 /** Check if the input is valid. */
70 bool validateInput();
71
72 public slots:
73 void setDateTimes(QDateTime start, QDateTime end);
74 void setDuration();
75
76 protected slots:
77 void timeStuffDisable(bool disable);
78 void dontAssociateTime(bool noTime);
79
80 void startTimeChanged(QTime);
81 void startDateChanged(QDate);
82 void endTimeChanged(QTime);
83 void endDateChanged(QDate);
84
85 void emitDateTimeStr();
86
87 signals:
88 void dateTimesChanged(QDateTime start,QDateTime end);
89 void allDayChanged(bool);
90 void dateTimeStrChanged(const QString &);
91
92 private:
93 QLabel *mStartDateLabel;
94 QLabel *mEndDateLabel;
95 KDateEdit *mStartDateEdit;
96 KDateEdit *mEndDateEdit;
97 KOTimeEdit *mStartTimeEdit;
98 KOTimeEdit *mEndTimeEdit;
99 QLabel *mDurationLabel;
100 QCheckBox *mNoTimeButton;
101 QComboBox *mFreeTimeCombo;
102
103 // current start and end date and time
104 QDateTime mCurrStartDateTime;
105 QDateTime mCurrEndDateTime;
106};
107
108#endif