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 showComponent();
00072 void hideComponent();
00073 bool preHotSync(QString &);
00074 void postHotSync();
00075
00076
00077 bool saveAsXML(const QString &fileName,const QPtrList<PilotListItem> &menu_item );
00078 bool saveAsText(const QString &fileName,const QPtrList<PilotListItem> &menu_item );
00079
00080 typedef enum {
00081 MAX_MEMO_LEN = 8192
00082 } Constants ;
00083
00084 protected:
00085 void initializeCategories(PilotDatabase *);
00086 void initializeMemos(PilotDatabase *);
00087
00088
00089 void saveChangedMemo();
00090
00091 public slots:
00099 void slotShowMemo(int);
00100 void slotUpdateButtons();
00101
00102 void slotImportMemo();
00103 void slotExportMemo();
00104 void slotDeleteMemo();
00105 void slotSetCategory(int);
00106
00107 private:
00108 void setupWidget();
00109 void updateWidget();
00110 void writeMemo(PilotMemo* which);
00111 QComboBox* fCatList;
00112
00113 KTextEdit* fTextWidget;
00114 struct MemoAppInfo fMemoAppInfo;
00115 QPtrList<PilotMemo> fMemoList;
00116 QListBox* fListBox;
00117
00118 QPushButton *fExportButton,*fDeleteButton;
00119
00120 int lastSelectedMemo;
00121 };
00122
00123
00124 #endif
This file is part of the documentation for kpilot Library Version 3.2.2.