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 Library Public License version 2 as published by the Free Software 00006 // Foundation and appearing in the file LGPL 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_KDELINEEDIT 00013 #define HK_KDELINEEDIT 00014 #include <klineedit.h> 00015 #include <hk_datasource.h> 00016 #include <hk_column.h> 00017 #include <hk_form.h> 00018 00019 #include <hk_dslineedit.h> 00020 class hk_kdefinddialog; 00021 class hk_dsgridcolumn; 00022 00032 class hk_kdelineedit : public KLineEdit , public hk_dslineedit 00033 { 00034 Q_OBJECT 00035 public: 00036 hk_kdelineedit(QWidget* wid,hk_form* form=NULL); 00037 virtual ~hk_kdelineedit(); 00038 virtual void set_value(const hk_string&); 00039 virtual hk_string value(void); 00040 virtual void show_widget(void); 00041 virtual void hide_widget(void); 00042 virtual bool close_widget(void); 00043 00044 protected: 00045 virtual void focusInEvent ( QFocusEvent * ); 00046 virtual void focusOutEvent ( QFocusEvent * ); 00047 virtual void closeEvent ( QCloseEvent * e ); 00048 virtual bool widget_specific_coordinates(uint px,uint py,uint pwidth,uint pheight); 00049 virtual bool widget_specific_row_change(void); 00050 virtual void widget_specific_insert_mode(void); 00051 virtual void widget_specific_row_added(void); 00052 virtual void widget_specific_row_deleted(void); 00053 virtual void widget_specific_font_changed(void); 00054 virtual void widget_specific_alignment(void); 00055 virtual void widget_specific_tooltip_changed(void); 00056 virtual void resizeEvent (QResizeEvent *); 00057 virtual void moveEvent ( QMoveEvent * ) ; 00058 virtual void mousePressEvent(QMouseEvent*); 00059 virtual void mouseDoubleClickEvent(QMouseEvent*); 00060 bool datasource_disable(void); 00061 bool datasource_enable(void); 00062 void datasource_delete(void); 00063 void keyPressEvent ( QKeyEvent * e ); 00064 virtual QPopupMenu* createPopupMenu(void); 00065 virtual void widget_specific_backgroundcolour_changed(const hk_colour&); 00066 virtual void widget_specific_foregroundcolour_changed(const hk_colour&); 00067 virtual void widget_specific_enabled_changed(void); 00068 virtual bool presentationmode_changed(void); 00069 00070 public slots: 00071 void find_clicked(int); 00072 void find_next(void); 00073 void findargument_changed(void); 00074 00075 protected slots: 00076 void slot_data_changed(void); 00077 void NULLselected( int r ); 00078 00079 private: 00080 00081 hk_kdefinddialog* p_finddialog; 00082 bool p_findfirstview; 00083 bool p_widget_specific_row_change; 00084 void widget_specific_enable_disable(void); 00085 void reposition(void); 00086 int NULLpopupid; 00087 int findpopupid; 00088 //bool p_while_keyaction; 00089 00090 }; 00091 #endif