summaryrefslogtreecommitdiffstats
path: root/kdeui/kcmenumngr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdeui/kcmenumngr.cpp')
-rw-r--r--kdeui/kcmenumngr.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kdeui/kcmenumngr.cpp b/kdeui/kcmenumngr.cpp
index 6255a764d..9cd9d6288 100644
--- a/kdeui/kcmenumngr.cpp
+++ b/kdeui/kcmenumngr.cpp
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*
*/
-#include <qwidget.h>
-#include <qpopupmenu.h>
+#include <tqwidget.h>
+#include <tqpopupmenu.h>
#include "kcmenumngr.h"
#include "kglobal.h"
#include "kconfig.h"
@@ -28,17 +28,17 @@
#undef KeyPress
#undef None
-template class QPtrDict<QPopupMenu>;
+template class TQPtrDict<TQPopupMenu>;
KContextMenuManager* KContextMenuManager::manager = 0;
-KContextMenuManager::KContextMenuManager( QObject* parent, const char* name )
- : QObject( parent, name)
+KContextMenuManager::KContextMenuManager( TQObject* parent, const char* name )
+ : TQObject( parent, name)
{
- KConfigGroupSaver saver ( KGlobal::config(), QString::fromLatin1("Shortcuts") ) ;
- menuKey = KShortcut( saver.config()->readEntry(QString::fromLatin1("PopupContextMenu"), QString::fromLatin1("Menu") ) ).keyCodeQt();
- saver.config()->setGroup( QString::fromLatin1("ContextMenus") ) ;
- showOnPress = saver.config()->readBoolEntry(QString::fromLatin1("ShowOnPress"), true );
+ KConfigGroupSaver saver ( KGlobal::config(), TQString::fromLatin1("Shortcuts") ) ;
+ menuKey = KShortcut( saver.config()->readEntry(TQString::fromLatin1("PopupContextMenu"), TQString::fromLatin1("Menu") ) ).keyCodeQt();
+ saver.config()->setGroup( TQString::fromLatin1("ContextMenus") ) ;
+ showOnPress = saver.config()->readBoolEntry(TQString::fromLatin1("ShowOnPress"), true );
}
KContextMenuManager::~KContextMenuManager()
@@ -54,40 +54,40 @@ bool KContextMenuManager::showOnButtonPress( void )
}
-void KContextMenuManager::insert( QWidget* widget, QPopupMenu* popup )
+void KContextMenuManager::insert( TQWidget* widget, TQPopupMenu* popup )
{
if ( !manager )
manager = new KContextMenuManager;
- manager->connect( widget, SIGNAL( destroyed() ), manager, SLOT( widgetDestroyed() ) );
+ manager->connect( widget, TQT_SIGNAL( destroyed() ), manager, TQT_SLOT( widgetDestroyed() ) );
manager->menus.insert( widget, popup );
widget->installEventFilter( manager );
}
-bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
+bool KContextMenuManager::eventFilter( TQObject *o, TQEvent * e)
{
- QPopupMenu* popup = 0;
- QPoint pos;
+ TQPopupMenu* popup = 0;
+ TQPoint pos;
switch ( e->type() ) {
- case QEvent::MouseButtonPress:
- if (((QMouseEvent*) e )->button() != RightButton )
+ case TQEvent::MouseButtonPress:
+ if (((TQMouseEvent*) e )->button() != RightButton )
break;
if ( !showOnPress )
return true; // eat event for safety
popup = menus[o];
- pos = ((QMouseEvent*) e )->globalPos();
+ pos = ((TQMouseEvent*) e )->globalPos();
break;
- case QEvent::MouseButtonRelease:
- if ( showOnPress || ((QMouseEvent*) e )->button() != RightButton )
+ case TQEvent::MouseButtonRelease:
+ if ( showOnPress || ((TQMouseEvent*) e )->button() != RightButton )
break;
popup = menus[o];
- pos = ((QMouseEvent*) e )->globalPos();
+ pos = ((TQMouseEvent*) e )->globalPos();
break;
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
if ( !o->isWidgetType() )
break;
- QKeyEvent *k = (QKeyEvent *)e;
+ TQKeyEvent *k = (TQKeyEvent *)e;
int key = k->key();
if ( k->state() & ShiftButton )
key |= SHIFT;
@@ -99,7 +99,7 @@ bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
break;
popup = menus[o];
if ( popup ) {
- QWidget* w = (QWidget*) o ;
+ TQWidget* w = (TQWidget*) o ;
// ### workaround
pos = w->mapToGlobal( w->rect().center() );
@@ -122,8 +122,8 @@ bool KContextMenuManager::eventFilter( QObject *o, QEvent * e)
void KContextMenuManager::widgetDestroyed()
{
- if ( menus.find( (QObject*)sender() ) )
- menus.remove( (QObject*)sender() );
+ if ( menus.find( (TQObject*)sender() ) )
+ menus.remove( (TQObject*)sender() );
}
#include "kcmenumngr.moc"