korganizer Library API Documentation

koeditorgeneralevent.h

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00018 
00019     As a special exception, permission is given to link this program
00020     with any edition of Qt, and distribute the resulting executable,
00021     without including the source code for Qt in the source distribution.
00022 */
00023 #ifndef _KOEDITORGENERALEVENT_H
00024 #define _KOEDITORGENERALEVENT_H
00025 
00026 #include "koeditorgeneral.h"
00027 #include <qdatetime.h>
00028 
00029 class QLabel;
00030 class KDateEdit;
00031 class KTimeEdit;
00032 class QCheckBox;
00033 class QComboBox;
00034 class QBoxLayout;
00035 
00036 namespace KCal {
00037 class Event;
00038 }
00039 using namespace KCal;
00040 
00041 class KOEditorGeneralEvent : public KOEditorGeneral
00042 {
00043     Q_OBJECT
00044   public:
00045     KOEditorGeneralEvent (QObject* parent=0,const char* name=0);
00046     virtual ~KOEditorGeneralEvent();
00047 
00048     void initTime(QWidget *,QBoxLayout *);
00049     void initClass(QWidget *,QBoxLayout *);
00050 
00051     void finishSetup();
00052 
00054     void setDefaults( QDateTime from, QDateTime to, bool allDay );
00059     void readEvent( Event *, bool tmpl = false );
00061     void writeEvent( Event * );
00062 
00064     bool validateInput();
00065 
00066   public slots:
00067     void setDateTimes( QDateTime start, QDateTime end );
00068     void setDuration();
00069 
00070   protected slots:
00071     void timeStuffDisable( bool disable );
00072     void dontAssociateTime( bool noTime );
00073 
00074     void startTimeChanged( QTime );
00075     void startDateChanged( QDate );
00076     void endTimeChanged( QTime );
00077     void endDateChanged( QDate );
00078 
00079     void emitDateTimeStr();
00080 
00081   signals:
00082     void allDayChanged(bool);
00083     void dateTimeStrChanged( const QString & );
00084     void dateTimesChanged( QDateTime start, QDateTime end );
00085 
00086   private:
00087     QLabel                  *mStartDateLabel;
00088     QLabel                  *mEndDateLabel;
00089     KDateEdit               *mStartDateEdit;
00090     KDateEdit               *mEndDateEdit;
00091     KTimeEdit               *mStartTimeEdit;
00092     KTimeEdit               *mEndTimeEdit;
00093     QLabel                  *mDurationLabel;
00094     QCheckBox               *mNoTimeButton;
00095     QComboBox               *mFreeTimeCombo;
00096 
00097     // current start and end date and time
00098     QDateTime mCurrStartDateTime;
00099     QDateTime mCurrEndDateTime;
00100 };
00101 
00102 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Aug 2 09:56:04 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003