korganizer Library API Documentation

koeditorgeneral.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 KOEDITORGENERAL_H
00024 #define KOEDITORGENERAL_H
00025 
00026 #include <qframe.h>
00027 #include <qlabel.h>
00028 #include <qcheckbox.h>
00029 #include <qpushbutton.h>
00030 #include <qgroupbox.h>
00031 #include <qlineedit.h>
00032 #include <qcombobox.h>
00033 #include <qlistview.h>
00034 #include <qradiobutton.h>
00035 #include <qlayout.h>
00036 
00037 #include <ktextedit.h>
00038 #include <krestrictedline.h>
00039 
00040 #include <libkcal/incidence.h>
00041 
00042 #include "ktimeedit.h"
00043 
00044 class KDateEdit;
00045 class KSqueezedTextLabel;
00046 
00047 using namespace KCal;
00048 
00049 class FocusLineEdit : public QLineEdit
00050 {
00051     Q_OBJECT
00052   public:
00053     FocusLineEdit( QWidget *parent );
00054     
00055   signals:
00056     void focusReceivedSignal();
00057 
00058   protected:
00059     void focusInEvent ( QFocusEvent *e );
00060   
00061   private:
00062     bool mSkipFirst;
00063 };
00064 
00065 class KOEditorGeneral : public QObject
00066 {
00067     Q_OBJECT
00068   public:
00069     KOEditorGeneral (QObject* parent=0,const char* name=0);
00070     virtual ~KOEditorGeneral();
00071 
00072     void initHeader(QWidget *,QBoxLayout *);
00073     void initDescription(QWidget *,QBoxLayout *);
00074     void initSecrecy(QWidget *,QBoxLayout *);
00075     void initCategories(QWidget *,QBoxLayout *);    
00076     void initAlarm(QWidget *,QBoxLayout *);
00077 
00079     void setDefaults(bool allDay);
00081     void readIncidence(Incidence *);
00083     void writeIncidence(Incidence *);
00084 
00086     bool validateInput() { return true; }
00087 
00088     void enableAlarm( bool enable );
00089 
00090     void setSummary( const QString & );
00091     void setDescription( const QString & );
00092 
00093     QObject *typeAheadReceiver() const;
00094 
00095   public slots:
00096     void setCategories(const QString &);
00097 
00098   protected slots:
00099     void enableAlarmEdit( bool enable );
00100     void disableAlarmEdit( bool disable );
00101     void alarmDisable( bool disable );
00102     void pickAlarmSound();
00103     void pickAlarmProgram();
00104 
00105   signals:
00106     void openCategoryDialog();
00107     void focusReceivedSignal();
00108     
00109   protected:
00110     QLineEdit               *mSummaryEdit;
00111     QLineEdit               *mLocationEdit;
00112     QLabel                  *mAlarmBell;
00113     QCheckBox               *mAlarmButton;
00114     KRestrictedLine         *mAlarmTimeEdit;
00115     QPushButton             *mAlarmSoundButton;
00116     QPushButton             *mAlarmProgramButton;
00117     QComboBox               *mAlarmIncrCombo;
00118     KTextEdit               *mDescriptionEdit;
00119     QLabel                  *mOwnerLabel;
00120     QComboBox               *mSecrecyCombo;
00121     QPushButton             *mCategoriesButton;
00122     KSqueezedTextLabel      *mCategoriesLabel;
00123      
00124   private:
00125     QString mCategories;
00126     QString mAlarmSound;
00127     QString mAlarmProgram;
00128 };
00129 
00130 #endif
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:29 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003