From 8155225c9be993acc0512956416d195edfef4eb9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 19 Jan 2011 01:42:14 +0000 Subject: Enable compilation with TQt for Qt4 3.4.0 TP2 This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/input/core/themepage.cpp | 4 +-- kcontrol/input/core/themepage.h | 4 +-- kcontrol/input/kapplymousetheme.cpp | 22 ++++++------ kcontrol/input/kmousedlg.ui | 60 ++++++++++++++++---------------- kcontrol/input/logitechmouse.cpp | 6 ++-- kcontrol/input/logitechmouse.h | 22 ++++++------ kcontrol/input/logitechmouse_base.ui | 24 ++++++------- kcontrol/input/mouse.cpp | 10 +++--- kcontrol/input/xcursor/previewwidget.cpp | 4 +-- kcontrol/input/xcursor/themepage.cpp | 26 +++++++------- 10 files changed, 91 insertions(+), 91 deletions(-) (limited to 'kcontrol/input') diff --git a/kcontrol/input/core/themepage.cpp b/kcontrol/input/core/themepage.cpp index a2b5f1b86..73ab04b8c 100644 --- a/kcontrol/input/core/themepage.cpp +++ b/kcontrol/input/core/themepage.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003 Fredrik Höglund + * Copyright (C) 2003 Fredrik H�glund * * Based on the large cursor code written by Rik Hemsley, * Copyright (c) 2000 Rik Hemsley @@ -130,7 +130,7 @@ void ThemePage::load( bool useDefaults ) currentTheme = whiteCursor ? "SmallWhite" : "SmallBlack"; selectedTheme = currentTheme; - TQListViewItem *item = listview->findItem( currentTheme, DirColumn ); + TQListViewItem *item = listview->tqfindItem( currentTheme, DirColumn ); item->setSelected( true ); } diff --git a/kcontrol/input/core/themepage.h b/kcontrol/input/core/themepage.h index 6ab6dcedd..646354d91 100644 --- a/kcontrol/input/core/themepage.h +++ b/kcontrol/input/core/themepage.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003 Fredrik Höglund + * Copyright (C) 2003 Fredrik H�glund * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public @@ -22,7 +22,7 @@ class KListView; class TQListViewItem; -class ThemePage : public QWidget +class ThemePage : public TQWidget { Q_OBJECT diff --git a/kcontrol/input/kapplymousetheme.cpp b/kcontrol/input/kapplymousetheme.cpp index 99d6d1077..4cc1a8b4f 100644 --- a/kcontrol/input/kapplymousetheme.cpp +++ b/kcontrol/input/kapplymousetheme.cpp @@ -35,8 +35,8 @@ #endif static Display* dpy; -static Display* qt_xdisplay() { return dpy; }\ -static Window qt_xrootwin() { return DefaultRootWindow( dpy ); } +static Display* trinity_qt_xdisplay() { return dpy; }\ +static Window trinity_qt_xrootwin() { return DefaultRootWindow( dpy ); } bool isEmpty( const char* str ) { @@ -63,8 +63,8 @@ int main( int argc, char* argv[] ) // use a default value for theme only if it's not configured at all, not even in X resources if( isEmpty( theme ) - && isEmpty( XGetDefault( qt_xdisplay(), "Xcursor", "theme" )) - && isEmpty( XcursorGetTheme( qt_xdisplay()))) + && isEmpty( XGetDefault( trinity_qt_xdisplay(), "Xcursor", "theme" )) + && isEmpty( XcursorGetTheme( trinity_qt_xdisplay()))) { theme = "default"; ret = 10; // means to switch to default @@ -72,19 +72,19 @@ int main( int argc, char* argv[] ) // Apply the KDE cursor theme to ourselves if( !isEmpty( theme )) - XcursorSetTheme(qt_xdisplay(), theme ); + XcursorSetTheme(trinity_qt_xdisplay(), theme ); if (!isEmpty( size )) - XcursorSetDefaultSize(qt_xdisplay(), atoi( size )); + XcursorSetDefaultSize(trinity_qt_xdisplay(), atoi( size )); // Load the default cursor from the theme and apply it to the root window. - Cursor handle = XcursorLibraryLoadCursor(qt_xdisplay(), "left_ptr"); - XDefineCursor(qt_xdisplay(), qt_xrootwin(), handle); - XFreeCursor(qt_xdisplay(), handle); // Don't leak the cursor + Cursor handle = XcursorLibraryLoadCursor(trinity_qt_xdisplay(), "left_ptr"); + XDefineCursor(trinity_qt_xdisplay(), trinity_qt_xrootwin(), handle); + XFreeCursor(trinity_qt_xdisplay(), handle); // Don't leak the cursor #else - ( void ) qt_xdisplay(); - ( void ) qt_xrootwin(); + ( void ) trinity_qt_xdisplay(); + ( void ) trinity_qt_xrootwin(); ( void ) argv; #endif XCloseDisplay( dpy ); diff --git a/kcontrol/input/kmousedlg.ui b/kcontrol/input/kmousedlg.ui index 01ba9966f..f3e14fc53 100644 --- a/kcontrol/input/kmousedlg.ui +++ b/kcontrol/input/kmousedlg.ui @@ -1,6 +1,6 @@ KMouseDlg - + KMouseDlg @@ -16,7 +16,7 @@ unnamed - + handedBox @@ -57,7 +57,7 @@ Expanding - + 20 20 @@ -74,14 +74,14 @@ Expanding - + 20 20 - + rightHanded @@ -92,7 +92,7 @@ true - + leftHanded @@ -100,7 +100,7 @@ Le&ft handed - + mousePix @@ -112,7 +112,7 @@ 0 - + 150 115 @@ -124,7 +124,7 @@ - + cbScrollPolarity @@ -135,7 +135,7 @@ Change the direction of scrolling for the mouse wheel or the 4th and 5th mouse buttons. - + GroupBox1 @@ -146,7 +146,7 @@ unnamed - + doubleClick @@ -171,7 +171,7 @@ Horizontal - + cbVisualActivate @@ -179,18 +179,18 @@ Visual f&eedback on activation - + - cb_pointershape + cb_pointertqshape - Cha&nge pointer shape over icons + Cha&nge pointer tqshape over icons true - + cbAutoSelect @@ -208,14 +208,14 @@ Fixed - + 20 60 - + layout7 @@ -223,7 +223,7 @@ unnamed - + lb_short @@ -231,11 +231,11 @@ Short - + slAutoSelect - + 250 0 @@ -258,14 +258,14 @@ Expanding - + 230 20 - + lDelay @@ -276,14 +276,14 @@ slAutoSelect - + lb_long Long - + AlignVCenter|AlignRight @@ -301,14 +301,14 @@ Fixed - + 20 21 - + singleClick @@ -331,7 +331,7 @@ Expanding - + 20 16 @@ -344,7 +344,7 @@ singleClick toggled(bool) - cb_pointershape + cb_pointertqshape setEnabled(bool) @@ -364,7 +364,7 @@ rightHanded leftHanded singleClick - cb_pointershape + cb_pointertqshape cbAutoSelect slAutoSelect doubleClick diff --git a/kcontrol/input/logitechmouse.cpp b/kcontrol/input/logitechmouse.cpp index 9fc8daf32..23defa614 100644 --- a/kcontrol/input/logitechmouse.cpp +++ b/kcontrol/input/logitechmouse.cpp @@ -238,7 +238,7 @@ void LogitechMouse::save(KConfig * /*config*/) kdDebug() << "Logitech mouse settings not saved - not implemented yet" << endl; } -Q_UINT8 LogitechMouse::resolution() +TQ_UINT8 LogitechMouse::resolution() { // kdDebug() << "resolution: " << m_resolution << endl; if ( 0 == m_resolution ) { @@ -299,13 +299,13 @@ void LogitechMouse::setLogitechTo400() } } -Q_UINT8 LogitechMouse::batteryLevel() +TQ_UINT8 LogitechMouse::batteryLevel() { return m_batteryLevel; } -Q_UINT8 LogitechMouse::channel() +TQ_UINT8 LogitechMouse::channel() { return m_channel; } diff --git a/kcontrol/input/logitechmouse.h b/kcontrol/input/logitechmouse.h index 4ea296725..1eae2d60f 100644 --- a/kcontrol/input/logitechmouse.h +++ b/kcontrol/input/logitechmouse.h @@ -68,10 +68,10 @@ private: void setLogitechTo800(); TQString cordlessName(); - Q_UINT8 resolution(); + TQ_UINT8 resolution(); void updateResolution(); - Q_UINT8 batteryLevel(); - Q_UINT8 channel(); + TQ_UINT8 batteryLevel(); + TQ_UINT8 channel(); bool isDualChannelCapable(); TQTimer *doUpdate; @@ -83,14 +83,14 @@ private: // of the receiver's CONNECT button bool m_waitLock; // true if receiver searching for new mouse because the // CONNECT button on the receiver was pressed - Q_UINT8 m_batteryLevel; - Q_UINT8 m_channel; - Q_UINT8 m_cordlessNameIndex; // this gets convered into a TQString in cordlessName() - Q_UINT16 m_cordlessSecurity; - Q_UINT16 m_useSecondChannel; - Q_UINT8 m_caseShape; - Q_UINT8 m_numberOfButtons; - Q_UINT8 m_resolution; + TQ_UINT8 m_batteryLevel; + TQ_UINT8 m_channel; + TQ_UINT8 m_cordlessNameIndex; // this gets convered into a TQString in cordlessName() + TQ_UINT16 m_cordlessSecurity; + TQ_UINT16 m_useSecondChannel; + TQ_UINT8 m_caseShape; + TQ_UINT8 m_numberOfButtons; + TQ_UINT8 m_resolution; bool m_twoChannelCapable; // true if the mouse supports dual channels bool m_verticalRoller; // true if the mouse has a vertical roller (wheel) bool m_horizontalRoller; // true if the mouse has a horizontal roller (wheel) diff --git a/kcontrol/input/logitechmouse_base.ui b/kcontrol/input/logitechmouse_base.ui index 5c9c1cd9a..acee892a0 100644 --- a/kcontrol/input/logitechmouse_base.ui +++ b/kcontrol/input/logitechmouse_base.ui @@ -1,6 +1,6 @@ LogitechMouseBase - + LogitechMouseBase @@ -16,7 +16,7 @@ unnamed - + cordlessNameLabel @@ -24,18 +24,18 @@ Cordless Name - + permissionProblemText You have a Logitech Mouse connected, and libusb was found at compile time, but it was not possible to access this mouse. This is probably caused by a permissions problem - you should consult the manual on how to fix this. - + WordBreak|AlignVCenter - + resolutionSelector @@ -52,7 +52,7 @@ unnamed - + button400cpi @@ -63,7 +63,7 @@ 1 - + button800cpi @@ -76,7 +76,7 @@ - + batteryBox @@ -90,7 +90,7 @@ unnamed - + batteryBar @@ -100,7 +100,7 @@ - + channelSelector @@ -117,7 +117,7 @@ unnamed - + channel1 @@ -131,7 +131,7 @@ 3 - + channel2 diff --git a/kcontrol/input/mouse.cpp b/kcontrol/input/mouse.cpp index 68f376474..1b64dbb9c 100644 --- a/kcontrol/input/mouse.cpp +++ b/kcontrol/input/mouse.cpp @@ -150,7 +150,7 @@ MouseConfig::MouseConfig (TQWidget * parent, const char *name) connect(tab1->slAutoSelect, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); connect(tab1->cbVisualActivate, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect(tab1->cb_pointershape, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(tab1->cb_pointertqshape, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); connect(tab1->singleClick, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); connect(tab1->singleClick, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClick())); @@ -291,7 +291,7 @@ MouseConfig::MouseConfig (TQWidget * parent, const char *name) TQBoxLayout *vbox = new TQVBoxLayout(mouse, KDialog::marginHint(), KDialog::spacingHint()); - TQVBoxLayout *vvbox = new TQVBoxLayout(mouse->layout(), KDialog::spacingHint()); + TQVBoxLayout *vvbox = new TQVBoxLayout(mouse->tqlayout(), KDialog::spacingHint()); mouseKeys = new TQCheckBox(i18n("&Move pointer with keyboard (using the num pad)"), mouse); vvbox->addWidget(mouseKeys); @@ -506,7 +506,7 @@ void MouseConfig::load( bool useDefaults ) tab1->singleClick->setChecked( settings->singleClick ); tab1->doubleClick->setChecked(!settings->singleClick); - tab1->cb_pointershape->setChecked(settings->changeCursor); + tab1->cb_pointertqshape->setChecked(settings->changeCursor); tab1->cbAutoSelect->setChecked( settings->autoSelectDelay >= 0 ); if ( settings->autoSelectDelay < 0 ) tab1->slAutoSelect->setValue( 0 ); @@ -564,7 +564,7 @@ void MouseConfig::save() settings->autoSelectDelay = tab1->cbAutoSelect->isChecked()? tab1->slAutoSelect->value():-1; settings->visualActivate = tab1->cbVisualActivate->isChecked(); // settings->changeCursor = tab1->singleClick->isChecked(); - settings->changeCursor = tab1->cb_pointershape->isChecked(); + settings->changeCursor = tab1->cb_pointertqshape->isChecked(); settings->reverseScrollPolarity = tab1->cbScrollPolarity->isChecked(); settings->apply(); @@ -723,7 +723,7 @@ void MouseConfig::slotWheelScrollLinesChanged(int value) void MouseSettings::apply(bool force) { XChangePointerControl( kapp->getDisplay(), - true, true, int(qRound(accelRate*10)), 10, thresholdMove); + true, true, int(tqRound(accelRate*10)), 10, thresholdMove); // 256 might seems extreme, but X has already been known to return 32, // and we don't want to truncate things. Xlib limits the table to 256 bytes, diff --git a/kcontrol/input/xcursor/previewwidget.cpp b/kcontrol/input/xcursor/previewwidget.cpp index ceb399648..e0b33cf1b 100644 --- a/kcontrol/input/xcursor/previewwidget.cpp +++ b/kcontrol/input/xcursor/previewwidget.cpp @@ -303,7 +303,7 @@ void PreviewWidget::setTheme( const TQString &theme ) current = -1; setFixedSize( ( maxWidth + cursorSpacing ) * numCursors, kMax( maxHeight, minHeight ) ); setUpdatesEnabled( true ); - repaint( false ); + tqrepaint( false ); } @@ -311,7 +311,7 @@ void PreviewWidget::paintEvent( TQPaintEvent * ) { TQPixmap buffer( size() ); TQPainter p( &buffer ); - p.fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) ); + p.fillRect( rect(), tqcolorGroup().brush( TQColorGroup::Background ) ); Picture dest; if ( !qt_has_xft || !qt_use_xrender ) { diff --git a/kcontrol/input/xcursor/themepage.cpp b/kcontrol/input/xcursor/themepage.cpp index 7caf18c3f..27438a4d2 100644 --- a/kcontrol/input/xcursor/themepage.cpp +++ b/kcontrol/input/xcursor/themepage.cpp @@ -122,7 +122,7 @@ ThemePage::ThemePage( TQWidget* parent, const char* name ) ( !icons.exists() && !TQFileInfo( TQDir::homeDirPath() ).isWritable() ) ) installButton->setEnabled( false ); - if ( !themeDirs.contains( path ) ) + if ( !themeDirs.tqcontains( path ) ) installButton->setEnabled( false ); selectionChanged( listview->currentItem() ); @@ -395,7 +395,7 @@ const TQStringList ThemePage::getThemeBaseDirs() const TQString path = XcursorLibraryPath(); #endif // Expand all occurences of ~ to the home dir - path.replace( "~/", TQDir::homeDirPath() + '/' ); + path.tqreplace( "~/", TQDir::homeDirPath() + '/' ); return TQStringList::split( ':', path ); } @@ -414,7 +414,7 @@ bool ThemePage::isCursorTheme( const TQString &theme, const int depth ) const continue; const TQStringList subdirs( dir.entryList( TQDir::Dirs ) ); - if ( subdirs.contains( theme ) ) + if ( subdirs.tqcontains( theme ) ) { const TQString path = *it + '/' + theme; const TQString indexfile = path + "/index.theme"; @@ -585,7 +585,7 @@ TQPixmap ThemePage::createIcon( const TQString &theme, const TQString &sample ) image.setAlphaBuffer( true ); // Clear the image - Q_UINT32 *dst = reinterpret_cast( image.bits() ); + TQ_UINT32 *dst = reinterpret_cast( image.bits() ); for ( int i = 0; i < image.width() * image.height(); i++ ) dst[i] = 0; @@ -593,26 +593,26 @@ TQPixmap ThemePage::createIcon( const TQString &theme, const TQString &sample ) TQPoint dstOffset( (image.width() - r.width()) / 2, (image.height() - r.height()) / 2 ); TQPoint srcOffset( r.topLeft() ); - dst = reinterpret_cast( image.scanLine(dstOffset.y()) ) + dstOffset.x(); - src = reinterpret_cast( xcur->pixels ) + srcOffset.y() * xcur->width + srcOffset.x(); + dst = reinterpret_cast( image.scanLine(dstOffset.y()) ) + dstOffset.x(); + src = reinterpret_cast( xcur->pixels ) + srcOffset.y() * xcur->width + srcOffset.x(); // Copy the XcursorImage into the TQImage, converting it from premultiplied // to non-premultiplied alpha and cropping it if needed. for ( int y = 0; y < r.height(); y++ ) { for ( int x = 0; x < r.width(); x++, dst++, src++ ) { - const Q_UINT32 pixel = *src; + const TQ_UINT32 pixel = *src; - const Q_UINT8 a = qAlpha( pixel ); - const Q_UINT8 r = qRed( pixel ); - const Q_UINT8 g = qGreen( pixel ); - const Q_UINT8 b = qBlue( pixel ); + const TQ_UINT8 a = tqAlpha( pixel ); + const TQ_UINT8 r = tqRed( pixel ); + const TQ_UINT8 g = tqGreen( pixel ); + const TQ_UINT8 b = tqBlue( pixel ); if ( !a || a == 255 ) { *dst = pixel; } else { float alpha = a / 255.0; - *dst = qRgba( int(r / alpha), int(g / alpha), int(b / alpha), a ); + *dst = tqRgba( int(r / alpha), int(g / alpha), int(b / alpha), a ); } } dst += ( image.width() - r.width() ); @@ -630,7 +630,7 @@ TQPixmap ThemePage::createIcon( const TQString &theme, const TQString &sample ) TQImage image( iconSize, iconSize, 32 ); image.setAlphaBuffer( true ); - Q_UINT32 *data = reinterpret_cast< Q_UINT32* >( image.bits() ); + TQ_UINT32 *data = reinterpret_cast< TQ_UINT32* >( image.bits() ); for ( int i = 0; i < image.width() * image.height(); i++ ) data[ i ] = 0; -- cgit v1.2.1