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_KDEGRID 00013 #define HK_KDEGRID 00014 #include <hk_class.h> 00015 #include <qlayout.h> 00016 #include <qpushbutton.h> 00017 #include <qheader.h> 00018 //#include <qstatusbar.h> 00019 #include <qwidget.h> 00020 #include <qframe.h> 00021 #include <qlabel.h> 00022 00023 #include "hk_dsgrid.h" 00024 00025 class hk_kderowselector; 00026 class hk_kdesimpleform; 00027 class hk_kdefinddialog; 00028 class hk_kdegridpart; 00029 class hk_kdesimplegrid; 00030 00045 class hk_kdegrid :public QFrame, public hk_dsgrid 00046 { 00047 friend class hk_kdegridpart; 00048 friend class hk_kdesimplegrid; 00049 Q_OBJECT 00050 public: 00051 hk_kdegrid(QWidget* w=0,const char* n=0,WFlags f=0,hk_kdesimpleform* form=NULL); 00052 virtual ~hk_kdegrid(); 00056 void set_datasource(hk_datasource* d); 00060 hk_kdesimplegrid* simplegrid(void){return p_grid;} 00061 hk_kdegridpart* part(void){return p_part;} 00062 virtual void show_widget(void); 00063 virtual void hide_widget(void); 00064 virtual bool close_widget(void); 00065 00066 00067 public slots: 00068 // void datasource_enables(void); 00069 // void datasource_disables(void); 00070 void find_clicked(void); 00071 void find_next(void); 00072 void findargument_changed(void); 00073 void print_grid(void); 00074 00075 protected: 00076 virtual bool widget_specific_coordinates(unsigned int px,unsigned int py,unsigned int pwidth,unsigned int pheight); 00077 virtual void widget_specific_presentationdatasource(long p); 00078 virtual void widget_specific_enable_disable(void); 00079 virtual void widget_specific_font_changed(void); 00080 00081 virtual void resizeEvent (QResizeEvent *); 00082 virtual void moveEvent ( QMoveEvent * ) ; 00083 virtual void before_row_change(void); 00084 virtual void widget_specific_backgroundcolour_changed(const hk_colour&); 00085 virtual void widget_specific_foregroundcolour_changed(const hk_colour&); 00086 virtual void widget_specific_columns_created(void); 00087 void widget_specific_rowheight_changes(void); 00088 virtual bool presentationmode_changed(void); 00089 00090 private: 00091 hk_kdefinddialog* p_finddialog; 00092 bool p_findfirstview; 00093 QHBoxLayout* hbottomlayout; 00094 QHBoxLayout* hdatalayout; 00095 QHBoxLayout* htoplayout; 00096 QVBoxLayout* vbasiclayout; 00097 hk_kdesimplegrid* p_grid; 00098 hk_kderowselector* selector; 00099 QLabel* statusbar; 00100 void reposition(void); 00101 hk_kdegridpart* p_part; 00102 } 00103 00104 00105 ; 00106 00111 #endif