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

korganizer

koeditorattachments.h

Go to the documentation of this file.
00001 /*
00002   This file is part of KOrganizer.
00003 
00004   Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
00005   Copyright (C) 2005 Reinhold Kainhofer <reinhold@kainhofer.com>
00006   Copyright (c) 2005 Rafal Rzepecki <divide@users.sourceforge.net>
00007 
00008   This program is free software; you can redistribute it and/or modify
00009   it under the terms of the GNU General Public License as published by
00010   the Free Software Foundation; either version 2 of the License, or
00011   (at your option) any later version.
00012 
00013   This program is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016   GNU General Public License for more details.
00017 
00018   You should have received a copy of the GNU General Public License along
00019   with this program; if not, write to the Free Software Foundation, Inc.,
00020   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00021 
00022   As a special exception, permission is given to link this program
00023   with any edition of Qt, and distribute the resulting executable,
00024   without including the source code for Qt in the source distribution.
00025 */
00026 #ifndef KOEDITORATTACHMENTS_H
00027 #define KOEDITORATTACHMENTS_H
00028 
00029 #include <kdialog.h>
00030 #include <kmimetype.h>
00031 #include <kurl.h>
00032 
00033 #include <QWidget>
00034 #include <QDragEnterEvent>
00035 #include <Q3ValueList>
00036 #include <QLabel>
00037 #include <QDropEvent>
00038 
00039 namespace KCal {
00040   class Incidence;
00041   class Attachment;
00042 }
00043 
00044 class KJob;
00045 class AttachmentIconItem;
00046 class Q3IconDragItem;
00047 class Q3IconViewItem;
00048 class QLabel;
00049 class KLineEdit;
00050 class K3IconView;
00051 class KMenu;
00052 class KUrlRequester;
00053 class QCheckBox;
00054 class AttachmentIconView;
00055 class QMimeSource;
00056 class QPushButton;
00057 class KAction;
00058 
00059 namespace KIO {
00060   class Job;
00061 }
00062 
00063 class AttachmentEditDialog : public KDialog
00064 {
00065   Q_OBJECT
00066   public:
00067     AttachmentEditDialog( AttachmentIconItem *item,
00068                           QWidget *parent, bool modal=true );
00069 
00070     void accept();
00071 
00072   protected slots:
00073     void urlChanged( const KUrl &url );
00074     virtual void slotApply();
00075 
00076   private:
00077     KMimeType::Ptr mMimeType;
00078     AttachmentIconItem *mItem;
00079     QLabel *mTypeLabel, *mIcon;
00080     KLineEdit *mLabelEdit;
00081     KUrlRequester *mURLRequester;
00082     QCheckBox *mInline;
00083 };
00084 
00085 class KOEditorAttachments : public QWidget
00086 {
00087   Q_OBJECT
00088   public:
00089     explicit KOEditorAttachments( int spacing = 8, QWidget *parent = 0 );
00090     ~KOEditorAttachments();
00091 
00092     void addAttachment( const QString &uri,
00093                         const QString &mimeType = QString(),
00094                         const QString &label = QString(),
00095                         bool binary = false );
00096     void addAttachment( KCal::Attachment *attachment );
00097     void addAttachment( const QByteArray &data,
00098                         const QString &mimeType = QString(),
00099                         const QString &label = QString() );
00100 
00102     void setDefaults();
00104     void readIncidence( KCal::Incidence * );
00106     void writeIncidence( KCal::Incidence * );
00107 
00108     bool hasAttachments();
00109 
00110   public slots:
00112     void applyChanges();
00113 
00114   protected slots:
00115     void showAttachment( Q3IconViewItem *item );
00116     void slotAdd();
00117     void slotEdit();
00118     void slotRemove();
00119     void slotShow();
00120     void dragEnterEvent( QDragEnterEvent *event );
00121     void dropEvent( QDropEvent *event );
00122     void slotItemRenamed ( Q3IconViewItem * item, const QString & text );
00123     void dropped ( QDropEvent * e, const Q3ValueList<Q3IconDragItem> & lst );
00124     void downloadComplete( KJob *job );
00125     void slotCopy();
00126     void slotCut();
00127     void slotPaste();
00128     void selectionChanged();
00129     void contextMenu( Q3IconViewItem *item, const QPoint &pos );
00130 
00131   signals:
00132     void openURL( const KUrl &url );
00133 
00134   private:
00135     void handlePasteOrDrop( const QMimeData *mimeData );
00136 
00137     AttachmentIconView *mAttachments;
00138     KMenu *mPopupMenu;
00139     QString mUid; // used only to generate attachments' filenames
00140     QPushButton *mRemoveBtn;
00141     KAction *mOpenAction, *mCopyAction, *mCutAction,
00142             *mDeleteAction, *mEditAction;
00143 };
00144 
00145 #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