knotes_part.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef KNOTE_PART_H
00022
#define KNOTE_PART_H
00023
00024
#include <qmap.h>
00025
#include <qpixmap.h>
00026
#include <kparts/part.h>
00027
#include <libkcal/resourcelocal.h>
00028
#include <libkcal/calendarresources.h>
00029
00030
typedef QMap<QString, QString> NotesMap;
00031
00032
class KAction;
00033
class KListView;
00034
00035
class QListViewItem;
00036
class QPoint;
00037
00038
class KNotesPart :
public KParts::ReadOnlyPart
00039 {
00040 Q_OBJECT
00041
00042
public:
00043 KNotesPart(
QObject *parent = 0,
const char *name = 0 );
00044 ~KNotesPart();
00045
00046
bool openFile();
00047
00048
public slots:
00049
void newNote();
00050
00051 signals:
00052
void noteSelected(
const QString &name );
00053
void noteSelected(
const QPixmap &pixmap );
00054
00055
protected slots:
00056
void noteRenamed(
QListViewItem *item,
int col,
const QString& text );
00057
void popupRMB(
QListViewItem *item,
const QPoint& pos,
int );
00058
void removeNote();
00059
void removeSelectedNotes();
00060
void renameNote();
00061
void editNote(
QListViewItem* item,
const QPoint&,
int );
00062
void editNote(
QListViewItem* item );
00063
void reloadNotes();
00064
void slotCalendarChanged();
00065
00066
private:
00067
bool lock();
00068
bool unlock();
00069
00070 KCal::ResourceLocal *mResource;
00071 KCal::CalendarResources *mCalendar;
00072 KCal::CalendarResources::Ticket *mTicket;
00073
00074 KAction *mActionEdit;
00075 KAction *mActionDelete;
00076
00077 KListView *mNotesView;
00078
QPixmap mAppIcon;
00079
QPopupMenu *mPopupMenu;
00080 };
00081
00082
#endif
This file is part of the documentation for kontact Library Version 3.3.0.