00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TDELISTBOX_H
00019 #define TDELISTBOX_H
00020
00021 #include <tqlistbox.h>
00022
00023 #include <tdelibs_export.h>
00024
00040 class TDEUI_EXPORT TDEListBox : public TQListBox
00041 {
00042 Q_OBJECT
00043
00044 public:
00045 TDEListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
00046
00047 signals:
00048
00059 void executed( TQListBoxItem *item );
00060
00072 void executed( TQListBoxItem *item, const TQPoint &pos );
00073
00088 void doubleClicked( TQListBoxItem *item, const TQPoint &pos );
00089
00090 protected slots:
00091 void slotOnItem( TQListBoxItem *item );
00092 void slotOnViewport();
00093
00094 void slotSettingsChanged(int);
00095
00099 void slotAutoSelect();
00100
00101 protected:
00102 void emitExecute( TQListBoxItem *item, const TQPoint &pos );
00103
00104 virtual void keyPressEvent(TQKeyEvent *e);
00105 virtual void focusOutEvent( TQFocusEvent *fe );
00106 virtual void leaveEvent( TQEvent *e );
00107 virtual void contentsMousePressEvent( TQMouseEvent *e );
00108 virtual void contentsMouseDoubleClickEvent ( TQMouseEvent *e );
00109
00110 bool m_bUseSingle;
00111 bool m_bChangeCursorOverItem;
00112
00113 TQListBoxItem* m_pCurrentItem;
00114
00115 TQTimer* m_pAutoSelect;
00116 int m_autoSelectDelay;
00117
00118 private slots:
00119 void slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos );
00120
00121 protected:
00122 virtual void virtual_hook( int id, void* data );
00123 private:
00124 class TDEListBoxPrivate;
00125 TDEListBoxPrivate* const d;
00126 };
00127
00128 #endif