Fix remnant QMIN/QMAX to TQMIN/TQMAX.

pull/2/head
Darrell Anderson 11 years ago
parent 1c37295608
commit 90f1f50f00

@ -588,7 +588,7 @@ void KateFileListItem::paintCell( TQPainter *painter, const TQColorGroup & cg, i
int v = hc-m_viewhistpos; int v = hc-m_viewhistpos;
int e = ec-m_edithistpos+1; int e = ec-m_edithistpos+1;
e = e*e; e = e*e;
int n = QMAX(v + e, 1); int n = TQMAX(v + e, 1);
shade.setRgb( shade.setRgb(
((shade.red()*v) + (eshade.red()*e))/n, ((shade.red()*v) + (eshade.red()*e))/n,
((shade.green()*v) + (eshade.green()*e))/n, ((shade.green()*v) + (eshade.green()*e))/n,

@ -488,7 +488,7 @@ bool KateFileSelector::eventFilter( TQObject* o, TQEvent *e )
TQListBox *lb = cmbPath->listBox(); TQListBox *lb = cmbPath->listBox();
if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lb) && e->type() == TQEvent::Show ) { if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lb) && e->type() == TQEvent::Show ) {
int add = lb->height() < lb->contentsHeight() ? lb->verticalScrollBar()->width() : 0; int add = lb->height() < lb->contentsHeight() ? lb->verticalScrollBar()->width() : 0;
int w = QMIN( mainwin->width(), lb->contentsWidth() + add ); int w = TQMIN( mainwin->width(), lb->contentsWidth() + add );
lb->resize( w, lb->height() ); lb->resize( w, lb->height() );
// TODO - move the listbox to a suitable place if nessecary // TODO - move the listbox to a suitable place if nessecary
// TODO - decide if it is worth caching the size while untill the contents // TODO - decide if it is worth caching the size while untill the contents

@ -100,7 +100,7 @@ void BGMonitorArrangement::updateArrangement()
TQRect expandedOverallGeometry = expandToPreview(overallGeometry); TQRect expandedOverallGeometry = expandToPreview(overallGeometry);
double scale = QMIN( double scale = TQMIN(
double(width()) / double(expandedOverallGeometry.width()), double(width()) / double(expandedOverallGeometry.width()),
double(height()) / double(expandedOverallGeometry.height()) double(height()) / double(expandedOverallGeometry.height())
); );

@ -218,8 +218,8 @@ int KBackgroundRenderer::doBackground(bool quit)
int w = m_Background.width(); int w = m_Background.width();
int h = m_Background.height(); int h = m_Background.height();
if ((w > m_Size.width()) || (h > m_Size.height())) { if ((w > m_Size.width()) || (h > m_Size.height())) {
w = QMIN(w, m_Size.width()); w = TQMIN(w, m_Size.width());
h = QMIN(h, m_Size.height()); h = TQMIN(h, m_Size.height());
m_Background = m_Background.copy(0, 0, w, h); m_Background = m_Background.copy(0, 0, w, h);
} }
KImageEffect::flatten(m_Background, colorA(), colorB(), 0); KImageEffect::flatten(m_Background, colorA(), colorB(), 0);
@ -645,7 +645,7 @@ void KBackgroundRenderer::fullWallpaperBlend()
for (int y = m_WallpaperRect.top(); y < m_WallpaperRect.bottom(); y += wh) { for (int y = m_WallpaperRect.top(); y < m_WallpaperRect.bottom(); y += wh) {
for (int x = m_WallpaperRect.left(); x < m_WallpaperRect.right(); x += ww) { for (int x = m_WallpaperRect.left(); x < m_WallpaperRect.right(); x += ww) {
blend(m_Image, TQRect(x, y, ww, wh), m_Wallpaper, blend(m_Image, TQRect(x, y, ww, wh), m_Wallpaper,
TQPoint(-QMIN(x, 0), -QMIN(y, 0)), blendFactor); TQPoint(-TQMIN(x, 0), -TQMIN(y, 0)), blendFactor);
} }
} }
} }

@ -107,7 +107,7 @@ BGMultiWallpaperDialog::BGMultiWallpaperDialog(KBackgroundSettings *settings,
dlg->m_spinInterval->setSuffix(i18n(" min")); dlg->m_spinInterval->setSuffix(i18n(" min"));
// Load // Load
dlg->m_spinInterval->setValue(QMAX(1,m_pSettings->wallpaperChangeInterval())); dlg->m_spinInterval->setValue(TQMAX(1,m_pSettings->wallpaperChangeInterval()));
dlg->m_listImages->insertStringList(m_pSettings->wallpaperList()); dlg->m_listImages->insertStringList(m_pSettings->wallpaperList());

@ -381,7 +381,7 @@ void Kclock::paintEvent( TQPaintEvent * )
TQPointArray pts; TQPointArray pts;
TQPoint cp = rect().center(); TQPoint cp = rect().center();
int d = QMIN(width(),height()); int d = TQMIN(width(),height());
TQColor hands = colorGroup().dark(); TQColor hands = colorGroup().dark();
TQColor shadow = colorGroup().text(); TQColor shadow = colorGroup().text();
paint.setPen( shadow ); paint.setPen( shadow );

@ -87,7 +87,7 @@ JoyWidget::JoyWidget(TQWidget *parent, const char *name)
// calculate the column width we need // calculate the column width we need
TQFontMetrics fm(font()); TQFontMetrics fm(font());
int colWidth = QMAX(fm.width(PRESSED), fm.width("-32767")) + 10; // -32767 largest string int colWidth = TQMAX(fm.width(PRESSED), fm.width("-32767")) + 10; // -32767 largest string
new TQLabel(i18n("Buttons:"), vboxMid); new TQLabel(i18n("Buttons:"), vboxMid);
buttonTbl = new TQTable(0, 1, vboxMid); buttonTbl = new TQTable(0, 1, vboxMid);
@ -282,7 +282,7 @@ void JoyWidget::showDeviceProps(JoyDevice *joy)
idle->start(0); idle->start(0);
// make both tables use the same space for header; this looks nicer // make both tables use the same space for header; this looks nicer
buttonTbl->setLeftMargin(QMAX(buttonTbl->verticalHeader()->width(), buttonTbl->setLeftMargin(TQMAX(buttonTbl->verticalHeader()->width(),
axesTbl->verticalHeader()->width())); axesTbl->verticalHeader()->width()));
axesTbl->setLeftMargin(buttonTbl->verticalHeader()->width()); axesTbl->setLeftMargin(buttonTbl->verticalHeader()->width());
} }

@ -78,9 +78,9 @@ KControlApp::KControlApp()
if (fontSize == 0) if (fontSize == 0)
fontSize = (toplevel->fontInfo().pixelSize() * 72) / pdm.logicalDpiX(); fontSize = (toplevel->fontInfo().pixelSize() * 72) / pdm.logicalDpiX();
int x = config->readNumEntry(TQString::fromLatin1("InitialWidth %1").arg(desk.width()), int x = config->readNumEntry(TQString::fromLatin1("InitialWidth %1").arg(desk.width()),
QMIN( desk.width(), 368 + (6*pdm.logicalDpiX()*fontSize)/12 ) ); TQMIN( desk.width(), 368 + (6*pdm.logicalDpiX()*fontSize)/12 ) );
int y = config->readNumEntry(TQString::fromLatin1("InitialHeight %1").arg(desk.height()), int y = config->readNumEntry(TQString::fromLatin1("InitialHeight %1").arg(desk.height()),
QMIN( desk.height(), 312 + (4*pdm.logicalDpiX()*fontSize)/12 ) ); TQMIN( desk.height(), 312 + (4*pdm.logicalDpiX()*fontSize)/12 ) );
toplevel->resize(x,y); toplevel->resize(x,y);
} }

@ -166,7 +166,7 @@ void ModuleTreeView::expandItem(TQListViewItem *item, TQPtrList<TQListViewItem>
{ {
while (item) while (item)
{ {
setOpen(item, parentList-.contains(item)); setOpen(item, parentList->contains(item));
if (item->childCount() != 0) if (item->childCount() != 0)
expandItem(item->firstChild(), parentList); expandItem(item->firstChild(), parentList);

@ -83,7 +83,7 @@ void KSaveIOConfig::setReadTimeout( int _timeout )
{ {
TDEConfig* cfg = config (); TDEConfig* cfg = config ();
cfg->setGroup( TQString() ); cfg->setGroup( TQString() );
cfg->writeEntry("ReadTimeout", QMAX(MIN_TIMEOUT_VALUE,_timeout)); cfg->writeEntry("ReadTimeout", TQMAX(MIN_TIMEOUT_VALUE,_timeout));
cfg->sync(); cfg->sync();
} }
@ -91,7 +91,7 @@ void KSaveIOConfig::setConnectTimeout( int _timeout )
{ {
TDEConfig* cfg = config (); TDEConfig* cfg = config ();
cfg->setGroup( TQString() ); cfg->setGroup( TQString() );
cfg->writeEntry("ConnectTimeout", QMAX(MIN_TIMEOUT_VALUE,_timeout)); cfg->writeEntry("ConnectTimeout", TQMAX(MIN_TIMEOUT_VALUE,_timeout));
cfg->sync(); cfg->sync();
} }
@ -99,7 +99,7 @@ void KSaveIOConfig::setProxyConnectTimeout( int _timeout )
{ {
TDEConfig* cfg = config (); TDEConfig* cfg = config ();
cfg->setGroup( TQString() ); cfg->setGroup( TQString() );
cfg->writeEntry("ProxyConnectTimeout", QMAX(MIN_TIMEOUT_VALUE,_timeout)); cfg->writeEntry("ProxyConnectTimeout", TQMAX(MIN_TIMEOUT_VALUE,_timeout));
cfg->sync(); cfg->sync();
} }
@ -107,7 +107,7 @@ void KSaveIOConfig::setResponseTimeout( int _timeout )
{ {
TDEConfig* cfg = config (); TDEConfig* cfg = config ();
cfg->setGroup( TQString() ); cfg->setGroup( TQString() );
cfg->writeEntry("ResponseTimeout", QMAX(MIN_TIMEOUT_VALUE,_timeout)); cfg->writeEntry("ResponseTimeout", TQMAX(MIN_TIMEOUT_VALUE,_timeout));
cfg->sync(); cfg->sync();
} }

@ -55,9 +55,9 @@ void KAbstractDebugDialog::buildButtons( TQVBoxLayout * topLayout )
int w1 = pHelpButton->sizeHint().width(); int w1 = pHelpButton->sizeHint().width();
int w2 = pOKButton->sizeHint().width(); int w2 = pOKButton->sizeHint().width();
int w3 = pCancelButton->sizeHint().width(); int w3 = pCancelButton->sizeHint().width();
int w4 = QMAX( w1, QMAX( w2, w3 ) ); int w4 = TQMAX( w1, TQMAX( w2, w3 ) );
int w5 = pApplyButton->sizeHint().width(); int w5 = pApplyButton->sizeHint().width();
w4 = QMAX(w4, w5); w4 = TQMAX(w4, w5);
pHelpButton->setFixedWidth( w4 ); pHelpButton->setFixedWidth( w4 );
pOKButton->setFixedWidth( w4 ); pOKButton->setFixedWidth( w4 );

@ -494,7 +494,7 @@ void KDIconView::setAutoAlign( bool b )
if ( b ) { if ( b ) {
// set maxItemWidth to ensure sane initial icon layout before the auto align code is fully activated // set maxItemWidth to ensure sane initial icon layout before the auto align code is fully activated
int sz = iconSize() ? iconSize() : TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop ); int sz = iconSize() ? iconSize() : TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop );
setMaxItemWidth( QMAX( QMAX( sz, previewIconSize( iconSize() ) ), KonqFMSettings::settings()->iconTextWidth() ) ); setMaxItemWidth( TQMAX( TQMAX( sz, previewIconSize( iconSize() ) ), KonqFMSettings::settings()->iconTextWidth() ) );
setFont( font() ); // Force calcRect() setFont( font() ); // Force calcRect()
if (!KRootWm::self()->startup) { if (!KRootWm::self()->startup) {
@ -509,7 +509,7 @@ void KDIconView::setAutoAlign( bool b )
else { else {
// change maxItemWidth, because when grid-align was active, it changed this for the grid // change maxItemWidth, because when grid-align was active, it changed this for the grid
int sz = iconSize() ? iconSize() : TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop ); int sz = iconSize() ? iconSize() : TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop );
setMaxItemWidth( QMAX( QMAX( sz, previewIconSize( iconSize() ) ), KonqFMSettings::settings()->iconTextWidth() ) ); setMaxItemWidth( TQMAX( TQMAX( sz, previewIconSize( iconSize() ) ), KonqFMSettings::settings()->iconTextWidth() ) );
setFont( font() ); // Force calcRect() setFont( font() ); // Force calcRect()
disconnect( this, TQT_SIGNAL( iconMoved() ), disconnect( this, TQT_SIGNAL( iconMoved() ),
@ -2001,8 +2001,8 @@ TQPoint KDIconView::findPlaceForIcon( int column, int row, const TQRect &current
int dx = gridXValue(), dy = 0; int dx = gridXValue(), dy = 0;
TQIconViewItem *item = firstItem(); TQIconViewItem *item = firstItem();
for ( ; item; item = item->nextItem() ) { for ( ; item; item = item->nextItem() ) {
dx = QMAX( dx, item->width() ); dx = TQMAX( dx, item->width() );
dy = QMAX( dy, item->height() ); dy = TQMAX( dy, item->height() );
} }
dx += spacing(); dx += spacing();
@ -2016,7 +2016,7 @@ TQPoint KDIconView::findPlaceForIcon( int column, int row, const TQRect &current
delta++; delta++;
res = findPlaceForIconCol(column + (delta / 2) * (-2 * (delta % 2) + 1), res = findPlaceForIconCol(column + (delta / 2) * (-2 * (delta % 2) + 1),
dx, dy, currentIconArea); dx, dy, currentIconArea);
if (delta / 2 > QMAX(max_cols - column, column)) if (delta / 2 > TQMAX(max_cols - column, column))
return res; return res;
} while (res.isNull()); } while (res.isNull());
return res; return res;
@ -2030,7 +2030,7 @@ TQPoint KDIconView::findPlaceForIcon( int column, int row, const TQRect &current
delta++; delta++;
res = findPlaceForIconRow(row + (delta / 2) * (-2 * (delta % 2) + 1), res = findPlaceForIconRow(row + (delta / 2) * (-2 * (delta % 2) + 1),
dx, dy, currentIconArea); dx, dy, currentIconArea);
if (delta / 2 > QMAX(max_rows - row, row)) if (delta / 2 > TQMAX(max_rows - row, row))
return res; return res;
} while (res.isNull()); } while (res.isNull());
return res; return res;

@ -370,20 +370,20 @@ void KfindWindow::resetColumns(bool init)
TQFontMetrics fm = fontMetrics(); TQFontMetrics fm = fontMetrics();
if (init) if (init)
{ {
setColumnWidth(2, QMAX(fm.width(columnText(2)), fm.width("0000000")) + 15); setColumnWidth(2, TQMAX(fm.width(columnText(2)), fm.width("0000000")) + 15);
TQString sampleDate = TQString sampleDate =
TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
setColumnWidth(3, QMAX(fm.width(columnText(3)), fm.width(sampleDate)) + 15); setColumnWidth(3, TQMAX(fm.width(columnText(3)), fm.width(sampleDate)) + 15);
setColumnWidth(4, QMAX(fm.width(columnText(4)), fm.width(i18n(perm[RO]))) + 15); setColumnWidth(4, TQMAX(fm.width(columnText(4)), fm.width(i18n(perm[RO]))) + 15);
setColumnWidth(5, QMAX(fm.width(columnText(5)), fm.width("some text")) + 15); setColumnWidth(5, TQMAX(fm.width(columnText(5)), fm.width("some text")) + 15);
} }
int free_space = visibleWidth() - int free_space = visibleWidth() -
columnWidth(2) - columnWidth(3) - columnWidth(4) - columnWidth(5); columnWidth(2) - columnWidth(3) - columnWidth(4) - columnWidth(5);
// int name_w = QMIN((int)(free_space*0.5), 150); // int name_w = TQMIN((int)(free_space*0.5), 150);
// int dir_w = free_space - name_w; // int dir_w = free_space - name_w;
int name_w = QMAX((int)(free_space*0.5), fm.width("some long filename")); int name_w = TQMAX((int)(free_space*0.5), fm.width("some long filename"));
int dir_w = name_w; int dir_w = name_w;
setColumnWidth(0, name_w); setColumnWidth(0, name_w);

@ -374,7 +374,7 @@ float VoiceSignature::diff(const VoiceSignature &s1, const VoiceSignature &s2)
d+= d1*d1;//*pond[x][y]; d+= d1*d1;//*pond[x][y];
} }
d=sqrt(d); d=sqrt(d);
g[i][j]=QMIN(QMIN( g[i-1][j]+d, g[i][j-1]+d ) , g[i-1][j-1]+d+d ); g[i][j]=TQMIN(TQMIN( g[i-1][j]+d, g[i][j-1]+d ) , g[i-1][j-1]+d+d );
} }
return g[I][J]/(I+J); return g[I][J]/(I+J);

@ -299,7 +299,7 @@ void KasBar::setMaxBoxes( int count )
void KasBar::setBoxesPerLine( int count ) void KasBar::setBoxesPerLine( int count )
{ {
boxesPerLine_ = QMIN( count, maxBoxes_ ); boxesPerLine_ = TQMIN( count, maxBoxes_ );
updateLayout(); updateLayout();
} }

@ -70,7 +70,7 @@ void KasLoadItem::paint( TQPainter *p )
{ {
double val = valuesOne.last(); double val = valuesOne.last();
double maxValue = 1.0; double maxValue = 1.0;
double scaleVal = QMAX( val, valuesFive.last() ); double scaleVal = TQMAX( val, valuesFive.last() );
if ( scaleVal >= maxValue ) if ( scaleVal >= maxValue )
maxValue = 2.0; maxValue = 2.0;

@ -1797,7 +1797,7 @@ TQSize ExtensionContainer::initialSize(KPanelExtension::Position p, TQRect workA
if (m_settings.expandSize()) if (m_settings.expandSize())
{ {
height = QMAX(height, hint.height()); height = TQMAX(height, hint.height());
} }
} }
else else
@ -1807,7 +1807,7 @@ TQSize ExtensionContainer::initialSize(KPanelExtension::Position p, TQRect workA
if (m_settings.expandSize()) if (m_settings.expandSize())
{ {
width = QMAX( width, hint.width() ); width = TQMAX( width, hint.width() );
} }
} }

@ -1611,8 +1611,8 @@ void ContainerArea::moveDragIndicator(int pos)
{ {
int newX = pos; int newX = pos;
_dragIndicator->resize(_dragIndicator->preferredSize()); _dragIndicator->resize(_dragIndicator->preferredSize());
newX = QMAX(newX, availableSpace.left()); newX = TQMAX(newX, availableSpace.left());
newX = QMIN(newX, newX = TQMIN(newX,
availableSpace.right() + 1 - _dragIndicator->width() ); availableSpace.right() + 1 - _dragIndicator->width() );
_dragIndicator->move(newX, availableSpace.top()); _dragIndicator->move(newX, availableSpace.top());
} }
@ -1629,8 +1629,8 @@ void ContainerArea::moveDragIndicator(int pos)
{ {
int newY = pos; int newY = pos;
_dragIndicator->resize(_dragIndicator->preferredSize()); _dragIndicator->resize(_dragIndicator->preferredSize());
newY = QMAX(newY, availableSpace.top()); newY = TQMAX(newY, availableSpace.top());
newY = QMIN(newY, newY = TQMIN(newY,
availableSpace.bottom() + 1 - _dragIndicator->height() ); availableSpace.bottom() + 1 - _dragIndicator->height() );
_dragIndicator->move(availableSpace.left(), newY); _dragIndicator->move(availableSpace.left(), newY);
} }

@ -733,22 +733,22 @@ void ExtensionManager::reduceArea(TQRect &area, const ExtensionContainer *extens
{ {
case KPanelExtension::Left: case KPanelExtension::Left:
{ {
area.setLeft(QMAX(area.left(), geom.right())); area.setLeft(TQMAX(area.left(), geom.right()));
break; break;
} }
case KPanelExtension::Right: case KPanelExtension::Right:
{ {
area.setRight(QMIN(area.right(), geom.left())); area.setRight(TQMIN(area.right(), geom.left()));
break; break;
} }
case KPanelExtension::Top: case KPanelExtension::Top:
{ {
area.setTop(QMAX(area.top(), geom.bottom())); area.setTop(TQMAX(area.top(), geom.bottom()));
break; break;
} }
case KPanelExtension::Bottom: case KPanelExtension::Bottom:
{ {
area.setBottom(QMIN(area.bottom(), geom.top())); area.setBottom(TQMIN(area.bottom(), geom.top()));
break; break;
} }
default: ; // ignore KPanelExtension::Floating ... at least for now default: ; // ignore KPanelExtension::Floating ... at least for now

@ -292,7 +292,7 @@ void AddAppletDialog::resizeAppletView()
m_appletBox->layout()->activate(); m_appletBox->layout()->activate();
w = v->visibleWidth(); w = v->visibleWidth();
h = m_appletBox->layout()->minimumSize().height(); h = m_appletBox->layout()->minimumSize().height();
v->resizeContents(w, QMAX(h, v->visibleHeight())); v->resizeContents(w, TQMAX(h, v->visibleHeight()));
if (w == m_appletBox->width() && h == m_appletBox->height()) if (w == m_appletBox->width() && h == m_appletBox->height())
break; break;
m_appletBox->resize(w, h); m_appletBox->resize(w, h);

@ -132,7 +132,7 @@ void AddAppletVisualFeedback::displayInternal()
} }
int margin = KDialog::marginHint(); int margin = KDialog::marginHint();
int height = QMAX(m_icon.height(), textRect.height()) + 2 * margin; int height = TQMAX(m_icon.height(), textRect.height()) + 2 * margin;
int textX = m_icon.isNull() ? margin : 2 + m_icon.width() + 2 * margin; int textX = m_icon.isNull() ? margin : 2 + m_icon.width() + 2 * margin;
int width = textX; int width = textX;

@ -175,7 +175,7 @@ static int used_size( TQLabel *label, int oldsize )
{ {
TQSimpleRichText st( label->text(), TDEGlobalSettings::toolBarFont() ); TQSimpleRichText st( label->text(), TDEGlobalSettings::toolBarFont() );
st.setWidth( oldsize ); st.setWidth( oldsize );
return QMAX( st.widthUsed(), oldsize ); return TQMAX( st.widthUsed(), oldsize );
} }
KMenu::KMenu() KMenu::KMenu()
@ -3206,14 +3206,14 @@ void KMenu::mouseMoveEvent ( TQMouseEvent * e )
if ( hasMouseTracking() && m_isresizing ) { if ( hasMouseTracking() && m_isresizing ) {
m_stacker->setMinimumSize( TQSize(0, 0) ); m_stacker->setMinimumSize( TQSize(0, 0) );
m_stacker->setMaximumSize( TQSize(32000, 32000) ); m_stacker->setMaximumSize( TQSize(32000, 32000) );
int newWidth = QMAX( e->x() - x(), minimumSizeHint().width() ); int newWidth = TQMAX( e->x() - x(), minimumSizeHint().width() );
if ( m_orientation == BottomUp ) { if ( m_orientation == BottomUp ) {
int newHeight = QMAX( height() - e->y(), minimumSizeHint().height() + 10 ); int newHeight = TQMAX( height() - e->y(), minimumSizeHint().height() + 10 );
int newY = y() + height() - newHeight; int newY = y() + height() - newHeight;
setGeometry( x(), newY, newWidth, newHeight); setGeometry( x(), newY, newWidth, newHeight);
} }
else { else {
setGeometry( x(), y(), newWidth, QMAX( e->y(), minimumSizeHint().height() + 10 )); setGeometry( x(), y(), newWidth, TQMAX( e->y(), minimumSizeHint().height() + 10 ));
} }
} }
} }
@ -3392,9 +3392,9 @@ TQSize KMenu::minimumSizeHint() const
{ {
TQSize minsize; TQSize minsize;
minsize.setWidth( minsize.width() + m_tabBar->minimumSizeHint().width() ); minsize.setWidth( minsize.width() + m_tabBar->minimumSizeHint().width() );
minsize.setWidth( QMAX( minsize.width(), minsize.setWidth( TQMAX( minsize.width(),
m_search->minimumSize().width() ) ); m_search->minimumSize().width() ) );
minsize.setWidth( QMAX( minsize.width(), minsize.setWidth( TQMAX( minsize.width(),
m_search->minimumSize().width() ) ); m_search->minimumSize().width() ) );
minsize.setHeight( minsize.height() + minsize.setHeight( minsize.height() +

@ -171,10 +171,10 @@ TQSize KickoffTabBar::minimumSizeHint() const
} }
// Final width for this tab // Final width for this tab
int w = QMAX(iw, fw) + hframe; int w = TQMAX(iw, fw) + hframe;
mw = QMAX(mw, w); mw = TQMAX(mw, w);
mh = QMAX(mh, h); mh = TQMAX(mh, h);
} }
s.setWidth(mw * count()); s.setWidth(mw * count());
@ -196,7 +196,7 @@ void KickoffTabBar::layoutTabs()
for (int t = 0; t < count(); ++t) { for (int t = 0; t < count(); ++t) {
TQTab* tab = tabAt(TQApplication::reverseLayout() ? count() - t - 1 : t); TQTab* tab = tabAt(TQApplication::reverseLayout() ? count() - t - 1 : t);
int w = QMAX(st.width() / count(), parentWidget()->width() / count()); int w = TQMAX(st.width() / count(), parentWidget()->width() / count());
TQRect r = tab->rect(); TQRect r = tab->rect();
tab->setRect(TQRect(TQPoint(x, 0), style().tqsizeFromContents(TQStyle::CT_TabBarTab, this, tab->setRect(TQRect(TQPoint(x, 0), style().tqsizeFromContents(TQStyle::CT_TabBarTab, this,

@ -356,7 +356,7 @@ void KickerTip::displayInternal()
} }
int margin = KDialog::marginHint(); int margin = KDialog::marginHint();
int height = QMAX(m_icon.height(), textRect.height()) + 2 * margin; int height = TQMAX(m_icon.height(), textRect.height()) + 2 * margin;
int textX = m_icon.isNull() ? margin : 2 + m_icon.width() + 2 * margin; int textX = m_icon.isNull() ? margin : 2 + m_icon.width() + 2 * margin;
int width = textX + textRect.width() + margin; int width = textX + textRect.width() + margin;
int textY = (height - textRect.height()) / 2; int textY = (height - textRect.height()) / 2;

@ -292,7 +292,7 @@ int PanelButton::preferredDimension(int panelDim) const
int newSize = preferredIconSize(panelDim); int newSize = preferredIconSize(panelDim);
if (newSize > 0) if (newSize > 0)
{ {
return QMIN(panelDim, newSize + (KDialog::spacingHint() * 2)); return TQMIN(panelDim, newSize + (KDialog::spacingHint() * 2));
} }
} }

@ -135,7 +135,7 @@ int PopupProxy::insertFromSpill( int index ) {
int count = 0; int count = 0;
int remainingHeight = m_menu_height - proxy_for_menu->sizeHint().height(); int remainingHeight = m_menu_height - proxy_for_menu->sizeHint().height();
// Force at least one item to be inserted. // Force at least one item to be inserted.
remainingHeight = QMAX( remainingHeight, 0 ); remainingHeight = TQMAX( remainingHeight, 0 );
for ( const HistoryItem* item = spillPointer.current(); for ( const HistoryItem* item = spillPointer.current();
item && remainingHeight >= 0; item && remainingHeight >= 0;
nextItemNumber++, item = ++spillPointer ) nextItemNumber++, item = ++spillPointer )

@ -399,7 +399,7 @@ void MenuFile::moveMenu(const TQString &oldMenu, const TQString &newMenu)
TQStringList oldMenuParts = TQStringList::split('/', oldMenu); TQStringList oldMenuParts = TQStringList::split('/', oldMenu);
TQStringList newMenuParts = TQStringList::split('/', newMenu); TQStringList newMenuParts = TQStringList::split('/', newMenu);
TQString commonMenuName; TQString commonMenuName;
uint max = QMIN(oldMenuParts.count(), newMenuParts.count()); uint max = TQMIN(oldMenuParts.count(), newMenuParts.count());
uint i = 0; uint i = 0;
for(; i < max; i++) for(; i < max; i++)
{ {

@ -749,15 +749,15 @@ int KonqComboListBoxPixmap::height( const TQListBox* lb ) const
if ( text().isEmpty() ) if ( text().isEmpty() )
h = pm.height(); h = pm.height();
else else
h = QMAX( pm.height(), lb->fontMetrics().lineSpacing() + 2 ); h = TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 2 );
return QMAX( h, TQApplication::globalStrut().height() ); return TQMAX( h, TQApplication::globalStrut().height() );
} }
int KonqComboListBoxPixmap::width( const TQListBox* lb ) const int KonqComboListBoxPixmap::width( const TQListBox* lb ) const
{ {
if ( text().isEmpty() ) if ( text().isEmpty() )
return QMAX( pm.width() + 6, TQApplication::globalStrut().width() ); return TQMAX( pm.width() + 6, TQApplication::globalStrut().width() );
return QMAX( pm.width() + lb->fontMetrics().width( text() ) + 6, return TQMAX( pm.width() + lb->fontMetrics().width( text() ) + 6,
TQApplication::globalStrut().width() ); TQApplication::globalStrut().width() );
} }

@ -141,8 +141,8 @@ void TEScreen::cursorUp(int n)
{ {
if (n == 0) n = 1; // Default if (n == 0) n = 1; // Default
int stop = cuY < tmargin ? 0 : tmargin; int stop = cuY < tmargin ? 0 : tmargin;
cuX = QMIN(columns-1,cuX); // nowrap! cuX = TQMIN(columns-1,cuX); // nowrap!
cuY = QMAX(stop,cuY-n); cuY = TQMAX(stop,cuY-n);
} }
/*! /*!
@ -156,8 +156,8 @@ void TEScreen::cursorDown(int n)
{ {
if (n == 0) n = 1; // Default if (n == 0) n = 1; // Default
int stop = cuY > bmargin ? lines-1 : bmargin; int stop = cuY > bmargin ? lines-1 : bmargin;
cuX = QMIN(columns-1,cuX); // nowrap! cuX = TQMIN(columns-1,cuX); // nowrap!
cuY = QMIN(stop,cuY+n); cuY = TQMIN(stop,cuY+n);
} }
/*! /*!
@ -170,8 +170,8 @@ void TEScreen::cursorLeft(int n)
//=CUB //=CUB
{ {
if (n == 0) n = 1; // Default if (n == 0) n = 1; // Default
cuX = QMIN(columns-1,cuX); // nowrap! cuX = TQMIN(columns-1,cuX); // nowrap!
cuX = QMAX(0,cuX-n); cuX = TQMAX(0,cuX-n);
} }
/*! /*!
@ -184,7 +184,7 @@ void TEScreen::cursorRight(int n)
//=CUF //=CUF
{ {
if (n == 0) n = 1; // Default if (n == 0) n = 1; // Default
cuX = QMIN(columns-1,cuX+n); cuX = TQMIN(columns-1,cuX+n);
} }
/*! /*!
@ -268,7 +268,7 @@ void TEScreen::NextLine()
void TEScreen::eraseChars(int n) void TEScreen::eraseChars(int n)
{ {
if (n == 0) n = 1; // Default if (n == 0) n = 1; // Default
int p = QMAX(0,QMIN(cuX+n-1,columns-1)); int p = TQMAX(0,TQMIN(cuX+n-1,columns-1));
clearImage(loc(cuX,cuY),loc(p,cuY),' '); clearImage(loc(cuX,cuY),loc(p,cuY),' ');
} }
@ -281,7 +281,7 @@ void TEScreen::deleteChars(int n)
{ {
if (n == 0) n = 1; // Default if (n == 0) n = 1; // Default
if (n > columns) n = columns - 1; if (n > columns) n = columns - 1;
int p = QMAX(0,QMIN(cuX+n,columns-1)); int p = TQMAX(0,TQMIN(cuX+n,columns-1));
moveImage(loc(cuX,cuY),loc(p,cuY),loc(columns-1,cuY)); moveImage(loc(cuX,cuY),loc(p,cuY),loc(columns-1,cuY));
clearImage(loc(columns-n,cuY),loc(columns-1,cuY),' '); clearImage(loc(columns-n,cuY),loc(columns-1,cuY),' ');
} }
@ -294,8 +294,8 @@ void TEScreen::deleteChars(int n)
void TEScreen::insertChars(int n) void TEScreen::insertChars(int n)
{ {
if (n == 0) n = 1; // Default if (n == 0) n = 1; // Default
int p = QMAX(0,QMIN(columns-1-n,columns-1)); int p = TQMAX(0,TQMIN(columns-1-n,columns-1));
int q = QMAX(0,QMIN(cuX+n,columns-1)); int q = TQMAX(0,TQMIN(cuX+n,columns-1));
moveImage(loc(q,cuY),loc(cuX,cuY),loc(p,cuY)); moveImage(loc(q,cuY),loc(cuX,cuY),loc(p,cuY));
clearImage(loc(cuX,cuY),loc(q-1,cuY),' '); clearImage(loc(cuX,cuY),loc(q-1,cuY),' ');
} }
@ -382,8 +382,8 @@ void TEScreen::saveCursor()
void TEScreen::restoreCursor() void TEScreen::restoreCursor()
{ {
cuX = QMIN(sa_cuX,columns-1); cuX = TQMIN(sa_cuX,columns-1);
cuY = QMIN(sa_cuY,lines-1); cuY = TQMIN(sa_cuY,lines-1);
cu_re = sa_cu_re; cu_re = sa_cu_re;
cu_fg = sa_cu_fg; cu_fg = sa_cu_fg;
cu_bg = sa_cu_bg; cu_bg = sa_cu_bg;
@ -436,8 +436,8 @@ void TEScreen::resizeImage(int new_lines, int new_columns)
} }
newwrapped[y]=false; newwrapped[y]=false;
} }
int cpy_lines = QMIN(new_lines, lines); int cpy_lines = TQMIN(new_lines, lines);
int cpy_columns = QMIN(new_columns,columns); int cpy_columns = TQMIN(new_columns,columns);
// copy to new image // copy to new image
for (int y = 0; y < cpy_lines; y++) { for (int y = 0; y < cpy_lines; y++) {
for (int x = 0; x < cpy_columns; x++) for (int x = 0; x < cpy_columns; x++)
@ -454,8 +454,8 @@ void TEScreen::resizeImage(int new_lines, int new_columns)
line_wrapped = newwrapped; line_wrapped = newwrapped;
lines = new_lines; lines = new_lines;
columns = new_columns; columns = new_columns;
cuX = QMIN(cuX,columns-1); cuX = TQMIN(cuX,columns-1);
cuY = QMIN(cuY,lines-1); cuY = TQMIN(cuY,lines-1);
// FIXME: try to keep values, evtl. // FIXME: try to keep values, evtl.
tmargin=0; tmargin=0;
@ -546,7 +546,7 @@ ca* TEScreen::getCookedImage()
// kdDebug(1211) << "InGetCookedImage" << endl; // kdDebug(1211) << "InGetCookedImage" << endl;
for (y = 0; (y < lines) && (y < (hist->getLines()-histCursor)); y++) for (y = 0; (y < lines) && (y < (hist->getLines()-histCursor)); y++)
{ {
int len = QMIN(columns,hist->getLineLen(y+histCursor)); int len = TQMIN(columns,hist->getLineLen(y+histCursor));
int yp = y*columns; int yp = y*columns;
// kdDebug(1211) << "InGetCookedImage - In first For. Y =" << y << "histCursor = " << histCursor << endl; // kdDebug(1211) << "InGetCookedImage - In first For. Y =" << y << "histCursor = " << histCursor << endl;
@ -648,7 +648,7 @@ void TEScreen::clear()
void TEScreen::BackSpace() void TEScreen::BackSpace()
{ {
cuX = QMAX(0,cuX-1); cuX = TQMAX(0,cuX-1);
if (BS_CLEARS) image[loc(cuX,cuY)].c = ' '; if (BS_CLEARS) image[loc(cuX,cuY)].c = ' ';
} }
@ -841,7 +841,7 @@ void TEScreen::setCursorX(int x)
{ {
if (x == 0) x = 1; // Default if (x == 0) x = 1; // Default
x -= 1; // Adjust x -= 1; // Adjust
cuX = QMAX(0,QMIN(columns-1, x)); cuX = TQMAX(0,TQMIN(columns-1, x));
} }
/*! Set the cursor to y-th line. */ /*! Set the cursor to y-th line. */
@ -850,7 +850,7 @@ void TEScreen::setCursorY(int y)
{ {
if (y == 0) y = 1; // Default if (y == 0) y = 1; // Default
y -= 1; // Adjust y -= 1; // Adjust
cuY = QMAX(0,QMIN(lines -1, y + (getMode(MODE_Origin) ? tmargin : 0) )); cuY = TQMAX(0,TQMIN(lines -1, y + (getMode(MODE_Origin) ? tmargin : 0) ));
} }
/*! set cursor to the `left upper' corner of the screen (1,1). /*! set cursor to the `left upper' corner of the screen (1,1).

@ -642,10 +642,10 @@ void TEWidget::drawAttrStr(TQPainter &paint, TQRect rect,
TQ_UINT8 dalpha = 255 - salpha; TQ_UINT8 dalpha = 255 - salpha;
int a, r, g, b; int a, r, g, b;
a = QMIN( (tqAlpha (col) * salpha) / 255 + (tqAlpha (blend_color) * dalpha) / 255, 255 ); a = TQMIN( (tqAlpha (col) * salpha) / 255 + (tqAlpha (blend_color) * dalpha) / 255, 255 );
r = QMIN( (tqRed (col) * salpha) / 255 + (tqRed (blend_color) * dalpha) / 255, 255 ); r = TQMIN( (tqRed (col) * salpha) / 255 + (tqRed (blend_color) * dalpha) / 255, 255 );
g = QMIN( (tqGreen (col) * salpha) / 255 + (tqGreen (blend_color) * dalpha) / 255, 255 ); g = TQMIN( (tqGreen (col) * salpha) / 255 + (tqGreen (blend_color) * dalpha) / 255, 255 );
b = QMIN( (tqBlue (col) * salpha) / 255 + (tqBlue (blend_color) * dalpha) / 255, 255 ); b = TQMIN( (tqBlue (col) * salpha) / 255 + (tqBlue (blend_color) * dalpha) / 255, 255 );
col = a << 24 | r << 16 | g << 8 | b; col = a << 24 | r << 16 | g << 8 | b;
int pixel = a << 24 | (r * a / 255) << 16 | (g * a / 255) << 8 | (b * a / 255); int pixel = a << 24 | (r * a / 255) << 16 | (g * a / 255) << 8 | (b * a / 255);
@ -1211,8 +1211,8 @@ void TEWidget::updateImageSize()
int oldcol = columns; int oldcol = columns;
makeImage(); makeImage();
// we copy the old image to reduce flicker // we copy the old image to reduce flicker
int lins = QMIN(oldlin,lines); int lins = TQMIN(oldlin,lines);
int cols = QMIN(oldcol,columns); int cols = TQMIN(oldcol,columns);
if (oldimg) if (oldimg)
{ {
for (int lin = 0; lin < lins; lin++) for (int lin = 0; lin < lins; lin++)

@ -242,14 +242,14 @@ void TEmuVt102::addDigit(int dig)
void TEmuVt102::addArgument() void TEmuVt102::addArgument()
{ {
argc = QMIN(argc+1,MAXARGS-1); argc = TQMIN(argc+1,MAXARGS-1);
argv[argc] = 0; argv[argc] = 0;
} }
void TEmuVt102::pushToToken(int cc) void TEmuVt102::pushToToken(int cc)
{ {
pbuf[ppos] = cc; pbuf[ppos] = cc;
ppos = QMIN(ppos+1,MAXPBUF-1); ppos = TQMIN(ppos+1,MAXPBUF-1);
} }
// Character Classes used while decoding // Character Classes used while decoding

@ -283,8 +283,8 @@ void TESession::notifySessionState(int state)
void TESession::onContentSizeChange(int height, int width) void TESession::onContentSizeChange(int height, int width)
{ {
// ensure that image is at least one line high by one column wide // ensure that image is at least one line high by one column wide
const int columns = QMAX( width/font_w , 1 ); const int columns = TQMAX( width/font_w , 1 );
const int lines = QMAX( height/font_h , 1 ); const int lines = TQMAX( height/font_h , 1 );
em->onImageSizeChange( lines , columns ); em->onImageSizeChange( lines , columns );
sh->setSize( lines , columns ); sh->setSize( lines , columns );

@ -64,7 +64,7 @@ int main( int argc, char **argv )
KSplash wndMain("ksplash"); KSplash wndMain("ksplash");
if ( arg->isSet( "steps" ) ) if ( arg->isSet( "steps" ) )
{ {
int steps = QMAX( arg->getOption( "steps" ).toInt(), 0 ); int steps = TQMAX( arg->getOption( "steps" ).toInt(), 0 );
if ( steps ) if ( steps )
wndMain.setStartupItemCount( steps ); wndMain.setStartupItemCount( steps );
} }

@ -163,7 +163,7 @@ void ThemeDefault::_initUi()
mProgressBar->setBackgroundOrigin( TQWidget::ParentOrigin ); mProgressBar->setBackgroundOrigin( TQWidget::ParentOrigin );
mProgressBar->setPaletteBackgroundPixmap( blimage ); mProgressBar->setPaletteBackgroundPixmap( blimage );
bottom_label->setFixedWidth( QMAX(blimage.width(),tlimage.width()) ); bottom_label->setFixedWidth( TQMAX(blimage.width(),tlimage.width()) );
bottom_label->setFixedHeight( mLabel->sizeHint().height()+4 ); bottom_label->setFixedHeight( mLabel->sizeHint().height()+4 );
// 3 pixels of whitespace between the label and the progressbar. // 3 pixels of whitespace between the label and the progressbar.

@ -122,7 +122,7 @@ TQPoint WndIcon::determinePosition()
nSlot = ( DW / wid ); nSlot = ( DW / wid );
while( x > nSlot ) while( x > nSlot )
{ {
x = QMAX(0,x-nSlot); x = TQMAX(0,x-nSlot);
y++; y++;
} }
X = (3) + ((x - 1) * wid); X = (3) + ((x - 1) * wid);
@ -134,7 +134,7 @@ TQPoint WndIcon::determinePosition()
nSlot = ( DW / wid ); nSlot = ( DW / wid );
while( x > nSlot ) while( x > nSlot )
{ {
x = QMAX(0,x-nSlot); x = TQMAX(0,x-nSlot);
y++; y++;
} }
X = (3) + ((x - 1) * wid); X = (3) + ((x - 1) * wid);
@ -146,7 +146,7 @@ TQPoint WndIcon::determinePosition()
nSlot = ( DW / wid ); nSlot = ( DW / wid );
while( x > nSlot ) while( x > nSlot )
{ {
x = QMAX(0,x-nSlot); x = TQMAX(0,x-nSlot);
y++; y++;
} }
X = (DW - 3) - (( x ) * wid ); X = (DW - 3) - (( x ) * wid );
@ -158,7 +158,7 @@ TQPoint WndIcon::determinePosition()
nSlot = ( DW / wid ); nSlot = ( DW / wid );
while( x > nSlot ) while( x > nSlot )
{ {
x = QMAX(0,x-nSlot); x = TQMAX(0,x-nSlot);
y++; y++;
} }
X = (DW - 3) - (( x ) * wid ); X = (DW - 3) - (( x ) * wid );
@ -170,7 +170,7 @@ TQPoint WndIcon::determinePosition()
nSlot = ( DH / wid ); nSlot = ( DH / wid );
while( x > nSlot ) while( x > nSlot )
{ {
x = QMAX(0,x-nSlot); x = TQMAX(0,x-nSlot);
y++; y++;
} }
X = (3) + (( y - 1 ) * wid ); X = (3) + (( y - 1 ) * wid );
@ -182,7 +182,7 @@ TQPoint WndIcon::determinePosition()
nSlot = ( DH / wid ); nSlot = ( DH / wid );
while( x > nSlot ) while( x > nSlot )
{ {
x = QMAX(0,x-nSlot); x = TQMAX(0,x-nSlot);
y++; y++;
} }
X = (DW - 3) - (( y ) * wid ); X = (DW - 3) - (( y ) * wid );
@ -194,7 +194,7 @@ TQPoint WndIcon::determinePosition()
nSlot = ( DH / wid ); nSlot = ( DH / wid );
while( x > nSlot ) while( x > nSlot )
{ {
x = QMAX(0,x-nSlot); x = TQMAX(0,x-nSlot);
y++; y++;
} }
X = (3) + (( y - 1 ) * wid ); X = (3) + (( y - 1 ) * wid );
@ -206,7 +206,7 @@ TQPoint WndIcon::determinePosition()
nSlot = ( DH / wid ); nSlot = ( DH / wid );
while( x > nSlot ) while( x > nSlot )
{ {
x = QMAX(0,x-nSlot); x = TQMAX(0,x-nSlot);
y++; y++;
} }
X = (DW - 3) - (( y ) * wid ); X = (DW - 3) - (( y ) * wid );

@ -72,7 +72,7 @@ WndStatus::WndStatus( TQPalette /*pal*/,
TQWidget *widg = new TQWidget( this ); TQWidget *widg = new TQWidget( this );
setStretchFactor(widg,50); setStretchFactor(widg,50);
setFixedSize( rect.width(), QMAX(m_progress->height(),m_label->height()) ); setFixedSize( rect.width(), TQMAX(m_progress->height(),m_label->height()) );
if ( atTop ) if ( atTop )
move( rect.topLeft() ); move( rect.topLeft() );

@ -639,7 +639,7 @@ void KonqIconViewWidget::setIcons( int size, const TQStringList& stopImagePrevie
int realSize = size ? size : TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop ); int realSize = size ? size : TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop );
// choose spacing depending on font, but min 5 (due to KFileIVI move limit) // choose spacing depending on font, but min 5 (due to KFileIVI move limit)
setSpacing( ( m_bDesktop || ( realSize > TDEIcon::SizeSmall ) ) ? setSpacing( ( m_bDesktop || ( realSize > TDEIcon::SizeSmall ) ) ?
QMAX( 5, TQFontMetrics(font()).width('n') ) : 0 ); TQMAX( 5, TQFontMetrics(font()).width('n') ) : 0 );
} }
if ( sizeChanged || previewSizeChanged || !stopImagePreviewFor.isEmpty() ) if ( sizeChanged || previewSizeChanged || !stopImagePreviewFor.isEmpty() )
@ -711,10 +711,10 @@ void KonqIconViewWidget::setItemTextPos( ItemTextPos pos )
if ( m_bSetGridX ) if ( m_bSetGridX )
if ( pos == TQIconView::Bottom ) if ( pos == TQIconView::Bottom )
setGridX( QMAX( sz + 50, previewIconSize( sz ) + 13 ) ); setGridX( TQMAX( sz + 50, previewIconSize( sz ) + 13 ) );
else else
{ {
setMaxItemWidth( QMAX( sz, previewIconSize( sz ) ) + m_pSettings->iconTextWidth() ); setMaxItemWidth( TQMAX( sz, previewIconSize( sz ) ) + m_pSettings->iconTextWidth() );
setGridX( -1 ); setGridX( -1 );
} }
@ -734,9 +734,9 @@ void KonqIconViewWidget::gridValues( int* x, int* y, int* dx, int* dy,
// vertical : top spacing(), <height>, bottom spacing() // vertical : top spacing(), <height>, bottom spacing()
// The doubled space in y-direction gives a better visual separation and makes it clearer // The doubled space in y-direction gives a better visual separation and makes it clearer
// to which item the text belongs // to which item the text belongs
*dx = spacing() + QMAX( QMAX( iconSize, previewSize ), m_pSettings->iconTextWidth() ); *dx = spacing() + TQMAX( TQMAX( iconSize, previewSize ), m_pSettings->iconTextWidth() );
int textHeight = iconTextHeight() * fontMetrics().height(); int textHeight = iconTextHeight() * fontMetrics().height();
*dy = spacing() + QMAX( iconSize, previewSize ) + 2 + textHeight + spacing(); *dy = spacing() + TQMAX( iconSize, previewSize ) + 2 + textHeight + spacing();
// Icon Area // Icon Area
int w, h; int w, h;
@ -790,9 +790,9 @@ int KonqIconViewWidget::gridXValue() const
int newGridX; int newGridX;
if ( itemTextPos() == TQIconView::Bottom ) if ( itemTextPos() == TQIconView::Bottom )
newGridX = QMAX( sz + 50, previewIconSize( sz ) + 13 ); newGridX = TQMAX( sz + 50, previewIconSize( sz ) + 13 );
else else
newGridX = QMAX( sz, previewIconSize( sz ) ) + m_pSettings->iconTextWidth(); newGridX = TQMAX( sz, previewIconSize( sz ) ) + m_pSettings->iconTextWidth();
//kdDebug(1203) << "gridXValue: " << newGridX << " sz=" << sz << endl; //kdDebug(1203) << "gridXValue: " << newGridX << " sz=" << sz << endl;
return newGridX; return newGridX;
@ -1488,7 +1488,7 @@ void KonqIconViewWidget::insertInGrid(TQIconViewItem *item)
for (; i; i = i->nextItem() ) for (; i; i = i->nextItem() )
{ {
r = r.subtract(i->rect()); r = r.subtract(i->rect());
y = QMAX(y, i->y() + i->height()); y = TQMAX(y, i->y() + i->height());
} }
TQMemArray<TQRect> rects = r.rects(); TQMemArray<TQRect> rects = r.rects();
@ -1586,8 +1586,8 @@ void KonqIconViewWidget::lineupIcons()
int x = item->x() + item->width() / 2 - x0; int x = item->x() + item->width() / 2 - x0;
int y = item->pixmapRect( false ).bottom() - iconSize / 2 int y = item->pixmapRect( false ).bottom() - iconSize / 2
- ( dy - ( iconSize + textHeight ) ) / 2 - y0; - ( dy - ( iconSize + textHeight ) ) / 2 - y0;
int posX = QMIN( nx-1, QMAX( 0, x / dx ) ); int posX = TQMIN( nx-1, TQMAX( 0, x / dx ) );
int posY = QMIN( ny-1, QMAX( 0, y / dy ) ); int posY = TQMIN( ny-1, TQMAX( 0, y / dy ) );
if ( !bins[posX][posY] ) if ( !bins[posX][posY] )
bins[posX][posY] = new Bin; bins[posX][posY] = new Bin;
@ -1646,7 +1646,7 @@ void KonqIconViewWidget::lineupIcons()
TQIconViewItem* movedItem; TQIconViewItem* movedItem;
Bin* items = bins[i][j]; Bin* items = bins[i][j];
int mini = QMIN( QMIN( tf, bf ), QMIN( lf, rf ) ); int mini = TQMIN( TQMIN( tf, bf ), TQMIN( lf, rf ) );
if ( tf == mini ) { if ( tf == mini ) {
// move top item in (i,j) to (i,j-1) // move top item in (i,j) to (i,j-1)
Bin::iterator it = items->begin(); Bin::iterator it = items->begin();
@ -1717,7 +1717,7 @@ void KonqIconViewWidget::lineupIcons()
if ( !bin->isEmpty() ) { if ( !bin->isEmpty() ) {
TQIconViewItem* item = bin->first(); TQIconViewItem* item = bin->first();
int newX = x0 + i*dx + spacing() + int newX = x0 + i*dx + spacing() +
QMAX(0, ( (dx-spacing()) - item->width() ) / 2); // pixmap can be larger as iconsize TQMAX(0, ( (dx-spacing()) - item->width() ) / 2); // pixmap can be larger as iconsize
// align all icons vertically to their text // align all icons vertically to their text
int newY = y0 + j*dy + dy - spacing() - ( item->pixmapRect().bottom() + 2 + textHeight ); int newY = y0 + j*dy + dy - spacing() - ( item->pixmapRect().bottom() + 2 + textHeight );
if ( item->x() != newX || item->y() != newY ) { if ( item->x() != newX || item->y() != newY ) {
@ -1770,7 +1770,7 @@ void KonqIconViewWidget::lineupIcons( TQIconView::Arrangement arrangement )
TQIconViewItem* item; TQIconViewItem* item;
for ( item = firstItem(); item; item = item->nextItem() ) { for ( item = firstItem(); item; item = item->nextItem() ) {
int newX = x0 + nx*dx + spacing() + int newX = x0 + nx*dx + spacing() +
QMAX(0, ( (dx-spacing()) - item->width() ) / 2); // icon can be larger as defined TQMAX(0, ( (dx-spacing()) - item->width() ) / 2); // icon can be larger as defined
// align all icons vertically to their text // align all icons vertically to their text
int newY = y0 + ny*dy + dy - spacing() - ( item->pixmapRect().bottom() + 2 + textHeight ); int newY = y0 + ny*dy + dy - spacing() - ( item->pixmapRect().bottom() + 2 + textHeight );
if ( item->x() != newX || item->y() != newY ) { if ( item->x() != newX || item->y() != newY ) {

@ -281,7 +281,7 @@ static void np_do_timers( void*, void* )
timeval *tm = qt_wait_timer(); timeval *tm = qt_wait_timer();
if (tm) { if (tm) {
int interval = QMIN(tm->tv_sec,INT_MAX/1000)*1000 + tm->tv_usec/1000; int interval = TQMIN(tm->tv_sec,INT_MAX/1000)*1000 + tm->tv_usec/1000;
np_set_timer( interval ); np_set_timer( interval );
} }
qxtapp->sendPostedEvents(); qxtapp->sendPostedEvents();

@ -1700,7 +1700,7 @@ int NSPluginStreamBase::process( const TQByteArray &data, int start )
max = _instance->NPWriteReady(_stream); max = _instance->NPWriteReady(_stream);
//kdDebug(1431) << "to_sent == " << to_sent << " and max = " << max << endl; //kdDebug(1431) << "to_sent == " << to_sent << " and max = " << max << endl;
len = QMIN(max, to_sent); len = TQMIN(max, to_sent);
//kdDebug(1431) << "-> Feeding stream to plugin: offset=" << _pos << ", len=" << len << endl; //kdDebug(1431) << "-> Feeding stream to plugin: offset=" << _pos << ", len=" << len << endl;
sent = _instance->NPWrite( _stream, _pos, len, d ); sent = _instance->NPWrite( _stream, _pos, len, d );

@ -230,7 +230,7 @@ POP3Protocol::Resp POP3Protocol::getResponse(char *r_buf, unsigned int r_len,
if (strncmp(buf, "+OK", 3) == 0) { if (strncmp(buf, "+OK", 3) == 0) {
if (r_buf && r_len) { if (r_buf && r_len) {
memcpy(r_buf, (buf[3] == ' ' ? buf + 4 : buf + 3), memcpy(r_buf, (buf[3] == ' ' ? buf + 4 : buf + 3),
QMIN(r_len, (buf[3] == ' ' ? recv_len - 4 : recv_len - 3))); TQMIN(r_len, (buf[3] == ' ' ? recv_len - 4 : recv_len - 3)));
} }
delete[]buf; delete[]buf;
@ -239,7 +239,7 @@ POP3Protocol::Resp POP3Protocol::getResponse(char *r_buf, unsigned int r_len,
} else if (strncmp(buf, "-ERR", 4) == 0) { } else if (strncmp(buf, "-ERR", 4) == 0) {
if (r_buf && r_len) { if (r_buf && r_len) {
memcpy(r_buf, (buf[4] == ' ' ? buf + 5 : buf + 4), memcpy(r_buf, (buf[4] == ' ' ? buf + 5 : buf + 4),
QMIN(r_len, (buf[4] == ' ' ? recv_len - 5 : recv_len - 4))); TQMIN(r_len, (buf[4] == ' ' ? recv_len - 5 : recv_len - 4)));
} }
TQString command = TQString::fromLatin1(cmd); TQString command = TQString::fromLatin1(cmd);
@ -256,8 +256,8 @@ POP3Protocol::Resp POP3Protocol::getResponse(char *r_buf, unsigned int r_len,
return Err; return Err;
} else if (strncmp(buf, "+ ", 2) == 0) { } else if (strncmp(buf, "+ ", 2) == 0) {
if (r_buf && r_len) { if (r_buf && r_len) {
memcpy(r_buf, buf + 2, QMIN(r_len, recv_len - 4)); memcpy(r_buf, buf + 2, TQMIN(r_len, recv_len - 4));
r_buf[QMIN(r_len - 1, recv_len - 4)] = '\0'; r_buf[TQMIN(r_len - 1, recv_len - 4)] = '\0';
} }
delete[]buf; delete[]buf;
@ -267,7 +267,7 @@ POP3Protocol::Resp POP3Protocol::getResponse(char *r_buf, unsigned int r_len,
POP3_DEBUG << "Invalid POP3 response received!" << endl; POP3_DEBUG << "Invalid POP3 response received!" << endl;
if (r_buf && r_len) { if (r_buf && r_len) {
memcpy(r_buf, buf, QMIN(r_len, recv_len)); memcpy(r_buf, buf, TQMIN(r_len, recv_len));
} }
if (!buf || !*buf) { if (!buf || !*buf) {

@ -122,9 +122,9 @@ bool TextCreator::create(const TQString &path, int width, int height, TQImage &i
TQRect rect; TQRect rect;
int rest = m_pixmap.width() - (numCharsPerLine * chSize.width()); int rest = m_pixmap.width() - (numCharsPerLine * chSize.width());
xborder = QMAX( xborder, rest/2); // center horizontally xborder = TQMAX( xborder, rest/2); // center horizontally
rest = m_pixmap.height() - (numLines * chSize.height()); rest = m_pixmap.height() - (numLines * chSize.height());
yborder = QMAX( yborder, rest/2); // center vertically yborder = TQMAX( yborder, rest/2); // center vertically
// end centering // end centering
int x = xborder, y = yborder; // where to paint the characters int x = xborder, y = yborder; // where to paint the characters

@ -348,9 +348,9 @@ void ThumbnailProtocol::get(const KURL &url)
TQImage icon = getIcon(); TQImage icon = getIcon();
int x = img.width() - icon.width() - 4; int x = img.width() - icon.width() - 4;
x = QMAX( x, 0 ); x = TQMAX( x, 0 );
int y = img.height() - icon.height() - 6; int y = img.height() - icon.height() - 6;
y = QMAX( y, 0 ); y = TQMAX( y, 0 );
KImageEffect::blendOnLower( x, y, icon, img ); KImageEffect::blendOnLower( x, y, icon, img );
} }

@ -34,7 +34,7 @@ void Repository::add(const TQCString &key, Data_entry &data)
data.timeout = (unsigned) -1; data.timeout = (unsigned) -1;
else else
data.timeout += time(0L); data.timeout += time(0L);
head_time = QMIN(head_time, data.timeout); head_time = TQMIN(head_time, data.timeout);
repo.insert(key, data); repo.insert(key, data);
} }
@ -177,7 +177,7 @@ int Repository::expire()
if (t <= current) if (t <= current)
keys.push(it.key()); keys.push(it.key());
else else
head_time = QMIN(head_time, t); head_time = TQMIN(head_time, t);
} }
int n = keys.count(); int n = keys.count();

@ -294,14 +294,14 @@ int main(int argc, char *argv[])
// Make sure we exit when the display gets closed. // Make sure we exit when the display gets closed.
int x11Fd = initXconnection(); int x11Fd = initXconnection();
maxfd = QMAX(maxfd, x11Fd); maxfd = TQMAX(maxfd, x11Fd);
repo = new Repository; repo = new Repository;
TQPtrVector<ConnectionHandler> handler; TQPtrVector<ConnectionHandler> handler;
handler.setAutoDelete(true); handler.setAutoDelete(true);
pipe(pipeOfDeath); pipe(pipeOfDeath);
maxfd = QMAX(maxfd, pipeOfDeath[0]); maxfd = TQMAX(maxfd, pipeOfDeath[0]);
// Signal handlers // Signal handlers
struct sigaction sa; struct sigaction sa;

@ -230,7 +230,7 @@ KGVerify::scheduleAutoLogin( bool initial )
timedLeft = _autoLoginDelay; timedLeft = _autoLoginDelay;
deadTicks = 0; deadTicks = 0;
} else { } else {
timedLeft = QMAX( _autoLoginDelay - TIMED_GREET_TO, MIN_TIMED_TO ); timedLeft = TQMAX( _autoLoginDelay - TIMED_GREET_TO, MIN_TIMED_TO );
deadTicks = DEAD_TIMED_TO; deadTicks = DEAD_TIMED_TO;
} }
updateStatus(); updateStatus();

@ -115,7 +115,7 @@ void KdmClock::paintEvent( TQPaintEvent * )
time.second() ); time.second() );
else else
buf.sprintf( "%02d:%02d", time.hour(), time.minute() ); buf.sprintf( "%02d:%02d", time.hour(), time.minute() );
mFont.setPointSize( QMIN( (int)(width()/buf.length()*1.5),height() ) ); mFont.setPointSize( TQMIN( (int)(width()/buf.length()*1.5),height() ) );
paint.setFont( mFont ); paint.setFont( mFont );
paint.setPen( backgroundColor() ); paint.setPen( backgroundColor() );
paint.drawText( contentsRect(),AlignHCenter|AlignVCenter, buf,-1,0,0 ); paint.drawText( contentsRect(),AlignHCenter|AlignVCenter, buf,-1,0,0 );
@ -123,7 +123,7 @@ void KdmClock::paintEvent( TQPaintEvent * )
*/ */
TQPointArray pts; TQPointArray pts;
TQPoint cp = contentsRect().center() - TQPoint( 2,2 ); TQPoint cp = contentsRect().center() - TQPoint( 2,2 );
int d = QMIN( contentsRect().width()-15,contentsRect().height()-15 ); int d = TQMIN( contentsRect().width()-15,contentsRect().height()-15 );
paint.setPen( foregroundColor() ); paint.setPen( foregroundColor() );
paint.setBrush( foregroundColor() ); paint.setBrush( foregroundColor() );

@ -362,7 +362,7 @@ KdmItem::paint( TQPainter *p, const TQRect &rect )
if (area.intersects( rect )) { if (area.intersects( rect )) {
TQRect contentsRect = area.intersect( rect ); TQRect contentsRect = area.intersect( rect );
contentsRect.moveBy( QMIN( 0, -area.x() ), QMIN( 0, -area.y() ) ); contentsRect.moveBy( TQMIN( 0, -area.x() ), TQMIN( 0, -area.y() ) );
drawContents( p, contentsRect ); drawContents( p, contentsRect );
} }

@ -889,7 +889,7 @@ void Client::setShade( ShadeMode mode )
// FRAME repaint( FALSE ); // FRAME repaint( FALSE );
// bool wasStaticContents = testWFlags( WStaticContents ); // bool wasStaticContents = testWFlags( WStaticContents );
// setWFlags( WStaticContents ); // setWFlags( WStaticContents );
int step = QMAX( 4, QABS( h - s.height() ) / as )+1; int step = TQMAX( 4, QABS( h - s.height() ) / as )+1;
do do
{ {
h -= step; h -= step;
@ -919,7 +919,7 @@ void Client::setShade( ShadeMode mode )
TQSize s( sizeForClientSize( clientSize())); TQSize s( sizeForClientSize( clientSize()));
// FRAME bool wasStaticContents = testWFlags( WStaticContents ); // FRAME bool wasStaticContents = testWFlags( WStaticContents );
// setWFlags( WStaticContents ); // setWFlags( WStaticContents );
int step = QMAX( 4, QABS( h - s.height() ) / as )+1; int step = TQMAX( 4, QABS( h - s.height() ) / as )+1;
do do
{ {
h += step; h += step;

@ -1279,7 +1279,7 @@ void KeramikClient::updateCaptionBuffer()
int tw = p.fontMetrics().width( caption() ) + int tw = p.fontMetrics().width( caption() ) +
( clientHandler->showAppIcons() ? 16 + iconSpacing : 0 ); ( clientHandler->showAppIcons() ? 16 + iconSpacing : 0 );
int xpos = QMAX( (captionRect.width() - tw) / 3, 8 ); int xpos = TQMAX( (captionRect.width() - tw) / 3, 8 );
TQRect tr = TQStyle::visualRect( TQRect(xpos, 1, captionRect.width() - xpos - 10, TQRect tr = TQStyle::visualRect( TQRect(xpos, 1, captionRect.width() - xpos - 10,
captionRect.height() - 4), captionBuffer.rect() ); captionRect.height() - 4), captionBuffer.rect() );
@ -1348,7 +1348,7 @@ void KeramikClient::calculateCaptionRect()
if ( clientHandler->showAppIcons() ) if ( clientHandler->showAppIcons() )
cw += 16 + 4; // icon width + space cw += 16 + 4; // icon width + space
cw = QMIN( cw, titlebar->geometry().width() ); cw = TQMIN( cw, titlebar->geometry().width() );
captionRect = TQStyle::visualRect( TQRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY), captionRect = TQStyle::visualRect( TQRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY),
cw, clientHandler->titleBarHeight(largeCaption) ), cw, clientHandler->titleBarHeight(largeCaption) ),
titlebar->geometry() ); titlebar->geometry() );
@ -1554,8 +1554,8 @@ void KeramikClient::paintEvent( TQPaintEvent *e )
// Space between the top left corner and the caption bubble // Space between the top left corner and the caption bubble
if ( updateRect.x() < captionRect.left() && updateRect.right() >= 15 ) { if ( updateRect.x() < captionRect.left() && updateRect.right() >= 15 ) {
int x1 = QMAX( 15, updateRect.x() ); int x1 = TQMAX( 15, updateRect.x() );
int x2 = QMIN( captionRect.left(), updateRect.right() ); int x2 = TQMIN( captionRect.left(), updateRect.right() );
p.drawTiledPixmap( x1, titleBaseY, x2 - x1 + 1, titleBarBaseHeight, p.drawTiledPixmap( x1, titleBaseY, x2 - x1 + 1, titleBarBaseHeight,
*clientHandler->tile( TitleCenter, active ) ); *clientHandler->tile( TitleCenter, active ) );
@ -1572,8 +1572,8 @@ void KeramikClient::paintEvent( TQPaintEvent *e )
// Space between the caption bubble and the top right corner // Space between the caption bubble and the top right corner
if ( updateRect.right() > captionRect.right() && updateRect.x() < width() - 15 ) { // FRAME if ( updateRect.right() > captionRect.right() && updateRect.x() < width() - 15 ) { // FRAME
int x1 = QMAX( captionRect.right() + 1, updateRect.x() ); int x1 = TQMAX( captionRect.right() + 1, updateRect.x() );
int x2 = QMIN( width() - 15, updateRect.right() ); int x2 = TQMIN( width() - 15, updateRect.right() );
p.drawTiledPixmap( x1, titleBaseY, x2 - x1 + 1, titleBarBaseHeight, p.drawTiledPixmap( x1, titleBaseY, x2 - x1 + 1, titleBarBaseHeight,
*clientHandler->tile( TitleCenter, active ) ); *clientHandler->tile( TitleCenter, active ) );
@ -1590,8 +1590,8 @@ void KeramikClient::paintEvent( TQPaintEvent *e )
if ( updateRect.bottom() >= titleBarHeight && if ( updateRect.bottom() >= titleBarHeight &&
updateRect.top() < height() - grabBarHeight ) updateRect.top() < height() - grabBarHeight )
{ {
int top = QMAX( titleBarHeight, updateRect.top() ); int top = TQMAX( titleBarHeight, updateRect.top() );
int bottom = QMIN( updateRect.bottom(), height() - grabBarHeight ); int bottom = TQMIN( updateRect.bottom(), height() - grabBarHeight );
// Left border // Left border
if ( updateRect.x() < leftBorderWidth ) if ( updateRect.x() < leftBorderWidth )
@ -1614,8 +1614,8 @@ void KeramikClient::paintEvent( TQPaintEvent *e )
// Space between the left corner and the right corner // Space between the left corner and the right corner
if ( updateRect.x() < width() - 9 ) { if ( updateRect.x() < width() - 9 ) {
int x1 = QMAX( 9, updateRect.x() ); int x1 = TQMAX( 9, updateRect.x() );
int x2 = QMIN( width() - 9, updateRect.right() ); int x2 = TQMIN( width() - 9, updateRect.right() );
p.drawTiledPixmap( x1, height() - grabBarHeight, x2 - x1 + 1, p.drawTiledPixmap( x1, height() - grabBarHeight, x2 - x1 + 1,
grabBarHeight, *clientHandler->tile( GrabBarCenter, active ) ); grabBarHeight, *clientHandler->tile( GrabBarCenter, active ) );

@ -171,7 +171,7 @@ void PlastikHandler::readConfig()
TQFontMetrics fm(m_titleFont); // active font = inactive font TQFontMetrics fm(m_titleFont); // active font = inactive font
int titleHeightMin = config.readNumEntry("MinTitleHeight", 16); int titleHeightMin = config.readNumEntry("MinTitleHeight", 16);
// The title should strech with bigger font sizes! // The title should strech with bigger font sizes!
m_titleHeight = QMAX(titleHeightMin, fm.height() + 4); // 4 px for the shadow etc. m_titleHeight = TQMAX(titleHeightMin, fm.height() + 4); // 4 px for the shadow etc.
// have an even title/button size so the button icons are fully centered... // have an even title/button size so the button icons are fully centered...
if ( m_titleHeight%2 == 0) if ( m_titleHeight%2 == 0)
m_titleHeight++; m_titleHeight++;
@ -179,7 +179,7 @@ void PlastikHandler::readConfig()
fm = TQFontMetrics(m_titleFontTool); // active font = inactive font fm = TQFontMetrics(m_titleFontTool); // active font = inactive font
int titleHeightToolMin = config.readNumEntry("MinTitleHeightTool", 13); int titleHeightToolMin = config.readNumEntry("MinTitleHeightTool", 13);
// The title should strech with bigger font sizes! // The title should strech with bigger font sizes!
m_titleHeightTool = QMAX(titleHeightToolMin, fm.height() ); // don't care about the shadow etc. m_titleHeightTool = TQMAX(titleHeightToolMin, fm.height() ); // don't care about the shadow etc.
// have an even title/button size so the button icons are fully centered... // have an even title/button size so the button icons are fully centered...
if ( m_titleHeightTool%2 == 0) if ( m_titleHeightTool%2 == 0)
m_titleHeightTool++; m_titleHeightTool++;
@ -560,7 +560,7 @@ const TQBitmap &PlastikHandler::buttonBitmap(ButtonIcon type, const TQSize &size
delete m_bitmaps[toolWindow][typeIndex]; delete m_bitmaps[toolWindow][typeIndex];
m_bitmaps[toolWindow][typeIndex] = 0; m_bitmaps[toolWindow][typeIndex] = 0;
TQBitmap bmp = IconEngine::icon(type /*icon*/, QMIN(w,h) ); TQBitmap bmp = IconEngine::icon(type /*icon*/, TQMIN(w,h) );
TQBitmap *bitmap = new TQBitmap(bmp); TQBitmap *bitmap = new TQBitmap(bmp);
m_bitmaps[toolWindow][typeIndex] = bitmap; m_bitmaps[toolWindow][typeIndex] = bitmap;
return *bitmap; return *bitmap;

@ -531,7 +531,7 @@ TQBitmap IconEngine::icon(ButtonIcon icon, int size)
lw2 = 1; lw2 = 1;
} }
int h = QMAX( (r.width()/2), (lw1+2*lw2) ); int h = TQMAX( (r.width()/2), (lw1+2*lw2) );
// horizontal bars // horizontal bars
drawObject(p, HorizontalLine, r.x(), r.y(), r.width(), lw1); drawObject(p, HorizontalLine, r.x(), r.y(), r.width(), lw1);

@ -179,7 +179,7 @@ WebClient::init()
default: default:
borderSize_ = 4; borderSize_ = 4;
} }
titleHeight_ = QMAX(QMAX(14, fm.height() + textVMargin * 2), borderSize_); titleHeight_ = TQMAX(TQMAX(14, fm.height() + textVMargin * 2), borderSize_);
if (0 != titleHeight_ % 2) if (0 != titleHeight_ % 2)
titleHeight_ += 1; titleHeight_ += 1;
@ -202,7 +202,7 @@ WebClient::reset( unsigned long changed )
// title height // title height
const int textVMargin = 2; const int textVMargin = 2;
TQFontMetrics fm(options()->font(isActive(), isToolWindow())); TQFontMetrics fm(options()->font(isActive(), isToolWindow()));
titleHeight_ = QMAX(QMAX(14, fm.height() + textVMargin * 2), borderSize_); titleHeight_ = TQMAX(TQMAX(14, fm.height() + textVMargin * 2), borderSize_);
if (0 != titleHeight_ % 2) if (0 != titleHeight_ % 2)
titleHeight_ += 1; titleHeight_ += 1;

@ -717,10 +717,10 @@ void Client::keepInArea( TQRect area, bool partial )
if( partial ) if( partial )
{ {
// increase the area so that can have only 100 pixels in the area // increase the area so that can have only 100 pixels in the area
area.setLeft( QMIN( area.left() - width() + 100, area.left())); area.setLeft( TQMIN( area.left() - width() + 100, area.left()));
area.setTop( QMIN( area.top() - height() + 100, area.top())); area.setTop( TQMIN( area.top() - height() + 100, area.top()));
area.setRight( QMAX( area.right() + width() - 100, area.right())); area.setRight( TQMAX( area.right() + width() - 100, area.right()));
area.setBottom( QMAX( area.bottom() + height() - 100, area.bottom())); area.setBottom( TQMAX( area.bottom() + height() - 100, area.bottom()));
} }
if ( geometry().right() > area.right() && width() < area.width() ) if ( geometry().right() > area.right() && width() < area.width() )
move( area.right() - width(), y() ); move( area.right() - width(), y() );
@ -1131,10 +1131,10 @@ TQSize Client::sizeForClientSize( const TQSize& wsize, Sizemode mode, bool nofra
if( decominsize.height() > min_size.height()) if( decominsize.height() > min_size.height())
min_size.setHeight( decominsize.height()); min_size.setHeight( decominsize.height());
} }
w = QMIN( max_size.width(), w ); w = TQMIN( max_size.width(), w );
h = QMIN( max_size.height(), h ); h = TQMIN( max_size.height(), h );
w = QMAX( min_size.width(), w ); w = TQMAX( min_size.width(), w );
h = QMAX( min_size.height(), h ); h = TQMAX( min_size.height(), h );
int w1 = w; int w1 = w;
int h1 = h; int h1 = h;
@ -1307,8 +1307,8 @@ void Client::getWmNormalHints()
xSizeHint.max_width = xSizeHint.max_height = INT_MAX; xSizeHint.max_width = xSizeHint.max_height = INT_MAX;
else else
{ {
xSizeHint.max_width = QMAX( xSizeHint.max_width, 1 ); xSizeHint.max_width = TQMAX( xSizeHint.max_width, 1 );
xSizeHint.max_height = QMAX( xSizeHint.max_height, 1 ); xSizeHint.max_height = TQMAX( xSizeHint.max_height, 1 );
} }
if( xSizeHint.flags & PResizeInc ) if( xSizeHint.flags & PResizeInc )
{ {

@ -48,7 +48,7 @@ void GeometryTip::setGeometry( const TQRect& geom )
} }
} }
h = QMAX( h, 0 ); // in case of isShade() and PBaseSize h = TQMAX( h, 0 ); // in case of isShade() and PBaseSize
TQString pos; TQString pos;
pos.sprintf( "%+d,%+d<br>(<b>%d&nbsp;x&nbsp;%d</b>)", pos.sprintf( "%+d,%+d<br>(<b>%d&nbsp;x&nbsp;%d</b>)",
geom.x(), geom.y(), w, h ); geom.x(), geom.y(), w, h );

@ -192,7 +192,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
connect(clickRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(clickRaiseOnTog(bool))); connect(clickRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(clickRaiseOnTog(bool)));
fLay->addWidget(clickRaiseOn); fLay->addWidget(clickRaiseOn);
// fLay->addColSpacing(0,QMAX(autoRaiseOn->sizeHint().width(), // fLay->addColSpacing(0,TQMAX(autoRaiseOn->sizeHint().width(),
// clickRaiseOn->sizeHint().width()) + 15); // clickRaiseOn->sizeHint().width()) + 15);
TQHBoxLayout* focusStealingLayout = new TQHBoxLayout(lay,KDialog::spacingHint()); TQHBoxLayout* focusStealingLayout = new TQHBoxLayout(lay,KDialog::spacingHint());

@ -524,8 +524,8 @@ void KCommonDecoration::resize( const TQSize& s )
TQSize KCommonDecoration::minimumSize() const TQSize KCommonDecoration::minimumSize() const
{ {
const int minWidth = QMAX(layoutMetric(LM_TitleEdgeLeft), layoutMetric(LM_BorderLeft)) const int minWidth = TQMAX(layoutMetric(LM_TitleEdgeLeft), layoutMetric(LM_BorderLeft))
+QMAX(layoutMetric(LM_TitleEdgeRight), layoutMetric(LM_BorderRight)) +TQMAX(layoutMetric(LM_TitleEdgeRight), layoutMetric(LM_BorderRight))
+layoutMetric(LM_TitleBorderLeft)+layoutMetric(LM_TitleBorderRight); +layoutMetric(LM_TitleBorderLeft)+layoutMetric(LM_TitleBorderRight);
return TQSize(minWidth, return TQSize(minWidth,
layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight) layoutMetric(LM_TitleEdgeTop)+layoutMetric(LM_TitleHeight)

@ -188,8 +188,8 @@ void Placement::placeSmart(Client* c, const TQRect& area, Policy /*next*/ )
if((cxl < xr) && (cxr > xl) && if((cxl < xr) && (cxr > xl) &&
(cyt < yb) && (cyb > yt)) (cyt < yb) && (cyb > yt))
{ {
xl = QMAX(cxl, xl); xr = QMIN(cxr, xr); xl = TQMAX(cxl, xl); xr = TQMIN(cxr, xr);
yt = QMAX(cyt, yt); yb = QMIN(cyb, yb); yt = TQMAX(cyt, yt); yb = TQMIN(cyb, yb);
if((*l)->keepAbove()) if((*l)->keepAbove())
overlap += 16 * (xr - xl) * (yb - yt); overlap += 16 * (xr - xl) * (yb - yt);
else if((*l)->keepBelow() && !(*l)->isDock()) // ignore KeepBelow windows else if((*l)->keepBelow() && !(*l)->isDock()) // ignore KeepBelow windows

@ -113,7 +113,7 @@ Rules::Rules( TDEConfig& cfg )
readFromCfg( cfg ); readFromCfg( cfg );
} }
static int limit0to4( int i ) { return QMAX( 0, QMIN( 4, i )); } static int limit0to4( int i ) { return TQMAX( 0, TQMIN( 4, i )); }
void Rules::readFromCfg( TDEConfig& cfg ) void Rules::readFromCfg( TDEConfig& cfg )
{ {

@ -183,7 +183,7 @@ void TabBox::reset()
// calculate height of 1 line // calculate height of 1 line
// fontheight + 1 pixel above + 1 pixel below, or 32x32 icon + 2 pixel above + below // fontheight + 1 pixel above + 1 pixel below, or 32x32 icon + 2 pixel above + below
lineHeight = QMAX(fontMetrics().height() + 2, 32 + 4); lineHeight = TQMAX(fontMetrics().height() + 2, 32 + 4);
if ( mode() == WindowsMode ) if ( mode() == WindowsMode )
{ {
@ -218,7 +218,7 @@ void TabBox::reset()
{ {
showMiniIcon = true; showMiniIcon = true;
// fontheight + 1 pixel above + 1 pixel below, or 16x16 icon + 1 pixel above + below // fontheight + 1 pixel above + 1 pixel below, or 16x16 icon + 1 pixel above + below
lineHeight = QMAX(fontMetrics().height() + 2, 16 + 2); lineHeight = TQMAX(fontMetrics().height() + 2, 16 + 2);
h = clients.count() * lineHeight; h = clients.count() * lineHeight;
@ -496,11 +496,11 @@ void TabBox::drawContents( TQPainter * )
int wmax = 0; int wmax = 0;
for ( int i = 1; i <= workspace()->numberOfDesktops(); i++ ) for ( int i = 1; i <= workspace()->numberOfDesktops(); i++ )
{ {
wmax = QMAX(wmax, fontMetrics().width(workspace()->desktopName(i))); wmax = TQMAX(wmax, fontMetrics().width(workspace()->desktopName(i)));
// calculate max width of desktop-number text // calculate max width of desktop-number text
TQString num = TQString::number(i); TQString num = TQString::number(i);
iconWidth = QMAX(iconWidth - 4, fm.boundingRect(num).width()) + 4; iconWidth = TQMAX(iconWidth - 4, fm.boundingRect(num).width()) + 4;
} }
// In DesktopMode, start at the current desktop // In DesktopMode, start at the current desktop

Loading…
Cancel
Save