kontact
knotes_part.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KNOTES_PART_H
00023 #define KNOTES_PART_H
00024
00025 #include <tqdict.h>
00026
00027 #include <kiconview.h>
00028 #include <kglobal.h>
00029 #include <kiconloader.h>
00030
00031 #include <libkcal/journal.h>
00032 #include <kparts/part.h>
00033
00034 #include "knotes/KNotesIface.h"
00035
00036 class KIconView;
00037 class TQIconViewItem;
00038 class KNotesIconViewItem;
00039 class KNoteTip;
00040 class KNoteEditDlg;
00041 class KNotesResourceManager;
00042
00043 namespace KCal {
00044 class Journal;
00045 }
00046
00047 class KNotesPart : public KParts::ReadOnlyPart, virtual public KNotesIface
00048 {
00049 Q_OBJECT
00050
00051 public:
00052 KNotesPart( TQObject *parent = 0, const char *name = 0 );
00053 ~KNotesPart();
00054
00055 bool openFile();
00056
00057 public slots:
00058 TQString newNote( const TQString& name = TQString::null,
00059 const TQString& text = TQString::null );
00060 TQString newNoteFromClipboard( const TQString& name = TQString::null );
00061
00062 public:
00063 void killNote( const TQString& id );
00064 void killNote( const TQString& id, bool force );
00065
00066 TQString name( const TQString& id ) const;
00067 TQString text( const TQString& id ) const;
00068
00069 void setName( const TQString& id, const TQString& newName );
00070 void setText( const TQString& id, const TQString& newText );
00071
00072 TQMap<TQString, TQString> notes() const;
00073
00074 private slots:
00075 void createNote( KCal::Journal *journal );
00076 void killNote( KCal::Journal *journal );
00077
00078 void editNote( TQIconViewItem *item );
00079
00080 void renameNote();
00081 void renamedNote( TQIconViewItem *item );
00082
00083 void slotOnItem( TQIconViewItem *item );
00084 void slotOnViewport();
00085 void slotOnCurrentChanged( TQIconViewItem *item );
00086
00087 void popupRMB( TQIconViewItem *item, const TQPoint& pos );
00088 void killSelectedNotes();
00089
00090 void printSelectedNotes();
00091
00092 private:
00093 KIconView *mNotesView;
00094 KNoteTip *mNoteTip;
00095 KNoteEditDlg *mNoteEditDlg;
00096
00097 KNotesResourceManager *mManager;
00098 TQDict<KNotesIconViewItem> mNoteList;
00099 TQString mOldName;
00100 };
00101
00102 #endif
|