summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/layout.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 10:00:25 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 10:00:25 -0600
commit1623fe64102c18ab098b79656b80f28cef840756 (patch)
tree78f35fef11ea3dbbca1ba4c99937736a1a0894cf /kdevdesigner/designer/layout.cpp
parentb6ba5d642f3fc7d320e3d6f4650eb259a3a52b04 (diff)
downloadtdevelop-1623fe64102c18ab098b79656b80f28cef840756.tar.gz
tdevelop-1623fe64102c18ab098b79656b80f28cef840756.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit b6ba5d642f3fc7d320e3d6f4650eb259a3a52b04.
Diffstat (limited to 'kdevdesigner/designer/layout.cpp')
-rw-r--r--kdevdesigner/designer/layout.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp
index 89dfe821..f908dd4b 100644
--- a/kdevdesigner/designer/layout.cpp
+++ b/kdevdesigner/designer/layout.cpp
@@ -25,11 +25,11 @@
**********************************************************************/
#include "formwindow.h"
-#include "layout.h"
+#include "tqlayout.h"
#include <widgetdatabase.h>
#include "widgetfactory.h"
-#include <layout.h>
+#include <tqlayout.h>
#include <tqevent.h>
#include <tqpainter.h>
#include <tqpen.h>
@@ -44,7 +44,7 @@ bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> &
}
/*!
- \class Layout layout.h
+ \class Layout tqlayout.h
\brief Baseclass for layouting widgets in the Designer
Classes derived from this abstract base class are used for layouting
@@ -67,7 +67,7 @@ Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *l
widgets.setAutoDelete( FALSE );
layoutBase = lb;
if ( !doSetup && layoutBase )
- oldGeometry = layoutBase->geometry();
+ oldGeometry = layoutBase->tqgeometry();
}
/*! The widget list we got in the constructor might contain too much
@@ -85,7 +85,7 @@ void Layout::setup()
TQWidget *w = 0;
// Go through all widgets of the list we got. As we can only
- // layout widgets which have the same parent, we first do some
+ // 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.
@@ -120,7 +120,7 @@ void Layout::setup()
}
// If we found no list (because no widget did fit at all) or the
- // best list has only one entry and we do not layout a container,
+ // best list has only one entry and we do not tqlayout a container,
// we leave here.
if ( !lastList || ( lastList->count() < 2 &&
( !layoutBase ||
@@ -133,11 +133,11 @@ void Layout::setup()
}
// Now we have a new and clean widget list, which makes sense
- // to layout
+ // to tqlayout
widgets = *lastList;
// Also use the only correct parent later, so store it
parent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() );
- // Now calculate the position where the layout-meta-widget should
+ // 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
// handle that and do not crash in this case
@@ -149,7 +149,7 @@ void Layout::setup()
geometries.insert( w, TQRect( w->pos(), w->size() ) );
// Change the Z-order, as saving/loading uses the Z-order for
// writing/creating widgets and this has to be the same as in
- // the layout. Else saving + loading will give different results
+ // the tqlayout. Else saving + loading will give different results
w->raise();
}
}
@@ -182,7 +182,7 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent )
return TRUE;
}
-void Layout::finishLayout( bool needMove, TQLayout *layout )
+void Layout::finishLayout( bool needMove, TQLayout *tqlayout )
{
if ( needMove )
layoutBase->move( startPoint );
@@ -193,7 +193,7 @@ void Layout::finishLayout( bool needMove, TQLayout *layout )
layoutBase->setGeometry( oldGeometry );
oldGeometry = g;
layoutBase->show();
- layout->activate();
+ tqlayout->activate();
formWindow->insertWidget( layoutBase );
formWindow->selectWidget( TQT_TQOBJECT(layoutBase) );
TQString n = layoutBase->name();
@@ -236,7 +236,7 @@ void Layout::breakLayout()
if ( !widgets.isEmpty() ) {
TQWidget *w;
for ( w = widgets.first(); w; w = widgets.next() )
- rects.insert( w, w->geometry() );
+ rects.insert( w, w->tqgeometry() );
}
WidgetFactory::deleteLayout( layoutBase );
bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 ||
@@ -311,16 +311,16 @@ void HorizontalLayout::doLayout()
if ( !prepareLayout( needMove, needReparent ) )
return;
- TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
+ TQHBoxLayout *tqlayout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
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 )
- layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
+ tqlayout->addWidget( w, 0, ( (Spacer*)w )->tqalignment() );
else
- layout->addWidget( w );
+ tqlayout->addWidget( w );
if ( ::tqqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy();
}
@@ -330,7 +330,7 @@ void HorizontalLayout::doLayout()
if ( ::tqqt_cast<TQSplitter*>(layoutBase) )
( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal );
- finishLayout( needMove, layout );
+ finishLayout( needMove, tqlayout );
}
@@ -375,16 +375,16 @@ void VerticalLayout::doLayout()
if ( !prepareLayout( needMove, needReparent ) )
return;
- TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
+ TQVBoxLayout *tqlayout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
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 )
- layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
+ tqlayout->addWidget( w, 0, ( (Spacer*)w )->tqalignment() );
else
- layout->addWidget( w );
+ tqlayout->addWidget( w );
if ( ::tqqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy();
}
@@ -394,7 +394,7 @@ void VerticalLayout::doLayout()
if ( ::tqqt_cast<TQSplitter*>(layoutBase) )
( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical );
- finishLayout( needMove, layout );
+ finishLayout( needMove, tqlayout );
}
@@ -747,7 +747,7 @@ void GridLayout::doLayout()
if ( !prepareLayout( needMove, needReparent ) )
return;
- QDesignerGridLayout *layout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid );
+ QDesignerGridLayout *tqlayout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid );
if ( !grid )
buildGrid();
@@ -759,18 +759,18 @@ void GridLayout::doLayout()
if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( rs * cs == 1 ) {
- layout->addWidget( w, r, c, ::tqqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
+ tqlayout->addWidget( w, r, c, ::tqqt_cast<Spacer*>(w) ? ( (Spacer*)w )->tqalignment() : 0 );
} else {
- layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
+ tqlayout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqqt_cast<Spacer*>(w) ? ( (Spacer*)w )->tqalignment() : 0 );
}
if ( ::tqqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy();
w->show();
} else {
- qWarning("ooops, widget '%s' does not fit in layout", w->name() );
+ qWarning("ooops, widget '%s' does not fit in tqlayout", w->name() );
}
}
- finishLayout( needMove, layout );
+ finishLayout( needMove, tqlayout );
}
void GridLayout::setup()
@@ -787,7 +787,7 @@ void GridLayout::buildGrid()
// Pixel to cell conversion:
// By keeping a list of start'n'stop values (x & y) for each widget,
// it is possible to create a very small grid of cells to represent
- // the widget layout.
+ // the widget tqlayout.
// -----------------------------------------------------------------
// We need a list of both start and stop values for x- & y-axis
@@ -798,7 +798,7 @@ void GridLayout::buildGrid()
int index = 0;
TQWidget* w = 0;
for ( w = widgets.first(); w; w = widgets.next() ) {
- TQRect widgetPos = w->geometry();
+ TQRect widgetPos = w->tqgeometry();
x[index] = widgetPos.left();
x[index+1] = widgetPos.right();
y[index] = widgetPos.top();
@@ -829,7 +829,7 @@ void GridLayout::buildGrid()
current++;
}
- // Create the smallest grid possible to represent the current layout
+ // Create the smallest grid possible to represent the current tqlayout
// Since no widget will be placed in the last row and column, we'll
// skip them to increase speed even further
delete grid;
@@ -837,7 +837,7 @@ void GridLayout::buildGrid()
// Mark the cells in the grid that contains a widget
for ( w = widgets.first(); w; w = widgets.next() ) {
- TQRect c(0,0,0,0), widgetPos = w->geometry();
+ TQRect c(0,0,0,0), widgetPos = w->tqgeometry();
// From left til right (not including)
for (uint cw=0; cw<x.size(); cw++) {
if ( x[cw] == widgetPos.left() )
@@ -936,25 +936,25 @@ void Spacer::setSizeType( SizeType t )
sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t );
else
sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum );
- setSizePolicy( sizeP );
+ tqsetSizePolicy( sizeP );
}
Spacer::SizeType Spacer::sizeType() const
{
if ( orient ==Qt::Vertical )
- return (SizeType)sizePolicy().verData();
- return (SizeType)sizePolicy().horData();
+ return (SizeType)tqsizePolicy().verData();
+ return (SizeType)tqsizePolicy().horData();
}
-int Spacer::alignment() const
+int Spacer::tqalignment() const
{
if ( orient ==Qt::Vertical )
return AlignHCenter;
return AlignVCenter;
}
-TQSize Spacer::minimumSize() const
+TQSize Spacer::tqminimumSize() const
{
TQSize s = TQSize( 20,20 );
if ( sizeType() == Expanding )
@@ -965,7 +965,7 @@ TQSize Spacer::minimumSize() const
return s;
}
-TQSize Spacer::sizeHint() const
+TQSize Spacer::tqsizeHint() const
{
return sh;
}
@@ -975,7 +975,7 @@ void Spacer::setSizeHint( const TQSize &s )
{
sh = s;
if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
- resize( sizeHint() );
+ resize( tqsizeHint() );
updateGeometry();
}