Replaced various '#define' with actual strings - part 3

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 36f2e08fd3)
pull/478/head
Michele Calgaro 12 months ago
parent c19f68bd91
commit 139b166e1a
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -113,14 +113,14 @@ KateFileSelector::KateFileSelector( KateMainWindow *mainWindow,
{
mActionCollection = new TDEActionCollection( this );
TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceQToolBar );
TQtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
KateFileSelectorToolBarParent *tbp=new KateFileSelectorToolBarParent(this);
toolbar = new KateFileSelectorToolBar(tbp);
tbp->setToolBar(toolbar);
toolbar->setMovingEnabled(false);
toolbar->setFlat(true);
tqInstallMsgHandler( oldHandler );
qInstallMsgHandler( oldHandler );
cmbPath = new KURLComboBox( KURLComboBox::Directories, true, this, "path combo" );
cmbPath->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));

@ -435,7 +435,7 @@ void WidgetCanvas::drawSampleWidgets()
// Menu bar
//qDrawShadePanel ( &paint, 25, 55, width()-52, 28, cg, FALSE, 2, &brush);
kapp->style().tqdrawPrimitive(TQStyle::PE_PanelMenuBar, &paint,
kapp->style().drawPrimitive(TQStyle::PE_PanelMenuBar, &paint,
TQRect(TQPoint(25, 55), TQSize(width()-52, 28)), cg);
paint.setFont( menuFont );
@ -443,7 +443,7 @@ void WidgetCanvas::drawSampleWidgets()
TQString file = i18n("File");
textLen = paint.fontMetrics().width( file );
//qDrawShadePanel ( &paint, 30, 59, textLen + 10, 21, cg, FALSE, 2, &brush);
kapp->style().tqdrawPrimitive(TQStyle::PE_Panel, &paint,
kapp->style().drawPrimitive(TQStyle::PE_Panel, &paint,
TQRect(30, 59, textLen + 10, 21), cg);
paint.drawText( 35, 74, file );
@ -528,7 +528,7 @@ void WidgetCanvas::drawSampleWidgets()
cg2.setColor(TQColorGroup::Button, button);
cg2.setColor(TQColorGroup::Background, window);
//qDrawWinButton(&paint, xpos, ypos, textLen+32, 28, cg, false, &brush);
kapp->style().tqdrawPrimitive(TQStyle::PE_ButtonCommand, &paint,
kapp->style().drawPrimitive(TQStyle::PE_ButtonCommand, &paint,
TQRect(xpos, ypos, textLen+32, 28), cg2, TQStyle::Style_Enabled | TQStyle::Style_Raised);
paint.setPen(buttonTxt);
paint.drawText(xpos, ypos, textLen+32, 28, AlignCenter,

@ -1667,7 +1667,7 @@ void KDIconView::slotAboutToCreate(const TQPoint &pos, const TQValueList<TDEIO::
saveIconPosition(m_dotDirectory, m_lastDropPos.x(), m_lastDropPos.y());
int dX = m_lastDropPos.x() - m_dropPos.x();
int dY = m_lastDropPos.y() - m_dropPos.y();
if ((QABS(dX) > QABS(dY)) || (m_lastDropPos.x() + 2*gridX > width()))
if ((TQABS(dX) > TQABS(dY)) || (m_lastDropPos.x() + 2*gridX > width()))
m_lastDropPos = TQPoint(m_dropPos.x(), m_lastDropPos.y() + gridY);
else
m_lastDropPos = TQPoint(m_lastDropPos.x() + gridX, m_lastDropPos.y());

@ -367,7 +367,7 @@ void AppletHandleDrag::paintEvent(TQPaintEvent *)
TQRect r = rect();
style().tqdrawPrimitive(TQStyle::PE_DockWindowHandle, &p, r,
style().drawPrimitive(TQStyle::PE_DockWindowHandle, &p, r,
colorGroup(), flags);
}
else

@ -1417,11 +1417,11 @@ void ExtensionContainer::paintEvent(TQPaintEvent *e)
// KPanelExtension::Left/Right don't seem to draw the separators at all!
if (position() == KPanelExtension::Left) {
rect = TQRect(width()-2,0,PANEL_RESIZE_HANDLE_WIDTH,height());
style().tqdrawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Horizontal );
style().drawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Horizontal );
}
else if (position() == KPanelExtension::Right) {
rect = TQRect(0,0,PANEL_RESIZE_HANDLE_WIDTH,height());
style().tqdrawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Horizontal );
style().drawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Horizontal );
}
else if (position() == KPanelExtension::Top) {
// Nastiness to both vertically flip the PE_Separator
@ -1431,12 +1431,12 @@ void ExtensionContainer::paintEvent(TQPaintEvent *e)
rect = TQRect(0,0,width(),PANEL_RESIZE_HANDLE_WIDTH);
TQColorGroup darkcg = colorGroup();
darkcg.setColor(TQColorGroup::Light, colorGroup().dark());
style().tqdrawPrimitive( TQStyle::PE_Separator, &myp, rect, darkcg, TQStyle::Style_Default );
style().drawPrimitive( TQStyle::PE_Separator, &myp, rect, darkcg, TQStyle::Style_Default );
p.drawPixmap(0,height()-2,inv_pm);
}
else {
rect = TQRect(0,0,width(),PANEL_RESIZE_HANDLE_WIDTH);
style().tqdrawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Default );
style().drawPrimitive( TQStyle::PE_Separator, &p, rect, colorGroup(), TQStyle::Style_Default );
}
}
}

@ -1958,7 +1958,7 @@ void DragIndicator::paintEvent(TQPaintEvent*)
{
TQPainter painter(this);
TQRect rect(0, 0, width(), height());
style().tqdrawPrimitive( TQStyle::PE_FocusRect, &painter, rect, colorGroup(),
style().drawPrimitive( TQStyle::PE_FocusRect, &painter, rect, colorGroup(),
TQStyle::Style_Default, colorGroup().base() );
}

@ -655,7 +655,7 @@ void PanelKMenu::paintEvent(TQPaintEvent * e)
TQPainter p(this);
p.setClipRegion(e->region());
style().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p,
style().drawPrimitive( TQStyle::PE_PanelPopup, &p,
TQRect( 0, 0, width(), height() ),
colorGroup(), TQStyle::Style_Default,
TQStyleOption( frameWidth(), 0 ) );

@ -199,7 +199,7 @@ void KickoffTabBar::layoutTabs()
int w = TQMAX(st.width() / count(), parentWidget()->width() / count());
TQRect r = tab->rect();
tab->setRect(TQRect(TQPoint(x, 0), style().tqsizeFromContents(TQStyle::CT_TabBarTab, this,
tab->setRect(TQRect(TQPoint(x, 0), style().sizeFromContents(TQStyle::CT_TabBarTab, this,
TQSize(w, h), TQStyleOption(tab))));
x += tab->rect().width() - overlap;
}

@ -46,7 +46,7 @@ public:
{
p->save();
TQRect r(x, y, w, h);
kapp->style().tqdrawPrimitive(TQStyle::PE_HeaderSectionMenu,
kapp->style().drawPrimitive(TQStyle::PE_HeaderSectionMenu,
p, r, cg);
if (!m_desktopName.isEmpty())

@ -540,7 +540,7 @@ void PanelButton::drawButton(TQPainter *p)
if (m_tileColor.isValid())
{
p->fillRect(rect(), m_tileColor);
style().tqdrawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup());
style().drawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup());
}
else if (paletteBackgroundPixmap())
{
@ -560,7 +560,7 @@ void PanelButton::drawButton(TQPainter *p)
else if (isDown() || isOn())
{
// Draw shapes to indicate the down state.
style().tqdrawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup(), TQStyle::Style_Sunken);
style().drawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup(), TQStyle::Style_Sunken);
}
drawButtonLabel(p);
@ -570,7 +570,7 @@ void PanelButton::drawButton(TQPainter *p)
int x1, y1, x2, y2;
rect().coords(&x1, &y1, &x2, &y2);
TQRect r(x1+2, y1+2, x2-x1-3, y2-y1-3);
style().tqdrawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
style().drawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
TQStyle::Style_Default, colorGroup().button());
}
}
@ -582,7 +582,7 @@ void PanelButton::drawDeepButton(TQPainter *p)
if (m_tileColor.isValid())
{
p->fillRect(rect(), m_tileColor);
style().tqdrawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup());
style().drawPrimitive(TQStyle::PE_Panel, p, rect(), colorGroup());
}
else if (paletteBackgroundPixmap())
{
@ -596,10 +596,10 @@ void PanelButton::drawDeepButton(TQPainter *p)
TQRect btn_rect = TQRect(rect().x(), rect().y()+1, rect().width(), rect().height()-2);
if (isDown() || isOn()) {
style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, p, btn_rect, colorGroup(), TQStyle::Style_Down);
style().drawPrimitive(TQStyle::PE_ButtonBevel, p, btn_rect, colorGroup(), TQStyle::Style_Down);
}
else {
style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, p, btn_rect, colorGroup(), TQStyle::Style_Raised);
style().drawPrimitive(TQStyle::PE_ButtonBevel, p, btn_rect, colorGroup(), TQStyle::Style_Raised);
}
drawButtonLabel(p,0,FALSE);
@ -609,7 +609,7 @@ void PanelButton::drawDeepButton(TQPainter *p)
int x1, y1, x2, y2;
rect().coords(&x1, &y1, &x2, &y2);
TQRect r(x1+2, y1+2, x2-x1-3, y2-y1-3);
style().tqdrawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
style().drawPrimitive(TQStyle::PE_FocusRect, p, r, colorGroup(),
TQStyle::Style_Default, colorGroup().button());
}
}
@ -772,7 +772,7 @@ void PanelButton::drawButtonLabel(TQPainter *p, int voffset, bool drawArrow)
{
flags |= TQStyle::Style_Down;
}
style().tqdrawPrimitive(e, p, r, colorGroup(), flags);
style().drawPrimitive(e, p, r, colorGroup(), flags);
}
}

@ -99,7 +99,7 @@ void SimpleButton::drawButton( TQPainter *p )
if (m_highlight || isDown() || isOn()) {
int flags = TQStyle::Style_Default | TQStyle::Style_Enabled;
if (isDown() || isOn()) flags |= TQStyle::Style_Down;
style().tqdrawPrimitive(TQStyle::PE_ButtonTool, p, r, colorGroup(), flags);
style().drawPrimitive(TQStyle::PE_ButtonTool, p, r, colorGroup(), flags);
}
}
@ -263,7 +263,7 @@ void SimpleArrowButton::drawButton( TQPainter *p )
int flags = TQStyle::Style_Default | TQStyle::Style_Enabled;
if (isDown() || isOn()) flags |= TQStyle::Style_Down;
style().tqdrawPrimitive(pe, p, r, colorGroup(), flags);
style().drawPrimitive(pe, p, r, colorGroup(), flags);
if (m_forceStandardCursor) {
SimpleButton::drawButton(p);

@ -755,7 +755,7 @@ void TOM::paintEvent(TQPaintEvent * e)
TQPainter p(this);
style().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p,
style().drawPrimitive( TQStyle::PE_PanelPopup, &p,
TQRect( 0, 0, width(), height() ),
colorGroup(), TQStyle::Style_Default,
TQStyleOption( frameWidth(), 0 ) );

@ -700,12 +700,12 @@ void TaskContainer::drawButton(TQPainter *p)
if (drawButton)
{
if (READ_MERGED_TASKBAR_SETTING(drawButtons) && KickerSettings::showDeepButtons()) {
style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, p,
style().drawPrimitive(TQStyle::PE_ButtonBevel, p,
TQRect(1, 1, width()-3, height()-2),
colors, sunken ? TQStyle::Style_On : TQStyle::Style_Raised);
}
else {
style().tqdrawPrimitive(TQStyle::PE_ButtonTool, p,
style().drawPrimitive(TQStyle::PE_ButtonTool, p,
TQRect(1, 1, width()-2, height()-2),
colors, sunken ? TQStyle::Style_Down : TQStyle::Style_Raised);
}
@ -908,7 +908,7 @@ void TaskContainer::drawButton(TQPainter *p)
flags |= TQStyle::Style_Down;
}
style().tqdrawPrimitive(e, p, ar, colors, flags);
style().drawPrimitive(e, p, ar, colors, flags);
}
// draw mouse over frame in transparent mode

@ -108,7 +108,7 @@ void PopupProxy::tryInsertItem( HistoryItem const * const item,
Q_ASSERT( id != -1 ); // Be sure that the item was inserted.
TQMenuItem* mi = proxy_for_menu->findItem( id );
int fontheight = TQFontMetrics( proxy_for_menu->fontMetrics() ).height();
int itemheight = proxy_for_menu->style().tqsizeFromContents(TQStyle::CT_PopupMenuItem,
int itemheight = proxy_for_menu->style().sizeFromContents(TQStyle::CT_PopupMenuItem,
proxy_for_menu,
TQSize( 0, fontheight ),
TQStyleOption(mi,10,0) ).height();

@ -585,7 +585,7 @@ void KonqBaseListViewWidget::drawRubber( TQPainter *p )
TQPoint pt( m_rubber->x(), m_rubber->y() );
pt = contentsToViewport( pt );
style().tqdrawPrimitive( TQStyle::PE_RubberBand, p,
style().drawPrimitive( TQStyle::PE_RubberBand, p,
TQRect( pt.x(), pt.y(), m_rubber->width(), m_rubber->height() ),
colorGroup(), TQStyle::Style_Default, colorGroup().base() );
}

@ -121,7 +121,7 @@ int KonqDirPart::KonqDirPartPrivate::findNearestIconSize(int preferred)
int KonqDirPart::KonqDirPartPrivate::nearestIconSizeError(int size)
{
return QABS(size - findNearestIconSize(size));
return TQABS(size - findNearestIconSize(size));
}
KonqDirPart::KonqDirPart( TQObject *parent, const char *name )

@ -163,7 +163,7 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/)
TQColorGroup cg = TQApplication::palette().active();
TQApplication::style().tqdrawPrimitive(TQStyle::PE_Panel, &p,
TQApplication::style().drawPrimitive(TQStyle::PE_Panel, &p,
TQRect(0, 0, 150, 20), cg,
TQStyle::Style_Sunken);

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

@ -1647,10 +1647,10 @@ void KeramikClient::resizeEvent( TQResizeEvent *e )
int dy = 0;
if ( e->oldSize().width() != width() )
dx = 32 + QABS( e->oldSize().width() - width() );
dx = 32 + TQABS( e->oldSize().width() - width() );
if ( e->oldSize().height() != height() )
dy = 8 + QABS( e->oldSize().height() - height() );
dy = 8 + TQABS( e->oldSize().height() - height() );
if ( dy )
widget()->update( 0, height() - dy + 1, width(), dy );

@ -337,23 +337,23 @@ TQPoint Workspace::adjustClientPosition( Client* c, TQPoint pos )
int snap = options->borderSnapZone; //snap trigger
if (snap)
{
if ((sOWO?(cx<xmin):true) && (QABS(xmin-cx)<snap))
if ((sOWO?(cx<xmin):true) && (TQABS(xmin-cx)<snap))
{
deltaX = xmin-cx;
nx = xmin;
}
if ((sOWO?(rx>xmax):true) && (QABS(rx-xmax)<snap) && (QABS(xmax-rx) < deltaX))
if ((sOWO?(rx>xmax):true) && (TQABS(rx-xmax)<snap) && (TQABS(xmax-rx) < deltaX))
{
deltaX = rx-xmax;
nx = xmax - cw;
}
if ((sOWO?(cy<ymin):true) && (QABS(ymin-cy)<snap))
if ((sOWO?(cy<ymin):true) && (TQABS(ymin-cy)<snap))
{
deltaY = ymin-cy;
ny = ymin;
}
if ((sOWO?(ry>ymax):true) && (QABS(ry-ymax)<snap) && (QABS(ymax-ry) < deltaY))
if ((sOWO?(ry>ymax):true) && (TQABS(ry-ymax)<snap) && (TQABS(ymax-ry) < deltaY))
{
deltaY =ry-ymax;
ny = ymax - ch;
@ -380,14 +380,14 @@ TQPoint Workspace::adjustClientPosition( Client* c, TQPoint pos )
(( ry >= ly ) && ( ry <= lry )) ||
(( cy <= ly ) && ( ry >= lry )) )
{
if ((sOWO?(cx<lrx):true) && (QABS(lrx-cx)<snap) && ( QABS(lrx -cx) < deltaX) )
if ((sOWO?(cx<lrx):true) && (TQABS(lrx-cx)<snap) && ( TQABS(lrx -cx) < deltaX) )
{
deltaX = QABS( lrx - cx );
deltaX = TQABS( lrx - cx );
nx = lrx;
}
if ((sOWO?(rx>lx):true) && (QABS(rx-lx)<snap) && ( QABS( rx - lx )<deltaX) )
if ((sOWO?(rx>lx):true) && (TQABS(rx-lx)<snap) && ( TQABS( rx - lx )<deltaX) )
{
deltaX = QABS(rx - lx);
deltaX = TQABS(rx - lx);
nx = lx - cw;
}
}
@ -396,15 +396,15 @@ TQPoint Workspace::adjustClientPosition( Client* c, TQPoint pos )
(( rx >= lx ) && ( rx <= lrx )) ||
(( cx <= lx ) && ( rx >= lrx )) )
{
if ((sOWO?(cy<lry):true) && (QABS(lry-cy)<snap) && (QABS( lry -cy ) < deltaY))
if ((sOWO?(cy<lry):true) && (TQABS(lry-cy)<snap) && (TQABS( lry -cy ) < deltaY))
{
deltaY = QABS( lry - cy );
deltaY = TQABS( lry - cy );
ny = lry;
}
//if ( (QABS( ry-ly ) < snap) && (QABS( ry - ly ) < deltaY ))
if ((sOWO?(ry>ly):true) && (QABS(ry-ly)<snap) && (QABS( ry - ly ) < deltaY ))
//if ( (TQABS( ry-ly ) < snap) && (TQABS( ry - ly ) < deltaY ))
if ((sOWO?(ry>ly):true) && (TQABS(ry-ly)<snap) && (TQABS( ry - ly ) < deltaY ))
{
deltaY = QABS( ry - ly );
deltaY = TQABS( ry - ly );
ny = ly - ch;
}
}
@ -451,30 +451,30 @@ TQRect Workspace::adjustClientSize( Client* c, TQRect moveResizeGeom, int mode )
deltaY = int(snap);
#define SNAP_BORDER_TOP \
if ((sOWO?(newcy<ymin):true) && (QABS(ymin-newcy)<deltaY)) \
if ((sOWO?(newcy<ymin):true) && (TQABS(ymin-newcy)<deltaY)) \
{ \
deltaY = QABS(ymin-newcy); \
deltaY = TQABS(ymin-newcy); \
newcy = ymin; \
}
#define SNAP_BORDER_BOTTOM \
if ((sOWO?(newry>ymax):true) && (QABS(ymax-newry)<deltaY)) \
if ((sOWO?(newry>ymax):true) && (TQABS(ymax-newry)<deltaY)) \
{ \
deltaY = QABS(ymax-newcy); \
deltaY = TQABS(ymax-newcy); \
newry = ymax; \
}
#define SNAP_BORDER_LEFT \
if ((sOWO?(newcx<xmin):true) && (QABS(xmin-newcx)<deltaX)) \
if ((sOWO?(newcx<xmin):true) && (TQABS(xmin-newcx)<deltaX)) \
{ \
deltaX = QABS(xmin-newcx); \
deltaX = TQABS(xmin-newcx); \
newcx = xmin; \
}
#define SNAP_BORDER_RIGHT \
if ((sOWO?(newrx>xmax):true) && (QABS(xmax-newrx)<deltaX)) \
if ((sOWO?(newrx>xmax):true) && (TQABS(xmax-newrx)<deltaX)) \
{ \
deltaX = QABS(xmax-newrx); \
deltaX = TQABS(xmax-newrx); \
newrx = xmax; \
}
switch ( mode )
@ -543,30 +543,30 @@ TQRect Workspace::adjustClientSize( Client* c, TQRect moveResizeGeom, int mode )
#define SNAP_WINDOW_TOP if ( (sOWO?(newcy<lry):true) \
&& WITHIN_WIDTH \
&& (QABS( lry - newcy ) < deltaY) ) { \
deltaY = QABS( lry - newcy ); \
&& (TQABS( lry - newcy ) < deltaY) ) { \
deltaY = TQABS( lry - newcy ); \
newcy=lry; \
}
#define SNAP_WINDOW_BOTTOM if ( (sOWO?(newry>ly):true) \
&& WITHIN_WIDTH \
&& (QABS( ly - newry ) < deltaY) ) { \
deltaY = QABS( ly - newry ); \
&& (TQABS( ly - newry ) < deltaY) ) { \
deltaY = TQABS( ly - newry ); \
newry=ly; \
}
#define SNAP_WINDOW_LEFT if ( (sOWO?(newcx<lrx):true) \
&& WITHIN_HEIGHT \
&& (QABS( lrx - newcx ) < deltaX)) { \
deltaX = QABS( lrx - newcx ); \
&& (TQABS( lrx - newcx ) < deltaX)) { \
deltaX = TQABS( lrx - newcx ); \
newcx=lrx; \
}
#define SNAP_WINDOW_RIGHT if ( (sOWO?(newrx>lx):true) \
&& WITHIN_HEIGHT \
&& (QABS( lx - newrx ) < deltaX)) \
&& (TQABS( lx - newrx ) < deltaX)) \
{ \
deltaX = QABS( lx - newrx ); \
deltaX = TQABS( lx - newrx ); \
newrx=lx; \
}

@ -74,7 +74,7 @@ void PopupInfo::reset()
void PopupInfo::paintEvent( TQPaintEvent* )
{
TQPainter p( this );
style().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( 0, 0, width(), height() ),
style().drawPrimitive( TQStyle::PE_Panel, &p, TQRect( 0, 0, width(), height() ),
colorGroup(), TQStyle::Style_Default );
paintContents();
}

Loading…
Cancel
Save