summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/src/widgets/tqaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/src/widgets/tqaction.cpp')
-rw-r--r--tqtinterface/qt4/src/widgets/tqaction.cpp136
1 files changed, 68 insertions, 68 deletions
diff --git a/tqtinterface/qt4/src/widgets/tqaction.cpp b/tqtinterface/qt4/src/widgets/tqaction.cpp
index 8a65d06..6857dda 100644
--- a/tqtinterface/qt4/src/widgets/tqaction.cpp
+++ b/tqtinterface/qt4/src/widgets/tqaction.cpp
@@ -220,7 +220,7 @@ TQActionPrivate::~TQActionPrivate()
++itci;
TQComboBox* combo = ci->combo;
combo->clear();
- TQActionGroup *group = ::tqqt_cast<TQActionGroup*>(action->tqparent());
+ TQActionGroup *group = ::tqqt_cast<TQActionGroup*>(action->parent());
TQObjectList *siblings = group ? group->queryList("TQAction") : 0;
if (siblings) {
TQObjectListIt it(*siblings);
@@ -392,38 +392,38 @@ static TQString qt_stripMenuText( TQString s )
}
/*!
- Constructs an action called \a name with tqparent \a tqparent.
+ Constructs an action called \a name with parent \a parent.
- If \a tqparent is a TQActionGroup, the new action inserts itself into
- \a tqparent.
+ If \a parent is a TQActionGroup, the new action inserts itself into
+ \a parent.
- For accelerators and status tips to work, \a tqparent must either be
- a widget, or an action group whose tqparent is a widget.
+ For accelerators and status tips to work, \a parent must either be
+ a widget, or an action group whose parent is a widget.
\warning To prevent recursion, don't create an action as a child
of a widget that the action is later added to.
*/
-TQAction::TQAction( TQT_BASE_OBJECT_NAME* tqparent, const char* name )
- : TQObject( TQT_TQOBJECT(tqparent), name )
+TQAction::TQAction( TQT_BASE_OBJECT_NAME* parent, const char* name )
+ : TQObject( TQT_TQOBJECT(parent), name )
{
d = new TQActionPrivate(this);
init();
}
/*! \obsolete
- Constructs an action called \a name with tqparent \a tqparent.
+ Constructs an action called \a name with parent \a parent.
If \a toggle is TRUE the action will be a toggle action, otherwise
it will be a command action.
- If \a tqparent is a TQActionGroup, the new action inserts itself into
- \a tqparent.
+ If \a parent is a TQActionGroup, the new action inserts itself into
+ \a parent.
- For accelerators and status tips to work, \a tqparent must either be
- a widget, or an action group whose tqparent is a widget.
+ For accelerators and status tips to work, \a parent must either be
+ a widget, or an action group whose parent is a widget.
*/
-TQAction::TQAction( TQT_BASE_OBJECT_NAME* tqparent, const char* name, bool toggle )
- : TQObject( TQT_TQOBJECT(tqparent), name )
+TQAction::TQAction( TQT_BASE_OBJECT_NAME* parent, const char* name, bool toggle )
+ : TQObject( TQT_TQOBJECT(parent), name )
{
d = new TQActionPrivate(this);
d->toggleaction = toggle;
@@ -436,14 +436,14 @@ TQAction::TQAction( TQT_BASE_OBJECT_NAME* tqparent, const char* name, bool toggl
/*!
This constructor creates an action with the following properties:
the icon or iconset \a icon, the menu text \a menuText and
- keyboard accelerator \a accel. It is a child of \a tqparent and
+ keyboard accelerator \a accel. It is a child of \a parent and
called \a name.
- If \a tqparent is a TQActionGroup, the action automatically becomes
+ If \a parent is a TQActionGroup, the action automatically becomes
a member of it.
- For accelerators and status tips to work, \a tqparent must either be
- a widget, or an action group whose tqparent is a widget.
+ For accelerators and status tips to work, \a parent must either be
+ a widget, or an action group whose parent is a widget.
The action uses a stripped version of \a menuText (e.g. "\&Menu
Option..." becomes "Menu Option") as descriptive text for
@@ -458,8 +458,8 @@ TQAction::TQAction( TQT_BASE_OBJECT_NAME* tqparent, const char* name, bool toggl
of a widget that the action is later added to.
*/
TQAction::TQAction( const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
- TQT_BASE_OBJECT_NAME* tqparent, const char* name )
- : TQObject( TQT_TQOBJECT(tqparent), name )
+ TQT_BASE_OBJECT_NAME* parent, const char* name )
+ : TQObject( TQT_TQOBJECT(parent), name )
{
d = new TQActionPrivate(this);
if ( !icon.isNull() )
@@ -473,13 +473,13 @@ TQAction::TQAction( const TQIconSet& icon, const TQString& menuText, TQKeySequen
/*!
This constructor results in an icon-less action with the the menu
text \a menuText and keyboard accelerator \a accel. It is a child
- of \a tqparent and called \a name.
+ of \a parent and called \a name.
- If \a tqparent is a TQActionGroup, the action automatically becomes
+ If \a parent is a TQActionGroup, the action automatically becomes
a member of it.
- For accelerators and status tips to work, \a tqparent must either be
- a widget, or an action group whose tqparent is a widget.
+ For accelerators and status tips to work, \a parent must either be
+ a widget, or an action group whose parent is a widget.
The action uses a stripped version of \a menuText (e.g. "\&Menu
Option..." becomes "Menu Option") as descriptive text for
@@ -494,8 +494,8 @@ TQAction::TQAction( const TQIconSet& icon, const TQString& menuText, TQKeySequen
of a widget that the action is later added to.
*/
TQAction::TQAction( const TQString& menuText, TQKeySequence accel,
- TQT_BASE_OBJECT_NAME* tqparent, const char* name )
- : TQObject( TQT_TQOBJECT(tqparent), name )
+ TQT_BASE_OBJECT_NAME* parent, const char* name )
+ : TQObject( TQT_TQOBJECT(parent), name )
{
d = new TQActionPrivate(this);
d->text = qt_stripMenuText( menuText );
@@ -508,21 +508,21 @@ TQAction::TQAction( const TQString& menuText, TQKeySequence accel,
This constructor creates an action with the following properties:
the description \a text, the icon or iconset \a icon, the menu
text \a menuText and keyboard accelerator \a accel. It is a child
- of \a tqparent and called \a name. If \a toggle is TRUE the action
+ of \a parent and called \a name. If \a toggle is TRUE the action
will be a toggle action, otherwise it will be a command action.
- If \a tqparent is a TQActionGroup, the action automatically becomes
+ If \a parent is a TQActionGroup, the action automatically becomes
a member of it.
- For accelerators and status tips to work, \a tqparent must either be
- a widget, or an action group whose tqparent is a widget.
+ For accelerators and status tips to work, \a parent must either be
+ a widget, or an action group whose parent is a widget.
The \a text and \a accel will be used for tool tips and status
tips unless you provide specific text for these using setToolTip()
and setStatusTip().
*/
-TQAction::TQAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, TQKeySequence accel, TQT_BASE_OBJECT_NAME* tqparent, const char* name, bool toggle )
- : TQObject( TQT_TQOBJECT(tqparent), name )
+TQAction::TQAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, TQKeySequence accel, TQT_BASE_OBJECT_NAME* parent, const char* name, bool toggle )
+ : TQObject( TQT_TQOBJECT(parent), name )
{
d = new TQActionPrivate(this);
d->toggleaction = toggle;
@@ -538,22 +538,22 @@ TQAction::TQAction( const TQString& text, const TQIconSet& icon, const TQString&
/*! \obsolete
This constructor results in an icon-less action with the
description \a text, the menu text \a menuText and the keyboard
- accelerator \a accel. Its tqparent is \a tqparent and it is called \a
+ accelerator \a accel. Its parent is \a parent and it is called \a
name. If \a toggle is TRUE the action will be a toggle action,
otherwise it will be a command action.
- The action automatically becomes a member of \a tqparent if \a
- tqparent is a TQActionGroup.
+ The action automatically becomes a member of \a parent if \a
+ parent is a TQActionGroup.
- For accelerators and status tips to work, \a tqparent must either be
- a widget, or an action group whose tqparent is a widget.
+ For accelerators and status tips to work, \a parent must either be
+ a widget, or an action group whose parent is a widget.
The \a text and \a accel will be used for tool tips and status
tips unless you provide specific text for these using setToolTip()
and setStatusTip().
*/
-TQAction::TQAction( const TQString& text, const TQString& menuText, TQKeySequence accel, TQT_BASE_OBJECT_NAME* tqparent, const char* name, bool toggle )
- : TQObject( TQT_TQOBJECT(tqparent), name )
+TQAction::TQAction( const TQString& text, const TQString& menuText, TQKeySequence accel, TQT_BASE_OBJECT_NAME* parent, const char* name, bool toggle )
+ : TQObject( TQT_TQOBJECT(parent), name )
{
d = new TQActionPrivate(this);
d->toggleaction = toggle;
@@ -569,8 +569,8 @@ TQAction::TQAction( const TQString& text, const TQString& menuText, TQKeySequenc
*/
void TQAction::init()
{
- if ( ::tqqt_cast<TQActionGroup*>(tqparent()) )
- ((TQActionGroup*) tqparent())->add( this ); // insert into action group
+ if ( ::tqqt_cast<TQActionGroup*>(parent()) )
+ ((TQActionGroup*) parent())->add( this ); // insert into action group
}
/*!
@@ -696,7 +696,7 @@ TQString TQAction::toolTip() const
\brief the action's status tip
The statusTip is displayed on all status bars that this action's
- toplevel tqparent widget provides.
+ toplevel parent widget provides.
If no status tip is defined, the action uses the tool tip text.
@@ -775,9 +775,9 @@ void TQAction::setAccel( const TQKeySequence& key )
return;
}
- TQObject* p = tqparent();
+ TQObject* p = parent();
while ( p && !p->isWidgetType() ) {
- p = p->tqparent();
+ p = p->parent();
}
if ( p ) {
d->accel = new TQAccel( (TQWidget*)p, this, "qt_action_accel" );
@@ -786,7 +786,7 @@ void TQAction::setAccel( const TQKeySequence& key )
}
#if defined(TQT_CHECK_STATE)
else
- qWarning( "TQAction::setAccel() (%s) requires widget in tqparent chain", name() );
+ qWarning( "TQAction::setAccel() (%s) requires widget in parent chain", name() );
#endif
d->update();
}
@@ -1119,13 +1119,13 @@ void TQAction::showtqStatusText( const TQString& text )
}
}
- TQObject* par = tqparent();
+ TQObject* par = parent();
TQObject* lpar = 0;
TQStatusBar *bar = 0;
while ( par && !bar ) {
lpar = par;
bar = (TQStatusBar*)par->child( 0, "TQStatusBar", FALSE );
- par = par->tqparent();
+ par = par->parent();
}
if ( !bar && lpar ) {
TQObjectList *l = lpar->queryList( "TQStatusBar" );
@@ -1347,9 +1347,9 @@ void TQActionGroupPrivate::update( const TQActionGroup* that )
#endif
}
for ( TQPtrListIterator<TQActionGroupPrivate::MenuItem> pu( menuitems ); pu.current(); ++pu ) {
- TQWidget* tqparent = pu.current()->popup->parentWidget();
- if ( ::tqqt_cast<TQPopupMenu*>(tqparent) ) {
- TQPopupMenu* ppopup = (TQPopupMenu*)tqparent;
+ TQWidget* parent = pu.current()->popup->parentWidget();
+ if ( ::tqqt_cast<TQPopupMenu*>(parent) ) {
+ TQPopupMenu* ppopup = (TQPopupMenu*)parent;
ppopup->setItemEnabled( pu.current()->id, that->isEnabled() );
ppopup->setItemVisible( pu.current()->id, that->isVisible() );
} else {
@@ -1358,20 +1358,20 @@ void TQActionGroupPrivate::update( const TQActionGroup* that )
}
for ( TQPtrListIterator<TQPopupMenu> pm( popupmenus ); pm.current(); ++pm ) {
TQPopupMenu *popup = pm.current();
- TQPopupMenu *tqparent = ::tqqt_cast<TQPopupMenu*>(popup->parentWidget());
- if ( !tqparent )
+ TQPopupMenu *parent = ::tqqt_cast<TQPopupMenu*>(popup->parentWidget());
+ if ( !parent )
continue;
int index;
- tqparent->findPopup( popup, &index );
- int id = tqparent->idAt( index );
+ parent->findPopup( popup, &index );
+ int id = parent->idAt( index );
if ( !that->iconSet().isNull() )
- tqparent->changeItem( id, that->iconSet(), that->menuText() );
+ parent->changeItem( id, that->iconSet(), that->menuText() );
else
- tqparent->changeItem( id, that->menuText() );
- tqparent->setItemEnabled( id, that->isEnabled() );
+ parent->changeItem( id, that->menuText() );
+ parent->setItemEnabled( id, that->isEnabled() );
#ifndef TQT_NO_ACCEL
- tqparent->setAccel( that->accel(), id );
+ parent->setAccel( that->accel(), id );
#endif
}
}
@@ -1428,18 +1428,18 @@ void TQActionGroupPrivate::update( const TQActionGroup* that )
Actions can be added to an action group using add(), but normally
they are added by creating the action with the action group as
- tqparent. Actions can have separators dividing them using
+ parent. Actions can have separators dividing them using
addSeparator(). Action groups are added to widgets with addTo().
*/
/*!
- Constructs an action group called \a name, with tqparent \a tqparent.
+ Constructs an action group called \a name, with parent \a parent.
The action group is exclusive by default. Call setExclusive(FALSE) to make
the action group non-exclusive.
*/
-TQActionGroup::TQActionGroup( TQT_BASE_OBJECT_NAME* tqparent, const char* name )
- : TQAction( TQT_TQOBJECT(tqparent), name )
+TQActionGroup::TQActionGroup( TQT_BASE_OBJECT_NAME* parent, const char* name )
+ : TQAction( TQT_TQOBJECT(parent), name )
{
d = new TQActionGroupPrivate;
d->exclusive = TRUE;
@@ -1452,15 +1452,15 @@ TQActionGroup::TQActionGroup( TQT_BASE_OBJECT_NAME* tqparent, const char* name )
}
/*!
- Constructs an action group called \a name, with tqparent \a tqparent.
+ Constructs an action group called \a name, with parent \a parent.
If \a exclusive is TRUE only one toggle action in the group will
ever be active.
\sa exclusive
*/
-TQActionGroup::TQActionGroup( TQT_BASE_OBJECT_NAME* tqparent, const char* name, bool exclusive )
- : TQAction( TQT_TQOBJECT(tqparent), name )
+TQActionGroup::TQActionGroup( TQT_BASE_OBJECT_NAME* parent, const char* name, bool exclusive )
+ : TQAction( TQT_TQOBJECT(parent), name )
{
d = new TQActionGroupPrivate;
d->exclusive = exclusive;
@@ -1572,7 +1572,7 @@ bool TQActionGroup::usesDropDown() const
Adds action \a action to this group.
Normally an action is added to a group by creating it with the
- group as tqparent, so this function is not usually used.
+ group as parent, so this function is not usually used.
\sa addTo()
*/
@@ -1630,7 +1630,7 @@ void TQActionGroup::addSeparator()
\obsolete
Use add() instead, or better still create the action with the action
- group as its tqparent.
+ group as its parent.
*/
/*!