summaryrefslogtreecommitdiffstats
path: root/src/widgets/qpopupmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/qpopupmenu.cpp')
-rw-r--r--src/widgets/qpopupmenu.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/widgets/qpopupmenu.cpp b/src/widgets/qpopupmenu.cpp
index a851abb2a..79812185e 100644
--- a/src/widgets/qpopupmenu.cpp
+++ b/src/widgets/qpopupmenu.cpp
@@ -39,7 +39,7 @@
**********************************************************************/
#include "ntqpopupmenu.h"
-#ifndef QT_NO_POPUPMENU
+#ifndef TQT_NO_POPUPMENU
#include "ntqmenubar.h"
#include "ntqaccel.h"
#include "ntqpainter.h"
@@ -123,7 +123,7 @@ static void popupSubMenuLater( int msec, TQPopupMenu * receiver ) {
static bool preventAnimation = FALSE;
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
extern void qWhatsThisBDH();
static TQMenuItem* whatsThisItem = 0;
#endif
@@ -281,7 +281,7 @@ TQPopupMenu::TQPopupMenu( TQWidget *parent, const char *name )
d->scroll.scrolltimer = 0;
d->hasmouse = 0;
isPopupMenu = TRUE;
-#ifndef QT_NO_ACCEL
+#ifndef TQT_NO_ACCEL
autoaccel = 0;
accelDisabled = FALSE;
#endif
@@ -387,7 +387,7 @@ void TQPopupMenu::performDelayedContentsChanged()
{
pendingDelayedContentsChanges = 0;
// here the part the can be delayed
-#ifndef QT_NO_ACCEL
+#ifndef TQT_NO_ACCEL
// if performDelayedStateChanged() will be called too,
// it will call updateAccel() too, no need to do it twice
if( !pendingDelayedStateChanges )
@@ -424,7 +424,7 @@ void TQPopupMenu::performDelayedStateChanged()
{
pendingDelayedStateChanges = 0;
// here the part that can be delayed
-#ifndef QT_NO_ACCEL
+#ifndef TQT_NO_ACCEL
updateAccel( 0 ); // ### when we have a good solution for the accel vs. focus widget problem, remove that. That is only a workaround
// if you remove this, see performDelayedContentsChanged()
#endif
@@ -570,7 +570,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
y = sy;
}
#ifdef Q_WS_X11
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
TQMenuData *top = this; // find top level
while ( top->parentMenu )
top = top->parentMenu;
@@ -648,7 +648,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
motion=0;
actItem = -1;
-#ifndef QT_NO_EFFECTS
+#ifndef TQT_NO_EFFECTS
int hGuess = tqApp->reverseLayout() ? TQEffects::LeftScroll : TQEffects::RightScroll;
int vGuess = TQEffects::DownScroll;
if ( tqApp->reverseLayout() ) {
@@ -663,7 +663,7 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
hGuess = TQEffects::LeftScroll;
}
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
if ( ( snapToMouse && ( y + h/2 < mouse.y() ) ) ||
( parentMenu && parentMenu->isMenuBar &&
( y + h/2 < ((TQMenuBar*)parentMenu)->mapToGlobal( ((TQMenuBar*)parentMenu)->pos() ).y() ) ) )
@@ -733,7 +733,7 @@ void TQPopupMenu::subHighlighted( int id )
static bool fromAccel = FALSE;
-#ifndef QT_NO_ACCEL
+#ifndef TQT_NO_ACCEL
void TQPopupMenu::accelActivated( int id )
{
TQMenuItem *mi = findItem( id );
@@ -751,7 +751,7 @@ void TQPopupMenu::accelDestroyed() // accel about to be deleted
{
autoaccel = 0; // don't delete it twice!
}
-#endif //QT_NO_ACCEL
+#endif //TQT_NO_ACCEL
void TQPopupMenu::popupDestroyed( TQObject *o )
{
@@ -767,7 +767,7 @@ void TQPopupMenu::actSig( int id, bool inwhatsthis )
TQAccessible::updateAccessibility( this, indexOf(id)+1, TQAccessible::MenuCommand );
#endif
} else {
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
TQRect r( itemGeometry( indexOf( id ) ) );
TQPoint p( r.center().x(), r.bottom() );
TQString whatsThis = findItem( id )->whatsThis();
@@ -830,7 +830,7 @@ void TQPopupMenu::hideAllPopups()
top = top->parentMenu;
((TQPopupMenu*)top)->hide(); // cascade from top level
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
if (whatsThisItem) {
qWhatsThisBDH();
whatsThisItem = 0;
@@ -876,7 +876,7 @@ bool TQPopupMenu::tryMenuBar( TQMouseEvent *e )
register TQMenuData *top = this; // find top level
while ( top->parentMenu )
top = top->parentMenu;
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
return top->isMenuBar ?
((TQMenuBar *)top)->tryMouseEvent( this, e ) :
((TQPopupMenu*)top)->tryMouseEvent(this, e );
@@ -908,13 +908,13 @@ bool TQPopupMenu::tryMouseEvent( TQPopupMenu *p, TQMouseEvent * e)
void TQPopupMenu::byeMenuBar()
{
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
register TQMenuData *top = this; // find top level
while ( top->parentMenu )
top = top->parentMenu;
#endif
hideAllPopups();
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
if ( top->isMenuBar )
((TQMenuBar *)top)->goodbye();
#endif
@@ -1069,7 +1069,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
}
if(badSize || force_update) {
-#ifndef QT_NO_ACCEL
+#ifndef TQT_NO_ACCEL
updateAccel( 0 );
#endif
int height = 0;
@@ -1248,7 +1248,7 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
}
-#ifndef QT_NO_ACCEL
+#ifndef TQT_NO_ACCEL
/*!
\internal
The \a parent is 0 when it is updated when a menu item has
@@ -1300,7 +1300,7 @@ void TQPopupMenu::updateAccel( TQWidget *parent )
TQKeySequence k = mi->key();
if ( (int)k ) {
int id = autoaccel->insertItem( k, mi->id() );
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
autoaccel->setWhatsThis( id, mi->whatsThis() );
#endif
}
@@ -1422,7 +1422,7 @@ void TQPopupMenu::hide()
#if defined(QT_ACCESSIBILITY_SUPPORT)
TQAccessible::updateAccessibility( this, 0, TQAccessible::PopupMenuEnd );
#endif
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
TQMenuData *top = this; // find top level
while ( top->parentMenu )
top = top->parentMenu;
@@ -1712,13 +1712,13 @@ void TQPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
}
}
TQPopupMenu *popup = mi->popup();
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
bool b = TQWhatsThis::inWhatsThisMode();
#else
const bool b = FALSE;
#endif
if ( !mi->isEnabledAndVisible() ) {
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
if ( b ) {
actItem = -1;
updateItem( mi->id() );
@@ -1869,7 +1869,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
- ((e->state() & ControlButton) ? CTRL : 0) |
- ((e->state() & AltButton) ? ALT : 0));
-
- - #ifndef QT_NO_ACCEL
+ - #ifndef TQT_NO_ACCEL
- if (mi)
- setAccel(modifier + e->key(), mi->id());
- #endif
@@ -1918,7 +1918,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
{
TQMenuData* p = parentMenu;
hide();
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
if ( p && p->isMenuBar )
((TQMenuBar*) p)->goodbye( TRUE );
#endif
@@ -1979,7 +1979,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
{
if ( actItem < 0 )
break;
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
bool b = TQWhatsThis::inWhatsThisMode();
#else
const bool b = FALSE;
@@ -2007,7 +2007,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
}
}
break;
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
case Key_F1:
if ( actItem < 0 || e->state() != ShiftButton)
break;
@@ -2076,7 +2076,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
popup->setFirstItemActive();
} else {
byeMenuBar();
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
bool b = TQWhatsThis::inWhatsThisMode();
#else
const bool b = FALSE;
@@ -2099,7 +2099,7 @@ void TQPopupMenu::keyPressEvent( TQKeyEvent *e )
dy = indexOf( firstAfterCurrent->id() ) - actItem;
}
}
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
if ( !ok_key ) { // send to menu bar
register TQMenuData *top = this; // find top level
while ( top->parentMenu )
@@ -2584,7 +2584,7 @@ void TQPopupMenu::setActiveItem( int i )
}
if ( mi->id() != -1 )
hilitSig( mi->id() );
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
if (whatsThisItem && whatsThisItem != mi) {
qWhatsThisBDH();
}
@@ -2753,7 +2753,7 @@ void TQPopupMenu::toggleTearOff()
TQPopupMenu* p = new TQPopupMenu( parentWidget(), "tear off menu" );
connect( p, SIGNAL( activated(int) ), this, SIGNAL( activated(int) ) );
connect( p, SIGNAL( highlighted(int) ), this, SIGNAL( highlighted(int) ) );
-#ifndef QT_NO_WIDGET_TOPEXTRA
+#ifndef TQT_NO_WIDGET_TOPEXTRA
p->setCaption( caption() );
#endif
p->setCheckable( isCheckable() );
@@ -2799,13 +2799,13 @@ void TQPopupMenu::activateItemAt( int index )
} else {
byeMenuBar(); // deactivate menu bar
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
bool b = TQWhatsThis::inWhatsThisMode();
#else
const bool b = FALSE;
#endif
if ( !mi->isEnabledAndVisible() ) {
-#ifndef QT_NO_WHATSTHIS
+#ifndef TQT_NO_WHATSTHIS
if ( b ) {
actItem = -1;
updateItem( mi->id() );
@@ -2833,7 +2833,7 @@ void TQPopupMenu::activateItemAt( int index )
} else {
TQMenuData* p = parentMenu;
hide();
-#ifndef QT_NO_MENUBAR
+#ifndef TQT_NO_MENUBAR
if ( p && p->isMenuBar )
((TQMenuBar*) p)->goodbye( TRUE );
#endif
@@ -2910,5 +2910,5 @@ int TQPopupMenu::menuItemHeight( TQMenuItem *mi, TQFontMetrics fm )
return h;
}
-#endif // QT_NO_POPUPMENU
+#endif // TQT_NO_POPUPMENU