summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/layout.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 22:19:39 +0000
commit32b67ac0690de411b26b1d5e715b188c27442248 (patch)
tree43167816a3df6b3a877d71c9a7963ed270dcc8c9 /kdevdesigner/designer/layout.cpp
parent330c33ab6f97b279737bf9527c9add7bb1475450 (diff)
downloadtdevelop-32b67ac0690de411b26b1d5e715b188c27442248.tar.gz
tdevelop-32b67ac0690de411b26b1d5e715b188c27442248.zip
rename the following methods:
tqparent parent tqmask mask git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/layout.cpp')
-rw-r--r--kdevdesigner/designer/layout.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp
index 8dd642b8..f908dd4b 100644
--- a/kdevdesigner/designer/layout.cpp
+++ b/kdevdesigner/designer/layout.cpp
@@ -52,17 +52,17 @@ bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> &
*/
-/*! \a p specifies the tqparent of the layoutBase \a lb. The tqparent
+/*! \a p specifies the parent of the layoutBase \a lb. The parent
might be changed in setup(). If the layoutBase is a
- container, the tqparent and the layoutBase are the same. Also they
+ container, the parent and the layoutBase are the same. Also they
always have to be a widget known to the designer (e.g. in the case
- of the tabwidget tqparent and layoutBase are the tabwidget and not the
+ of the tabwidget parent and layoutBase are the tabwidget and not the
page which actually gets laid out. For actual usage the correct
widget is found later by Layout.)
*/
Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter )
- : widgets( wl ), tqparent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter )
+ : widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter )
{
widgets.setAutoDelete( FALSE );
layoutBase = lb;
@@ -85,8 +85,8 @@ void Layout::setup()
TQWidget *w = 0;
// Go through all widgets of the list we got. As we can only
- // tqlayout widgets which have the same tqparent, we first do some
- // sorting which means create a list for each tqparent containing
+ // tqlayout widgets which have the same parent, we first do some
+ // sorting which means create a list for each parent containing
// its child here. After that we keep working on the list of
// childs which has the most entries.
// Widgets which are already laid out are thrown away here too
@@ -135,8 +135,8 @@ void Layout::setup()
// Now we have a new and clean widget list, which makes sense
// to tqlayout
widgets = *lastList;
- // Also use the only correct tqparent later, so store it
- tqparent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() );
+ // Also use the only correct parent later, so store it
+ parent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() );
// Now calculate the position where the tqlayout-meta-widget should
// be placed and connect to widgetDestroyed() signals of the
// widgets to get informed if one gets deleted to be able to
@@ -160,21 +160,21 @@ void Layout::widgetDestroyed()
widgets.removeRef( (TQWidget*)sender() );
}
-bool Layout::prepareLayout( bool &needMove, bool &needRetqparent )
+bool Layout::prepareLayout( bool &needMove, bool &needReparent )
{
if ( !widgets.count() )
return FALSE;
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->raise();
needMove = !layoutBase;
- needRetqparent = needMove || ::tqqt_cast<TQLayoutWidget*>(layoutBase) || ::tqqt_cast<TQSplitter*>(layoutBase);
+ needReparent = needMove || ::tqqt_cast<TQLayoutWidget*>(layoutBase) || ::tqqt_cast<TQSplitter*>(layoutBase);
if ( !layoutBase ) {
if ( !useSplitter )
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ),
- WidgetFactory::containerOfWidget( tqparent ) );
+ WidgetFactory::containerOfWidget( parent ) );
else
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ),
- WidgetFactory::containerOfWidget( tqparent ) );
+ WidgetFactory::containerOfWidget( parent ) );
} else {
WidgetFactory::deleteLayout( layoutBase );
}
@@ -211,12 +211,12 @@ void Layout::undoLayout()
for ( ; it != geometries.end(); ++it ) {
if ( !it.key() )
continue;
- it.key()->reparent( WidgetFactory::containerOfWidget( tqparent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
+ it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
it.key()->resize( ( *it ).size() );
}
formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE );
WidgetFactory::deleteLayout( layoutBase );
- if ( tqparent != layoutBase && !::tqqt_cast<TQMainWindow*>(layoutBase) ) {
+ if ( parent != layoutBase && !::tqqt_cast<TQMainWindow*>(layoutBase) ) {
layoutBase->hide();
TQString n = layoutBase->name();
n.prepend( "qt_dead_widget_" );
@@ -239,14 +239,14 @@ void Layout::breakLayout()
rects.insert( w, w->tqgeometry() );
}
WidgetFactory::deleteLayout( layoutBase );
- bool needRetqparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 ||
+ bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 ||
qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 ||
( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) &&
layoutBase != formWindow->mainContainer() );
bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0;
bool add = geometries.isEmpty();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( needRetqparent )
+ if ( needReparent )
w->reparent( layoutBase->parentWidget(), 0,
layoutBase->pos() + w->pos(), TRUE );
if ( needResize ) {
@@ -257,14 +257,14 @@ void Layout::breakLayout()
if ( add )
geometries.insert( w, TQRect( w->pos(), w->size() ) );
}
- if ( needRetqparent ) {
+ if ( needReparent ) {
layoutBase->hide();
- tqparent = layoutBase->parentWidget();
+ parent = layoutBase->parentWidget();
TQString n = layoutBase->name();
n.prepend( "qt_dead_widget_" );
layoutBase->setName( n );
} else {
- tqparent = layoutBase;
+ parent = layoutBase;
}
if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) )
formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) );
@@ -307,14 +307,14 @@ void HorizontalLayout::setup()
void HorizontalLayout::doLayout()
{
- bool needMove, needRetqparent;
- if ( !prepareLayout( needMove, needRetqparent ) )
+ bool needMove, needReparent;
+ if ( !prepareLayout( needMove, needReparent ) )
return;
TQHBoxLayout *tqlayout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(layoutBase) )
+ if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
@@ -371,14 +371,14 @@ void VerticalLayout::setup()
void VerticalLayout::doLayout()
{
- bool needMove, needRetqparent;
- if ( !prepareLayout( needMove, needRetqparent ) )
+ bool needMove, needReparent;
+ if ( !prepareLayout( needMove, needReparent ) )
return;
TQVBoxLayout *tqlayout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(layoutBase) )
+ if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
@@ -743,8 +743,8 @@ GridLayout::~GridLayout()
void GridLayout::doLayout()
{
- bool needMove, needRetqparent;
- if ( !prepareLayout( needMove, needRetqparent ) )
+ bool needMove, needReparent;
+ if ( !prepareLayout( needMove, needReparent ) )
return;
QDesignerGridLayout *tqlayout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid );
@@ -756,7 +756,7 @@ void GridLayout::doLayout()
int r, c, rs, cs;
for ( w = widgets.first(); w; w = widgets.next() ) {
if ( grid->locateWidget( w, r, c, rs, cs) ) {
- if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(layoutBase) )
+ if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( rs * cs == 1 ) {
tqlayout->addWidget( w, r, c, ::tqqt_cast<Spacer*>(w) ? ( (Spacer*)w )->tqalignment() : 0 );
@@ -863,8 +863,8 @@ void GridLayout::buildGrid()
-Spacer::Spacer( TQWidget *tqparent, const char *name )
- : TQWidget( tqparent, name, WMouseNoMask ),
+Spacer::Spacer( TQWidget *parent, const char *name )
+ : TQWidget( parent, name, WMouseNoMask ),
orient(Qt::Vertical ), interactive(TRUE), sh( TQSize(20,20) )
{
setSizeType( Expanding );