summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/tools/designer/designer/layout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/tools/designer/designer/layout.cpp')
-rw-r--r--tqtinterface/qt4/tools/designer/designer/layout.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/tqtinterface/qt4/tools/designer/designer/layout.cpp b/tqtinterface/qt4/tools/designer/designer/layout.cpp
index e6e34e1..db5c195 100644
--- a/tqtinterface/qt4/tools/designer/designer/layout.cpp
+++ b/tqtinterface/qt4/tools/designer/designer/layout.cpp
@@ -59,17 +59,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;
@@ -92,8 +92,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
@@ -142,8 +142,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() Q_SIGNALS of the
// widgets to get informed if one gets deleted to be able to
@@ -167,21 +167,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" ),
- WidgetFactory::containerOfWidget( tqparent ) );
+ WidgetFactory::containerOfWidget( parent ) );
else
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQSplitter" ),
- WidgetFactory::containerOfWidget( tqparent ) );
+ WidgetFactory::containerOfWidget( parent ) );
} else {
WidgetFactory::deleteLayout( layoutBase );
}
@@ -218,12 +218,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( 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_" );
@@ -246,14 +246,14 @@ void Layout::breakLayout()
rects.insert( w, w->tqgeometry() );
}
WidgetFactory::deleteLayout( layoutBase );
- bool needRetqparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 ||
+ bool needReparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 ||
qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 ||
( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
layoutBase != formWindow->mainContainer() );
bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 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 ) {
@@ -264,14 +264,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( widgets.first() );
@@ -314,14 +314,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 && w->tqparent() != TQT_TQOBJECT(layoutBase) )
+ if ( needReparent && w->parent() != TQT_TQOBJECT(layoutBase) )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
@@ -378,14 +378,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 && w->tqparent() != TQT_TQOBJECT(layoutBase) )
+ if ( needReparent && w->parent() != TQT_TQOBJECT(layoutBase) )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
@@ -750,8 +750,8 @@ GridLayout::~GridLayout()
void GridLayout::doLayout()
{
- bool needMove, needRetqparent;
- if ( !prepareLayout( needMove, needRetqparent ) )
+ bool needMove, needReparent;
+ if ( !prepareLayout( needMove, needReparent ) )
return;
TQDesignerGridLayout *tqlayout = (TQDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid );
@@ -763,7 +763,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 && w->tqparent() != TQT_TQOBJECT(layoutBase) )
+ if ( needReparent && w->parent() != TQT_TQOBJECT(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 );
@@ -870,8 +870,8 @@ void GridLayout::buildGrid()
-Spacer::Spacer( TQWidget *tqparent, const char *name )
- : TQWidget( tqparent, name, TQt::WMouseNoMask ),
+Spacer::Spacer( TQWidget *parent, const char *name )
+ : TQWidget( parent, name, TQt::WMouseNoMask ),
orient( Qt::Vertical ), interactive(TRUE), sh( TQSize(20,20) )
{
setSizeType( Expanding );