00001 // **************************************************************************** 00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org> 00003 // This file is part of the hk_kdeclasses library. 00004 // This file may be distributed and/or modified under the terms of the 00005 // GNU General Public License version 2 as published by the Free Software 00006 // Foundation and appearing in the file COPYING included in the 00007 // packaging of this file. 00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 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 virtual void focusInEvent ( QFocusEvent * ); 00064 virtual void focusOutEvent ( QFocusEvent * ); 00065 virtual void widget_specific_tooltip_changed(void); 00066 void widget_specific_enable_disable(void); 00067 bool widget_specific_row_change(void); 00068 void datasource_delete(void); 00069 bool datasource_enable(void); 00070 virtual void widget_specific_insert_mode(void); 00071 virtual void resizeEvent (QResizeEvent *); 00072 virtual void moveEvent ( QMoveEvent * ) ; 00073 bool widget_specific_coordinates(uint px,uint py,uint pwidth,uint pheight); 00074 virtual void widget_specific_backgroundcolour_changed(const hk_colour&); 00075 virtual void widget_specific_foregroundcolour_changed(const hk_colour&); 00076 virtual void widget_specific_enabled_changed(void); 00077 virtual bool presentationmode_changed(void); 00078 00079 private: 00080 QPushButton* button_delete; 00081 QPushButton* button_insert; 00082 QPushButton* button_gotofirst; 00083 QPushButton* button_gotoprevious; 00084 QPushButton* button_gotonext; 00085 QPushButton* button_gotolast; 00086 QPushButton* button_store; 00087 KLineEdit* label; 00088 QHBoxLayout* layout; 00089 void reposition(void); 00090 00091 }; 00092 #endif