Rename old tq methods that no longer need a unique name

pull/1/head
Timothy Pearson 13 years ago
parent 0b46312b4c
commit fc6629f90a

@ -181,25 +181,25 @@ bool FlowLayout::hasWidthForHeight() const{
return mOrientation == Qt::Horizontal; return mOrientation == Qt::Horizontal;
} }
TQSize FlowLayout::tqsizeHint() const{ TQSize FlowLayout::sizeHint() const{
//return tqminimumSize(); //return minimumSize();
TQSize size(0,0); TQSize size(0,0);
TQPtrListIterator<TQLayoutItem> it(mLayoutItems); TQPtrListIterator<TQLayoutItem> it(mLayoutItems);
TQLayoutItem *o; TQLayoutItem *o;
while((o=it.current()) != 0){ while((o=it.current()) != 0){
++it; ++it;
size = size.expandedTo( o->tqsizeHint() ); size = size.expandedTo( o->sizeHint() );
} }
return size; return size;
} }
TQSize FlowLayout::tqminimumSize() const{ TQSize FlowLayout::minimumSize() const{
TQSize size(0,0); TQSize size(0,0);
TQPtrListIterator<TQLayoutItem> it(mLayoutItems); TQPtrListIterator<TQLayoutItem> it(mLayoutItems);
TQLayoutItem *o; TQLayoutItem *o;
while((o=it.current()) != 0){ while((o=it.current()) != 0){
++it; ++it;
size = size.expandedTo(o->tqminimumSize()); size = size.expandedTo(o->minimumSize());
} }
return size; return size;
} }
@ -250,26 +250,26 @@ int FlowLayout::doLayoutHorizontal( const TQRect& rect, bool testOnly ){
TQPtrList<TQLayoutItem> column; // stores the items of one column TQPtrList<TQLayoutItem> column; // stores the items of one column
while((layoutItem = it.current()) != 0){ while((layoutItem = it.current()) != 0){
++it; ++it;
//int nextY = y + layoutItem->tqsizeHint().height() + spacing(); // next y //int nextY = y + layoutItem->sizeHint().height() + spacing(); // next y
int nextY = y + layoutItem->tqsizeHint().height(); // next y int nextY = y + layoutItem->sizeHint().height(); // next y
//if( nextY - spacing() > rect.bottom() && width > 0 ) { //if( nextY - spacing() > rect.bottom() && width > 0 ) {
if( nextY > rect.bottom() && width > 0 ) { if( nextY > rect.bottom() && width > 0 ) {
// next column // next column
y = rect.y(); // reset y y = rect.y(); // reset y
x = x + width + spacing(); // new x x = x + width + spacing(); // new x
//nextY = y + layoutItem->tqsizeHint().height() + spacing(); // next y with changed y //nextY = y + layoutItem->sizeHint().height() + spacing(); // next y with changed y
nextY = y + layoutItem->tqsizeHint().height(); // next y with changed y nextY = y + layoutItem->sizeHint().height(); // next y with changed y
width = 0; // reset width for the next column width = 0; // reset width for the next column
} }
if(!testOnly){ if(!testOnly){
layoutItem->setGeometry( TQRect( TQPoint( x, y ), layoutItem->tqsizeHint() ) ); layoutItem->setGeometry( TQRect( TQPoint( x, y ), layoutItem->sizeHint() ) );
column.append(layoutItem); column.append(layoutItem);
height += layoutItem->tqsizeHint().height(); // add the height of the current item to the column height height += layoutItem->sizeHint().height(); // add the height of the current item to the column height
if( it.current() == 0 || nextY + it.current()->tqsizeHint().height() > rect.bottom() ){ // test it it's the last item (of this column) if( it.current() == 0 || nextY + it.current()->sizeHint().height() > rect.bottom() ){ // test it it's the last item (of this column)
// calculate real needed width // calculate real needed width
int rWidth = 0; int rWidth = 0;
for(TQLayoutItem* item = column.first(); item; item = column.next()){ for(TQLayoutItem* item = column.first(); item; item = column.next()){
rWidth = TQMAX( rWidth, item->widget()->tqsizeHint().width() ); rWidth = TQMAX( rWidth, item->widget()->sizeHint().width() );
} }
// retqlayout the items of the former column // retqlayout the items of the former column
int space = (rect.height() - height) / (column.count() + 1); int space = (rect.height() - height) / (column.count() + 1);
@ -283,7 +283,7 @@ int FlowLayout::doLayoutHorizontal( const TQRect& rect, bool testOnly ){
} }
} }
y = nextY; y = nextY;
width = TQMAX( width, layoutItem->tqsizeHint().width() ); width = TQMAX( width, layoutItem->sizeHint().width() );
} }
return x + width - rect.x(); // width return x + width - rect.x(); // width
} }
@ -296,18 +296,18 @@ int FlowLayout::doLayoutVertical( const TQRect& rect, bool testOnly ){
TQLayoutItem* layoutItem; TQLayoutItem* layoutItem;
while((layoutItem = it.current() ) != 0){ while((layoutItem = it.current() ) != 0){
++it; ++it;
//int nextX = x + layoutItem->tqsizeHint().width() + spacing(); //int nextX = x + layoutItem->sizeHint().width() + spacing();
int nextX = x + layoutItem->tqsizeHint().width(); int nextX = x + layoutItem->sizeHint().width();
if(nextX - spacing() > rect.right() && height > 0) { if(nextX - spacing() > rect.right() && height > 0) {
// next line // next line
x = rect.x(); // reset x x = rect.x(); // reset x
//y = y + height + spacing(); // new y //y = y + height + spacing(); // new y
y = y + height; // new y y = y + height; // new y
//nextX = x + layoutItem->tqsizeHint().width() + spacing(); // next x //nextX = x + layoutItem->sizeHint().width() + spacing(); // next x
nextX = x + layoutItem->tqsizeHint().width(); // next x nextX = x + layoutItem->sizeHint().width(); // next x
height = 0; // reset height for the next line height = 0; // reset height for the next line
} }
const int itemHeight = layoutItem->tqsizeHint().height(); const int itemHeight = layoutItem->sizeHint().height();
if(!testOnly) if(!testOnly)
layoutItem->setGeometry(TQRect(x, y, rect.right(), itemHeight)); layoutItem->setGeometry(TQRect(x, y, rect.right(), itemHeight));
x = nextX; x = nextX;

@ -62,8 +62,8 @@ public:
int heightForWidth(int w) const; int heightForWidth(int w) const;
bool hasWidthForHeight() const; bool hasWidthForHeight() const;
int widthForHeight(int h) const; int widthForHeight(int h) const;
TQSize tqsizeHint() const; TQSize sizeHint() const;
TQSize tqminimumSize() const; TQSize minimumSize() const;
TQLayoutIterator iterator(); TQLayoutIterator iterator();
TQSizePolicy::ExpandData expanding() const; TQSizePolicy::ExpandData expanding() const;
Qt::Orientation getOrientation() const; Qt::Orientation getOrientation() const;

@ -319,7 +319,7 @@ int Kima::heightForWidth(int inWidth) const{
//kdDebug() << "heightForWidth: " << width << endl; //kdDebug() << "heightForWidth: " << width << endl;
mLayout->setOrientation(Qt::Vertical); mLayout->setOrientation(Qt::Vertical);
return mLayout->heightForWidth(inWidth); return mLayout->heightForWidth(inWidth);
//return tqsizeHint().height(); //return sizeHint().height();
} }
void Kima::mousePressEvent(TQMouseEvent* inEvent ){ void Kima::mousePressEvent(TQMouseEvent* inEvent ){

@ -46,7 +46,7 @@ Prefs::Prefs( TQWidget* parent, const char* name, WFlags fl )
widgetStack->addWidget( WStackPage, 0 ); widgetStack->addWidget( WStackPage, 0 );
PrefsLayout->addWidget( splitter3 ); PrefsLayout->addWidget( splitter3 );
languageChange(); languageChange();
resize( TQSize(340, 73).expandedTo(tqminimumSizeHint()) ); resize( TQSize(340, 73).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
} }

@ -95,7 +95,7 @@ void LabelSource::applyPrefs(){
}else if(alignID == 2){ }else if(alignID == 2){
align = TQt::AlignRight; align = TQt::AlignRight;
} }
mLabel->tqsetAlignment(align); mLabel->setAlignment(align);
updateLabel(mValue); updateLabel(mValue);
} }
@ -113,7 +113,7 @@ void LabelSource::loadPrefs(KConfig* inKConfig){
color.setRgb(0,0,0); color.setRgb(0,0,0);
mLabel->setPaletteForegroundColor(color); mLabel->setPaletteForegroundColor(color);
mLabel->setFont(inKConfig->readFontEntry(mID + "_font")); mLabel->setFont(inKConfig->readFontEntry(mID + "_font"));
mLabel->tqsetAlignment(inKConfig->readNumEntry(mID + "_align")); mLabel->setAlignment(inKConfig->readNumEntry(mID + "_align"));
} }
void LabelSource::updateLabel(const TQString& inValue){ void LabelSource::updateLabel(const TQString& inValue){

@ -76,7 +76,7 @@ LabelSourcePrefs::LabelSourcePrefs( TQWidget* parent, const char* name, WFlags f
defaultSourcePrefsFrameLayout->addLayout( tqlayout18 ); defaultSourcePrefsFrameLayout->addLayout( tqlayout18 );
LabelSourcePrefsLayout->addWidget( defaultSourcePrefsFrame ); LabelSourcePrefsLayout->addWidget( defaultSourcePrefsFrame );
languageChange(); languageChange();
resize( TQSize(299, 135).expandedTo(tqminimumSizeHint()) ); resize( TQSize(299, 135).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
} }

@ -87,7 +87,7 @@ Taskbar visual settings</string>
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>350</width> <width>350</width>
<height>20</height> <height>20</height>
@ -165,7 +165,7 @@ Taskbar visual settings</string>
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>350</width> <width>350</width>
<height>20</height> <height>20</height>

@ -59,7 +59,7 @@ SourcePrefs::SourcePrefs( TQWidget* parent, const char* name, WFlags fl )
tooltipCheckBox = new TQCheckBox( this, "tooltipCheckBox" ); tooltipCheckBox = new TQCheckBox( this, "tooltipCheckBox" );
SourcePrefsLayout->addWidget( tooltipCheckBox ); SourcePrefsLayout->addWidget( tooltipCheckBox );
languageChange(); languageChange();
resize( TQSize(203, 127).expandedTo(tqminimumSizeHint()) ); resize( TQSize(203, 127).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
} }

@ -61,7 +61,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -96,7 +96,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<property name="tqsizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>

Loading…
Cancel
Save