summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/klistbox.h
Unidiff
Diffstat (limited to 'microkde/kdeui/klistbox.h') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/klistbox.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/microkde/kdeui/klistbox.h b/microkde/kdeui/klistbox.h
index 8023780..5ec514b 100644
--- a/microkde/kdeui/klistbox.h
+++ b/microkde/kdeui/klistbox.h
@@ -15,13 +15,18 @@
15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 15 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16 Boston, MA 02111-1307, USA. 16 Boston, MA 02111-1307, USA.
17*/ 17*/
18#ifndef KLISTBOX_H 18#ifndef KLISTBOX_H
19#define KLISTBOX_H 19#define KLISTBOX_H
20 20
21#include <qlistbox.h> 21#include <q3listbox.h>
22//Added by qt3to4:
23#include <QMouseEvent>
24#include <QFocusEvent>
25#include <QKeyEvent>
26#include <QEvent>
22 27
23/** 28/**
24 * Extends the functionality of @ref QListBox to honor the system 29 * Extends the functionality of @ref QListBox to honor the system
25 * wide settings for Single Click/Double Click mode, Auto Selection and 30 * wide settings for Single Click/Double Click mode, Auto Selection and
26 * Change Cursor over Link. 31 * Change Cursor over Link.
27 * 32 *
@@ -32,18 +37,18 @@
32 * mentioned. This way you don't need to care about the current 37 * mentioned. This way you don't need to care about the current
33 * settings. If you want to get informed when the user selects 38 * settings. If you want to get informed when the user selects
34 * something connect to the @ref QListBox::selectionChanged() signal. 39 * something connect to the @ref QListBox::selectionChanged() signal.
35 * 40 *
36 * @short A variant of @ref QListBox that honors KDE's system-wide settings. 41 * @short A variant of @ref QListBox that honors KDE's system-wide settings.
37 **/ 42 **/
38class KListBox : public QListBox 43class KListBox : public Q3ListBox
39{ 44{
40 Q_OBJECT 45 Q_OBJECT
41 46
42public: 47public:
43 KListBox( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 48 KListBox( QWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 );
44 49
45signals: 50signals:
46 51
47 /** 52 /**
48 * Emitted whenever the user executes an listbox item. 53 * Emitted whenever the user executes an listbox item.
49 * 54 *
@@ -51,26 +56,26 @@ signals:
51 * setting the user clicked or double clicked on that item. 56 * setting the user clicked or double clicked on that item.
52 * @param item is the pointer to the executed listbox item. 57 * @param item is the pointer to the executed listbox item.
53 * 58 *
54 * Note that you may not delete any @ref QListBoxItem objects in slots 59 * Note that you may not delete any @ref QListBoxItem objects in slots
55 * connected to this signal. 60 * connected to this signal.
56 */ 61 */
57 void executed( QListBoxItem *item ); 62 void executed( Q3ListBoxItem *item );
58 63
59 /** 64 /**
60 * Emitted whenever the user executes an listbox item. 65 * Emitted whenever the user executes an listbox item.
61 * 66 *
62 * That means depending on the KDE wide Single Click/Double Click 67 * That means depending on the KDE wide Single Click/Double Click
63 * setting the user clicked or double clicked on that item. 68 * setting the user clicked or double clicked on that item.
64 * @param item is the pointer to the executed listbox item. 69 * @param item is the pointer to the executed listbox item.
65 * @param pos is the position where the user has clicked 70 * @param pos is the position where the user has clicked
66 * 71 *
67 * Note that you may not delete any @ref QListBoxItem objects in slots 72 * Note that you may not delete any @ref QListBoxItem objects in slots
68 * connected to this signal. 73 * connected to this signal.
69 */ 74 */
70 void executed( QListBoxItem *item, const QPoint &pos ); 75 void executed( Q3ListBoxItem *item, const QPoint &pos );
71 76
72 /** 77 /**
73 * This signal gets emitted whenever the user double clicks into the 78 * This signal gets emitted whenever the user double clicks into the
74 * listbox. 79 * listbox.
75 * 80 *
76 * @param item The pointer to the clicked listbox item. 81 * @param item The pointer to the clicked listbox item.
@@ -80,27 +85,27 @@ signals:
80 * connected to this signal. 85 * connected to this signal.
81 * 86 *
82 * This signal is more or less here for the sake of completeness. 87 * This signal is more or less here for the sake of completeness.
83 * You should normally not need to use this. In most cases it's better 88 * You should normally not need to use this. In most cases it's better
84 * to use @ref executed() instead. 89 * to use @ref executed() instead.
85 */ 90 */
86 void doubleClicked( QListBoxItem *item, const QPoint &pos ); 91 void doubleClicked( Q3ListBoxItem *item, const QPoint &pos );
87 92
88protected slots: 93protected slots:
89 void slotOnItem( QListBoxItem *item ); 94 void slotOnItem( Q3ListBoxItem *item );
90 void slotOnViewport(); 95 void slotOnViewport();
91 96
92//US void slotSettingsChanged(int); 97//US void slotSettingsChanged(int);
93 98
94 /** 99 /**
95 * Auto selection happend. 100 * Auto selection happend.
96 */ 101 */
97 void slotAutoSelect(); 102 void slotAutoSelect();
98 103
99protected: 104protected:
100 void emitExecute( QListBoxItem *item, const QPoint &pos ); 105 void emitExecute( Q3ListBoxItem *item, const QPoint &pos );
101 106
102 /** 107 /**
103 * @reimplemented 108 * @reimplemented
104 */ 109 */
105 virtual void keyPressEvent(QKeyEvent *e); 110 virtual void keyPressEvent(QKeyEvent *e);
106 /** 111 /**
@@ -120,19 +125,19 @@ protected:
120 */ 125 */
121 virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e ); 126 virtual void contentsMouseDoubleClickEvent ( QMouseEvent *e );
122 127
123 bool m_bUseSingle; 128 bool m_bUseSingle;
124//US bool m_bChangeCursorOverItem; 129//US bool m_bChangeCursorOverItem;
125 130
126 QListBoxItem* m_pCurrentItem; 131 Q3ListBoxItem* m_pCurrentItem;
127 132
128 QTimer* m_pAutoSelect; 133 QTimer* m_pAutoSelect;
129 int m_autoSelectDelay; 134 int m_autoSelectDelay;
130 135
131private slots: 136private slots:
132 void slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos ); 137 void slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos );
133 138
134protected: 139protected:
135 virtual void virtual_hook( int id, void* data ); 140 virtual void virtual_hook( int id, void* data );
136private: 141private:
137 class KListBoxPrivate; 142 class KListBoxPrivate;
138 KListBoxPrivate *d; 143 KListBoxPrivate *d;