memoWidget.h
00001 #ifndef _KPILOT_MEMOWIDGET_H
00002 #define _KPILOT_MEMOWIDGET_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 <time.h>
00032
00033 #ifndef _PILOT_MEMO_H_
00034 #include <pi-memo.h>
00035 #endif
00036
00037 #ifndef KDE_VERSION
00038 #include <kdeversion.h>
00039 #endif
00040
00041 #if KDE_VERSION >= 0x30100
00042 #include <ktextedit.h>
00043 #else
00044 #define KTextEdit QTextEdit
00045 #include <qtextedit.h>
00046 #endif
00047
00048 #include <qptrlist.h>
00049
00050 class KPilotInstaller;
00051 class QListBox;
00052 class QComboBox;
00053 class QPushButton;
00054
00055 class PilotMemo;
00056 class PilotListItem;
00057
00058 #ifndef _KPILOT_PILOTCOMPONENT_H
00059 #include "pilotComponent.h"
00060 #endif
00061
00062 class MemoWidget : public PilotComponent
00063 {
00064 Q_OBJECT
00065
00066 public:
00067 MemoWidget(QWidget* parent, const QString& dbpath);
00068 virtual ~MemoWidget();
00069
00070
00071 void initialize();
00072 bool preHotSync(QString &);
00073 void postHotSync();
00074
00075
00076 bool saveAsXML(const QString &fileName,const QPtrList<PilotListItem> &menu_item );
00077 bool saveAsText(const QString &fileName,const QPtrList<PilotListItem> &menu_item );
00078
00079 typedef enum {
00080 MAX_MEMO_LEN = 8192
00081 } Constants ;
00082
00083 protected:
00084 void initializeCategories(PilotDatabase *);
00085 void initializeMemos(PilotDatabase *);
00086
00087
00088 void saveChangedMemo();
00089
00090 public slots:
00098 void slotShowMemo(int);
00099 void slotUpdateButtons();
00100
00101 void slotImportMemo();
00102 void slotExportMemo();
00103 void slotDeleteMemo();
00104 void slotSetCategory(int);
00105
00106 private:
00107 void setupWidget();
00108 void updateWidget();
00109 void writeMemo(PilotMemo* which);
00110 QComboBox* fCatList;
00111
00112 KTextEdit* fTextWidget;
00113 struct MemoAppInfo fMemoAppInfo;
00114 QPtrList<PilotMemo> fMemoList;
00115 QListBox* fListBox;
00116
00117 QPushButton *fExportButton,*fDeleteButton;
00118
00119 int lastSelectedMemo;
00120 };
00121
00122
00123 #endif
This file is part of the documentation for kdelibs Version 3.1.5.