summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/src/widgets/tqpopupmenu.cpp')
-rw-r--r--tqtinterface/qt4/src/widgets/tqpopupmenu.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp b/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp
index a96b67d..b528c8b 100644
--- a/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp
+++ b/tqtinterface/qt4/src/widgets/tqpopupmenu.cpp
@@ -281,15 +281,15 @@ public:
static TQPopupMenu* active_popup_menu = 0;
/*!
- Constructs a popup menu called \a name with tqparent \a tqparent.
+ Constructs a popup menu called \a name with parent \a parent.
- Although a popup menu is always a top-level widget, if a tqparent is
- passed the popup menu will be deleted when that tqparent is
+ Although a popup menu is always a top-level widget, if a parent is
+ passed the popup menu will be deleted when that parent is
destroyed (as with any other TQObject).
*/
-TQPopupMenu::TQPopupMenu( TQWidget *tqparent, const char *name )
- : TQFrame( tqparent, name, (WFlags)WType_Popup | TQt::WNoAutoErase )
+TQPopupMenu::TQPopupMenu( TQWidget *parent, const char *name )
+ : TQFrame( parent, name, (WFlags)WType_Popup | TQt::WNoAutoErase )
{
d = new TQPopupMenuPrivate;
d->scroll.scrollableSize = d->scroll.topScrollableIndex = 0;
@@ -599,13 +599,13 @@ void TQPopupMenu::popup( const TQPoint &pos, int indexAtPoint )
x11SetWindowTransient( static_cast< TQPopupMenu* >( parentMenu ));
if( !parentMenu ) {
// hackish ... try to find the main window related to this popup
- TQWidget* tqparent = parentWidget() ? parentWidget()->tqtopLevelWidget() : NULL;
- if( tqparent == NULL )
- tqparent = TQApplication::widgetAt( pos );
- if( tqparent == NULL )
- tqparent = TQT_TQWIDGET(tqApp->activeWindow());
- if( tqparent != NULL )
- x11SetWindowTransient( tqparent );
+ TQWidget* parent = parentWidget() ? parentWidget()->tqtopLevelWidget() : NULL;
+ if( parent == NULL )
+ parent = TQApplication::widgetAt( pos );
+ if( parent == NULL )
+ parent = TQT_TQWIDGET(tqApp->activeWindow());
+ if( parent != NULL )
+ x11SetWindowTransient( parent );
}
#endif
@@ -1267,33 +1267,33 @@ TQSize TQPopupMenu::updateSize(bool force_update, bool do_resize)
#ifndef TQT_NO_ACCEL
/*!
\internal
- The \a tqparent is 0 when it is updated when a menu item has
+ The \a parent is 0 when it is updated when a menu item has
changed a state, or it is something else if called from the menu bar.
*/
-void TQPopupMenu::updateAccel( TQWidget *tqparent )
+void TQPopupMenu::updateAccel( TQWidget *parent )
{
TQMenuItemListIt it(*mitems);
register TQMenuItem *mi;
- if ( tqparent ) {
+ if ( parent ) {
delete autoaccel;
autoaccel = 0;
} else if ( !autoaccel ) {
- // we have no tqparent. Rather than ignoring any accelerators we try to find this popup's main window
+ // we have no parent. Rather than ignoring any accelerators we try to find this popup's main window
if ( tornOff ) {
- tqparent = this;
+ parent = this;
} else {
TQWidget *w = (TQWidget *) this;
- tqparent = w->parentWidget();
- while ( (!w->testWFlags(TQt::WType_TopLevel) || !w->testWFlags(WType_Popup)) && tqparent ) {
- w = tqparent;
- tqparent = tqparent->parentWidget();
+ parent = w->parentWidget();
+ while ( (!w->testWFlags(TQt::WType_TopLevel) || !w->testWFlags(WType_Popup)) && parent ) {
+ w = parent;
+ parent = parent->parentWidget();
}
}
}
- if ( tqparent == 0 && autoaccel == 0 )
+ if ( parent == 0 && autoaccel == 0 )
return;
if ( autoaccel ) // build it from scratch
@@ -1301,7 +1301,7 @@ void TQPopupMenu::updateAccel( TQWidget *tqparent )
else {
// create an autoaccel in any case, even if we might not use
// it immediately. Maybe the user needs it later.
- autoaccel = new TQAccel( tqparent, this );
+ autoaccel = new TQAccel( parent, this );
connect( autoaccel, TQT_SIGNAL(activated(int)),
TQT_SLOT(accelActivated(int)) );
connect( autoaccel, TQT_SIGNAL(activatedAmbiguously(int)),
@@ -1342,12 +1342,12 @@ void TQPopupMenu::updateAccel( TQWidget *tqparent )
badSize = TRUE;
}
}
- if ( mi->popup() && tqparent ) { // call recursively
+ if ( mi->popup() && parent ) { // call recursively
// reuse
TQPopupMenu* popup = mi->popup();
if (!popup->avoid_circularity) {
popup->avoid_circularity = 1;
- popup->updateAccel( tqparent );
+ popup->updateAccel( parent );
popup->avoid_circularity = 0;
}
}