diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kcontrol/input | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/input')
-rw-r--r-- | kcontrol/input/core/themepage.cpp | 40 | ||||
-rw-r--r-- | kcontrol/input/core/themepage.h | 6 | ||||
-rw-r--r-- | kcontrol/input/logitechmouse.cpp | 40 | ||||
-rw-r--r-- | kcontrol/input/logitechmouse.h | 18 | ||||
-rw-r--r-- | kcontrol/input/main.cpp | 16 | ||||
-rw-r--r-- | kcontrol/input/mouse.cpp | 146 | ||||
-rw-r--r-- | kcontrol/input/mouse.h | 42 | ||||
-rw-r--r-- | kcontrol/input/xcursor/previewwidget.cpp | 40 | ||||
-rw-r--r-- | kcontrol/input/xcursor/previewwidget.h | 8 | ||||
-rw-r--r-- | kcontrol/input/xcursor/themepage.cpp | 160 | ||||
-rw-r--r-- | kcontrol/input/xcursor/themepage.h | 26 |
11 files changed, 271 insertions, 271 deletions
diff --git a/kcontrol/input/core/themepage.cpp b/kcontrol/input/core/themepage.cpp index d83b28cb7..a2b5f1b86 100644 --- a/kcontrol/input/core/themepage.cpp +++ b/kcontrol/input/core/themepage.cpp @@ -31,11 +31,11 @@ #include <klistview.h> #include <kdialog.h> -#include <qlayout.h> -#include <qdir.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqlabel.h> #include "themepage.h" #include "themepage.moc" @@ -49,15 +49,15 @@ namespace { } -ThemePage::ThemePage( QWidget* parent, const char* name ) - : QWidget( parent, name ) +ThemePage::ThemePage( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { - QBoxLayout *layout = new QVBoxLayout( this ); + TQBoxLayout *layout = new TQVBoxLayout( this ); layout->setAutoAdd( true ); layout->setMargin( KDialog::marginHint() ); layout->setSpacing( KDialog::spacingHint() ); - new QLabel( i18n("Select the cursor theme you want to use:"), this ); + new TQLabel( i18n("Select the cursor theme you want to use:"), this ); // Create the theme list view listview = new KListView( this ); @@ -66,8 +66,8 @@ ThemePage::ThemePage( QWidget* parent, const char* name ) listview->addColumn( i18n("Name") ); listview->addColumn( i18n("Description") ); - connect( listview, SIGNAL(selectionChanged(QListViewItem*)), - SLOT(selectionChanged(QListViewItem*)) ); + connect( listview, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + TQT_SLOT(selectionChanged(TQListViewItem*)) ); insertThemes(); } @@ -78,7 +78,7 @@ ThemePage::~ThemePage() } -void ThemePage::selectionChanged( QListViewItem *item ) +void ThemePage::selectionChanged( TQListViewItem *item ) { selectedTheme = item->text( DirColumn ); emit changed( selectedTheme != currentTheme ); @@ -130,7 +130,7 @@ void ThemePage::load( bool useDefaults ) currentTheme = whiteCursor ? "SmallWhite" : "SmallBlack"; selectedTheme = currentTheme; - QListViewItem *item = listview->findItem( currentTheme, DirColumn ); + TQListViewItem *item = listview->findItem( currentTheme, DirColumn ); item->setSelected( true ); } @@ -147,22 +147,22 @@ void ThemePage::insertThemes() item = new KListViewItem( listview, i18n("Small black"), i18n("Small black cursors"), "SmallBlack" ); - item->setPixmap( 0, QPixmap( arrow_small_black_xpm ) ); + item->setPixmap( 0, TQPixmap( arrow_small_black_xpm ) ); listview->insertItem( item ); item = new KListViewItem( listview, i18n("Large black"), i18n("Large black cursors"), "LargeBlack" ); - item->setPixmap( 0, QPixmap( arrow_large_black_xpm ) ); + item->setPixmap( 0, TQPixmap( arrow_large_black_xpm ) ); listview->insertItem( item ); item = new KListViewItem( listview, i18n("Small white"), i18n("Small white cursors"), "SmallWhite" ); - item->setPixmap( 0, QPixmap( arrow_small_white_xpm ) ); + item->setPixmap( 0, TQPixmap( arrow_small_white_xpm ) ); listview->insertItem( item ); item = new KListViewItem( listview, i18n("Large white"), i18n("Large white cursors"), "LargeWhite" ); - item->setPixmap( 0, QPixmap( arrow_large_white_xpm ) ); + item->setPixmap( 0, TQPixmap( arrow_large_white_xpm ) ); listview->insertItem( item ); } @@ -179,8 +179,8 @@ void ThemePage::fixCursorFile() // Run mkfontdir to update fonts.dir in that dir. KGlobal::dirs()->addResourceType( "font", "share/fonts/" ); - KIO::mkdir( KURL::fromPathOrURL(QDir::homeDirPath() + "/.fonts/kde-override") ); - QString overrideDir = QDir::homeDirPath() + "/.fonts/kde-override/"; + KIO::mkdir( KURL::fromPathOrURL(TQDir::homeDirPath() + "/.fonts/kde-override") ); + TQString overrideDir = TQDir::homeDirPath() + "/.fonts/kde-override/"; KURL installedFont; installedFont.setPath( overrideDir + "cursor.pcf.gz" ); @@ -200,7 +200,7 @@ void ThemePage::fixCursorFile() KIO::NetAccess::file_copy( source, installedFont, -1, true ); } - QString cmd = KGlobal::dirs()->findExe( "mkfontdir" ); + TQString cmd = KGlobal::dirs()->findExe( "mkfontdir" ); if ( !cmd.isEmpty() ) { KProcess p; diff --git a/kcontrol/input/core/themepage.h b/kcontrol/input/core/themepage.h index 491c11f75..b4c964037 100644 --- a/kcontrol/input/core/themepage.h +++ b/kcontrol/input/core/themepage.h @@ -27,7 +27,7 @@ class ThemePage : public QWidget Q_OBJECT public: - ThemePage( QWidget* parent = 0, const char* name = 0 ); + ThemePage( TQWidget* parent = 0, const char* name = 0 ); ~ThemePage(); // Called by the KCM @@ -40,14 +40,14 @@ class ThemePage : public QWidget void changed( bool ); private slots: - void selectionChanged( QListViewItem * ); + void selectionChanged( TQListViewItem * ); private: void insertThemes(); void fixCursorFile(); KListView *listview; - QString currentTheme, selectedTheme; + TQString currentTheme, selectedTheme; }; #endif // __THEMEPAGE_H diff --git a/kcontrol/input/logitechmouse.cpp b/kcontrol/input/logitechmouse.cpp index 1b8132a7e..9fc8daf32 100644 --- a/kcontrol/input/logitechmouse.cpp +++ b/kcontrol/input/logitechmouse.cpp @@ -19,15 +19,15 @@ */ -#include <qdialog.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qwidget.h> -#include <qlayout.h> -#include <qprogressbar.h> -#include <qtimer.h> +#include <tqdialog.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqprogressbar.h> +#include <tqtimer.h> #include <kdebug.h> #include <kdialog.h> @@ -41,7 +41,7 @@ #include "logitechmouse.h" -LogitechMouse::LogitechMouse( struct usb_device *usbDev, int mouseCapabilityFlags, QWidget* parent, const char* name ) +LogitechMouse::LogitechMouse( struct usb_device *usbDev, int mouseCapabilityFlags, TQWidget* parent, const char* name ) : LogitechMouseBase( parent, name, 0 ) { if ( !name ) @@ -70,8 +70,8 @@ LogitechMouse::LogitechMouse( struct usb_device *usbDev, int mouseCapabilityFlag updateResolution(); resolutionSelector->setEnabled( TRUE ); - connect( button400cpi, SIGNAL( clicked() ), parent, SLOT( changed() ) ); - connect( button800cpi, SIGNAL( clicked() ), parent, SLOT( changed() ) ); + connect( button400cpi, TQT_SIGNAL( clicked() ), parent, TQT_SLOT( changed() ) ); + connect( button800cpi, TQT_SIGNAL( clicked() ), parent, TQT_SLOT( changed() ) ); if ( 4 == resolution() ) { button800cpi->setChecked( TRUE ); @@ -100,12 +100,12 @@ LogitechMouse::LogitechMouse( struct usb_device *usbDev, int mouseCapabilityFlag // if the channel is changed, we need to turn off the timer, otherwise it // just resets the button to reflect the current status. The timer is // started again when we applyChanges() - connect( channel1, SIGNAL( clicked() ), this, SLOT( stopTimerForNow() ) ); - connect( channel1, SIGNAL( clicked() ), parent, SLOT( changed() ) ); + connect( channel1, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stopTimerForNow() ) ); + connect( channel1, TQT_SIGNAL( clicked() ), parent, TQT_SLOT( changed() ) ); if ( isDualChannelCapable() ) { channel2->setEnabled( TRUE ); - connect( channel2, SIGNAL( clicked() ), this, SLOT( stopTimerForNow() ) ); - connect( channel2, SIGNAL( clicked() ), parent, SLOT( changed() ) ); + connect( channel2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stopTimerForNow() ) ); + connect( channel2, TQT_SIGNAL( clicked() ), parent, TQT_SLOT( changed() ) ); } updateGUI(); @@ -121,14 +121,14 @@ LogitechMouse::~LogitechMouse() void LogitechMouse::initCordlessStatusReporting() { updateCordlessStatus(); - doUpdate = new QTimer( this ); // will be automatically deleted - connect( doUpdate, SIGNAL( timeout() ), this, SLOT( updateGUI() ) ); + doUpdate = new TQTimer( this ); // will be automatically deleted + connect( doUpdate, TQT_SIGNAL( timeout() ), this, TQT_SLOT( updateGUI() ) ); doUpdate->start( 20000 ); } void LogitechMouse::updateCordlessStatus() { - QByteArray status(8); + TQByteArray status(8); int result = usb_control_msg( m_usbDeviceHandle, USB_TYPE_VENDOR | USB_ENDPOINT_IN,0x09, @@ -349,7 +349,7 @@ void LogitechMouse::setChannel2() } -QString LogitechMouse::cordlessName() +TQString LogitechMouse::cordlessName() { switch ( m_cordlessNameIndex ) { case 0x00: diff --git a/kcontrol/input/logitechmouse.h b/kcontrol/input/logitechmouse.h index 8c7ef06d3..4ea296725 100644 --- a/kcontrol/input/logitechmouse.h +++ b/kcontrol/input/logitechmouse.h @@ -22,11 +22,11 @@ #ifndef __LOGITECHMOUSE_H__ #define __LOGITECHMOUSE_H__ -#include <qdialog.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> +#include <tqdialog.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> #include <kconfig.h> @@ -49,7 +49,7 @@ class LogitechMouse : public LogitechMouseBase Q_OBJECT public: - LogitechMouse( struct usb_device *usbDev, int mouseCapabilityFlags, QWidget* parent = 0, const char* name = 0 ); + LogitechMouse( struct usb_device *usbDev, int mouseCapabilityFlags, TQWidget* parent = 0, const char* name = 0 ); ~LogitechMouse(); void applyChanges(); void save(KConfig *config); @@ -67,14 +67,14 @@ private: void setLogitechTo400(); void setLogitechTo800(); - QString cordlessName(); + TQString cordlessName(); Q_UINT8 resolution(); void updateResolution(); Q_UINT8 batteryLevel(); Q_UINT8 channel(); bool isDualChannelCapable(); - QTimer *doUpdate; + TQTimer *doUpdate; struct usb_dev_handle *m_usbDeviceHandle; bool m_connectStatus; // true if the CONNECT button on the mouse is pressed @@ -85,7 +85,7 @@ private: // CONNECT button on the receiver was pressed Q_UINT8 m_batteryLevel; Q_UINT8 m_channel; - Q_UINT8 m_cordlessNameIndex; // this gets convered into a QString in cordlessName() + Q_UINT8 m_cordlessNameIndex; // this gets convered into a TQString in cordlessName() Q_UINT16 m_cordlessSecurity; Q_UINT16 m_useSecondChannel; Q_UINT8 m_caseShape; diff --git a/kcontrol/input/main.cpp b/kcontrol/input/main.cpp index f0a464adc..f42498aab 100644 --- a/kcontrol/input/main.cpp +++ b/kcontrol/input/main.cpp @@ -29,7 +29,7 @@ #include <kglobal.h> #include <kconfig.h> #include <dcopref.h> -#include <qfile.h> +#include <tqfile.h> #include <X11/Xlib.h> @@ -41,7 +41,7 @@ extern "C" { - KDE_EXPORT KCModule *create_mouse(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_mouse(TQWidget *parent, const char *) { return new MouseConfig(parent, "kcminput"); } @@ -55,15 +55,15 @@ extern "C" #ifdef HAVE_XCURSOR config->setGroup("Mouse"); - QCString theme = QFile::encodeName(config->readEntry("cursorTheme", QString())); - QCString size = config->readEntry("cursorSize", QString()).local8Bit(); + TQCString theme = TQFile::encodeName(config->readEntry("cursorTheme", TQString())); + TQCString size = config->readEntry("cursorSize", TQString()).local8Bit(); // Note: If you update this code, update kapplymousetheme as well. // use a default value for theme only if it's not configured at all, not even in X resources if( theme.isEmpty() - && QCString( XGetDefault( qt_xdisplay(), "Xcursor", "theme" )).isEmpty() - && QCString( XcursorGetTheme( qt_xdisplay())).isEmpty()) + && TQCString( XGetDefault( qt_xdisplay(), "Xcursor", "theme" )).isEmpty() + && TQCString( XcursorGetTheme( qt_xdisplay())).isEmpty()) { theme = "default"; } @@ -84,9 +84,9 @@ extern "C" // variables when launching applications. DCOPRef klauncher("klauncher"); if( !theme.isEmpty()) - klauncher.send("setLaunchEnv", QCString("XCURSOR_THEME"), theme); + klauncher.send("setLaunchEnv", TQCString("XCURSOR_THEME"), theme); if( !size.isEmpty()) - klauncher.send("setLaunchEnv", QCString("XCURSOR_SIZE"), size); + klauncher.send("setLaunchEnv", TQCString("XCURSOR_SIZE"), size); #endif delete config; diff --git a/kcontrol/input/mouse.cpp b/kcontrol/input/mouse.cpp index 56e737135..68f376474 100644 --- a/kcontrol/input/mouse.cpp +++ b/kcontrol/input/mouse.cpp @@ -47,14 +47,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> #undef Below #undef Above -#include <qslider.h> -#include <qwhatsthis.h> -#include <qtabwidget.h> -#include <qradiobutton.h> +#include <tqslider.h> +#include <tqwhatsthis.h> +#include <tqtabwidget.h> +#include <tqradiobutton.h> #include <klocale.h> #include <kdialog.h> @@ -74,7 +74,7 @@ #undef Below -MouseConfig::MouseConfig (QWidget * parent, const char *name) +MouseConfig::MouseConfig (TQWidget * parent, const char *name) : KCModule(parent, name) { @@ -84,15 +84,15 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) " pointing device may be a mouse, trackball, or some other hardware" " that performs a similar function.")); - QString wtstr; + TQString wtstr; - QBoxLayout *top = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQBoxLayout *top = new TQVBoxLayout(this, 0, KDialog::spacingHint()); - tabwidget = new QTabWidget(this); + tabwidget = new TQTabWidget(this); top->addWidget(tabwidget); tab1 = new KMouseDlg(this); - QButtonGroup *group = new QButtonGroup( tab1 ); + TQButtonGroup *group = new TQButtonGroup( tab1 ); group->setExclusive( true ); group->hide(); group->insert( tab1->singleClick ); @@ -100,8 +100,8 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) tabwidget->addTab(tab1, i18n("&General")); - connect(tab1->handedBox, SIGNAL(clicked(int)), this, SLOT(changed())); - connect(tab1->handedBox, SIGNAL(clicked(int)), this, SLOT(slotHandedChanged(int))); + connect(tab1->handedBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(changed())); + connect(tab1->handedBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotHandedChanged(int))); wtstr = i18n("If you are left-handed, you may prefer to swap the" " functions of the left and right buttons on your pointing device" @@ -109,9 +109,9 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) " has more than two buttons, only those that function as the" " left and right buttons are affected. For example, if you have" " a three-button mouse, the middle button is unaffected."); - QWhatsThis::add( tab1->handedBox, wtstr ); + TQWhatsThis::add( tab1->handedBox, wtstr ); - connect(tab1->doubleClick, SIGNAL(clicked()), SLOT(changed())); + connect(tab1->doubleClick, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); wtstr = i18n("The default behavior in KDE is to select and activate" " icons with a single click of the left button on your pointing" @@ -119,44 +119,44 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) " when you click links in most web browsers. If you would prefer" " to select with a single click, and activate with a double click," " check this option."); - QWhatsThis::add( tab1->doubleClick, wtstr ); + TQWhatsThis::add( tab1->doubleClick, wtstr ); wtstr = i18n("Activates and opens a file or folder with a single click."); - QWhatsThis::add( tab1->singleClick, wtstr ); + TQWhatsThis::add( tab1->singleClick, wtstr ); - connect(tab1->cbAutoSelect, SIGNAL(clicked()), this, SLOT(changed())); + connect(tab1->cbAutoSelect, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); wtstr = i18n("If you check this option, pausing the mouse pointer" " over an icon on the screen will automatically select that icon." " This may be useful when single clicks activate icons, and you" " want only to select the icon without activating it."); - QWhatsThis::add( tab1->cbAutoSelect, wtstr ); + TQWhatsThis::add( tab1->cbAutoSelect, wtstr ); -// slAutoSelect = new QSlider(0, 2000, 10, 0, QSlider::Horizontal, tab1); +// slAutoSelect = new TQSlider(0, 2000, 10, 0, TQSlider::Horizontal, tab1); tab1->slAutoSelect->setSteps( 125, 125 ); - tab1->slAutoSelect->setTickmarks( QSlider::Below ); + tab1->slAutoSelect->setTickmarks( TQSlider::Below ); tab1->slAutoSelect->setTickInterval( 250 ); tab1->slAutoSelect->setTracking( true ); wtstr = i18n("If you have checked the option to automatically select" " icons, this slider allows you to select how long the mouse pointer" " must be paused over the icon before it is selected."); - QWhatsThis::add( tab1->slAutoSelect, wtstr ); + TQWhatsThis::add( tab1->slAutoSelect, wtstr ); wtstr = i18n("Show feedback when clicking an icon"); - QWhatsThis::add( tab1->cbVisualActivate, wtstr ); + TQWhatsThis::add( tab1->cbVisualActivate, wtstr ); - connect(tab1->slAutoSelect, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(tab1->cbVisualActivate, SIGNAL(clicked()), this, SLOT(changed())); + 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, SIGNAL(clicked()), this, SLOT(changed())); + connect(tab1->cb_pointershape, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); - connect(tab1->singleClick, SIGNAL(clicked()), this, SLOT(changed())); - connect(tab1->singleClick, SIGNAL(clicked()), this, SLOT(slotClick())); + connect(tab1->singleClick, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(tab1->singleClick, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClick())); - connect( tab1->doubleClick, SIGNAL( clicked() ), this, SLOT( slotClick() ) ); - connect( tab1->cbAutoSelect, SIGNAL( clicked() ), this, SLOT( slotClick() ) ); + connect( tab1->doubleClick, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClick() ) ); + connect( tab1->cbAutoSelect, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClick() ) ); // Only allow setting reversing scroll polarity if we have scroll buttons unsigned char map[20]; @@ -170,26 +170,26 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) tab1->cbScrollPolarity->setEnabled( false ); tab1->cbScrollPolarity->hide(); } - connect(tab1->cbScrollPolarity, SIGNAL(clicked()), this, SLOT(changed())); - connect(tab1->cbScrollPolarity, SIGNAL(clicked()), this, SLOT(slotScrollPolarityChanged())); + connect(tab1->cbScrollPolarity, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(tab1->cbScrollPolarity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotScrollPolarityChanged())); // Cursor theme tab themetab = new ThemePage(this); - connect(themetab, SIGNAL(changed(bool)), SLOT(changed())); + connect(themetab, TQT_SIGNAL(changed(bool)), TQT_SLOT(changed())); tabwidget->addTab(themetab, i18n("&Cursor Theme")); // Advanced tab - tab2 = new QWidget(0, "Advanced Tab"); + tab2 = new TQWidget(0, "Advanced Tab"); tabwidget->addTab(tab2, i18n("Advanced")); - QBoxLayout *lay = new QVBoxLayout(tab2, KDialog::marginHint(), + TQBoxLayout *lay = new TQVBoxLayout(tab2, KDialog::marginHint(), KDialog::spacingHint()); accel = new KDoubleNumInput(1, 20, 2, 0.1, 1, tab2); accel->setLabel(i18n("Pointer acceleration:")); accel->setSuffix("x"); lay->addWidget(accel); - connect(accel, SIGNAL(valueChanged(double)), this, SLOT(changed())); + connect(accel, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(changed())); wtstr = i18n("This option allows you to change the relationship" " between the distance that the mouse pointer moves on the" @@ -201,15 +201,15 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) " you only make a small movement with the physical device." " Selecting very high values may result in the mouse pointer" " flying across the screen, making it hard to control."); - QWhatsThis::add( accel, wtstr ); + TQWhatsThis::add( accel, wtstr ); thresh = new KIntNumInput(accel, 20, tab2); thresh->setLabel(i18n("Pointer threshold:")); thresh->setRange(0,20,1); thresh->setSteps(1,1); lay->addWidget(thresh); - connect(thresh, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(thresh, SIGNAL(valueChanged(int)), this, SLOT(slotThreshChanged(int))); + connect(thresh, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); + connect(thresh, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotThreshChanged(int))); slotThreshChanged(thresh->value()); wtstr = i18n("The threshold is the smallest distance that the" @@ -221,7 +221,7 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) " of control over the mouse pointer. With larger movements of" " the physical device, you can move the mouse pointer" " rapidly to different areas on the screen."); - QWhatsThis::add( thresh, wtstr ); + TQWhatsThis::add( thresh, wtstr ); // It would be nice if the user had a test field. // Selecting such values in milliseconds is not intuitive @@ -231,7 +231,7 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) doubleClickInterval->setSuffix(i18n(" msec")); doubleClickInterval->setSteps(100, 100); lay->addWidget(doubleClickInterval); - connect(doubleClickInterval, SIGNAL(valueChanged(int)), this, SLOT(changed())); + connect(doubleClickInterval, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); wtstr = i18n("The double click interval is the maximal time" " (in milliseconds) between two mouse clicks which" @@ -239,7 +239,7 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) " click happens later than this time interval after" " the first click, they are recognized as two" " separate clicks."); - QWhatsThis::add( doubleClickInterval, wtstr ); + TQWhatsThis::add( doubleClickInterval, wtstr ); lay->addSpacing(15); @@ -249,54 +249,54 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) dragStartTime->setSuffix(i18n(" msec")); dragStartTime->setSteps(100, 100); lay->addWidget(dragStartTime); - connect(dragStartTime, SIGNAL(valueChanged(int)), this, SLOT(changed())); + connect(dragStartTime, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); wtstr = i18n("If you click with the mouse (e.g. in a multi-line" " editor) and begin to move the mouse within the" " drag start time, a drag operation will be initiated."); - QWhatsThis::add( dragStartTime, wtstr ); + TQWhatsThis::add( dragStartTime, wtstr ); dragStartDist = new KIntNumInput(dragStartTime, 20, tab2); dragStartDist->setLabel(i18n("Drag start distance:")); dragStartDist->setRange(1, 20, 1); dragStartDist->setSteps(1,1); lay->addWidget(dragStartDist); - connect(dragStartDist, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(dragStartDist, SIGNAL(valueChanged(int)), this, SLOT(slotDragStartDistChanged(int))); + connect(dragStartDist, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); + connect(dragStartDist, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDragStartDistChanged(int))); slotDragStartDistChanged(dragStartDist->value()); wtstr = i18n("If you click with the mouse and begin to move the" " mouse at least the drag start distance, a drag" " operation will be initiated."); - QWhatsThis::add( dragStartDist, wtstr); + TQWhatsThis::add( dragStartDist, wtstr); wheelScrollLines = new KIntNumInput(dragStartDist, 3, tab2); wheelScrollLines->setLabel(i18n("Mouse wheel scrolls by:")); wheelScrollLines->setRange(1, 12, 1); wheelScrollLines->setSteps(1,1); lay->addWidget(wheelScrollLines); - connect(wheelScrollLines, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(wheelScrollLines, SIGNAL(valueChanged(int)), SLOT(slotWheelScrollLinesChanged(int))); + connect(wheelScrollLines, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); + connect(wheelScrollLines, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotWheelScrollLinesChanged(int))); slotWheelScrollLinesChanged(wheelScrollLines->value()); wtstr = i18n("If you use the wheel of a mouse, this value determines the number of lines to scroll for each wheel movement. Note that if this number exceeds the number of visible lines, it will be ignored and the wheel movement will be handled as a page up/down movement."); - QWhatsThis::add( wheelScrollLines, wtstr); + TQWhatsThis::add( wheelScrollLines, wtstr); lay->addStretch(); { - QWidget *mouse = new QWidget(this, "Mouse Navigation"); + TQWidget *mouse = new TQWidget(this, "Mouse Navigation"); tabwidget->addTab(mouse, i18n("Mouse Navigation")); - QBoxLayout *vbox = new QVBoxLayout(mouse, KDialog::marginHint(), + TQBoxLayout *vbox = new TQVBoxLayout(mouse, KDialog::marginHint(), KDialog::spacingHint()); - QVBoxLayout *vvbox = new QVBoxLayout(mouse->layout(), KDialog::spacingHint()); + TQVBoxLayout *vvbox = new TQVBoxLayout(mouse->layout(), KDialog::spacingHint()); - mouseKeys = new QCheckBox(i18n("&Move pointer with keyboard (using the num pad)"), mouse); + mouseKeys = new TQCheckBox(i18n("&Move pointer with keyboard (using the num pad)"), mouse); vvbox->addWidget(mouseKeys); - QBoxLayout *hbox = new QHBoxLayout(vvbox, KDialog::spacingHint()); + TQBoxLayout *hbox = new TQHBoxLayout(vvbox, KDialog::spacingHint()); hbox->addSpacing(24); mk_delay = new KIntNumInput(mouse); mk_delay->setLabel(i18n("&Acceleration delay:"), AlignVCenter); @@ -304,7 +304,7 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) mk_delay->setRange(1, 1000, 50); hbox->addWidget(mk_delay); - hbox = new QHBoxLayout(vvbox, KDialog::spacingHint()); + hbox = new TQHBoxLayout(vvbox, KDialog::spacingHint()); hbox->addSpacing(24); mk_interval = new KIntNumInput(mk_delay, 0, mouse); mk_interval->setLabel(i18n("R&epeat interval:"), AlignVCenter); @@ -312,7 +312,7 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) mk_interval->setRange(1, 1000, 10); hbox->addWidget(mk_interval); - hbox = new QHBoxLayout(vvbox, KDialog::spacingHint()); + hbox = new TQHBoxLayout(vvbox, KDialog::spacingHint()); hbox->addSpacing(24); mk_time_to_max = new KIntNumInput(mk_interval, 0, mouse); mk_time_to_max->setLabel(i18n("Acceleration &time:"), AlignVCenter); @@ -320,7 +320,7 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) mk_time_to_max->setSuffix(i18n(" msec")); hbox->addWidget(mk_time_to_max); - hbox = new QHBoxLayout(vvbox, KDialog::spacingHint()); + hbox = new TQHBoxLayout(vvbox, KDialog::spacingHint()); hbox->addSpacing(24); mk_max_speed = new KIntNumInput(mk_time_to_max, 0, mouse); mk_max_speed->setLabel(i18n("Ma&ximum speed:"), AlignVCenter); @@ -328,20 +328,20 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) mk_max_speed->setSuffix(i18n(" pixel/sec")); hbox->addWidget(mk_max_speed); - hbox = new QHBoxLayout(vvbox, KDialog::spacingHint()); + hbox = new TQHBoxLayout(vvbox, KDialog::spacingHint()); hbox->addSpacing(24); mk_curve = new KIntNumInput(mk_max_speed, 0, mouse); mk_curve->setLabel(i18n("Acceleration &profile:"), AlignVCenter); mk_curve->setRange(-1000, 1000, 100); hbox->addWidget(mk_curve); - connect(mouseKeys, SIGNAL(clicked()), this, SLOT(checkAccess())); - connect(mouseKeys, SIGNAL(clicked()), this, SLOT(changed())); - connect(mk_delay, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(mk_interval, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(mk_time_to_max, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(mk_max_speed, SIGNAL(valueChanged(int)), this, SLOT(changed())); - connect(mk_curve, SIGNAL(valueChanged(int)), this, SLOT(changed())); + connect(mouseKeys, TQT_SIGNAL(clicked()), this, TQT_SLOT(checkAccess())); + connect(mouseKeys, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed())); + connect(mk_delay, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); + connect(mk_interval, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); + connect(mk_time_to_max, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); + connect(mk_max_speed, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); + connect(mk_curve, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); vbox->addStretch(); } @@ -355,8 +355,8 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) struct device_table { int idVendor; int idProduct; - QString Model; - QString Name; + TQString Model; + TQString Name; int flags; } device_table[] = { { VENDOR_LOGITECH, 0xC00E, "M-BJ58", "Wheel Mouse Optical", HAS_RES }, @@ -377,7 +377,7 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) { VENDOR_LOGITECH, 0xC50E, "M-RAG97", "MX1000 Laser Mouse", HAS_SS | HAS_CSR }, { VENDOR_LOGITECH, 0xC512, "M-RAK89B", "Cordless Desktop Pro LX700", HAS_CSR | USE_CH2 }, { VENDOR_LOGITECH, 0xC702, "C-UF15", "Receiver for Cordless Presenter", HAS_CSR }, - { 0, 0, QString(), QString(), 0 } + { 0, 0, TQString(), TQString(), 0 } }; usb_init(); @@ -395,7 +395,7 @@ MouseConfig::MouseConfig (QWidget * parent, const char *name) // OK, we have a device that appears to be one of the ones we support LogitechMouse *mouse = new LogitechMouse( dev, device_table[n].flags, this, device_table[n].Name.latin1() ); settings->logitechMouseList.append(mouse); - tabwidget->addTab( (QWidget*)mouse, device_table[n].Name ); + tabwidget->addTab( (TQWidget*)mouse, device_table[n].Name ); } } } @@ -682,7 +682,7 @@ void MouseSettings::load(KConfig *config) else thresholdMove = t; - QString key = config->readEntry("MouseButtonMapping"); + TQString key = config->readEntry("MouseButtonMapping"); if (key == "RightHanded") handed = RIGHT_HANDED; else if (key == "LeftHanded") @@ -805,9 +805,9 @@ void MouseSettings::save(KConfig *config) config->writeEntry("Acceleration",accelRate); config->writeEntry("Threshold",thresholdMove); if (handed == RIGHT_HANDED) - config->writeEntry("MouseButtonMapping",QString("RightHanded")); + config->writeEntry("MouseButtonMapping",TQString("RightHanded")); else - config->writeEntry("MouseButtonMapping",QString("LeftHanded")); + config->writeEntry("MouseButtonMapping",TQString("LeftHanded")); config->writeEntry( "ReverseScrollPolarity", reverseScrollPolarity ); config->setGroup("KDE"); diff --git a/kcontrol/input/mouse.h b/kcontrol/input/mouse.h index 005c7a2fc..749351f19 100644 --- a/kcontrol/input/mouse.h +++ b/kcontrol/input/mouse.h @@ -31,12 +31,12 @@ #ifndef __MOUSECONFIG_H__ #define __MOUSECONFIG_H__ -#include <qbuttongroup.h> -#include <qdialog.h> -#include <qlabel.h> -#include <qlcdnumber.h> -#include <qpushbutton.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqdialog.h> +#include <tqlabel.h> +#include <tqlcdnumber.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> #include <kapplication.h> @@ -85,7 +85,7 @@ public: #ifdef HAVE_LIBUSB // TODO: In Qt4, replace with a better container. - QPtrList <LogitechMouse> logitechMouseList; + TQPtrList <LogitechMouse> logitechMouseList; #endif }; @@ -93,7 +93,7 @@ class MouseConfig : public KCModule { Q_OBJECT public: - MouseConfig(QWidget *parent=0, const char* name=0); + MouseConfig(TQWidget *parent=0, const char* name=0); ~MouseConfig(); void save(); @@ -129,23 +129,23 @@ private: KIntNumInput *dragStartDist; KIntNumInput *wheelScrollLines; - QButtonGroup *handedBox; -// QRadioButton *leftHanded, *rightHanded; -// QCheckBox *doubleClick; -// QCheckBox *cbAutoSelect; - QLabel *lDelay; -// QSlider *slAutoSelect; -// QCheckBox *cbVisualActivate; -// QCheckBox *cbCursor; -// QCheckBox *cbLargeCursor; - - QTabWidget *tabwidget; - QWidget *tab2; + TQButtonGroup *handedBox; +// TQRadioButton *leftHanded, *rightHanded; +// TQCheckBox *doubleClick; +// TQCheckBox *cbAutoSelect; + TQLabel *lDelay; +// TQSlider *slAutoSelect; +// TQCheckBox *cbVisualActivate; +// TQCheckBox *cbCursor; +// TQCheckBox *cbLargeCursor; + + TQTabWidget *tabwidget; + TQWidget *tab2; KMouseDlg* tab1; ThemePage* themetab; MouseSettings *settings; - QCheckBox *mouseKeys; + TQCheckBox *mouseKeys; KIntNumInput *mk_delay, *mk_interval, *mk_time_to_max, *mk_max_speed, *mk_curve; diff --git a/kcontrol/input/xcursor/previewwidget.cpp b/kcontrol/input/xcursor/previewwidget.cpp index 36108ef36..ceb399648 100644 --- a/kcontrol/input/xcursor/previewwidget.cpp +++ b/kcontrol/input/xcursor/previewwidget.cpp @@ -18,11 +18,11 @@ #include <kglobal.h> -#include <qwidget.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstring.h> -#include <qcursor.h> +#include <tqwidget.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstring.h> +#include <tqcursor.h> #include <kglobal.h> @@ -91,7 +91,7 @@ class PreviewCursor PreviewCursor(); ~PreviewCursor(); - void load( const QString &, const QString & ); + void load( const TQString &, const TQString & ); const Picture picture() const { return m_pict; } const Cursor handle() const { return m_handle; } const int width() const { return m_width; } @@ -113,9 +113,9 @@ PreviewCursor::PreviewCursor() : } -void PreviewCursor::load( const QString &name, const QString &theme ) +void PreviewCursor::load( const TQString &name, const TQString &theme ) { - Display *dpy = QPaintDevice::x11AppDisplay(); + Display *dpy = TQPaintDevice::x11AppDisplay(); if ( m_pict ) XRenderFreePicture( dpy, m_pict ); if ( m_handle ) XFreeCursor( dpy, m_handle ); @@ -176,14 +176,14 @@ void PreviewCursor::load( const QString &name, const QString &theme ) PreviewCursor::~PreviewCursor() { - if ( m_handle ) XFreeCursor( QPaintDevice::x11AppDisplay(), m_handle ); - if ( m_pict ) XRenderFreePicture( QPaintDevice::x11AppDisplay(), m_pict ); + if ( m_handle ) XFreeCursor( TQPaintDevice::x11AppDisplay(), m_handle ); + if ( m_pict ) XRenderFreePicture( TQPaintDevice::x11AppDisplay(), m_pict ); } Picture PreviewCursor::createPicture( const XcursorImage* image ) const { - Display *dpy = QPaintDevice::x11AppDisplay(); + Display *dpy = TQPaintDevice::x11AppDisplay(); XImage ximage; ximage.width = image->width; @@ -221,7 +221,7 @@ Picture PreviewCursor::createPicture( const XcursorImage* image ) const void PreviewCursor::cropCursorImage( XcursorImage *&image ) const { // Calculate the auto-crop rectangle - QRect r( QPoint( image->width, image->height ), QPoint() ); + TQRect r( TQPoint( image->width, image->height ), TQPoint() ); XcursorPixel *pixels = image->pixels; for ( int y = 0; y < int(image->height); y++ ) { for ( int x = 0; x < int(image->width); x++ ) { @@ -262,8 +262,8 @@ void PreviewCursor::cropCursorImage( XcursorImage *&image ) const -PreviewWidget::PreviewWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +PreviewWidget::PreviewWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { cursors = new PreviewCursor* [ numCursors ]; for ( int i = 0; i < numCursors; i++ ) @@ -284,7 +284,7 @@ PreviewWidget::~PreviewWidget() } -void PreviewWidget::setTheme( const QString &theme ) +void PreviewWidget::setTheme( const TQString &theme ) { setUpdatesEnabled( false ); @@ -307,11 +307,11 @@ void PreviewWidget::setTheme( const QString &theme ) } -void PreviewWidget::paintEvent( QPaintEvent * ) +void PreviewWidget::paintEvent( TQPaintEvent * ) { - QPixmap buffer( size() ); - QPainter p( &buffer ); - p.fillRect( rect(), colorGroup().brush( QColorGroup::Background ) ); + TQPixmap buffer( size() ); + TQPainter p( &buffer ); + p.fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) ); Picture dest; if ( !qt_has_xft || !qt_use_xrender ) { @@ -339,7 +339,7 @@ void PreviewWidget::paintEvent( QPaintEvent * ) } -void PreviewWidget::mouseMoveEvent( QMouseEvent *e ) +void PreviewWidget::mouseMoveEvent( TQMouseEvent *e ) { int pos = e->x() / ( width() / numCursors ); diff --git a/kcontrol/input/xcursor/previewwidget.h b/kcontrol/input/xcursor/previewwidget.h index 1c1d12c0f..a3db01d88 100644 --- a/kcontrol/input/xcursor/previewwidget.h +++ b/kcontrol/input/xcursor/previewwidget.h @@ -27,13 +27,13 @@ class PreviewCursor; class PreviewWidget : public QWidget { public: - PreviewWidget( QWidget *parent = NULL, const char *name = NULL ); + PreviewWidget( TQWidget *parent = NULL, const char *name = NULL ); ~PreviewWidget(); - void setTheme( const QString & ); + void setTheme( const TQString & ); - void paintEvent( QPaintEvent * ); - void mouseMoveEvent( QMouseEvent * ); + void paintEvent( TQPaintEvent * ); + void mouseMoveEvent( TQMouseEvent * ); private: PreviewCursor **cursors; diff --git a/kcontrol/input/xcursor/themepage.cpp b/kcontrol/input/xcursor/themepage.cpp index 96e3e6871..4fb8b8a69 100644 --- a/kcontrol/input/xcursor/themepage.cpp +++ b/kcontrol/input/xcursor/themepage.cpp @@ -33,15 +33,15 @@ #include <kio/netaccess.h> #include <ktar.h> -#include <qlayout.h> -#include <qdir.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qlabel.h> -#include <qhbox.h> -#include <qpainter.h> -#include <qfileinfo.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqdir.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqhbox.h> +#include <tqpainter.h> +#include <tqfileinfo.h> +#include <tqpushbutton.h> #include <cstdlib> // for getenv() @@ -68,23 +68,23 @@ namespace { } struct ThemeInfo { - QString path; // Path to the cursor theme + TQString path; // Path to the cursor theme bool writable; // Theme directory is writable }; -ThemePage::ThemePage( QWidget* parent, const char* name ) - : QWidget( parent, name ), selectedTheme( NULL ), currentTheme( NULL ) +ThemePage::ThemePage( TQWidget* parent, const char* name ) + : TQWidget( parent, name ), selectedTheme( NULL ), currentTheme( NULL ) { - QBoxLayout *layout = new QVBoxLayout( this ); + TQBoxLayout *layout = new TQVBoxLayout( this ); layout->setAutoAdd( true ); layout->setMargin( KDialog::marginHint() ); layout->setSpacing( KDialog::spacingHint() ); - new QLabel( i18n("Select the cursor theme you want to use (hover preview to test cursor):"), this ); + new TQLabel( i18n("Select the cursor theme you want to use (hover preview to test cursor):"), this ); // Create the preview widget - preview = new PreviewWidget( new QHBox( this ) ); + preview = new PreviewWidget( new TQHBox( this ) ); // Create the theme list view listview = new KListView( this ); @@ -93,26 +93,26 @@ ThemePage::ThemePage( QWidget* parent, const char* name ) listview->addColumn( i18n("Name") ); listview->addColumn( i18n("Description") ); - connect( listview, SIGNAL(selectionChanged(QListViewItem*)), - SLOT(selectionChanged(QListViewItem*)) ); + connect( listview, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + TQT_SLOT(selectionChanged(TQListViewItem*)) ); themeDirs = getThemeBaseDirs(); insertThemes(); - QHBox *hbox = new QHBox( this ); + TQHBox *hbox = new TQHBox( this ); hbox->setSpacing( KDialog::spacingHint() ); - installButton = new QPushButton( i18n("Install New Theme..."), hbox ); - removeButton = new QPushButton( i18n("Remove Theme"), hbox ); + installButton = new TQPushButton( i18n("Install New Theme..."), hbox ); + removeButton = new TQPushButton( i18n("Remove Theme"), hbox ); - connect( installButton, SIGNAL( clicked() ), SLOT( installClicked() ) ); - connect( removeButton, SIGNAL( clicked() ), SLOT( removeClicked() ) ); + connect( installButton, TQT_SIGNAL( clicked() ), TQT_SLOT( installClicked() ) ); + connect( removeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeClicked() ) ); // Disable the install button if ~/.icons isn't writable - QString path = QDir::homeDirPath() + "/.icons"; - QFileInfo icons = QFileInfo( path ); + TQString path = TQDir::homeDirPath() + "/.icons"; + TQFileInfo icons = TQFileInfo( path ); if ( ( icons.exists() && !icons.isWritable() ) || - ( !icons.exists() && !QFileInfo( QDir::homeDirPath() ).isWritable() ) ) + ( !icons.exists() && !TQFileInfo( TQDir::homeDirPath() ).isWritable() ) ) installButton->setEnabled( false ); if ( !themeDirs.contains( path ) ) @@ -134,7 +134,7 @@ void ThemePage::save() KConfig c( "kcminputrc" ); c.setGroup( "Mouse" ); - c.writeEntry( "cursorTheme", selectedTheme != "system" ? selectedTheme : QString::null ); + c.writeEntry( "cursorTheme", selectedTheme != "system" ? selectedTheme : TQString::null ); KMessageBox::information( this, i18n("You have to restart KDE for these " "changes to take effect."), i18n("Cursor Settings Changed"), @@ -163,7 +163,7 @@ void ThemePage::load( bool useDefaults ) currentTheme = "system"; // Find the theme in the listview and select it - QListViewItem *item = listview->findItem( currentTheme, DirColumn ); + TQListViewItem *item = listview->findItem( currentTheme, DirColumn ); if( !item ) item = listview->findItem( "system", DirColumn ); selectedTheme = item->text( DirColumn ); @@ -186,7 +186,7 @@ void ThemePage::defaults() } -void ThemePage::selectionChanged( QListViewItem *item ) +void ThemePage::selectionChanged( TQListViewItem *item ) { if ( !item ) { @@ -209,13 +209,13 @@ void ThemePage::selectionChanged( QListViewItem *item ) void ThemePage::installClicked() { // Get the URL for the theme we're going to install - KURL url = KURLRequesterDlg::getURL( QString::null, this, i18n( "Drag or Type Theme URL" ) ); + KURL url = KURLRequesterDlg::getURL( TQString::null, this, i18n( "Drag or Type Theme URL" ) ); if ( url.isEmpty() ) return; - QString tmpFile; + TQString tmpFile; if ( !KIO::NetAccess::download( url, tmpFile, this ) ) { - QString text; + TQString text; if ( url.isLocalFile() ) text = i18n( "Unable to find the cursor theme archive %1." ); @@ -237,7 +237,7 @@ void ThemePage::installClicked() void ThemePage::removeClicked() { - QString question = i18n( "<qt>Are you sure you want to remove the " + TQString question = i18n( "<qt>Are you sure you want to remove the " "<strong>%1</strong> cursor theme?<br>" "This will delete all the files installed by this theme.</qt>") .arg( listview->currentItem()->text( NameColumn ) ); @@ -266,7 +266,7 @@ void ThemePage::removeClicked() } -bool ThemePage::installThemes( const QString &file ) +bool ThemePage::installThemes( const TQString &file ) { KTar archive( file ); @@ -274,10 +274,10 @@ bool ThemePage::installThemes( const QString &file ) return false; const KArchiveDirectory *archiveDir = archive.directory(); - QStringList themeDirs; + TQStringList themeDirs; - const QStringList entries = archiveDir->entries(); - for ( QStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it ) + const TQStringList entries = archiveDir->entries(); + for ( TQStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it ) { const KArchiveEntry *entry = archiveDir->entry( *it ); if ( entry->isDirectory() && entry->name().lower() != "default" ) { @@ -290,14 +290,14 @@ bool ThemePage::installThemes( const QString &file ) if ( themeDirs.count() < 1 ) return false; - const QString destDir = QDir::homeDirPath() + "/.icons/"; + const TQString destDir = TQDir::homeDirPath() + "/.icons/"; KStandardDirs::makeDir( destDir ); // Make sure the directory exists - for ( QStringList::ConstIterator it = themeDirs.begin(); it != themeDirs.end(); ++it ) + for ( TQStringList::ConstIterator it = themeDirs.begin(); it != themeDirs.end(); ++it ) { // Check if a theme with that name already exists - if ( QDir( destDir ).exists( *it ) ) { - const QString question = i18n( "A theme named %1 already exists in your icon " + if ( TQDir( destDir ).exists( *it ) ) { + const TQString question = i18n( "A theme named %1 already exists in your icon " "theme folder. Do you want replace it with this one?" ).arg( *it ); int answer = KMessageBox::warningContinueCancel( this, question, i18n( "Overwrite Theme?"), i18n("Replace") ); if ( answer != KMessageBox::Continue ) @@ -314,7 +314,7 @@ bool ThemePage::installThemes( const QString &file ) // result in strange side effects (from the average users point of view). OTOH // a user might want to do this 'upgrade' a global theme. - const QString dest = destDir + *it; + const TQString dest = destDir + *it; const KArchiveDirectory *dir = static_cast< const KArchiveDirectory* >( archiveDir->entry( *it ) ); dir->copyTo( dest ); insertTheme( dest ); @@ -327,14 +327,14 @@ bool ThemePage::installThemes( const QString &file ) } -void ThemePage::insertTheme( const QString &path ) +void ThemePage::insertTheme( const TQString &path ) { - QString dirName = QDir( path ).dirName(); + TQString dirName = TQDir( path ).dirName(); // Defaults in case there's no name or comment field. - QString name = dirName; - QString desc = i18n( "No description available" ); - QString sample = "left_ptr"; + TQString name = dirName; + TQString desc = i18n( "No description available" ); + TQString sample = "left_ptr"; KSimpleConfig c( path + "/index.theme", true ); // Open read-only c.setGroup( "Icon Theme" ); @@ -373,11 +373,11 @@ void ThemePage::insertTheme( const QString &path ) } -const QStringList ThemePage::getThemeBaseDirs() const +const TQStringList ThemePage::getThemeBaseDirs() const { #if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR < 1 // These are the default paths Xcursor will scan for cursor themes - QString path( "~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons" ); + TQString path( "~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons" ); // If XCURSOR_PATH is set, use that instead of the default path char *xcursorPath = std::getenv( "XCURSOR_PATH" ); @@ -385,35 +385,35 @@ const QStringList ThemePage::getThemeBaseDirs() const path = xcursorPath; #else // Get the search patch from Xcursor - QString path = XcursorLibraryPath(); + TQString path = XcursorLibraryPath(); #endif // Expand all occurences of ~ to the home dir - path.replace( "~/", QDir::homeDirPath() + '/' ); - return QStringList::split( ':', path ); + path.replace( "~/", TQDir::homeDirPath() + '/' ); + return TQStringList::split( ':', path ); } -bool ThemePage::isCursorTheme( const QString &theme, const int depth ) const +bool ThemePage::isCursorTheme( const TQString &theme, const int depth ) const { // Prevent infinate recursion if ( depth > 10 ) return false; // Search each icon theme directory for 'theme' - for ( QStringList::ConstIterator it = themeDirs.begin(); it != themeDirs.end(); ++it ) + for ( TQStringList::ConstIterator it = themeDirs.begin(); it != themeDirs.end(); ++it ) { - QDir dir( *it ); + TQDir dir( *it ); if ( !dir.exists() ) continue; - const QStringList subdirs( dir.entryList( QDir::Dirs ) ); + const TQStringList subdirs( dir.entryList( TQDir::Dirs ) ); if ( subdirs.contains( theme ) ) { - const QString path = *it + '/' + theme; - const QString indexfile = path + "/index.theme"; + const TQString path = *it + '/' + theme; + const TQString indexfile = path + "/index.theme"; const bool haveIndexFile = dir.exists( indexfile ); const bool haveCursors = dir.exists( path + "/cursors" ); - QStringList inherit; + TQStringList inherit; // Return true if we have a cursors subdirectory if ( haveCursors ) @@ -428,7 +428,7 @@ bool ThemePage::isCursorTheme( const QString &theme, const int depth ) const } // Recurse through the list of inherited themes - for ( QStringList::ConstIterator it2 = inherit.begin(); it2 != inherit.end(); ++it2 ) + for ( TQStringList::ConstIterator it2 = inherit.begin(); it2 != inherit.end(); ++it2 ) { if ( *it2 == theme ) // Avoid possible DoS continue; @@ -448,17 +448,17 @@ void ThemePage::insertThemes() // Scan each base dir for cursor themes and add them to the listview. // An icon theme is considered to be a cursor theme if it contains // a cursors subdirectory or if it inherits a cursor theme. - for ( QStringList::ConstIterator it = themeDirs.begin(); it != themeDirs.end(); ++it ) + for ( TQStringList::ConstIterator it = themeDirs.begin(); it != themeDirs.end(); ++it ) { - QDir dir( *it ); + TQDir dir( *it ); if ( !dir.exists() ) continue; - QStringList subdirs( dir.entryList( QDir::Dirs ) ); + TQStringList subdirs( dir.entryList( TQDir::Dirs ) ); subdirs.remove( "." ); subdirs.remove( ".." ); - for ( QStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it ) + for ( TQStringList::ConstIterator it = subdirs.begin(); it != subdirs.end(); ++it ) { // Only add the theme if we don't already have a theme with that name // in the list. Xcursor will use the first theme it finds in that @@ -467,8 +467,8 @@ void ThemePage::insertThemes() if ( listview->findItem( *it, DirColumn ) ) continue; - const QString path = dir.path() + '/' + *it; - const QString indexfile = path + "/index.theme"; + const TQString path = dir.path() + '/' + *it; + const TQString indexfile = path + "/index.theme"; const bool haveIndexFile = dir.exists( *it + "/index.theme" ); const bool haveCursors = dir.exists( *it + "/cursors" ); @@ -479,9 +479,9 @@ void ThemePage::insertThemes() // Defaults in case there's no index.theme file or it lacks // a name and a comment field. - QString name = *it; - QString desc = i18n( "No description available" ); - QString sample = "left_ptr"; + TQString name = *it; + TQString desc = i18n( "No description available" ); + TQString sample = "left_ptr"; // Parse the index.theme file if the theme has one. if ( haveIndexFile ) @@ -498,8 +498,8 @@ void ThemePage::insertThemes() if ( !haveCursors ) { bool result = false; - QStringList inherit = c.readListEntry( "Inherits" ); - for ( QStringList::ConstIterator it2 = inherit.begin(); it2 != inherit.end(); ++it2 ) + TQStringList inherit = c.readListEntry( "Inherits" ); + for ( TQStringList::ConstIterator it2 = inherit.begin(); it2 != inherit.end(); ++it2 ) if ( result = isCursorTheme( *it2 ) ) break; @@ -518,7 +518,7 @@ void ThemePage::insertThemes() // Create a ThemeInfo object, and fill in the members ThemeInfo *info = new ThemeInfo; info->path = path; - info->writable = QFileInfo( path ).isWritable(); + info->writable = TQFileInfo( path ).isWritable(); themeInfo.insert( *it, info ); // Create the listview item and insert it into the list. @@ -542,10 +542,10 @@ void ThemePage::insertThemes() } -QPixmap ThemePage::createIcon( const QString &theme, const QString &sample ) const +TQPixmap ThemePage::createIcon( const TQString &theme, const TQString &sample ) const { XcursorImage *xcur; - QPixmap pix; + TQPixmap pix; xcur = XcursorLibraryLoadImage( sample.latin1(), theme.latin1(), iconSize ); if ( !xcur ) xcur = XcursorLibraryLoadImage( "left_ptr", theme.latin1(), iconSize ); @@ -553,7 +553,7 @@ QPixmap ThemePage::createIcon( const QString &theme, const QString &sample ) con if ( xcur ) { // Calculate an auto-crop rectangle for the cursor image // (helps with cursors converted from windows .cur or .ani files) - QRect r( QPoint( xcur->width, xcur->height ), QPoint() ); + TQRect r( TQPoint( xcur->width, xcur->height ), TQPoint() ); XcursorPixel *src = xcur->pixels; for ( int y = 0; y < int( xcur->height ); y++ ) { @@ -574,7 +574,7 @@ QPixmap ThemePage::createIcon( const QString &theme, const QString &sample ) con int size = kMax( iconSize, kMax( r.width(), r.height() ) ); // Create the intermediate QImage - QImage image( size, size, 32 ); + TQImage image( size, size, 32 ); image.setAlphaBuffer( true ); // Clear the image @@ -583,13 +583,13 @@ QPixmap ThemePage::createIcon( const QString &theme, const QString &sample ) con dst[i] = 0; // Compute the source and destination offsets - QPoint dstOffset( (image.width() - r.width()) / 2, (image.height() - r.height()) / 2 ); - QPoint srcOffset( r.topLeft() ); + TQPoint dstOffset( (image.width() - r.width()) / 2, (image.height() - r.height()) / 2 ); + TQPoint srcOffset( r.topLeft() ); dst = reinterpret_cast<Q_UINT32*>( image.scanLine(dstOffset.y()) ) + dstOffset.x(); src = reinterpret_cast<Q_UINT32*>( xcur->pixels ) + srcOffset.y() * xcur->width + srcOffset.x(); - // Copy the XcursorImage into the QImage, converting it from premultiplied + // 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++ ) { @@ -614,13 +614,13 @@ QPixmap ThemePage::createIcon( const QString &theme, const QString &sample ) con // Scale down the image if we need to if ( image.width() > iconSize || image.height() > iconSize ) - image = image.smoothScale( iconSize, iconSize, QImage::ScaleMin ); + image = image.smoothScale( iconSize, iconSize, TQImage::ScaleMin ); pix.convertFromImage( image ); XcursorImageDestroy( xcur ); } else { - QImage image( iconSize, iconSize, 32 ); + TQImage image( iconSize, iconSize, 32 ); image.setAlphaBuffer( true ); Q_UINT32 *data = reinterpret_cast< Q_UINT32* >( image.bits() ); diff --git a/kcontrol/input/xcursor/themepage.h b/kcontrol/input/xcursor/themepage.h index 7d4dec675..95ee12fd9 100644 --- a/kcontrol/input/xcursor/themepage.h +++ b/kcontrol/input/xcursor/themepage.h @@ -19,7 +19,7 @@ #ifndef __THEMEPAGE_H #define __THEMEPAGE_H -#include <qdict.h> +#include <tqdict.h> class KListView; @@ -37,7 +37,7 @@ class ThemePage : public QWidget Q_OBJECT public: - ThemePage( QWidget* parent = 0, const char* name = 0 ); + ThemePage( TQWidget* parent = 0, const char* name = 0 ); ~ThemePage(); // Called by the KCM @@ -50,25 +50,25 @@ class ThemePage : public QWidget void changed( bool ); private slots: - void selectionChanged( QListViewItem * ); + void selectionChanged( TQListViewItem * ); void installClicked(); void removeClicked(); private: - bool installThemes( const QString &file ); - void insertTheme( const QString & ); - const QStringList getThemeBaseDirs() const; - bool isCursorTheme( const QString &theme, const int depth = 0 ) const; + bool installThemes( const TQString &file ); + void insertTheme( const TQString & ); + const TQStringList getThemeBaseDirs() const; + bool isCursorTheme( const TQString &theme, const int depth = 0 ) const; void insertThemes(); - QPixmap createIcon( const QString &, const QString & ) const; + TQPixmap createIcon( const TQString &, const TQString & ) const; KListView *listview; PreviewWidget *preview; - QPushButton *installButton, *removeButton; - QString selectedTheme; - QString currentTheme; - QStringList themeDirs; - QDict<ThemeInfo> themeInfo; + TQPushButton *installButton, *removeButton; + TQString selectedTheme; + TQString currentTheme; + TQStringList themeDirs; + TQDict<ThemeInfo> themeInfo; }; #endif // __THEMEPAGE_H |