summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/klistbox.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdeui/klistbox.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/klistbox.cpp56
1 files changed, 31 insertions, 25 deletions
diff --git a/microkde/kdeui/klistbox.cpp b/microkde/kdeui/klistbox.cpp
index c65b892..71020b3 100644
--- a/microkde/kdeui/klistbox.cpp
+++ b/microkde/kdeui/klistbox.cpp
@@ -18,2 +18,7 @@
#include <qtimer.h>
+//Added by qt3to4:
+#include <QEvent>
+#include <QMouseEvent>
+#include <QKeyEvent>
+#include <QFocusEvent>
@@ -28,2 +33,3 @@
#ifdef Q_WS_X11
+#include <QX11Info>
#include <X11/Xlib.h>
@@ -33,4 +39,4 @@
#endif
-KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
- : QListBox( parent, name, f )
+KListBox::KListBox( QWidget *parent, const char *name, Qt::WFlags f )
+ : Q3ListBox( parent, name, f )
{
@@ -38,8 +44,8 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
this, SLOT( slotOnViewport() ) );
- connect( this, SIGNAL( onItem( QListBoxItem * ) ),
- this, SLOT( slotOnItem( QListBoxItem * ) ) );
+ connect( this, SIGNAL( onItem( Q3ListBoxItem * ) ),
+ this, SLOT( slotOnItem( Q3ListBoxItem * ) ) );
- connect( this, SIGNAL( mouseButtonClicked( int, QListBoxItem *,
+ connect( this, SIGNAL( mouseButtonClicked( int, Q3ListBoxItem *,
const QPoint & ) ),
- this, SLOT( slotMouseButtonClicked( int, QListBoxItem *,
+ this, SLOT( slotMouseButtonClicked( int, Q3ListBoxItem *,
const QPoint & ) ) );
@@ -62,3 +68,3 @@ KListBox::KListBox( QWidget *parent, const char *name, WFlags f )
-void KListBox::slotOnItem( QListBoxItem *item )
+void KListBox::slotOnItem( Q3ListBoxItem *item )
{
@@ -141,3 +147,3 @@ void KListBox::slotAutoSelect()
uint keybstate;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &keybstate );
@@ -145,3 +151,3 @@ void KListBox::slotAutoSelect()
- QListBoxItem* previousItem = item( currentItem() );
+ Q3ListBoxItem* previousItem = item( currentItem() );
setCurrentItem( m_pCurrentItem );
@@ -169,3 +175,3 @@ void KListBox::slotAutoSelect()
bool down = index( previousItem ) < index( m_pCurrentItem );
- QListBoxItem* it = down ? previousItem : m_pCurrentItem;
+ Q3ListBoxItem* it = down ? previousItem : m_pCurrentItem;
for (;it ; it = it->next() ) {
@@ -188,3 +194,3 @@ void KListBox::slotAutoSelect()
- if( selectionMode() == QListBox::Single )
+ if( selectionMode() == Q3ListBox::Single )
emit selectionChanged( m_pCurrentItem );
@@ -215,3 +221,3 @@ void KListBox::slotAutoSelect()
-void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
+void KListBox::emitExecute( Q3ListBoxItem *item, const QPoint &pos )
{
@@ -222,3 +228,3 @@ void KListBox::emitExecute( QListBoxItem *item, const QPoint &pos )
uint keybstate;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( x11Info().display(), x11Info().appRootWindow(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &keybstate );
@@ -248,3 +254,3 @@ void KListBox::keyPressEvent(QKeyEvent *e)
{
- if( e->key() == Key_Escape )
+ if( e->key() == Qt::Key_Escape )
{
@@ -252,3 +258,3 @@ void KListBox::keyPressEvent(QKeyEvent *e)
}
- else if( e->key() == Key_F1 )
+ else if( e->key() == Qt::Key_F1 )
{
@@ -258,3 +264,3 @@ void KListBox::keyPressEvent(QKeyEvent *e)
{
- QListBox::keyPressEvent(e);
+ Q3ListBox::keyPressEvent(e);
}
@@ -266,3 +272,3 @@ void KListBox::focusOutEvent( QFocusEvent *fe )
- QListBox::focusOutEvent( fe );
+ Q3ListBox::focusOutEvent( fe );
}
@@ -273,3 +279,3 @@ void KListBox::leaveEvent( QEvent *e )
- QListBox::leaveEvent( e );
+ Q3ListBox::leaveEvent( e );
}
@@ -278,3 +284,3 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e )
{
- if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) {
+ if( (selectionMode() == Extended) && (e->state() & Qt::ShiftButton) && !(e->state() & Qt::ControlButton) ) {
bool block = signalsBlocked();
@@ -287,3 +293,3 @@ void KListBox::contentsMousePressEvent( QMouseEvent *e )
- QListBox::contentsMousePressEvent( e );
+ Q3ListBox::contentsMousePressEvent( e );
}
@@ -292,5 +298,5 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
{
- QListBox::contentsMouseDoubleClickEvent( e );
+ Q3ListBox::contentsMouseDoubleClickEvent( e );
- QListBoxItem* item = itemAt( e->pos() );
+ Q3ListBoxItem* item = itemAt( e->pos() );
@@ -299,3 +305,3 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
- if( (e->button() == LeftButton) && !m_bUseSingle )
+ if( (e->button() == Qt::LeftButton) && !m_bUseSingle )
emitExecute( item, e->globalPos() );
@@ -304,5 +310,5 @@ void KListBox::contentsMouseDoubleClickEvent ( QMouseEvent * e )
-void KListBox::slotMouseButtonClicked( int btn, QListBoxItem *item, const QPoint &pos )
+void KListBox::slotMouseButtonClicked( int btn, Q3ListBoxItem *item, const QPoint &pos )
{
- if( (btn == LeftButton) && item )
+ if( (btn == Qt::LeftButton) && item )
emitExecute( item, pos );