less qt3support

svn path=/trunk/KDE/kdebase/workspace/; revision=672194
This commit is contained in:
Pino Toscano 2007-06-06 10:37:37 +00:00
parent 033e0cc6a1
commit 38267e8ac6
8 changed files with 46 additions and 46 deletions

View file

@ -46,14 +46,14 @@
static void flip( QPixmap *&pix )
{
QPixmap *tmp = new QPixmap( pix->transformed( QWMatrix(-1,0,0,1,pix->width(),0) ) );
QPixmap *tmp = new QPixmap( pix->transformed( QMatrix(-1,0,0,1,pix->width(),0) ) );
delete pix;
pix = tmp;
}
static void flip( QBitmap *&pix )
{
QBitmap *tmp = new QBitmap( pix->transformed( QWMatrix(-1,0,0,1,pix->width(),0) ) );
QBitmap *tmp = new QBitmap( pix->transformed( QMatrix(-1,0,0,1,pix->width(),0) ) );
delete pix;
pix = tmp;
}
@ -610,9 +610,9 @@ QPixmap *KeramikHandler::composite( QImage *over, QImage *under )
*dst = *src;
else if ( a != 0x00 )
*dst = qRgba( Q_UINT8( r1 + (((r2 - r1) * a) >> 8) ),
Q_UINT8( g1 + (((g2 - g1) * a) >> 8) ),
Q_UINT8( b1 + (((b2 - b1) * a) >> 8) ),
*dst = qRgba( quint8( r1 + (((r2 - r1) * a) >> 8) ),
quint8( g1 + (((g2 - g1) * a) >> 8) ),
quint8( b1 + (((b2 - b1) * a) >> 8) ),
0xff );
else if ( qAlpha(*dst) == 0x00 )
@ -1639,10 +1639,10 @@ void KeramikClient::resizeEvent( QResizeEvent *e )
int dy = 0;
if ( e->oldSize().width() != width() )
dx = 32 + QABS( e->oldSize().width() - width() );
dx = 32 + qAbs( e->oldSize().width() - width() );
if ( e->oldSize().height() != height() )
dy = 8 + QABS( e->oldSize().height() - height() );
dy = 8 + qAbs( e->oldSize().height() - height() );
if ( dy )
widget()->update( 0, height() - dy + 1, width(), dy );

View file

@ -507,7 +507,7 @@ void DesktopGridEffect::windowInputMouseEvent( Window, QEvent* e )
QRect rect = windowRect( window_move );
int desktop = posToDesktop( rect.center());
// to desktop's coordinates
rect.moveBy( -desktopRect( desktop, true ).topLeft());
rect.translate( -desktopRect( desktop, true ).topLeft());
int x, y;
Qt::Orientation orientation;
effects->calcDesktopLayout( &x, &y, &orientation );

View file

@ -770,12 +770,12 @@ void PresentWindowsEffect::updateFilterTexture()
rect.adjust( -border, -border, border, border );
QRect area = effects->clientArea( PlacementArea, QPoint( 0, 0 ), effects->currentDesktop());
QImage im( rect.width(), rect.height(), QImage::Format_ARGB32 );
QColor col = QPalette().highlight();
QColor col = QPalette().color( QPalette::Highlight );
col.setAlpha( 128 ); // 0.5
im.fill( col.rgba());
QPainter p( &im );
p.setFont( font );
p.setPen( QPalette().highlightedText());
p.setPen( QPalette().color( QPalette::HighlightedText ) );
p.drawText( -rect.topLeft(), windowFilter );
p.end();
filterTexture = new GLTexture( im );

View file

@ -318,23 +318,23 @@ QPoint Workspace::adjustClientPosition( Client* c, QPoint pos )
int snap = options->borderSnapZone; //snap trigger
if (snap)
{
if ((sOWO?(cx<xmin):true) && (QABS(xmin-cx)<snap))
if ((sOWO?(cx<xmin):true) && (qAbs(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) && (qAbs(rx-xmax)<snap) && (qAbs(xmax-rx) < deltaX))
{
deltaX = rx-xmax;
nx = xmax - cw;
}
if ((sOWO?(cy<ymin):true) && (QABS(ymin-cy)<snap))
if ((sOWO?(cy<ymin):true) && (qAbs(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) && (qAbs(ry-ymax)<snap) && (qAbs(ymax-ry) < deltaY))
{
deltaY =ry-ymax;
ny = ymax - ch;
@ -361,14 +361,14 @@ QPoint Workspace::adjustClientPosition( Client* c, QPoint 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) && (qAbs(lrx-cx)<snap) && ( qAbs(lrx -cx) < deltaX) )
{
deltaX = QABS( lrx - cx );
deltaX = qAbs( lrx - cx );
nx = lrx;
}
if ((sOWO?(rx>lx):true) && (QABS(rx-lx)<snap) && ( QABS( rx - lx )<deltaX) )
if ((sOWO?(rx>lx):true) && (qAbs(rx-lx)<snap) && ( qAbs( rx - lx )<deltaX) )
{
deltaX = QABS(rx - lx);
deltaX = qAbs(rx - lx);
nx = lx - cw;
}
}
@ -377,15 +377,15 @@ QPoint Workspace::adjustClientPosition( Client* c, QPoint 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) && (qAbs(lry-cy)<snap) && (qAbs( lry -cy ) < deltaY))
{
deltaY = QABS( lry - cy );
deltaY = qAbs( 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 ( (qAbs( ry-ly ) < snap) && (qAbs( ry - ly ) < deltaY ))
if ((sOWO?(ry>ly):true) && (qAbs(ry-ly)<snap) && (qAbs( ry - ly ) < deltaY ))
{
deltaY = QABS( ry - ly );
deltaY = qAbs( ry - ly );
ny = ly - ch;
}
}
@ -432,30 +432,30 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode )
deltaY = int(snap);
#define SNAP_BORDER_TOP \
if ((sOWO?(newcy<ymin):true) && (QABS(ymin-newcy)<deltaY)) \
if ((sOWO?(newcy<ymin):true) && (qAbs(ymin-newcy)<deltaY)) \
{ \
deltaY = QABS(ymin-newcy); \
deltaY = qAbs(ymin-newcy); \
newcy = ymin; \
}
#define SNAP_BORDER_BOTTOM \
if ((sOWO?(newry>ymax):true) && (QABS(ymax-newry)<deltaY)) \
if ((sOWO?(newry>ymax):true) && (qAbs(ymax-newry)<deltaY)) \
{ \
deltaY = QABS(ymax-newcy); \
deltaY = qAbs(ymax-newcy); \
newry = ymax; \
}
#define SNAP_BORDER_LEFT \
if ((sOWO?(newcx<xmin):true) && (QABS(xmin-newcx)<deltaX)) \
if ((sOWO?(newcx<xmin):true) && (qAbs(xmin-newcx)<deltaX)) \
{ \
deltaX = QABS(xmin-newcx); \
deltaX = qAbs(xmin-newcx); \
newcx = xmin; \
}
#define SNAP_BORDER_RIGHT \
if ((sOWO?(newrx>xmax):true) && (QABS(xmax-newrx)<deltaX)) \
if ((sOWO?(newrx>xmax):true) && (qAbs(xmax-newrx)<deltaX)) \
{ \
deltaX = QABS(xmax-newrx); \
deltaX = qAbs(xmax-newrx); \
newrx = xmax; \
}
switch ( mode )
@ -524,30 +524,30 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode )
#define SNAP_WINDOW_TOP if ( (sOWO?(newcy<lry):true) \
&& WITHIN_WIDTH \
&& (QABS( lry - newcy ) < deltaY) ) { \
deltaY = QABS( lry - newcy ); \
&& (qAbs( lry - newcy ) < deltaY) ) { \
deltaY = qAbs( lry - newcy ); \
newcy=lry; \
}
#define SNAP_WINDOW_BOTTOM if ( (sOWO?(newry>ly):true) \
&& WITHIN_WIDTH \
&& (QABS( ly - newry ) < deltaY) ) { \
deltaY = QABS( ly - newry ); \
&& (qAbs( ly - newry ) < deltaY) ) { \
deltaY = qAbs( ly - newry ); \
newry=ly; \
}
#define SNAP_WINDOW_LEFT if ( (sOWO?(newcx<lrx):true) \
&& WITHIN_HEIGHT \
&& (QABS( lrx - newcx ) < deltaX)) { \
deltaX = QABS( lrx - newcx ); \
&& (qAbs( lrx - newcx ) < deltaX)) { \
deltaX = qAbs( lrx - newcx ); \
newcx=lrx; \
}
#define SNAP_WINDOW_RIGHT if ( (sOWO?(newrx>lx):true) \
&& WITHIN_HEIGHT \
&& (QABS( lx - newrx ) < deltaX)) \
&& (qAbs( lx - newrx ) < deltaX)) \
{ \
deltaX = QABS( lx - newrx ); \
deltaX = qAbs( lx - newrx ); \
newrx=lx; \
}

View file

@ -415,7 +415,7 @@ void KFocusConfig::updateActiveMouseScreen()
// on by default for non click to focus policies
KConfigGroup cfg( config, "Windows" );
if( !cfg.hasKey( KWIN_ACTIVE_MOUSE_SCREEN ))
setActiveMouseScreen( focusCombo->currentItem() != 0 );
setActiveMouseScreen( focusCombo->currentIndex() != 0 );
}
void KFocusConfig::setAltTabMode(bool a) {
@ -467,7 +467,7 @@ void KFocusConfig::load( void )
setSeparateScreenFocus( cg.readEntry(KWIN_SEPARATE_SCREEN_FOCUS, true));
// on by default for non click to focus policies
setActiveMouseScreen( cg.readEntry(KWIN_ACTIVE_MOUSE_SCREEN, focusCombo->currentItem() != 0 ));
setActiveMouseScreen( cg.readEntry(KWIN_ACTIVE_MOUSE_SCREEN, focusCombo->currentIndex() != 0 ));
key = cg.readEntry(KWIN_ALTTABMODE, "KDE");
setAltTabMode(key == "KDE");
@ -555,7 +555,7 @@ void KFocusConfig::defaults()
setClickRaise(true);
setSeparateScreenFocus( true );
// on by default for non click to focus policies
setActiveMouseScreen( focusCombo->currentItem() != 0 );
setActiveMouseScreen( focusCombo->currentIndex() != 0 );
setAltTabMode(true);
setTraverseAll( false );
setRollOverDesktops(true);

View file

@ -511,7 +511,7 @@ GLShader::~GLShader()
bool GLShader::loadFromFiles(const QString& vertexfile, const QString& fragmentfile)
{
QFile vf(vertexfile);
if(!vf.open(IO_ReadOnly))
if(!vf.open(QIODevice::ReadOnly))
{
kError(1212) << k_funcinfo << "Couldn't open '" << vertexfile << "' for reading!" << endl;
return false;
@ -519,7 +519,7 @@ bool GLShader::loadFromFiles(const QString& vertexfile, const QString& fragmentf
QString vertexsource(vf.readAll());
QFile ff(fragmentfile);
if(!ff.open(IO_ReadOnly))
if(!ff.open(QIODevice::ReadOnly))
{
kError(1212) << k_funcinfo << "Couldn't open '" << fragmentfile << "' for reading!" << endl;
return false;

View file

@ -201,7 +201,7 @@ unsigned long Options::updateSettings()
refreshRate = config.readEntry( "RefreshRate", 0 );
smoothScale = qBound( -1, config.readEntry( "SmoothScale", -1 ), 2 );
QString glmode = config.readEntry("GLMode", "TFP" ).upper();
QString glmode = config.readEntry("GLMode", "TFP" ).toUpper();
if( glmode == "TFP" )
glMode = GLTFP;
else if( glmode == "SHM" )

View file

@ -36,7 +36,7 @@ namespace KWin
{
PopupInfo::PopupInfo( Workspace* ws, const char *name )
: QWidget( 0, name ), workspace( ws )
: QWidget( 0 ), workspace( ws )
{
setObjectName( name );