• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

korganizer

koeditorgeneral.h

Go to the documentation of this file.
00001 /*
00002   This file is part of KOrganizer.
00003 
00004   Copyright (c) 2001 Cornelius Schumacher <schumacher@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 along
00017   with this program; if not, write to the Free Software Foundation, Inc.,
00018   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 KOEDITORGENERAL_H
00025 #define KOEDITORGENERAL_H
00026 
00027 #include <kcal/alarm.h>
00028 
00029 #include <KLineEdit>
00030 
00031 #include <QLabel>
00032 #include <QFocusEvent>
00033 #include <QBoxLayout>
00034 #include <QTextList>
00035 
00036 class QWidget;
00037 class QBoxLayout;
00038 class QLabel;
00039 class QCheckBox;
00040 class QStackedWidget;
00041 class QSpinBox;
00042 class QPushButton;
00043 class QToolButton;
00044 class KComboBox;
00045 class KLineEdit;
00046 class KToolBar;
00047 class KRichTextWidget;
00048 class KSqueezedTextLabel;
00049 class KUrl;
00050 class KOEditorAttachments;
00051 
00052 namespace KCal {
00053   class Incidence;
00054   class Calendar;
00055 }
00056 using namespace KCal;
00057 
00058 class FocusLineEdit : public KLineEdit
00059 {
00060   Q_OBJECT
00061   public:
00062     explicit FocusLineEdit( QWidget *parent );
00063 
00064   signals:
00065     void focusReceivedSignal();
00066 
00067   protected:
00068     void focusInEvent ( QFocusEvent *e );
00069 
00070   private:
00071     bool mFirst;
00072 };
00073 
00074 class KOEditorGeneral : public QObject
00075 {
00076   Q_OBJECT
00077   public:
00078     explicit KOEditorGeneral( QObject *parent=0 );
00079     virtual ~KOEditorGeneral();
00080 
00081     void initHeader( QWidget *parent, QBoxLayout *topLayout );
00082     void initDescription( QWidget *, QBoxLayout * );
00083     void initSecrecy( QWidget *, QBoxLayout * );
00084     void initAlarm( QWidget *, QBoxLayout * );
00085     void initAttachments( QWidget *, QBoxLayout * );
00086 
00088     void setDefaults( bool allDay );
00089 
00091     void readIncidence( Incidence *event, Calendar *calendar );
00093     void writeIncidence( Incidence * );
00094 
00096     bool validateInput() { return true; }
00097 
00098     void enableAlarm( bool enable );
00099     void toggleAlarm( bool on );
00100 
00101     void setSummary( const QString & );
00102     void setDescription( const QString &, bool isRich );
00103 
00104     QObject *typeAheadReceiver() const;
00105 
00106   public slots:
00107     void setCategories( const QStringList &categories );
00108     void selectCategories();
00109     void addAttachments( const QStringList &attachments,
00110                          const QStringList &mimeTypes = QStringList(),
00111                          bool inlineAttachment = false );
00112 
00113   protected slots:
00114     void editAlarms();
00115     void updateAlarmWidgets();
00116     void updateDefaultAlarmTime();
00117     void updateAttendeeSummary( int count );
00118     void setDescriptionRich( bool rich );
00119 
00120   signals:
00121     void openCategoryDialog();
00122     void updateCategoryConfig();
00123     void focusReceivedSignal();
00124     void openURL( const KUrl & );
00125 
00126   protected:
00127     Alarm *alarmFromSimplePage() const;
00128 
00129     KLineEdit               *mSummaryEdit;
00130     KLineEdit               *mLocationEdit;
00131     QLabel                  *mAttendeeSummaryLabel;
00132     QLabel                  *mAlarmBell;
00133     QStackedWidget          *mAlarmStack;
00134     QLabel                  *mAlarmInfoLabel;
00135     QCheckBox               *mAlarmButton;
00136     QSpinBox                *mAlarmTimeEdit;
00137     KComboBox               *mAlarmIncrCombo;
00138     QPushButton             *mAlarmEditButton;
00139     KRichTextWidget         *mDescriptionEdit;
00140     QLabel                  *mOwnerLabel;
00141     KComboBox               *mSecrecyCombo;
00142     QPushButton             *mCategoriesButton;
00143     KSqueezedTextLabel      *mCategoriesLabel;
00144     KToolBar                *mEditToolBar;
00145     KToolBar                *mFormatToolBar;
00146     QCheckBox               *mRichDescription;
00147     KOEditorAttachments     *mAttachments;
00148 
00149     enum AlarmStackPages {
00150       SimpleAlarmPage,
00151       AdvancedAlarmLabel
00152     };
00153 
00154   private:
00155     void toggleDescriptionRichButtons( bool rich );
00156     QStringList mCategories;
00157     KCal::Alarm::List mAlarmList;
00158 };
00159 
00160 #endif

korganizer

Skip menu "korganizer"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal