25 #include <tqscrollview.h> 27 class KWidgetListItem; 29 class KWidgetList : public TQScrollView 35 KWidgetList( TQWidget *parent = 0, const char *name = 0 ); 40 void appendItem( KWidgetListItem *item ); 41 void removeItem( int index ); 42 void takeItem( KWidgetListItem *item ); 44 void setSelected( KWidgetListItem *item ); 45 void setSelected( int index ); 47 bool isSelected( KWidgetListItem *item ) const; 48 bool isSelected( int index ) const; 50 KWidgetListItem *selectedItem() const; 51 KWidgetListItem *item( int index ) const; 53 int index( KWidgetListItem *item ) const; 55 virtual bool eventFilter( TQObject * object, TQEvent *event ); 59 virtual void setFocus(); 62 void selectionChanged( KWidgetListItem *item ); 63 void doubleClicked( KWidgetListItem *item ); 70 class KWidgetListItem : public TQWidget 73 KWidgetListItem( KWidgetList *parent, const char *name = 0 ); 76 void setSelected( bool selected ); 79 void setForegroundColor( const TQColor& ); 80 void setBackgroundColor( const TQColor& ); 81 void setSelectionForegroundColor( const TQColor& ); 82 void setSelectionBackgroundColor( const TQColor& ); 85 TQColor mForegroundColor; 86 TQColor mBackgroundColor; 87 TQColor mSelectionForegroundColor; 88 TQColor mSelectionBackgroundColor;
|