00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef YQTable_h
00021 #define YQTable_h
00022
00023 #include <qvbox.h>
00024 #include <ycp/YCPString.h>
00025
00026 #include "YTable.h"
00027
00028
00029 class QListView;
00030 class QListViewItem;
00031 class YQListViewItem;
00032
00033 class YQTable : public QVBox, public YTable
00034 {
00035 Q_OBJECT
00036
00037 public:
00038
00042 YQTable( QWidget * parent, const YWidgetOpt & opt, vector<string> header );
00043
00049 void setEnabling( bool enabled );
00050
00056 long nicesize( YUIDimension dim );
00057
00061 void setSize( long newWidth, long newHeight );
00062
00068 void itemAdded( vector<string> elements, int index );
00069
00073 void itemsCleared();
00074
00078 void cellChanged( int index, int colnum, const YCPString & newtext );
00079
00084 int getCurrentItem();
00085
00089 void setCurrentItem( int index );
00090
00094 virtual bool setKeyboardFocus();
00095
00099 bool sortByInsertionOrder() const { return _sort_by_insertion_order; }
00100
00101
00102
00103 protected slots:
00104
00109 void slotSelected( QListViewItem * );
00110
00115 void slotActivated( QListViewItem * );
00116
00117
00121 void userSort( int column );
00122
00123
00124 protected:
00128 QListViewItem * findItem( int index );
00129
00133 QListView * _qt_listview;
00134
00135
00136
00137
00138
00139
00143 bool _sort_by_insertion_order;
00144
00148 bool _enable_user_sort;
00149
00153 YQListViewItem * _last_item;
00154 };
00155
00156 #endif // YQLabel_h