00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef HK_KDEROWSELECTOR
00013 #define HK_KDEROWSELECTOR
00014 #include <qwidget.h>
00015 #include <qlayout.h>
00016 #include <qpushbutton.h>
00017 #include <klineedit.h>
00018 #include <hk_dsrowselector.h>
00019 #include <hk_datasource.h>
00020
00021 class hk_form;
00032 class hk_kderowselector : public QWidget , public hk_dsrowselector
00033 {
00034 Q_OBJECT
00035
00036 public:
00037 hk_kderowselector(QWidget* wid=0,hk_form* form=NULL);
00038 virtual ~hk_kderowselector();
00039
00040 protected slots:
00041 void slotpress_gotofirst(void);
00042 void slotpress_gotoprevious(void);
00043 void slotpress_gotonext(void);
00044 void slotpress_gotolast(void);
00045 void slotpress_storechanges(void);
00046 void slotpress_delete(void);
00047 void slotpress_insert(void);
00048 void slotlineedit(void);
00049
00050 signals:
00051 void previousrow_clicked();
00052 void nextrow_clicked();
00053 void insertrow_clicked();
00054 void lastrow_clicked();
00055 void firstrow_clicked();
00056 void deleterow_clicked();
00060 void rowselector_clicked();
00061
00062 protected:
00063 void widget_specific_enable_disable(void);
00064 bool widget_specific_row_change(void);
00065 void datasource_delete(void);
00066 bool datasource_enable(void);
00067 virtual void widget_specific_insert_mode(void);
00068 virtual void resizeEvent (QResizeEvent *);
00069 virtual void moveEvent ( QMoveEvent * ) ;
00070 bool widget_specific_coordinates(uint px,uint py,uint pwidth,uint pheight);
00071 virtual void widget_specific_backgroundcolour_changed(const hk_colour&);
00072 virtual void widget_specific_foregroundcolour_changed(const hk_colour&);
00073
00074 private:
00075 QPushButton* button_delete;
00076 QPushButton* button_insert;
00077 QPushButton* button_gotofirst;
00078 QPushButton* button_gotoprevious;
00079 QPushButton* button_gotonext;
00080 QPushButton* button_gotolast;
00081 QPushButton* button_store;
00082 KLineEdit* label;
00083 QHBoxLayout* layout;
00084 void reposition(void);
00085
00086 };
00087 #endif