summaryrefslogtreecommitdiffstats
path: root/kdeui/kcmenumngr.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdeui/kcmenumngr.cpp
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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"