dbviewerWidget.h
00001 #ifndef _KPILOT_DBVIEWERWIDGET_H
00002 #define _KPILOT_DBVIEWERWIDGET_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
00032 #include "pilotComponent.h"
00033
00034 class KListBox;
00035 class KTextEdit;
00036 class KPushButton;
00037 class KComboBox;
00038 class PilotLocalDatabase;
00039 class PilotRecord;
00040 class KListView;
00041
00042 class GenericDBWidget : public PilotComponent
00043 {
00044 Q_OBJECT
00045
00046 public:
00047 GenericDBWidget(QWidget* parent, const QString& dbpath);
00048 virtual ~GenericDBWidget();
00049
00050
00051 void showComponent();
00052 void hideComponent();
00053
00054 QString getCurrentDB() const { return currentDB; }
00055 protected:
00056 void setupWidget();
00057
00058 protected slots:
00059 void slotSelected(const QString &dbname);
00060 void slotDBType(int mode);
00061 void reset();
00062 void slotAddRecord();
00063 void slotEditRecord();
00064 bool slotEditRecord(QListViewItem*);
00065 void slotDeleteRecord();
00066 void slotShowAppInfo();
00067 void slotShowDBInfo();
00068 void enableWidgets(bool enable);
00069 void writeRecord(PilotRecord*r);
00070
00071 private:
00072 KListBox*fDBList;
00073 KComboBox*fDBType;
00074 KTextEdit*fDBInfo;
00075 KPushButton*fDBInfoButton, *fAppInfoButton;
00076 KListView*fRecordList;
00077 KPushButton*fAddRecord, *fEditRecord, *fDeleteRecord;
00078
00079 enum eDBType {
00080 eDatabase,
00081 eApplication
00082 } currentDBtype;
00083
00084 PilotLocalDatabase*fDB;
00085 QString currentDB;
00086 QPtrList<PilotRecord> fRecList;
00087 };
00088
00089
00090 #endif
This file is part of the documentation for kpilot Library Version 3.2.2.