00001
#ifndef _KPILOT_KNOTES_ACTION_H
00002
#define _KPILOT_KNOTES_ACTION_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
#include "plugin.h"
00032
00033
class KNotesAction :
public ConduitAction
00034 {
00035 Q_OBJECT
00036
public:
00037 KNotesAction(
00038 KPilotDeviceLink *o,
00039
const char *n = 0L,
00040
const QStringList &a = QStringList() );
00041
virtual ~KNotesAction();
00042
00043
enum Status { Init,
00044 ModifiedNotesToPilot,
00045 NewNotesToPilot,
00046 MemosToKNotes,
00047 Cleanup,
00048 Done } ;
00049
virtual QString statusString() const;
00050
00051 protected:
00052 virtual
bool exec();
00053
00054 protected:
00058
void listNotes();
00059
00067
void getAppInfo();
00068
void getConfigInfo();
00069
bool modifyNoteOnPilot();
00070
bool addNewNoteToPilot();
00071
bool syncMemoToKNotes();
00072
void cleanupMemos();
00073
00074
void resetIndexes();
00075
00076 static const
char * const noteIdsKey;
00077 static const
char * const memoIdsKey;
00078
00079 protected slots:
00080
void process();
00081
00082 private:
00083 class KNotesActionPrivate;
00084 KNotesActionPrivate *fP;
00085 } ;
00086
00087 #endif