From 7346aee26bf190a7e70333c40fab4caca847cd27 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:22:56 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kicker-applets/kbinaryclock/datepicker.cpp | 8 +- kicker-applets/kbinaryclock/datepicker.h | 6 +- kicker-applets/kbinaryclock/kbinaryclock.cpp | 90 +++++++------- kicker-applets/kbinaryclock/kbinaryclock.h | 18 +-- kicker-applets/kolourpicker/kolourpicker.cpp | 112 +++++++++--------- kicker-applets/kolourpicker/kolourpicker.h | 26 ++--- kicker-applets/kolourpicker/simplebutton.cpp | 84 ++++++------- kicker-applets/kolourpicker/simplebutton.h | 38 +++--- kicker-applets/ktimemon/confdlg.cc | 96 +++++++-------- kicker-applets/ktimemon/confdlg.h | 34 +++--- kicker-applets/ktimemon/sample.cc | 8 +- kicker-applets/ktimemon/sample.h | 4 +- kicker-applets/ktimemon/timemon.cc | 58 ++++----- kicker-applets/ktimemon/timemon.h | 26 ++--- kicker-applets/math/mathapplet.cpp | 62 +++++----- kicker-applets/math/mathapplet.h | 18 +-- kicker-applets/math/parser.cpp | 36 +++--- kicker-applets/math/parser.h | 24 ++-- kicker-applets/mediacontrol/amarokInterface.cpp | 84 ++++++------- kicker-applets/mediacontrol/amarokInterface.h | 16 +-- kicker-applets/mediacontrol/configfrontend.cpp | 14 +-- kicker-applets/mediacontrol/configfrontend.h | 8 +- kicker-applets/mediacontrol/jukInterface.cpp | 94 +++++++-------- kicker-applets/mediacontrol/jukInterface.h | 18 +-- kicker-applets/mediacontrol/kscdInterface.cpp | 78 ++++++------- kicker-applets/mediacontrol/kscdInterface.h | 16 +-- kicker-applets/mediacontrol/mcslider.cpp | 12 +- kicker-applets/mediacontrol/mcslider.h | 6 +- kicker-applets/mediacontrol/mediacontrol.cpp | 128 ++++++++++---------- kicker-applets/mediacontrol/mediacontrol.h | 24 ++-- kicker-applets/mediacontrol/mediacontrolconfig.cpp | 42 +++---- kicker-applets/mediacontrol/mediacontrolconfig.h | 6 +- kicker-applets/mediacontrol/mpdInterface.cpp | 130 ++++++++++----------- kicker-applets/mediacontrol/mpdInterface.h | 24 ++-- kicker-applets/mediacontrol/noatunInterface.cpp | 78 ++++++------- kicker-applets/mediacontrol/noatunInterface.h | 16 +-- kicker-applets/mediacontrol/playerInterface.cpp | 4 +- kicker-applets/mediacontrol/playerInterface.h | 12 +- kicker-applets/mediacontrol/simplebutton.cpp | 84 ++++++------- kicker-applets/mediacontrol/simplebutton.h | 38 +++--- kicker-applets/mediacontrol/xmmsInterface.cpp | 20 ++-- kicker-applets/mediacontrol/xmmsInterface.h | 10 +- 42 files changed, 855 insertions(+), 855 deletions(-) (limited to 'kicker-applets') diff --git a/kicker-applets/kbinaryclock/datepicker.cpp b/kicker-applets/kbinaryclock/datepicker.cpp index 19efc1d..c87e11a 100644 --- a/kicker-applets/kbinaryclock/datepicker.cpp +++ b/kicker-applets/kbinaryclock/datepicker.cpp @@ -29,11 +29,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -DatePicker::DatePicker(QWidget *parent, const QDate& date) - : QVBox( parent, 0, WType_TopLevel | WDestructiveClose | +DatePicker::DatePicker(TQWidget *parent, const TQDate& date) + : TQVBox( parent, 0, WType_TopLevel | WDestructiveClose | WStyle_Customize | WStyle_StaysOnTop | WStyle_NoBorder ) { - setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); + setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised ); KWin::setOnAllDesktops( handle(), true ); picker = new KDatePicker(this, date); picker->setCloseButton(true); @@ -43,7 +43,7 @@ DatePicker::DatePicker(QWidget *parent, const QDate& date) setIcon(SmallIcon("date")); } -void DatePicker::keyReleaseEvent(QKeyEvent *e) +void DatePicker::keyReleaseEvent(TQKeyEvent *e) { DATEPICKER_INHERITED::keyReleaseEvent(e); if (e->key() == Qt::Key_Escape) diff --git a/kicker-applets/kbinaryclock/datepicker.h b/kicker-applets/kbinaryclock/datepicker.h index 2cf524a..d0010af 100644 --- a/kicker-applets/kbinaryclock/datepicker.h +++ b/kicker-applets/kbinaryclock/datepicker.h @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __DATEPICKER_H #define __DATEPICKER_H -#include +#include class QDate; class KDatePicker; @@ -33,10 +33,10 @@ class KDatePicker; class DatePicker : public QVBox { public: - DatePicker(QWidget*, const QDate&); + DatePicker(TQWidget*, const TQDate&); private: KDatePicker *picker; - void keyReleaseEvent(QKeyEvent *e); + void keyReleaseEvent(TQKeyEvent *e); }; #endif diff --git a/kicker-applets/kbinaryclock/kbinaryclock.cpp b/kicker-applets/kbinaryclock/kbinaryclock.cpp index 33e8ced..30682e4 100644 --- a/kicker-applets/kbinaryclock/kbinaryclock.cpp +++ b/kicker-applets/kbinaryclock/kbinaryclock.cpp @@ -25,30 +25,30 @@ #include #include -#include +#include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include -#include +#include #include extern "C" { - KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString& configFile ) { + KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString& configFile ) { KGlobal::locale()->insertCatalogue( "kbinaryclock"); return new KBinaryClock( configFile, KPanelApplet::Normal, KPanelApplet::Preferences, parent, "kbinaryclock"); } } -KConfigDialogImp::KConfigDialogImp( QWidget *parent, const char *name, KConfigSkeleton *prefs, KDialogBase::DialogType dialogType, KDialogBase::ButtonCode defaultButton, bool modal) : +KConfigDialogImp::KConfigDialogImp( TQWidget *parent, const char *name, KConfigSkeleton *prefs, KDialogBase::DialogType dialogType, KDialogBase::ButtonCode defaultButton, bool modal) : KConfigDialog(parent, name, prefs, dialogType,(KDialogBase::ButtonCode) (KDialogBase::Default | KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel ), defaultButton, modal) { // As a temporary mesure until the kicker applet's app name is set to the @@ -58,10 +58,10 @@ KConfigDialogImp::KConfigDialogImp( QWidget *parent, const char *name, KConfigSk settings = new SettingsImp(0, "General"); addPage(settings, i18n("General"), "package_settings"); - connect(this, SIGNAL(widgetModified()), settings, SLOT(updatePreview())); + connect(this, TQT_SIGNAL(widgetModified()), settings, TQT_SLOT(updatePreview())); } -SettingsImp::SettingsImp(QWidget* parent, const char* name, WFlags fl): Settings(parent, name, fl){ +SettingsImp::SettingsImp(TQWidget* parent, const char* name, WFlags fl): Settings(parent, name, fl){ } /** @@ -72,9 +72,9 @@ void SettingsImp::updatePreview(){ int look = KLed::Raised; look = Look_Flat->isChecked() ? Prefs::EnumLook::Flat : look; look = Look_Sunken->isChecked() ? Prefs::EnumLook::Sunken : look; - QColor color = kcfg_Color->color(); + TQColor color = kcfg_Color->color(); int darkFactor = kcfg_DarkFactor->value(); - QColor backgroundColor = kcfg_Background->color(); + TQColor backgroundColor = kcfg_Background->color(); frame1->setBackgroundColor(backgroundColor); kLed1->setBackgroundColor(backgroundColor); @@ -116,7 +116,7 @@ void SettingsImp::updatePreview(){ /** * Constructor, create LED's */ -KBinaryClock::KBinaryClock(const QString& configFile, Type type, int actions, QWidget *parent, const char *name) +KBinaryClock::KBinaryClock(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name), ledWidth(6), _calendar(NULL), _disableCalendar(false), prefs( new Prefs(sharedConfig())), m_tooltip(this) @@ -137,8 +137,8 @@ KBinaryClock::KBinaryClock(const QString& configFile, Type type, int actions, QW updateClock(); loadSettings(); - QTimer *timer=new QTimer(this); - connect (timer, SIGNAL (timeout()), this, SLOT (updateClock())); + TQTimer *timer=new TQTimer(this); + connect (timer, TQT_SIGNAL (timeout()), this, TQT_SLOT (updateClock())); timer->start(500,false); } @@ -162,11 +162,11 @@ int KBinaryClock::heightForWidth( int width ) const { return (width/ledWidth)*4; } -void KBinaryClock::resizeEvent( QResizeEvent *e ) { +void KBinaryClock::resizeEvent( TQResizeEvent *e ) { int width = e->size().width(); for (int i=0; i < ledWidth; i++) for (int j=0; j < 4; j++) - ledMatrix[i][j]->setGeometry( QRect( (width/ledWidth)*i, (width/ledWidth)*j, width/ledWidth, width/ledWidth) ); + ledMatrix[i][j]->setGeometry( TQRect( (width/ledWidth)*i, (width/ledWidth)*j, width/ledWidth, width/ledWidth) ); } /** @@ -175,10 +175,10 @@ void KBinaryClock::resizeEvent( QResizeEvent *e ) { void KBinaryClock::loadSettings(){ int shape = prefs->shape(); int look = prefs->look(); - QColor color = prefs->color(); + TQColor color = prefs->color(); int darkFactor = prefs->darkFactor(); - QColor backgroundColor = prefs->background(); + TQColor backgroundColor = prefs->background(); bool modifyBackground = false; if(backgroundColor != KApplication::palette().active().background()){ setPaletteBackgroundColor(backgroundColor); @@ -217,7 +217,7 @@ void KBinaryClock::preferences(){ return; KConfigDialogImp *dialog = new KConfigDialogImp(this, "settings", prefs, KDialogBase::Swallow); - connect(dialog, SIGNAL(settingsChanged()), this, SLOT(loadSettings())); + connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(loadSettings())); dialog->show(); dialog->settings->updatePreview(); } @@ -226,11 +226,11 @@ void KBinaryClock::preferences(){ * Get the time and update the LED's */ void KBinaryClock::updateClock(){ - QString time = "hhmmss"; + TQString time = "hhmmss"; if(KGlobal::locale()->use12Clock()) time += "ap"; - QString currentTime = (QTime::currentTime()).toString(time); + TQString currentTime = (TQTime::currentTime()).toString(time); int splice[6]; splice[0] = currentTime.mid( 0, 1 ).toInt(); splice[1] = currentTime.mid( 1, 1 ).toInt(); @@ -262,18 +262,18 @@ void KBinaryClock::updateClock(){ /** * Catch the right click press */ - void KBinaryClock::mousePressEvent(QMouseEvent *event) { + void KBinaryClock::mousePressEvent(TQMouseEvent *event) { switch (event->button()) { - case QMouseEvent::RightButton: - QToolTip::remove(this); + case TQMouseEvent::RightButton: + TQToolTip::remove(this); openContextMenu(); break; - case QMouseEvent::LeftButton: + case TQMouseEvent::LeftButton: toggleCalendar(); - QToolTip::remove(this); + TQToolTip::remove(this); break; - case QMouseEvent::MidButton: - QToolTip::remove(this); + case TQMouseEvent::MidButton: + TQToolTip::remove(this); break; default: break; @@ -290,7 +290,7 @@ void KBinaryClock::openContextMenu() { menu->insertTitle( SmallIcon( "clock" ), i18n( "KBinaryClock" ) ); KLocale *loc = KGlobal::locale(); - QDateTime dt = QDateTime::currentDateTime(); + TQDateTime dt = TQDateTime::currentDateTime(); KPopupMenu *copyMenu = new KPopupMenu( menu ); copyMenu->insertItem(loc->formatDateTime(dt), 201); @@ -301,7 +301,7 @@ void KBinaryClock::openContextMenu() { copyMenu->insertItem(dt.date().toString(), 206); copyMenu->insertItem(dt.time().toString(), 207); copyMenu->insertItem(dt.toString(), 208); - connect( copyMenu, SIGNAL( activated(int) ), this, SLOT( slotCopyMenuActivated(int) ) ); + connect( copyMenu, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotCopyMenuActivated(int) ) ); if (!bImmutable) { @@ -318,7 +318,7 @@ void KBinaryClock::openContextMenu() { menu->insertSeparator(7); menu->insertItem(SmallIcon("configure"), i18n("&Configure KBinaryClock..."), 102, 8); } - int result = menu->exec( QCursor::pos() ); + int result = menu->exec( TQCursor::pos() ); KProcess proc; switch (result) { @@ -328,7 +328,7 @@ void KBinaryClock::openContextMenu() { case 103: proc << locate("exe", "kdesu"); proc << "--nonewdcop"; - proc << QString("%1 clock --lang %2") + proc << TQString("%1 clock --lang %2") .arg(locate("exe", "kcmshell")) .arg(KGlobal::locale()->language()); proc.start(KProcess::DontCare); @@ -346,9 +346,9 @@ void KBinaryClock::openContextMenu() { } void KBinaryClock::slotCopyMenuActivated( int id ) { - QPopupMenu *m = (QPopupMenu *) sender(); - QString s = m->text(id); - QApplication::clipboard()->setText(s); + TQPopupMenu *m = (TQPopupMenu *) sender(); + TQString s = m->text(id); + TQApplication::clipboard()->setText(s); } void KBinaryClock::toggleCalendar() @@ -361,11 +361,11 @@ void KBinaryClock::toggleCalendar() if (_calendar || _disableCalendar){ return; } - _calendar = new DatePicker(this, QDateTime::currentDateTime().date()); - connect( _calendar, SIGNAL( destroyed() ), SLOT( slotCalendarDeleted() )); + _calendar = new DatePicker(this, TQDateTime::currentDateTime().date()); + connect( _calendar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotCalendarDeleted() )); // some extra spacing is included if aligned on a desktop edge - QPoint c = mapToGlobal(QPoint(0,0)); + TQPoint c = mapToGlobal(TQPoint(0,0)); int w = _calendar->sizeHint().width() + 28; // Added 28 px. to size poperly as said in API @@ -379,7 +379,7 @@ void KBinaryClock::toggleCalendar() } // make calendar fully visible - QRect deskR = KGlobalSettings::desktopGeometry(QPoint(0,0)); + TQRect deskR = KGlobalSettings::desktopGeometry(TQPoint(0,0)); if (c.y()+h > deskR.bottom()) c.setY(deskR.bottom()-h-1); if (c.x()+w > deskR.right()) c.setX(deskR.right()-w-1); @@ -393,7 +393,7 @@ void KBinaryClock::slotCalendarDeleted() _calendar = 0L; // don't reopen the calendar immediately ... _disableCalendar = true; - QTimer::singleShot(100, this, SLOT(slotEnableCalendar())); + TQTimer::singleShot(100, this, TQT_SLOT(slotEnableCalendar())); } void KBinaryClock::slotEnableCalendar() @@ -401,11 +401,11 @@ void KBinaryClock::slotEnableCalendar() _disableCalendar = false; } -ClockAppletToolTip::ClockAppletToolTip( KBinaryClock *clock ) : QToolTip( clock ), m_clock( clock ) {} +ClockAppletToolTip::ClockAppletToolTip( KBinaryClock *clock ) : TQToolTip( clock ), m_clock( clock ) {} -void ClockAppletToolTip::maybeTip( const QPoint & /*point*/ ) +void ClockAppletToolTip::maybeTip( const TQPoint & /*point*/ ) { - tip(m_clock->geometry(), KGlobal::locale()->formatDate(QDateTime::currentDateTime().date(), false)); + tip(m_clock->geometry(), KGlobal::locale()->formatDate(TQDateTime::currentDateTime().date(), false)); } #include "kbinaryclock.moc" diff --git a/kicker-applets/kbinaryclock/kbinaryclock.h b/kicker-applets/kbinaryclock/kbinaryclock.h index 9edf51d..ba88456 100644 --- a/kicker-applets/kbinaryclock/kbinaryclock.h +++ b/kicker-applets/kbinaryclock/kbinaryclock.h @@ -20,11 +20,11 @@ #define KBINARYCLOCK_H #include -#include +#include #include #include -#include -#include +#include +#include #include #include "settings.h" @@ -39,7 +39,7 @@ class KBinaryClock; class SettingsImp : public Settings { Q_OBJECT public: - SettingsImp(QWidget* parent=0, + SettingsImp(TQWidget* parent=0, const char* name=0, WFlags fl=0); public slots: @@ -49,7 +49,7 @@ public slots: class KConfigDialogImp : public KConfigDialog { public: - KConfigDialogImp(QWidget *parent, const char *name, + KConfigDialogImp(TQWidget *parent, const char *name, KConfigSkeleton *prefs, KDialogBase::DialogType dialogType = KDialogBase::IconList, KDialogBase::ButtonCode defaultButton = Ok, @@ -63,7 +63,7 @@ class ClockAppletToolTip : public QToolTip ClockAppletToolTip( KBinaryClock* clock ); protected: - virtual void maybeTip( const QPoint & ); + virtual void maybeTip( const TQPoint & ); private: KBinaryClock *m_clock; @@ -72,15 +72,15 @@ class ClockAppletToolTip : public QToolTip class KBinaryClock : public KPanelApplet { Q_OBJECT public: - KBinaryClock(const QString& configFile, Type t = Normal, int actions = 0, QWidget *parent = 0, const char *name = 0); + KBinaryClock(const TQString& configFile, Type t = Normal, int actions = 0, TQWidget *parent = 0, const char *name = 0); ~KBinaryClock(); virtual int widthForHeight (int height) const; virtual int heightForWidth (int width) const; protected: - virtual void resizeEvent(QResizeEvent *event); - virtual void mousePressEvent(QMouseEvent *event); + virtual void resizeEvent(TQResizeEvent *event); + virtual void mousePressEvent(TQMouseEvent *event); protected slots: void preferences(); diff --git a/kicker-applets/kolourpicker/kolourpicker.cpp b/kicker-applets/kolourpicker/kolourpicker.cpp index 98f5302..cadbb2d 100644 --- a/kicker-applets/kolourpicker/kolourpicker.cpp +++ b/kicker-applets/kolourpicker/kolourpicker.cpp @@ -19,16 +19,16 @@ $Id$ */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -48,7 +48,7 @@ $Id$ // Applet initialization function extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kolourpicker"); return new KolourPicker(configFile, KPanelApplet::Normal, @@ -57,8 +57,8 @@ extern "C" } } -KolourPicker::KolourPicker(const QString& configFile, Type type, - int actions, QWidget *parent, const char *name) +KolourPicker::KolourPicker(const TQString& configFile, Type type, + int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name), m_picking(0) { @@ -73,17 +73,17 @@ KolourPicker::KolourPicker(const QString& configFile, Type type, KConfig *conf = config(); conf->setGroup("General"); - QStringList history = conf->readListEntry("History"); - for (QStringList::ConstIterator it = history.begin(); it != history.end(); ++it) - m_history.append(QColor(*it)); + TQStringList history = conf->readListEntry("History"); + for (TQStringList::ConstIterator it = history.begin(); it != history.end(); ++it) + m_history.append(TQColor(*it)); setBackgroundOrigin(AncestorOrigin); m_colourButton = new SimpleButton(this); m_colourButton->setPixmap(SmallIcon("colorpicker")); m_colourButton->setFixedSize(20, 20); - QToolTip::add(m_colourButton, i18n("Pick a color")); - connect(m_colourButton, SIGNAL(clicked()), SLOT(slotPick())); + TQToolTip::add(m_colourButton, i18n("Pick a color")); + connect(m_colourButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotPick())); m_historyButton = new SimpleButton(this); m_historyButton->setFixedSize(20, 20); @@ -91,11 +91,11 @@ KolourPicker::KolourPicker(const QString& configFile, Type type, m_historyButton->setPixmap(colorPixmap(m_history.last())); else { - m_historyButton->setPixmap(colorPixmap(QColor())); + m_historyButton->setPixmap(colorPixmap(TQColor())); m_historyButton->setEnabled(false); } - QToolTip::add(m_historyButton, i18n("History")); - connect(m_historyButton, SIGNAL(clicked()), SLOT(slotHistory())); + TQToolTip::add(m_historyButton, i18n("History")); + connect(m_historyButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotHistory())); } KolourPicker::~KolourPicker() @@ -131,21 +131,21 @@ void KolourPicker::slotHistory() { KPopupMenu popup; popup.insertTitle(SmallIcon("colorize"), i18n("History")); - QPtrList subMenus; + TQPtrList subMenus; subMenus.setAutoDelete(true); - for (QValueList::ConstIterator it = m_history.fromLast(); + for (TQValueList::ConstIterator it = m_history.fromLast(); it != m_history.end(); --it) { - QPopupMenu *sub = copyPopup(*it, false); + TQPopupMenu *sub = copyPopup(*it, false); subMenus.append(sub); popup.insertItem(colorPixmap(*it), - QString("%1, %2, %3").arg((*it).red()).arg((*it).green()).arg((*it).blue()), + TQString("%1, %2, %3").arg((*it).red()).arg((*it).green()).arg((*it).blue()), sub); } popup.insertSeparator(); int clear = popup.insertItem(SmallIcon("history_clear"), i18n("&Clear History")); - int id = popup.exec(QCursor::pos()); + int id = popup.exec(TQCursor::pos()); if (id == clear) { m_history.clear(); @@ -153,28 +153,28 @@ void KolourPicker::slotHistory() arrangeButtons(); KConfig *conf = config(); conf->setGroup("General"); - conf->writeEntry("History", QStringList()); + conf->writeEntry("History", TQStringList()); conf->sync(); } else if (id != -1) setClipboard(popup.findItem(id)->text()); } -void KolourPicker::mouseReleaseEvent(QMouseEvent *e) +void KolourPicker::mouseReleaseEvent(TQMouseEvent *e) { if (m_picking) { m_picking = false; releaseMouse(); releaseKeyboard(); - QWidget *desktop = QApplication::desktop(); - QPixmap pm = QPixmap::grabWindow(desktop->winId(), + TQWidget *desktop = TQApplication::desktop(); + TQPixmap pm = TQPixmap::grabWindow(desktop->winId(), e->globalPos().x(), e->globalPos().y(), 1, 1); - QImage img = pm.convertToImage(); - QColor color(img.pixel(0, 0)); + TQImage img = pm.convertToImage(); + TQColor color(img.pixel(0, 0)); // eventually remove a dupe - QValueListIterator dupe = m_history.find(color); + TQValueListIterator dupe = m_history.find(color); if (dupe != m_history.end()) m_history.remove(dupe); @@ -183,8 +183,8 @@ void KolourPicker::mouseReleaseEvent(QMouseEvent *e) m_history.remove(m_history.begin()); m_historyButton->setEnabled(true); arrangeButtons(); - QStringList history; - for (QValueList::ConstIterator it = m_history.begin(); + TQStringList history; + for (TQValueList::ConstIterator it = m_history.begin(); it != m_history.end(); ++it) { @@ -195,7 +195,7 @@ void KolourPicker::mouseReleaseEvent(QMouseEvent *e) conf->writeEntry("History", history); conf->sync(); m_historyButton->setPixmap(colorPixmap(color)); - QPopupMenu *popup = copyPopup(color, true); + TQPopupMenu *popup = copyPopup(color, true); int id = popup->exec(e->globalPos()); if (id != -1) setClipboard( popup->findItem(id)->text() ); @@ -206,9 +206,9 @@ void KolourPicker::mouseReleaseEvent(QMouseEvent *e) } // set both clipboard and selection -void KolourPicker::setClipboard(const QString& text) +void KolourPicker::setClipboard(const TQString& text) { - QClipboard *clip = QApplication::clipboard(); + QClipboard *clip = TQApplication::clipboard(); bool oldMode = clip->selectionModeEnabled(); clip->setSelectionMode(true); clip->setText(text); @@ -217,7 +217,7 @@ void KolourPicker::setClipboard(const QString& text) clip->setSelectionMode( oldMode ); } -void KolourPicker::keyPressEvent(QKeyEvent *e) +void KolourPicker::keyPressEvent(TQKeyEvent *e) { if (m_picking) { @@ -233,7 +233,7 @@ void KolourPicker::keyPressEvent(QKeyEvent *e) KPanelApplet::keyPressEvent(e); } -void KolourPicker::resizeEvent(QResizeEvent *) +void KolourPicker::resizeEvent(TQResizeEvent *) { arrangeButtons(); } @@ -282,19 +282,19 @@ void KolourPicker::arrangeButtons() updateGeometry(); } -QPopupMenu *KolourPicker::copyPopup(const QColor &c, bool title) const +TQPopupMenu *KolourPicker::copyPopup(const TQColor &c, bool title) const { KPopupMenu *popup = new KPopupMenu; if (title) popup->insertTitle(colorPixmap(c), i18n("Copy Color Value")); - QString value; + TQString value; // r, g, b value.sprintf("%u, %u, %u", c.red(), c.green(), c.blue()); popup->insertItem(SmallIcon("text"), value); // HTML, lower case hex chars value.sprintf("#%.2x%.2x%.2x", c.red(), c.green(), c.blue()); popup->insertItem(SmallIcon("html"), value); - if (value.find(QRegExp("[a-f]")) >= 0) + if (value.find(TQRegExp("[a-f]")) >= 0) { // HTML, upper case hex chars value.sprintf("#%.2X%.2X%.2X", c.red(), c.green(), c.blue()); @@ -303,26 +303,26 @@ QPopupMenu *KolourPicker::copyPopup(const QColor &c, bool title) const // lower case hex chars value.sprintf( "%.2x%.2x%.2x", c.red(), c.green(), c.blue() ); popup->insertItem( SmallIcon( "html" ), value ); - if ( value.find( QRegExp( "[a-f]" ) ) >= 0 ) + if ( value.find( TQRegExp( "[a-f]" ) ) >= 0 ) { // upper case hex chars value.sprintf( "%.2X%.2X%.2X", c.red(), c.green(), c.blue() ); popup->insertItem( SmallIcon( "html" ), value ); } // Color name - QStringList names = colorNames(c.red(), c.green(), c.blue()); - for (QStringList::ConstIterator it = names.begin(); it != names.end(); ++it) + TQStringList names = colorNames(c.red(), c.green(), c.blue()); + for (TQStringList::ConstIterator it = names.begin(); it != names.end(); ++it) popup->insertItem(SmallIcon("text"), *it); return popup; } #define AAFACTOR 4 -QPixmap KolourPicker::colorPixmap(const QColor &c) const +TQPixmap KolourPicker::colorPixmap(const TQColor &c) const { int x, y, dx, dy, d; - QImage img(16 * AAFACTOR, 16 * AAFACTOR, 32); + TQImage img(16 * AAFACTOR, 16 * AAFACTOR, 32); img.setAlphaBuffer(true); img.fill(0); @@ -339,30 +339,30 @@ QPixmap KolourPicker::colorPixmap(const QColor &c) const img.setPixel(x, y, qRgba(128, 128, 128, 255)); } - QBitmap mask(16, 16); + TQBitmap mask(16, 16); mask.fill(Qt::color0); - QPainter p(&mask); + TQPainter p(&mask); p.setPen(Qt::NoPen); p.setBrush(Qt::color1); p.drawEllipse(0, 0, 15, 15); p.end(); - QPixmap pm = QPixmap(img.smoothScale(16, 16)); + TQPixmap pm = TQPixmap(img.smoothScale(16, 16)); pm.setMask(mask); return pm; } -const QStringList &KolourPicker::colorNames(int r, int g, int b) const +const TQStringList &KolourPicker::colorNames(int r, int g, int b) const { - static QStringList NullList; + static TQStringList NullList; if (m_colorNames.isEmpty()) { - QFile f("/usr/lib/X11/rgb.txt"); + TQFile f("/usr/lib/X11/rgb.txt"); if (!f.open(IO_ReadOnly)) return NullList; - QTextStream str(&f); - QString red, green, blue; + TQTextStream str(&f); + TQString red, green, blue; while (!str.atEnd()) { str >> red; diff --git a/kicker-applets/kolourpicker/kolourpicker.h b/kicker-applets/kolourpicker/kolourpicker.h index 0b576e9..20780f9 100644 --- a/kicker-applets/kolourpicker/kolourpicker.h +++ b/kicker-applets/kolourpicker/kolourpicker.h @@ -21,8 +21,8 @@ #ifndef _KOLOURPICKER_H_ #define _KOLOURPICKER_H_ -#include -#include +#include +#include #include @@ -35,34 +35,34 @@ class KolourPicker : public KPanelApplet { Q_OBJECT public: - KolourPicker(const QString& configFile, Type t = Normal, int actions = 0, - QWidget *parent = 0, const char *name = 0); + KolourPicker(const TQString& configFile, Type t = Normal, int actions = 0, + TQWidget *parent = 0, const char *name = 0); ~KolourPicker(); virtual int heightForWidth(int) const; virtual int widthForHeight(int) const; virtual void about(); protected: - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void keyPressEvent(QKeyEvent *); - virtual void resizeEvent(QResizeEvent*); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void keyPressEvent(TQKeyEvent *); + virtual void resizeEvent(TQResizeEvent*); private slots: void slotPick(); void slotHistory(); private: - QPopupMenu *copyPopup(const QColor &, bool title) const; - QPixmap colorPixmap(const QColor &) const; - const QStringList &colorNames(int r, int g, int b) const; + TQPopupMenu *copyPopup(const TQColor &, bool title) const; + TQPixmap colorPixmap(const TQColor &) const; + const TQStringList &colorNames(int r, int g, int b) const; void arrangeButtons(); - void setClipboard(const QString& text); + void setClipboard(const TQString& text); KInstance *m_instance; bool m_picking; SimpleButton *m_historyButton, *m_colourButton; - QValueList m_history; - QMap m_colorNames; + TQValueList m_history; + TQMap m_colorNames; }; #endif diff --git a/kicker-applets/kolourpicker/simplebutton.cpp b/kicker-applets/kolourpicker/simplebutton.cpp index 9daa926..478ca2d 100644 --- a/kicker-applets/kolourpicker/simplebutton.cpp +++ b/kicker-applets/kolourpicker/simplebutton.cpp @@ -20,8 +20,8 @@ #include "simplebutton.h" -#include -#include +#include +#include #include #include @@ -32,17 +32,17 @@ #include #include -SimpleButton::SimpleButton(QWidget *parent, const char *name) - : QButton(parent, name), +SimpleButton::SimpleButton(TQWidget *parent, const char *name) + : TQButton(parent, name), m_highlight(false), m_orientation(Qt::Horizontal) { setBackgroundOrigin( AncestorOrigin ); - connect( kapp, SIGNAL( settingsChanged( int ) ), - SLOT( slotSettingsChanged( int ) ) ); - connect( kapp, SIGNAL( iconChanged( int ) ), - SLOT( slotIconChanged( int ) ) ); + connect( kapp, TQT_SIGNAL( settingsChanged( int ) ), + TQT_SLOT( slotSettingsChanged( int ) ) ); + connect( kapp, TQT_SIGNAL( iconChanged( int ) ), + TQT_SLOT( slotIconChanged( int ) ) ); kapp->addKipcEventMask( KIPC::SettingsChanged ); kapp->addKipcEventMask( KIPC::IconChanged ); @@ -50,9 +50,9 @@ SimpleButton::SimpleButton(QWidget *parent, const char *name) slotSettingsChanged( KApplication::SETTINGS_MOUSE ); } -void SimpleButton::setPixmap(const QPixmap &pix) +void SimpleButton::setPixmap(const TQPixmap &pix) { - QButton::setPixmap(pix); + TQButton::setPixmap(pix); generateIcons(); update(); } @@ -63,39 +63,39 @@ void SimpleButton::setOrientation(Qt::Orientation orientation) update(); } -QSize SimpleButton::sizeHint() const +TQSize SimpleButton::sizeHint() const { - const QPixmap* pm = pixmap(); + const TQPixmap* pm = pixmap(); if (!pm) - return QButton::sizeHint(); + return TQButton::sizeHint(); else - return QSize(pm->width() + KDialog::spacingHint(), pm->height() + KDialog::spacingHint()); + return TQSize(pm->width() + KDialog::spacingHint(), pm->height() + KDialog::spacingHint()); } -QSize SimpleButton::minimumSizeHint() const +TQSize SimpleButton::minimumSizeHint() const { - const QPixmap* pm = pixmap(); + const TQPixmap* pm = pixmap(); if (!pm) - return QButton::minimumSizeHint(); + return TQButton::minimumSizeHint(); else - return QSize(pm->width(), pm->height()); + return TQSize(pm->width(), pm->height()); } -void SimpleButton::drawButton( QPainter *p ) +void SimpleButton::drawButton( TQPainter *p ) { drawButtonLabel(p); } -void SimpleButton::drawButtonLabel( QPainter *p ) +void SimpleButton::drawButtonLabel( TQPainter *p ) { if (!pixmap()) { return; } - QPixmap pix = isEnabled() ? (m_highlight? m_activeIcon : m_normalIcon) : m_disabledIcon; + TQPixmap pix = isEnabled() ? (m_highlight? m_activeIcon : m_normalIcon) : m_disabledIcon; if (isOn() || isDown()) { @@ -108,7 +108,7 @@ void SimpleButton::drawButtonLabel( QPainter *p ) int ph = pix.height(); int pw = pix.width(); int margin = KDialog::spacingHint(); - QPoint origin(margin / 2, margin / 2); + TQPoint origin(margin / 2, margin / 2); if (ph < (h - margin)) { @@ -130,7 +130,7 @@ void SimpleButton::generateIcons() return; } - QImage image = pixmap()->convertToImage(); + TQImage image = pixmap()->convertToImage(); KIconEffect effect; m_normalIcon = effect.apply(image, KIcon::Panel, KIcon::DefaultState); @@ -170,29 +170,29 @@ void SimpleButton::slotIconChanged( int group ) update(); } -void SimpleButton::enterEvent( QEvent *e ) +void SimpleButton::enterEvent( TQEvent *e ) { m_highlight = true; repaint( false ); - QButton::enterEvent( e ); + TQButton::enterEvent( e ); } -void SimpleButton::leaveEvent( QEvent *e ) +void SimpleButton::leaveEvent( TQEvent *e ) { m_highlight = false; repaint( false ); - QButton::enterEvent( e ); + TQButton::enterEvent( e ); } -void SimpleButton::resizeEvent( QResizeEvent * ) +void SimpleButton::resizeEvent( TQResizeEvent * ) { generateIcons(); } -SimpleArrowButton::SimpleArrowButton(QWidget *parent, Qt::ArrowType arrow, const char *name) +SimpleArrowButton::SimpleArrowButton(TQWidget *parent, Qt::ArrowType arrow, const char *name) : SimpleButton(parent, name) { setBackgroundOrigin(AncestorOrigin); @@ -200,9 +200,9 @@ SimpleArrowButton::SimpleArrowButton(QWidget *parent, Qt::ArrowType arrow, const _inside = false; } -QSize SimpleArrowButton::sizeHint() const +TQSize SimpleArrowButton::sizeHint() const { - return QSize( 12, 12 ); + return TQSize( 12, 12 ); } void SimpleArrowButton::setArrowType(Qt::ArrowType a) @@ -219,32 +219,32 @@ Qt::ArrowType SimpleArrowButton::arrowType() const return _arrow; } -void SimpleArrowButton::drawButton( QPainter *p ) +void SimpleArrowButton::drawButton( TQPainter *p ) { - QRect r(1, 1, width() - 2, height() - 2); + TQRect r(1, 1, width() - 2, height() - 2); - QStyle::PrimitiveElement pe = QStyle::PE_ArrowLeft; + TQStyle::PrimitiveElement pe = TQStyle::PE_ArrowLeft; switch (_arrow) { - case Qt::LeftArrow: pe = QStyle::PE_ArrowLeft; break; - case Qt::RightArrow: pe = QStyle::PE_ArrowRight; break; - case Qt::UpArrow: pe = QStyle::PE_ArrowUp; break; - case Qt::DownArrow: pe = QStyle::PE_ArrowDown; break; + case Qt::LeftArrow: pe = TQStyle::PE_ArrowLeft; break; + case Qt::RightArrow: pe = TQStyle::PE_ArrowRight; break; + case Qt::UpArrow: pe = TQStyle::PE_ArrowUp; break; + case Qt::DownArrow: pe = TQStyle::PE_ArrowDown; break; } - int flags = QStyle::Style_Default | QStyle::Style_Enabled; - if (isDown() || isOn()) flags |= QStyle::Style_Down; + int flags = TQStyle::Style_Default | TQStyle::Style_Enabled; + if (isDown() || isOn()) flags |= TQStyle::Style_Down; style().drawPrimitive(pe, p, r, colorGroup(), flags); } -void SimpleArrowButton::enterEvent( QEvent *e ) +void SimpleArrowButton::enterEvent( TQEvent *e ) { _inside = true; SimpleButton::enterEvent( e ); update(); } -void SimpleArrowButton::leaveEvent( QEvent *e ) +void SimpleArrowButton::leaveEvent( TQEvent *e ) { _inside = false; SimpleButton::enterEvent( e ); diff --git a/kicker-applets/kolourpicker/simplebutton.h b/kicker-applets/kolourpicker/simplebutton.h index 5423dff..1ea5c7a 100644 --- a/kicker-applets/kolourpicker/simplebutton.h +++ b/kicker-applets/kolourpicker/simplebutton.h @@ -21,8 +21,8 @@ #ifndef SIMPLEBUTTON_H #define SIMPLEBUTTON_H -#include -#include +#include +#include #include @@ -31,20 +31,20 @@ class KDE_EXPORT SimpleButton : public QButton Q_OBJECT public: - SimpleButton(QWidget *parent, const char *name = 0); - void setPixmap(const QPixmap &pix); + SimpleButton(TQWidget *parent, const char *name = 0); + void setPixmap(const TQPixmap &pix); void setOrientation(Qt::Orientation orientaton); - QSize sizeHint() const; - QSize minimumSizeHint() const; + TQSize sizeHint() const; + TQSize minimumSizeHint() const; protected: - void drawButton( QPainter *p ); - void drawButtonLabel( QPainter *p ); + void drawButton( TQPainter *p ); + void drawButtonLabel( TQPainter *p ); void generateIcons(); - void enterEvent( QEvent *e ); - void leaveEvent( QEvent *e ); - void resizeEvent( QResizeEvent *e ); + void enterEvent( TQEvent *e ); + void leaveEvent( TQEvent *e ); + void resizeEvent( TQResizeEvent *e ); protected slots: virtual void slotSettingsChanged( int category ); @@ -52,9 +52,9 @@ class KDE_EXPORT SimpleButton : public QButton private: bool m_highlight; - QPixmap m_normalIcon; - QPixmap m_activeIcon; - QPixmap m_disabledIcon; + TQPixmap m_normalIcon; + TQPixmap m_activeIcon; + TQPixmap m_disabledIcon; Qt::Orientation m_orientation; class SimpleButtonPrivate; SimpleButtonPrivate* d; @@ -65,14 +65,14 @@ class KDE_EXPORT SimpleArrowButton: public SimpleButton Q_OBJECT public: - SimpleArrowButton(QWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0); + SimpleArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0); virtual ~SimpleArrowButton() {}; - QSize sizeHint() const; + TQSize sizeHint() const; protected: - virtual void enterEvent( QEvent *e ); - virtual void leaveEvent( QEvent *e ); - virtual void drawButton(QPainter *p); + virtual void enterEvent( TQEvent *e ); + virtual void leaveEvent( TQEvent *e ); + virtual void drawButton(TQPainter *p); Qt::ArrowType arrowType() const; public slots: diff --git a/kicker-applets/ktimemon/confdlg.cc b/kicker-applets/ktimemon/confdlg.cc index ff5ab9d..df3fffe 100644 --- a/kicker-applets/ktimemon/confdlg.cc +++ b/kicker-applets/ktimemon/confdlg.cc @@ -11,14 +11,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,11 +36,11 @@ KConfDialog::KConfDialog(KTimeMon *t) Ok|Cancel|Apply, Ok, t, 0, false ), timemon(t) { - QFrame *page; - QBoxLayout *bl; - QGridLayout *gl; - QLabel *l; - QGroupBox *b; + TQFrame *page; + TQBoxLayout *bl; + TQGridLayout *gl; + TQLabel *l; + TQGroupBox *b; KColorButton *cb; unsigned i, j; @@ -49,9 +49,9 @@ KConfDialog::KConfDialog(KTimeMon *t) // first tab: general page = addPage( i18n( "&General" ) ); - bl = new QVBoxLayout(page, 0, spacingHint()); + bl = new TQVBoxLayout(page, 0, spacingHint()); - b = new QVGroupBox(i18n("Sample &Rate"), page); + b = new TQVGroupBox(i18n("Sample &Rate"), page); bl->addWidget(b); intervalEdit = new KIntNumInput(250, b); @@ -59,13 +59,13 @@ KConfDialog::KConfDialog(KTimeMon *t) intervalEdit->setSuffix(i18n(" msec")); // scaling group box - b = new QVGroupBox(i18n("Scaling"), page); + b = new TQVGroupBox(i18n("Scaling"), page); bl->addWidget(b); bl->addStretch(); - autoScaleBox = new QCheckBox(i18n("&Automatic"), b); - connect(autoScaleBox, SIGNAL(toggled(bool)), this, SLOT(toggle(bool))); + autoScaleBox = new TQCheckBox(i18n("&Automatic"), b); + connect(autoScaleBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(toggle(bool))); pageScaleEdit = new KIntNumInput(intervalEdit, 1000, b); pageScaleEdit->setRange(10, 10000, 10); @@ -84,7 +84,7 @@ KConfDialog::KConfDialog(KTimeMon *t) // second tab: colours page = addPage( i18n( "C&olors" ) ); - gl = new QGridLayout(page, 12, 10, 0, spacingHint()); + gl = new TQGridLayout(page, 12, 10, 0, spacingHint()); gl->setColStretch(3, 1); gl->setColStretch(6, 1); // eat up horizontal space gl->setRowStretch(11, 1); // eat up vertical space @@ -94,85 +94,85 @@ KConfDialog::KConfDialog(KTimeMon *t) gl->addColSpacing(0, 10); gl->addColSpacing(9, 25); - QString cpuColourLabels[4]; + TQString cpuColourLabels[4]; cpuColourLabels[0] = i18n("Kernel:"); cpuColourLabels[1] = i18n("User:"); cpuColourLabels[2] = i18n("Nice:"); cpuColourLabels[3] = i18n("IOWait:"); - QString memColourLabels[4]; + TQString memColourLabels[4]; memColourLabels[0] = i18n("Kernel:"); memColourLabels[1] = i18n("Used:"); memColourLabels[2] = i18n("Buffers:"); memColourLabels[3] = i18n("Cached:"); KColorButton **cpuColourButtons[4] = { &kernelCB, &userCB, &niceCB, &iowaitCB }; - b = new QGroupBox(i18n("CPU"), page); + b = new TQGroupBox(i18n("CPU"), page); gl->addMultiCellWidget(b, 0, 2, 0, 13); for (j = 0; j < 4; j++) { - l = new QLabel(cpuColourLabels[j], page); + l = new TQLabel(cpuColourLabels[j], page); gl->addWidget(l, 1, 3*j+1, AlignVCenter | AlignRight); cb = *cpuColourButtons[j] = new KColorButton(white, page); gl->addWidget(cb, 1, 3*j+2, AlignCenter); - connect(cb, SIGNAL(changed(const QColor &)), - this, SLOT(updateSampleWidget(const QColor &))); + connect(cb, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(updateSampleWidget(const TQColor &))); } KColorButton **memColourButtons[4] = { &mkernelCB, &usedCB, &buffersCB, &cachedCB }; - b = new QGroupBox(i18n("Memory"), page); + b = new TQGroupBox(i18n("Memory"), page); gl->addMultiCellWidget(b, 4, 6, 0, 13); for (j = 0; j < 4; j++) { - l = new QLabel(memColourLabels[j], page); + l = new TQLabel(memColourLabels[j], page); gl->addWidget(l, 5, 3*j+1, AlignVCenter | AlignRight); cb = *memColourButtons[j] = new KColorButton(white, page); gl->addWidget(cb, 5, 3*j+2, AlignCenter); - connect(cb, SIGNAL(changed(const QColor &)), - this, SLOT(updateSampleWidget(const QColor &))); + connect(cb, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(updateSampleWidget(const TQColor &))); } - b = new QGroupBox(i18n("Swap"), page); + b = new TQGroupBox(i18n("Swap"), page); gl->addMultiCellWidget(b, 8, 10, 0, 6); - l = new QLabel(i18n("Swap:"), page); + l = new TQLabel(i18n("Swap:"), page); gl->addWidget(l, 9, 1, AlignVCenter | AlignRight); cb = swapCB = new KColorButton(red, page); gl->addWidget(cb, 9, 2); - connect(cb, SIGNAL(changed(const QColor &)), - this, SLOT(updateSampleWidget(const QColor &))); + connect(cb, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(updateSampleWidget(const TQColor &))); - l = new QLabel(i18n("Backgd:"), page); + l = new TQLabel(i18n("Backgd:"), page); gl->addWidget(l, 9, 4, AlignVCenter | AlignRight); cb = bgCB = new KColorButton(blue, page); gl->addWidget(cb, 9, 5); - connect(cb, SIGNAL(changed(const QColor &)), - this, SLOT(updateSampleWidget(const QColor &))); + connect(cb, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(updateSampleWidget(const TQColor &))); - //b = new QGroupBox(i18n("Sample"), page); + //b = new TQGroupBox(i18n("Sample"), page); //gl->addMultiCellWidget(b, 8, 10, 7, 9); // third tab: interaction page = addPage( i18n( "&Interaction" ) ); - bl = new QVBoxLayout(page, 0, spacingHint()); + bl = new TQVBoxLayout(page, 0, spacingHint()); - b = new QGroupBox(i18n("Mouse Events"), page); + b = new TQGroupBox(i18n("Mouse Events"), page); b->setColumnLayout( 0, Qt::Vertical ); bl->addWidget(b); bl->addStretch(); - QVBoxLayout *vbox = new QVBoxLayout( b->layout() ); + TQVBoxLayout *vbox = new TQVBoxLayout( b->layout() ); - gl = new QGridLayout(b, MAX_MOUSE_ACTIONS + 1, 3, 0, 6 ); + gl = new TQGridLayout(b, MAX_MOUSE_ACTIONS + 1, 3, 0, 6 ); vbox->addLayout( gl ); @@ -180,13 +180,13 @@ KConfDialog::KConfDialog(KTimeMon *t) gl->setRowStretch(i, 1); gl->setColStretch(2, 1); - QString buttonText[MAX_MOUSE_ACTIONS] = { i18n("Left button:"), + TQString buttonText[MAX_MOUSE_ACTIONS] = { i18n("Left button:"), i18n("Middle button:"), i18n("Right button:") }; for (i = 0; i < (int) MAX_MOUSE_ACTIONS; i++) { - l = new QLabel(buttonText[i], b); + l = new TQLabel(buttonText[i], b); gl->addWidget(l, i+1, 0); mouseC[i] = new KComboBox(false, b); @@ -197,8 +197,8 @@ KConfDialog::KConfDialog(KTimeMon *t) mouseC[i]->insertItem(i18n("Starts"), KTimeMon::COMMAND - 1); gl->addWidget(mouseC[i], i+1, 1); - connect( mouseC[ i ], SIGNAL( activated( int ) ), this, - SLOT( mouseCommandEnable() ) ); + connect( mouseC[ i ], TQT_SIGNAL( activated( int ) ), this, + TQT_SLOT( mouseCommandEnable() ) ); mouseLE[i] = new KURLRequester(b); mouseLE[i]->lineEdit()->setText(t->mouseActionCommand[i]); @@ -209,12 +209,12 @@ KConfDialog::KConfDialog(KTimeMon *t) resize(380, 300); - connect(this, SIGNAL(applyClicked()), timemon, SLOT(apply())); - connect(this, SIGNAL(okClicked()), timemon, SLOT(apply())); + connect(this, TQT_SIGNAL(applyClicked()), timemon, TQT_SLOT(apply())); + connect(this, TQT_SIGNAL(okClicked()), timemon, TQT_SLOT(apply())); } // Adjust the colours of the sample widget in the configuration dialog. -void KConfDialog::updateSampleWidget(const QColor &) +void KConfDialog::updateSampleWidget(const TQColor &) { #if 0 sample->kernelColour = kernelCB->color(); diff --git a/kicker-applets/ktimemon/confdlg.h b/kicker-applets/ktimemon/confdlg.h index d458bf2..25d0501 100644 --- a/kicker-applets/ktimemon/confdlg.h +++ b/kicker-applets/ktimemon/confdlg.h @@ -18,9 +18,9 @@ #ifndef CONFDLG_H #define CONFDLG_H -#include -#include -#include +#include +#include +#include #include #include @@ -56,16 +56,16 @@ public: void update(); // get values from timemon unsigned getInterval() const { return intervalEdit->value(); } - QColor getKernelColour() const { return kernelCB->color(); } - QColor getUserColour() const { return userCB->color(); } - QColor getNiceColour() const { return niceCB->color(); } - QColor getIOWaitColour() const { return iowaitCB->color(); } - QColor getCachedColour() const { return cachedCB->color(); } - QColor getUsedColour() const { return usedCB->color(); } - QColor getBuffersColour() const { return buffersCB->color(); } - QColor getMKernelColour() const { return mkernelCB->color(); } - QColor getSwapColour() const { return swapCB->color(); } - QColor getBgColour() const { return bgCB->color(); } + TQColor getKernelColour() const { return kernelCB->color(); } + TQColor getUserColour() const { return userCB->color(); } + TQColor getNiceColour() const { return niceCB->color(); } + TQColor getIOWaitColour() const { return iowaitCB->color(); } + TQColor getCachedColour() const { return cachedCB->color(); } + TQColor getUsedColour() const { return usedCB->color(); } + TQColor getBuffersColour() const { return buffersCB->color(); } + TQColor getMKernelColour() const { return mkernelCB->color(); } + TQColor getSwapColour() const { return swapCB->color(); } + TQColor getBgColour() const { return bgCB->color(); } bool getAutoScale() const { return autoScaleBox->isChecked(); } unsigned getPageScale() const { return pageScaleEdit->value(); } @@ -73,10 +73,10 @@ public: unsigned getCtxScale() const { return ctxScaleEdit->value(); } unsigned getMouseAction(int i) const; - QString getMouseActionCommand(int i) const { return mouseLE[i]->lineEdit()->text(); } + TQString getMouseActionCommand(int i) const { return mouseLE[i]->lineEdit()->text(); } private slots: - void updateSampleWidget(const QColor &); // update colours in configuration + void updateSampleWidget(const TQColor &); // update colours in configuration void toggle(bool state); // enable/disable scales void mouseCommandEnable(); @@ -84,8 +84,8 @@ private: KTimeMon *timemon; KIntNumInput *intervalEdit, *swapScaleEdit, *pageScaleEdit, *ctxScaleEdit; - QLineEdit *procFileEdit; - QCheckBox *autoScaleBox; + TQLineEdit *procFileEdit; + TQCheckBox *autoScaleBox; KColorButton *kernelCB, *userCB, *niceCB, *iowaitCB; KColorButton *buffersCB, *usedCB, *cachedCB, *mkernelCB; KColorButton *swapCB, *bgCB; diff --git a/kicker-applets/ktimemon/sample.cc b/kicker-applets/ktimemon/sample.cc index 25f25a3..99ea20b 100644 --- a/kicker-applets/ktimemon/sample.cc +++ b/kicker-applets/ktimemon/sample.cc @@ -33,7 +33,7 @@ #include #endif -#include +#include #include #include @@ -162,7 +162,7 @@ void KSample::setScaling(bool a, unsigned p, unsigned s, unsigned c) // ----------------------------------------------------------------------------- // Show a message box with the given message and terminate the application. -void KSample::fatal(const QString& msg) +void KSample::fatal(const TQString& msg) { timemon->stop(); @@ -174,7 +174,7 @@ void KSample::fatal(const QString& msg) // ----------------------------------------------------------------------------- // Show a message box with the given message and don't terminate the app ;-) -void KSample::nonfatal(const QString& msg) +void KSample::nonfatal(const TQString& msg) { timemon->stop(); @@ -263,7 +263,7 @@ void KSample::readSample() #elif defined(__osf__) // in OSF/2, we can use table() - QString msg = i18n("Unable to obtain system information.\n" + TQString msg = i18n("Unable to obtain system information.\n" "The table(2) system call returned an error " "for table %1.\n" "Please contact the maintainer at mueller@kde.org " diff --git a/kicker-applets/ktimemon/sample.h b/kicker-applets/ktimemon/sample.h index b4a0723..63974fc 100644 --- a/kicker-applets/ktimemon/sample.h +++ b/kicker-applets/ktimemon/sample.h @@ -72,8 +72,8 @@ private: // converts pages to MB void makeMBytes(unsigned long &pages); - void fatal(const QString& msg); - void nonfatal(const QString& msg); + void fatal(const TQString& msg); + void nonfatal(const TQString& msg); KTimeMon *timemon; #ifdef __linux__ diff --git a/kicker-applets/ktimemon/timemon.cc b/kicker-applets/ktimemon/timemon.cc index 84b0e79..75164f4 100644 --- a/kicker-applets/ktimemon/timemon.cc +++ b/kicker-applets/ktimemon/timemon.cc @@ -13,9 +13,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("ktimemon"); KTimeMon *mon = new KTimeMon(configFile, KPanelApplet::Normal, @@ -85,7 +85,7 @@ void KTimeMon::preferences() // Repaint the object; get the current sample and paint the bar graphs // correspondingly. Use a pixmap to minimise flicker. -void KTimeMon::paintEvent(QPaintEvent *) +void KTimeMon::paintEvent(TQPaintEvent *) { int w, h, x, y, b, r; @@ -103,10 +103,10 @@ void KTimeMon::paintEvent(QPaintEvent *) else s.fill(h); - QPixmap pixmap(width(), height()); + TQPixmap pixmap(width(), height()); pixmap.fill(this, 0, 0); - QPainter painter(&pixmap); + TQPainter painter(&pixmap); b = r / 3; // bar width r -= b; @@ -152,7 +152,7 @@ void KTimeMon::paintEvent(QPaintEvent *) // ----------------------------------------------------------------------------- // Draw part of a bar, depending on the bar orientation. -void KTimeMon::paintRect(int x, int y, int w, int h, QColor c, QPainter *p) +void KTimeMon::paintRect(int x, int y, int w, int h, TQColor c, TQPainter *p) { if (vertical) p->fillRect(x, y, w, h, c); @@ -161,7 +161,7 @@ void KTimeMon::paintRect(int x, int y, int w, int h, QColor c, QPainter *p) } // Show a tool-tip with some status information. -void KTimeMon::maybeTip(const QPoint& p) +void KTimeMon::maybeTip(const TQPoint& p) { if (sample == 0) return; // no associated sample... if(!rect().contains(p)) return; @@ -170,7 +170,7 @@ void KTimeMon::maybeTip(const QPoint& p) int idle = 100 - s.kernel - s.user - s.nice; if ( idle < 0 ) idle = 0; - QString str = i18n("cpu: %1% idle\nmem: %2 MB %3% free\nswap: %4 MB %5% free") + TQString str = i18n("cpu: %1% idle\nmem: %2 MB %3% free\nswap: %4 MB %5% free") .arg(idle) .arg(KGlobal::locale()->formatNumber(s.used/100.*s.mtotal, 0)) .arg(100-s.used) @@ -184,9 +184,9 @@ void KTimeMon::maybeTip(const QPoint& p) // Initialise the member variables, read the configuration data base, // set up the widget, and start the timer. -KTimeMon::KTimeMon(const QString& configFile, Type type, int actions, - QWidget *parent, const char *name) - : KPanelApplet(configFile, type, actions, parent, name, WRepaintNoErase), QToolTip(this), +KTimeMon::KTimeMon(const TQString& configFile, Type type, int actions, + TQWidget *parent, const char *name) + : KPanelApplet(configFile, type, actions, parent, name, WRepaintNoErase), TQToolTip(this), configDialog(0), bgProcess(0), kernelColour("red1"), userColour("blue"), niceColour("yellow"), iowaitColour("darkgreen"), @@ -207,12 +207,12 @@ KTimeMon::KTimeMon(const QString& configFile, Type type, int actions, swapScale = conf->readUnsignedNumEntry("SwapScale", 5); ctxScale = conf->readUnsignedNumEntry("ContextScale", 300); for (int i = 0; i < MAX_MOUSE_ACTIONS; i++) { - QString n; + TQString n; n.setNum(i); mouseAction[i] = (MouseAction) - conf->readUnsignedNumEntry(QString("MouseAction")+n, mouseAction[i]); - mouseActionCommand[i] = conf->readPathEntry(QString("MouseActionCommand")+n); + conf->readUnsignedNumEntry(TQString("MouseAction")+n, mouseAction[i]); + mouseActionCommand[i] = conf->readPathEntry(TQString("MouseActionCommand")+n); } conf->setGroup("Interface"); @@ -229,13 +229,13 @@ KTimeMon::KTimeMon(const QString& configFile, Type type, int actions, vertical = conf->readBoolEntry("Vertical", true); - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(timeout())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout())); timer->start(interval); sample = new KSample(this, autoScale, pageScale, swapScale, ctxScale); - QString aboutmsg = i18n("KTimeMon for KDE\n" + TQString aboutmsg = i18n("KTimeMon for KDE\n" "Maintained by Dirk A. Mueller \n" "Written by M. Maierhofer (m.maierhofer@tees.ac.uk)\n" "Based on timemon by H. Maierhofer"); @@ -249,8 +249,8 @@ KTimeMon::KTimeMon(const QString& configFile, Type type, int actions, menu->insertSeparator(); menu->insertItem(SmallIcon( "help" ), i18n("Help"), hmenu->menu(), 1); - menu->connectItem(2, this, SLOT(configure())); - menu->connectItem(4, this, SLOT(orientation())); + menu->connectItem(2, this, TQT_SLOT(configure())); + menu->connectItem(4, this, TQT_SLOT(orientation())); menu->setCheckable(true); @@ -328,11 +328,11 @@ void KTimeMon::writeConfiguration() conf->writeEntry("ContextScale", ctxScale); conf->writeEntry("WidgetSize", size()); for (int i = 0; i < MAX_MOUSE_ACTIONS; i++) { - QString n; + TQString n; n.setNum(i); - conf->writeEntry(QString("MouseAction")+n, (unsigned)mouseAction[i]); - conf->writePathEntry(QString("MouseActionCommand")+n, mouseActionCommand[i]); + conf->writeEntry(TQString("MouseAction")+n, (unsigned)mouseAction[i]); + conf->writePathEntry(TQString("MouseActionCommand")+n, mouseActionCommand[i]); } conf->sync(); } @@ -380,7 +380,7 @@ void KTimeMon::orientation() } // Pop up the menu when the appropriate button has been pressed. -void KTimeMon::mousePressEvent(QMouseEvent *event) +void KTimeMon::mousePressEvent(TQMouseEvent *event) { if (event == 0) return; @@ -413,8 +413,8 @@ void KTimeMon::runCommand(int index) bgProcess = new KShellProcess; *bgProcess << mouseActionCommand[index]; - connect(bgProcess, SIGNAL(receivedStderr(KProcess *, char *, int)), - this, SLOT(commandStderr(KProcess *, char *, int))); + connect(bgProcess, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(commandStderr(KProcess *, char *, int))); bgProcess->start(KProcess::DontCare, KProcess::Stderr); } @@ -423,10 +423,10 @@ void KTimeMon::runCommand(int index) void KTimeMon::commandStderr(KProcess * /*proc*/, char *buffer, int /*length*/) { - QString msgbuf; + TQString msgbuf; msgbuf = i18n("Got diagnostic output from child command:\n\n"); - msgbuf += QString::fromLocal8Bit(buffer); + msgbuf += TQString::fromLocal8Bit(buffer); KMessageBox::information(this, msgbuf); } diff --git a/kicker-applets/ktimemon/timemon.h b/kicker-applets/ktimemon/timemon.h index 8f5664c..cf39a35 100644 --- a/kicker-applets/ktimemon/timemon.h +++ b/kicker-applets/ktimemon/timemon.h @@ -15,7 +15,7 @@ #ifndef TIMEMON_H #define TIMEMON_H -#include +#include #include #include @@ -44,13 +44,13 @@ class KPopupMenu; * case it hides itself). */ -class KTimeMon : public KPanelApplet, QToolTip { +class KTimeMon : public KPanelApplet, TQToolTip { Q_OBJECT public: enum MouseAction { NOTHING, SWITCH, MENU, COMMAND }; - KTimeMon(const QString& configFile, Type t = Normal, int actions = 0, - QWidget *parent = 0, const char *name = 0); + KTimeMon(const TQString& configFile, Type t = Normal, int actions = 0, + TQWidget *parent = 0, const char *name = 0); virtual ~KTimeMon(); void writeConfiguration(); // write back the configuration data @@ -70,10 +70,10 @@ public slots: void apply(); // apply configuration information protected: - virtual void maybeTip(const QPoint&); - virtual void mousePressEvent(QMouseEvent *event); + virtual void maybeTip(const TQPoint&); + virtual void mousePressEvent(TQMouseEvent *event); virtual void updateConfig(KConfDialog *d); - virtual void paintEvent(QPaintEvent *event); + virtual void paintEvent(TQPaintEvent *event); private slots: // called from the menu void configure(); // show the configuration dialog @@ -82,23 +82,23 @@ private slots: // called from the menu private: void runCommand(int index); - void paintRect(int x, int y, int w, int h, QColor c, QPainter *p); + void paintRect(int x, int y, int w, int h, TQColor c, TQPainter *p); unsigned interval; bool autoScale; unsigned pageScale, swapScale, ctxScale; KPopupMenu* menu; KHelpMenu* hmenu; - QTimer* timer; + TQTimer* timer; KConfDialog *configDialog; MouseAction mouseAction[MAX_MOUSE_ACTIONS]; - QString mouseActionCommand[MAX_MOUSE_ACTIONS]; + TQString mouseActionCommand[MAX_MOUSE_ACTIONS]; KShellProcess *bgProcess; KSample *sample; - QColor kernelColour, userColour, niceColour, iowaitColour; - QColor usedColour, buffersColour, cachedColour, mkernelColour; - QColor swapColour, bgColour; + TQColor kernelColour, userColour, niceColour, iowaitColour; + TQColor usedColour, buffersColour, cachedColour, mkernelColour; + TQColor swapColour, bgColour; bool vertical, tooltip; friend class KConfDialog; diff --git a/kicker-applets/math/mathapplet.cpp b/kicker-applets/math/mathapplet.cpp index b4966b2..9d7ca38 100644 --- a/kicker-applets/math/mathapplet.cpp +++ b/kicker-applets/math/mathapplet.cpp @@ -23,11 +23,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -49,23 +49,23 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kmathapplet"); return new MathApplet(configFile, KPanelApplet::Stretch, 0, parent, "kmathapplet"); } } -MathApplet::MathApplet(const QString& configFile, Type type, int actions, - QWidget *parent, const char *name) +MathApplet::MathApplet(const TQString& configFile, Type type, int actions, + TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name), m_hasFocus(false) { // setBackgroundMode(X11ParentRelative); setBackgroundOrigin( AncestorOrigin ); // setup label - _label = new QLabel(i18n("Evaluate:"), this); - QFont f(_label->font()); + _label = new TQLabel(i18n("Evaluate:"), this); + TQFont f(_label->font()); f.setPixelSize(12); // _label->setBackgroundMode(X11ParentRelative); _label->setBackgroundOrigin( AncestorOrigin ); @@ -73,19 +73,19 @@ MathApplet::MathApplet(const QString& configFile, Type type, int actions, _label->setFont(f); // setup popup button - _btn = new QPushButton(this); + _btn = new TQPushButton(this); f = _btn->font(); f.setPixelSize(12); _btn->setFont(f); - connect(_btn, SIGNAL(clicked()), SLOT(popup_combo())); + connect(_btn, TQT_SIGNAL(clicked()), TQT_SLOT(popup_combo())); // setup history combo _input = new KHistoryCombo(this); _input->setFocus(); _input->clearEdit(); watchForFocus(_input->lineEdit()); - connect(_input, SIGNAL(activated(const QString&)), - SLOT(evaluate(const QString&))); + connect(_input, TQT_SIGNAL(activated(const TQString&)), + TQT_SLOT(evaluate(const TQString&))); initContextMenu(); useDegrees(); @@ -95,14 +95,14 @@ MathApplet::MathApplet(const QString& configFile, Type type, int actions, // restore history and completion list - QStringList list = c->readListEntry("Completion list"); + TQStringList list = c->readListEntry("Completion list"); _input->completionObject()->setItems(list); list = c->readListEntry("History list"); _input->setHistoryItems(list); int mode = c->readNumEntry( "CompletionMode", KGlobalSettings::completionMode() ); _input->setCompletionMode( (KGlobalSettings::Completion) mode ); - _hbox = new QHBox( 0, 0, WStyle_Customize | WType_Popup ); + _hbox = new TQHBox( 0, 0, WStyle_Customize | WType_Popup ); _hbox->setFixedSize(120, 22); @@ -112,8 +112,8 @@ void MathApplet::initContextMenu() { mContextMenu = new KPopupMenu(this); mContextMenu->setCheckable(true); - mContextMenu->insertItem(i18n("Use &Degrees"), this, SLOT(useDegrees()), 0, 0, 0); - mContextMenu->insertItem(i18n("Use &Radians"), this, SLOT(useRadians()), 0, 1, 1); + mContextMenu->insertItem(i18n("Use &Degrees"), this, TQT_SLOT(useDegrees()), 0, 0, 0); + mContextMenu->insertItem(i18n("Use &Radians"), this, TQT_SLOT(useRadians()), 0, 1, 1); setCustomMenu(mContextMenu); } @@ -124,7 +124,7 @@ MathApplet::~MathApplet() c->setGroup("General"); // save history and completion list - QStringList list = _input->completionObject()->items(); + TQStringList list = _input->completionObject()->items(); c->writeEntry("Completion list", list); list = _input->historyItems(); c->writeEntry("History list", list); @@ -149,12 +149,12 @@ void MathApplet::useRadians() { dummy.setAngleMode(0); } -void MathApplet::resizeEvent(QResizeEvent*) +void MathApplet::resizeEvent(TQResizeEvent*) { if(orientation() == Horizontal) { _btn->hide(); - _input->reparent(this, QPoint(0,0), true); + _input->reparent(this, TQPoint(0,0), true); _label->setGeometry(0,0, width(), _label->height()); if(height() >= _input->sizeHint().height() + _label->height()) @@ -185,7 +185,7 @@ void MathApplet::resizeEvent(QResizeEvent*) { _btn->show(); _btn->setFixedSize(width(), 22); - _input->reparent( _hbox, QPoint(0, 0), false); + _input->reparent( _hbox, TQPoint(0, 0), false); _label->hide(); } setButtonText(); @@ -198,7 +198,7 @@ void MathApplet::positionChange(KPanelApplet::Position) void MathApplet::setButtonText() { - QString t; + TQString t; if (position() == pLeft) { @@ -230,19 +230,19 @@ int MathApplet::heightForWidth(int ) const void MathApplet::popup_combo() { - QPoint p; + TQPoint p; if (position() == pLeft) - p = mapToGlobal(QPoint(-_input->width()-1, 0)); + p = mapToGlobal(TQPoint(-_input->width()-1, 0)); else - p = mapToGlobal(QPoint(width()+1, 0)); + p = mapToGlobal(TQPoint(width()+1, 0)); _hbox->move(p); _hbox->show(); _input->setFocus(); } -void MathApplet::evaluate(const QString& command) +void MathApplet::evaluate(const TQString& command) { - QString exec; + TQString exec; Parser evaluator; @@ -251,7 +251,7 @@ void MathApplet::evaluate(const QString& command) _input->addToHistory(command); - QString cmd = command; + TQString cmd = command; // Nothing interesting. Quit! if ( cmd.isEmpty() ){ @@ -260,7 +260,7 @@ void MathApplet::evaluate(const QString& command) } else { double answer = evaluator.eval(command); if (evaluator.errmsg() == 0) { - QString ansAsString = QString::number(answer); + TQString ansAsString = TQString::number(answer); _input->clearEdit(); _input->setEditText(ansAsString); } else { @@ -273,7 +273,7 @@ void MathApplet::evaluate(const QString& command) _hbox->hide(); } -void MathApplet::mousePressEvent(QMouseEvent *e) +void MathApplet::mousePressEvent(TQMouseEvent *e) { if ( e->button() != RightButton ) { diff --git a/kicker-applets/math/mathapplet.h b/kicker-applets/math/mathapplet.h index 1a918c3..8b483f2 100644 --- a/kicker-applets/math/mathapplet.h +++ b/kicker-applets/math/mathapplet.h @@ -26,7 +26,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __mathapplet_h__ #define __mathapplet_h__ -#include +#include #include class QLabel; @@ -40,19 +40,19 @@ class MathApplet : public KPanelApplet Q_OBJECT public: - MathApplet(const QString& configFile, Type t = Stretch, int actions = 0, - QWidget *parent = 0, const char *name = 0); + MathApplet(const TQString& configFile, Type t = Stretch, int actions = 0, + TQWidget *parent = 0, const char *name = 0); virtual ~MathApplet(); int widthForHeight(int height) const; int heightForWidth(int width) const; protected: - void resizeEvent(QResizeEvent*); + void resizeEvent(TQResizeEvent*); void positionChange(KPanelApplet::Position); protected slots: - void evaluate(const QString&); + void evaluate(const TQString&); void popup_combo(); void setButtonText(); void useDegrees(); @@ -61,12 +61,12 @@ protected slots: private: void initContextMenu(); - void mousePressEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); KHistoryCombo *_input; - QLabel *_label; - QPushButton *_btn; - QHBox *_hbox; + TQLabel *_label; + TQPushButton *_btn; + TQHBox *_hbox; KPopupMenu *mContextMenu; bool m_hasFocus; }; diff --git a/kicker-applets/math/parser.cpp b/kicker-applets/math/parser.cpp index 7d99c87..8a58064 100644 --- a/kicker-applets/math/parser.cpp +++ b/kicker-applets/math/parser.cpp @@ -136,7 +136,7 @@ double Parser::anglemode() { return m_anglemode; } -double Parser::eval(QString str) +double Parser::eval(TQString str) { double erg; stack=new double [stacksize]; @@ -235,7 +235,7 @@ int Parser::getNextIndex() return ix; } -int Parser::addfkt(QString str) +int Parser::addfkt(TQString str) { int ix; @@ -250,11 +250,11 @@ int Parser::addfkt(QString str) //insert '*' when it is needed for(int i=p1+3; i < (int) str.length();i++) { - if( (str.at(i).isNumber() || str.at(i).category()==QChar::Letter_Uppercase )&& ( str.at(i-1).isLetter() || str.at(i-1) == ')' ) ) + if( (str.at(i).isNumber() || str.at(i).category()==TQChar::Letter_Uppercase )&& ( str.at(i-1).isLetter() || str.at(i-1) == ')' ) ) { str.insert(i,'*'); } - else if( (str.at(i).isNumber() || str.at(i) == ')' || str.at(i).category()==QChar::Letter_Uppercase) && ( str.at(i+1).isLetter() || str.at(i+1) == '(' ) ) + else if( (str.at(i).isNumber() || str.at(i) == ')' || str.at(i).category()==TQChar::Letter_Uppercase) && ( str.at(i+1).isLetter() || str.at(i+1) == '(' ) ) { str.insert(i+1,'*'); i++; @@ -316,7 +316,7 @@ int Parser::addfkt(QString str) } -int Parser::delfkt(QString name) +int Parser::delfkt(TQString name) { int ix; ix=getfix(name); @@ -333,7 +333,7 @@ int Parser::delfkt(int ix) } -double Parser::fkt(QString name, double x) +double Parser::fkt(TQString name, double x) { int ix; ix=getfix(name); @@ -632,7 +632,7 @@ int Parser::chkfix(int ix) } -int Parser::getfkt(int ix, QString& name, QString& str) +int Parser::getfkt(int ix, TQString& name, TQString& str) { if(ix<0 || ix>=ufanz) return -1; // ungltiger Index if(ufkt[ix].fname.isEmpty()) return -1; // keine Funktion name=ufkt[ix].fname.copy(); @@ -641,7 +641,7 @@ int Parser::getfkt(int ix, QString& name, QString& str) } -int Parser::getfix(QString name) +int Parser::getfix(TQString name) { int ix; err=0; @@ -656,41 +656,41 @@ int Parser::getfix(QString name) int Parser::errmsg() { switch(err) { case 1: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Syntax error").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "Syntax error").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 2: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Missing parenthesis").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "Missing parenthesis").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 3: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Function name unknown").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "Function name unknown").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 4: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Void function variable").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "Void function variable").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 5: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Too many functions").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "Too many functions").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 6: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Token-memory overflow").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "Token-memory overflow").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 7: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Stack overflow").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "Stack overflow").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 8: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "Name of function not free").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "Name of function not free").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 9: KMessageBox::error(0, i18n("Parser error at position %1:\n" - "recursive function not allowed").arg(QString::number(errpos)), i18n("Math Expression Evaluator")); + "recursive function not allowed").arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; - case 10: KMessageBox::error(0, i18n("Could not find a defined constant at position %1" ).arg(QString::number(errpos)), + case 10: KMessageBox::error(0, i18n("Could not find a defined constant at position %1" ).arg(TQString::number(errpos)), i18n("Math Expression Evaluator")); break; case 11: KMessageBox::error(0, i18n("Empty function"), i18n("Math Expression Evaluator")); diff --git a/kicker-applets/math/parser.h b/kicker-applets/math/parser.h index 44e82ba..4ee0e7d 100644 --- a/kicker-applets/math/parser.h +++ b/kicker-applets/math/parser.h @@ -30,8 +30,8 @@ * \brief Contains the parser core class Parser. */ // Qt includes -#include -#include +#include +#include #ifndef parser_included #define parser_included @@ -125,23 +125,23 @@ public: ~Parser(); /// Evaluates the given expression. - double eval(QString); + double eval(TQString); /// Evaluates the function with the given name at the position. - double fkt(QString, double); + double fkt(TQString, double); /// Evaluates the function with the given index at the position. double fkt(int ix, double x) {return ufkt[ix].fkt(x);} /// Adds a user defined function with the given equation. - int addfkt(QString); + int addfkt(TQString); /// Removes the function with the given name. - int delfkt(QString); + int delfkt(TQString); /// Removes the function with the given index. int delfkt(int); /// Returns name and expression of the function with the given index. - int getfkt(int, QString&, QString&); + int getfkt(int, TQString&, TQString&); /// Checks, if at the given index a function is stored. int chkfix(int); /// Returns the index of the function with the given name. - int getfix(QString); + int getfix(TQString); /// Returns the lowest index in the array of user defined functions which is empty, /// or -1, if the array is full. int getNextIndex(); @@ -154,7 +154,7 @@ public: /// sets the angletype. TRUE is radians and FALSE degrees void setAngleMode(int); - QValueVector constant; + TQValueVector constant; /// Error codes. /** @@ -188,9 +188,9 @@ public: unsigned char *mem; ///< Pointer to the allocated memory for the tokens. unsigned char *mptr; ///< Pointer to the token. QString fname; ///< Name of the function. - QString fvar; ///< Dummy variable. - QString fpar; ///< Parameter. - QString fstr; ///< Function expression. + TQString fvar; ///< Dummy variable. + TQString fpar; ///< Parameter. + TQString fstr; ///< Function expression. int memsize; ///< Size of token memory int stacksize; ///< Size of the stack. double k, ///< Function parameter. diff --git a/kicker-applets/mediacontrol/amarokInterface.cpp b/kicker-applets/mediacontrol/amarokInterface.cpp index 2045c12..f52ae4b 100644 --- a/kicker-applets/mediacontrol/amarokInterface.cpp +++ b/kicker-applets/mediacontrol/amarokInterface.cpp @@ -21,8 +21,8 @@ #include "amarokInterface.moc" #include -#include -#include +#include +#include #include #define TIMER_FAST 250 @@ -30,18 +30,18 @@ AmarokInterface::AmarokInterface() : PlayerInterface() { mTimerValue = TIMER_FAST; - mAmarokTimer = new QTimer ( this, "mAmaroKTimer" ); + mAmarokTimer = new TQTimer ( this, "mAmaroKTimer" ); - connect(mAmarokTimer, SIGNAL(timeout()), SLOT(updateSlider()) ); + connect(mAmarokTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateSlider()) ); kapp->dcopClient()->setNotifications ( true ); - connect(kapp->dcopClient(), SIGNAL(applicationRegistered(const QCString&)), - SLOT(appRegistered(const QCString&)) ); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRegistered(const TQCString&)), + TQT_SLOT(appRegistered(const TQCString&)) ); - connect(kapp->dcopClient(), SIGNAL(applicationRemoved(const QCString&)), - SLOT(appRemoved(const QCString&))); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRemoved(const TQCString&)), + TQT_SLOT(appRemoved(const TQCString&))); - QTimer::singleShot(0, this, SLOT(myInit())); + TQTimer::singleShot(0, this, TQT_SLOT(myInit())); } AmarokInterface::~AmarokInterface() @@ -66,7 +66,7 @@ void AmarokInterface::myInit() } } -void AmarokInterface::appRegistered ( const QCString &appId ) +void AmarokInterface::appRegistered ( const TQCString &appId ) { if(appId.contains("amarok",false) ) { @@ -76,7 +76,7 @@ void AmarokInterface::appRegistered ( const QCString &appId ) } } -void AmarokInterface::appRemoved ( const QCString &appId ) +void AmarokInterface::appRemoved ( const TQCString &appId ) { if ( appId.contains("amarok",false) ) { @@ -93,8 +93,8 @@ void AmarokInterface::updateSlider ( ) { // length/time in msecs, -1 means "no playobject in amarok" int len, time; - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (!kapp->dcopClient()->call(mAppId, "player", "trackTotalTime()",data, replyType, replyData)) { @@ -104,7 +104,7 @@ void AmarokInterface::updateSlider ( ) } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") { reply >> len; @@ -128,7 +128,7 @@ void AmarokInterface::updateSlider ( ) } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") { reply >> time; @@ -151,20 +151,20 @@ void AmarokInterface::updateSlider ( ) // Drag-n-Drop stuff ================================================================= -void AmarokInterface::dragEnterEvent(QDragEnterEvent* event) +void AmarokInterface::dragEnterEvent(TQDragEnterEvent* event) { // kdDebug(90200) << "AmarokInterface::dragEnterEvent()" << endl; event->accept( KURLDrag::canDecode(event) ); } -void AmarokInterface::dropEvent(QDropEvent* event) +void AmarokInterface::dropEvent(TQDropEvent* event) { kdDebug(90200) << "AmarokInterface::dropEvent()" << endl; KURL::List list; if (KURLDrag::decode(event, list)) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << list; if (!kapp->dcopClient()->send(mAppId, "player", "addMediaList(KURL::List)",data)) kdDebug(90200) << "Couldn't send drop to amarok" << endl; @@ -185,8 +185,8 @@ void AmarokInterface::sliderStopDrag() void AmarokInterface::jumpToTime( int sec ) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << sec; kapp->dcopClient()->send(mAppId, "player", "seek(int)", data); } @@ -195,54 +195,54 @@ void AmarokInterface::playpause() { if (!findRunningAmarok()) startPlayer("amarok"); - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "playPause()", data); } void AmarokInterface::stop() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "stop()", data); } void AmarokInterface::next() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "next()", data); } void AmarokInterface::prev() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "prev()", data); } void AmarokInterface::volumeUp() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "volumeUp()", data); } void AmarokInterface::volumeDown() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "player", "volumeDown()", data); } -const QString AmarokInterface::getTrackTitle() const +const TQString AmarokInterface::getTrackTitle() const { - QString title; - QByteArray data, replyData; - QCString replyType; + TQString title; + TQByteArray data, replyData; + TQCString replyType; if (!kapp->dcopClient()->call(mAppId, "player", "nowPlaying()",data, replyType, replyData)) { //kdDebug(90200) << "mediacontrol: DCOP communication Error" << endl; - return QString(""); + return TQString(""); } else { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> title; return title; @@ -250,7 +250,7 @@ const QString AmarokInterface::getTrackTitle() const else { //kdDebug(90200) << "mediacontrol: unexpected type of DCOP-reply" << endl; - return QString(""); + return TQString(""); } } } @@ -258,9 +258,9 @@ const QString AmarokInterface::getTrackTitle() const bool AmarokInterface::findRunningAmarok() { QCStringList allApps = kapp->dcopClient()->registeredApplications(); - QValueList::const_iterator iterator; - QByteArray data, replyData; - QCString replyType; + TQValueList::const_iterator iterator; + TQByteArray data, replyData; + TQCString replyType; for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { @@ -270,7 +270,7 @@ bool AmarokInterface::findRunningAmarok() { if ( replyType == "QCStringList" ) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); QCStringList list; reply >> list; @@ -291,14 +291,14 @@ bool AmarokInterface::findRunningAmarok() int AmarokInterface::playingStatus() { - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "player", "status()", data, replyType, replyData)) { int status = 0; - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> status; if (status == 2) diff --git a/kicker-applets/mediacontrol/amarokInterface.h b/kicker-applets/mediacontrol/amarokInterface.h index 3a71031..53f1ac6 100644 --- a/kicker-applets/mediacontrol/amarokInterface.h +++ b/kicker-applets/mediacontrol/amarokInterface.h @@ -24,7 +24,7 @@ #include #include -#include +#include class AmarokInterface : public PlayerInterface { @@ -44,20 +44,20 @@ class AmarokInterface : public PlayerInterface virtual void prev(); virtual void volumeUp(); virtual void volumeDown(); - virtual void dragEnterEvent(QDragEnterEvent* event); - virtual void dropEvent(QDropEvent* event); - virtual const QString getTrackTitle() const; + virtual void dragEnterEvent(TQDragEnterEvent* event); + virtual void dropEvent(TQDropEvent* event); + virtual const TQString getTrackTitle() const; virtual int playingStatus(); private slots: void myInit(); - void appRegistered ( const QCString &appId ); - void appRemoved ( const QCString &appId ); + void appRegistered ( const TQCString &appId ); + void appRemoved ( const TQCString &appId ); private: - QTimer *mAmarokTimer; + TQTimer *mAmarokTimer; int mTimerValue; - QCString mAppId; + TQCString mAppId; /** * Tries to find a DCOP registered instance of AmaroK diff --git a/kicker-applets/mediacontrol/configfrontend.cpp b/kicker-applets/mediacontrol/configfrontend.cpp index ba206c8..4deab8b 100644 --- a/kicker-applets/mediacontrol/configfrontend.cpp +++ b/kicker-applets/mediacontrol/configfrontend.cpp @@ -21,9 +21,9 @@ #include "configfrontend.h" // #include -ConfigFrontend::ConfigFrontend() : QObject(0, 0) +ConfigFrontend::ConfigFrontend() : TQObject(0, 0) { - _config = new KConfig(QString::null, true, false); + _config = new KConfig(TQString::null, true, false); _ownConfig = true; } @@ -35,7 +35,7 @@ ConfigFrontend::~ConfigFrontend() } } -ConfigFrontend::ConfigFrontend(KConfig *config) : QObject(0, 0) +ConfigFrontend::ConfigFrontend(KConfig *config) : TQObject(0, 0) { _config = config; _config->setGroup("MediaControl"); @@ -57,12 +57,12 @@ void ConfigFrontend::setMouseWheelSpeed(const uint mouseWheelSpeed) // ==================================================================================== -QString ConfigFrontend::player() const +TQString ConfigFrontend::player() const { return _config->readPathEntry("Player", "Noatun"); } -void ConfigFrontend::setPlayer(const QString &player) +void ConfigFrontend::setPlayer(const TQString &player) { _config->writePathEntry("Player", player); _config->sync(); @@ -70,12 +70,12 @@ void ConfigFrontend::setPlayer(const QString &player) // ==================================================================================== -QString ConfigFrontend::theme() const +TQString ConfigFrontend::theme() const { return _config->readEntry("Theme", "default"); } -void ConfigFrontend::setTheme(const QString &theme) +void ConfigFrontend::setTheme(const TQString &theme) { _config->writeEntry("Theme", theme); _config->sync(); diff --git a/kicker-applets/mediacontrol/configfrontend.h b/kicker-applets/mediacontrol/configfrontend.h index 87a0bf4..b625c70 100644 --- a/kicker-applets/mediacontrol/configfrontend.h +++ b/kicker-applets/mediacontrol/configfrontend.h @@ -33,14 +33,14 @@ class ConfigFrontend : public QObject virtual ~ConfigFrontend(); uint mouseWheelSpeed() const; - QString player() const; - QString theme() const; + TQString player() const; + TQString theme() const; bool useCustomTheme() const; public slots: void setMouseWheelSpeed(const uint); - void setPlayer(const QString &player); - void setTheme(const QString &theme); + void setPlayer(const TQString &player); + void setTheme(const TQString &theme); void setUseCustomTheme(const bool use); void reparseConfiguration() { _config->reparseConfiguration(); } diff --git a/kicker-applets/mediacontrol/jukInterface.cpp b/kicker-applets/mediacontrol/jukInterface.cpp index 302e7f2..be99528 100644 --- a/kicker-applets/mediacontrol/jukInterface.cpp +++ b/kicker-applets/mediacontrol/jukInterface.cpp @@ -20,9 +20,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #define TIMER_FAST 250 @@ -30,18 +30,18 @@ JuKInterface::JuKInterface() : PlayerInterface(), mProc(0) { mTimerValue = TIMER_FAST; - mJuKTimer = new QTimer ( this, "mJukTimer" ); + mJuKTimer = new TQTimer ( this, "mJukTimer" ); - connect(mJuKTimer, SIGNAL(timeout()), SLOT(updateSlider()) ); + connect(mJuKTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateSlider()) ); kapp->dcopClient()->setNotifications ( true ); - connect(kapp->dcopClient(), SIGNAL(applicationRegistered(const QCString&)), - SLOT(appRegistered(const QCString&)) ); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRegistered(const TQCString&)), + TQT_SLOT(appRegistered(const TQCString&)) ); - connect(kapp->dcopClient(), SIGNAL(applicationRemoved(const QCString&)), - SLOT(appRemoved(const QCString&))); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRemoved(const TQCString&)), + TQT_SLOT(appRemoved(const TQCString&))); - QTimer::singleShot(0, this, SLOT(myInit())); + TQTimer::singleShot(0, this, TQT_SLOT(myInit())); } JuKInterface::~JuKInterface() @@ -66,7 +66,7 @@ void JuKInterface::myInit() } } -void JuKInterface::appRegistered ( const QCString &appId ) +void JuKInterface::appRegistered ( const TQCString &appId ) { if(appId.contains("juk",false) ) { @@ -80,18 +80,18 @@ void JuKInterface::appRegistered ( const QCString &appId ) // So what we do is launch the dcop command instead, and let // *it* block for us. As soon as the command exits, we know // that JuK is ready to go (and so are we). - mProc = new QProcess(this, "jukdcopCheckProc"); + mProc = new TQProcess(this, "jukdcopCheckProc"); mProc->addArgument("dcop"); mProc->addArgument("juk"); mProc->addArgument("Player"); mProc->addArgument("status()"); - connect(mProc, SIGNAL(processExited()), SLOT(jukIsReady())); + connect(mProc, TQT_SIGNAL(processExited()), TQT_SLOT(jukIsReady())); mProc->start(); } } -void JuKInterface::appRemoved ( const QCString &appId ) +void JuKInterface::appRemoved ( const TQCString &appId ) { if ( appId.contains("juk",false) ) { @@ -119,13 +119,13 @@ void JuKInterface::updateSlider () // length/time in msecs, -1 means "no playobject in juk" int len = -1; int time = -1; - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "Player", "totalTime()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> len; } @@ -137,7 +137,7 @@ void JuKInterface::updateSlider () if (kapp->dcopClient()->call(mAppId, "Player", "currentTime()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> time; } @@ -153,22 +153,22 @@ void JuKInterface::updateSlider () // Drag-n-Drop stuff ================================================================= -void JuKInterface::dragEnterEvent(QDragEnterEvent* event) +void JuKInterface::dragEnterEvent(TQDragEnterEvent* event) { // kdDebug(90200) << "JuKInterface::dragEnterEvent()" << endl; event->accept( KURLDrag::canDecode(event) ); } -void JuKInterface::dropEvent(QDropEvent* event) +void JuKInterface::dropEvent(TQDropEvent* event) { // kdDebug(90200) << "JuKInterface::dropEvent()" << endl; KURL::List list; if (KURLDrag::decode(event, list)) { - QByteArray data, replyData; - QStringList fileList; - QCString replyType; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data, replyData; + TQStringList fileList; + TQCString replyType; + TQDataStream arg(data, IO_WriteOnly); // Juk doesn't handle KURL's yet, so we need to form a list // that contains the local paths. @@ -179,18 +179,18 @@ void JuKInterface::dropEvent(QDropEvent* event) // Use call instead of send to make sure the files are added // before we try to play. - if (!kapp->dcopClient()->call(mAppId, "Collection", "openFile(QStringList)", data, + if (!kapp->dcopClient()->call(mAppId, "Collection", "openFile(TQStringList)", data, replyType, replyData, true)) { kdDebug(90200) << "Couldn't send drop to juk" << endl; } // Apparently we should auto-play? - QByteArray strData; - QDataStream strArg(strData, IO_WriteOnly); + TQByteArray strData; + TQDataStream strArg(strData, IO_WriteOnly); strArg << *fileList.begin(); - if (!kapp->dcopClient()->send(mAppId, "Player", "play(QString)", strData)) + if (!kapp->dcopClient()->send(mAppId, "Player", "play(TQString)", strData)) kdDebug(90200) << "Couldn't send play command to juk" << endl; } } @@ -209,8 +209,8 @@ void JuKInterface::sliderStopDrag() void JuKInterface::jumpToTime( int sec ) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << sec; // Used in JuK shipping with KDE < 3.3 //kapp->dcopClient()->send(mAppId, "Player", "setTime(int)", data); @@ -221,64 +221,64 @@ void JuKInterface::playpause() { if (!findRunningJuK()) startPlayer("juk"); - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "Player", "playPause()", data); } void JuKInterface::stop() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "Player", "stop()", data); } void JuKInterface::next() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "Player", "forward()", data); } void JuKInterface::prev() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "Player", "back()", data); } void JuKInterface::volumeUp() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "Player", "volumeUp()", data); } void JuKInterface::volumeDown() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "Player", "volumeDown()", data); } -const QString JuKInterface::getTrackTitle() const +const TQString JuKInterface::getTrackTitle() const { - QString title; - QByteArray data, replyData; - QCString replyType; + TQString title; + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "Player", "playingString()",data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> title; return title; } } - return QString(""); + return TQString(""); } // FIXME: what if we have a dcop app named, let's say, 'jukfrontend'? bool JuKInterface::findRunningJuK() { QCStringList allApps = kapp->dcopClient()->registeredApplications(); - QValueList::const_iterator iterator; + TQValueList::const_iterator iterator; for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { @@ -293,14 +293,14 @@ bool JuKInterface::findRunningJuK() int JuKInterface::playingStatus() { - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "Player", "status()", data, replyType, replyData)) { int status = 0; - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> status; diff --git a/kicker-applets/mediacontrol/jukInterface.h b/kicker-applets/mediacontrol/jukInterface.h index fb7f9bb..f305ab0 100644 --- a/kicker-applets/mediacontrol/jukInterface.h +++ b/kicker-applets/mediacontrol/jukInterface.h @@ -23,7 +23,7 @@ #include #include -#include +#include class QProcess; @@ -45,22 +45,22 @@ class JuKInterface : public PlayerInterface void prev(); void volumeUp(); void volumeDown(); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - const QString getTrackTitle() const; + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + const TQString getTrackTitle() const; int playingStatus(); private slots: void myInit(); - void appRegistered ( const QCString &appId ); - void appRemoved ( const QCString &appId ); + void appRegistered ( const TQCString &appId ); + void appRemoved ( const TQCString &appId ); void jukIsReady(); private: - QTimer *mJuKTimer; - QProcess *mProc; + TQTimer *mJuKTimer; + TQProcess *mProc; int mTimerValue; - QCString mAppId; + TQCString mAppId; /** * Tries to find a DCOP registered instance of juk diff --git a/kicker-applets/mediacontrol/kscdInterface.cpp b/kicker-applets/mediacontrol/kscdInterface.cpp index f7f7e90..fea1048 100644 --- a/kicker-applets/mediacontrol/kscdInterface.cpp +++ b/kicker-applets/mediacontrol/kscdInterface.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -30,18 +30,18 @@ KsCDInterface::KsCDInterface() : PlayerInterface() { - mKsCDTimer = new QTimer(this, "mKsCDTimer"); + mKsCDTimer = new TQTimer(this, "mKsCDTimer"); - connect(mKsCDTimer, SIGNAL(timeout()), SLOT(updateSlider()) ); + connect(mKsCDTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateSlider()) ); kapp->dcopClient()->setNotifications ( true ); - connect(kapp->dcopClient(), SIGNAL(applicationRegistered(const QCString&)), - SLOT(appRegistered(const QCString&)) ); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRegistered(const TQCString&)), + TQT_SLOT(appRegistered(const TQCString&)) ); - connect(kapp->dcopClient(), SIGNAL(applicationRemoved(const QCString&)), - SLOT(appRemoved(const QCString&))); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRemoved(const TQCString&)), + TQT_SLOT(appRemoved(const TQCString&))); - QTimer::singleShot(0, this, SLOT(myInit())); + TQTimer::singleShot(0, this, TQT_SLOT(myInit())); } KsCDInterface::~KsCDInterface() @@ -66,7 +66,7 @@ void KsCDInterface::myInit() } } -void KsCDInterface::appRegistered(const QCString &appId) +void KsCDInterface::appRegistered(const TQCString &appId) { if((appId) == "kscd") { @@ -76,7 +76,7 @@ void KsCDInterface::appRegistered(const QCString &appId) } } -void KsCDInterface::appRemoved(const QCString &appId) +void KsCDInterface::appRemoved(const TQCString &appId) { if ((appId) == "kscd") { @@ -97,13 +97,13 @@ void KsCDInterface::updateSlider() // length/time in secs, -1 means "no playobject in kscd" int len = -1; int time = -1; - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentTrackLength()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> len; } @@ -115,7 +115,7 @@ void KsCDInterface::updateSlider() if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentPosition()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> time; } @@ -134,12 +134,12 @@ void KsCDInterface::updateSlider() // or even no application to drag AudioCD track from (not the KIO-wrapped track // path (audiocd:/...) like from Konqueror) -void KsCDInterface::dragEnterEvent(QDragEnterEvent* event) +void KsCDInterface::dragEnterEvent(TQDragEnterEvent* event) { event->ignore(); } -void KsCDInterface::dropEvent(QDropEvent* event) +void KsCDInterface::dropEvent(TQDropEvent* event) { event->ignore(); } @@ -158,8 +158,8 @@ void KsCDInterface::sliderStopDrag() void KsCDInterface::jumpToTime(int sec) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << sec; kapp->dcopClient()->send(mAppId, "CDPlayer", "jumpTo(int)", data); } @@ -168,52 +168,52 @@ void KsCDInterface::playpause() { if (!findRunningKsCD()) startPlayer("kscd"); - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "play()", data); } void KsCDInterface::stop() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "stop()", data); } void KsCDInterface::next() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "next()", data); } void KsCDInterface::prev() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "previous()", data); } void KsCDInterface::volumeUp() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "volumeUp()", data); } void KsCDInterface::volumeDown() { - QByteArray data; + TQByteArray data; kapp->dcopClient()->send(mAppId, "CDPlayer", "volumeDown()", data); } -const QString KsCDInterface::getTrackTitle() const +const TQString KsCDInterface::getTrackTitle() const { - QString title, artist, album, result; - QByteArray data, replyData; - QCString replyType; + TQString title, artist, album, result; + TQByteArray data, replyData; + TQCString replyType; // Get track title from KsCD... if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentTrackTitle()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> title; } @@ -223,8 +223,8 @@ const QString KsCDInterface::getTrackTitle() const if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentAlbum()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> album; } @@ -234,8 +234,8 @@ const QString KsCDInterface::getTrackTitle() const if (kapp->dcopClient()->call(mAppId, "CDPlayer", "currentArtist()", data, replyType, replyData)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") { reply >> artist; } @@ -292,7 +292,7 @@ const QString KsCDInterface::getTrackTitle() const bool KsCDInterface::findRunningKsCD() { QCStringList allApps = kapp->dcopClient()->registeredApplications(); - QValueList::const_iterator iterator; + TQValueList::const_iterator iterator; for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { @@ -307,14 +307,14 @@ bool KsCDInterface::findRunningKsCD() int KsCDInterface::playingStatus() { - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "CDPlayer", "getStatus()", data, replyType, replyData)) { int status = 0; - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> status; diff --git a/kicker-applets/mediacontrol/kscdInterface.h b/kicker-applets/mediacontrol/kscdInterface.h index 0817b1e..8af0d1d 100644 --- a/kicker-applets/mediacontrol/kscdInterface.h +++ b/kicker-applets/mediacontrol/kscdInterface.h @@ -24,7 +24,7 @@ #include #include -#include +#include class KsCDInterface : public PlayerInterface { @@ -44,19 +44,19 @@ class KsCDInterface : public PlayerInterface void prev(); void volumeUp(); void volumeDown(); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - const QString getTrackTitle() const; + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + const TQString getTrackTitle() const; int playingStatus(); private slots: void myInit(); - void appRegistered ( const QCString &appId ); - void appRemoved ( const QCString &appId ); + void appRegistered ( const TQCString &appId ); + void appRemoved ( const TQCString &appId ); private: - QTimer *mKsCDTimer; - QCString mAppId; + TQTimer *mKsCDTimer; + TQCString mAppId; /** * Tries to find a DCOP registered instance of KsCD diff --git a/kicker-applets/mediacontrol/mcslider.cpp b/kicker-applets/mediacontrol/mcslider.cpp index 642d2e2..cad953d 100644 --- a/kicker-applets/mediacontrol/mcslider.cpp +++ b/kicker-applets/mediacontrol/mcslider.cpp @@ -15,12 +15,12 @@ * * ***************************************************************************/ -#include +#include #include "mcslider.h" -MCSlider::MCSlider( Orientation orientation, QWidget *parent, const char *name ) - : QSlider( orientation, parent, name ) +MCSlider::MCSlider( Orientation orientation, TQWidget *parent, const char *name ) + : TQSlider( orientation, parent, name ) { setBackgroundOrigin(WidgetOrigin); setBackground(); @@ -38,13 +38,13 @@ void MCSlider::setBackground() if (parentWidget()->paletteBackgroundPixmap()) { - QPixmap pm(width(), height()); + TQPixmap pm(width(), height()); pm.fill(parentWidget(), pos()); setPaletteBackgroundPixmap(pm); } } -void MCSlider::wheelEvent(QWheelEvent *e) +void MCSlider::wheelEvent(TQWheelEvent *e) { if (e->orientation() == Horizontal) return; @@ -59,7 +59,7 @@ void MCSlider::wheelEvent(QWheelEvent *e) } else { - QSlider::wheelEvent(e); + TQSlider::wheelEvent(e); } } diff --git a/kicker-applets/mediacontrol/mcslider.h b/kicker-applets/mediacontrol/mcslider.h index 9b11893..d58aac0 100644 --- a/kicker-applets/mediacontrol/mcslider.h +++ b/kicker-applets/mediacontrol/mcslider.h @@ -18,18 +18,18 @@ #ifndef MCSLIDER_H #define MCSLIDER_H -#include +#include class MCSlider : public QSlider { Q_OBJECT public: - MCSlider( Orientation orientation, QWidget *parent, const char *name = 0 ); + MCSlider( Orientation orientation, TQWidget *parent, const char *name = 0 ); ~MCSlider(); void setBackground(); private: - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); signals: void volumeUp(); void volumeDown(); diff --git a/kicker-applets/mediacontrol/mediacontrol.cpp b/kicker-applets/mediacontrol/mediacontrol.cpp index e69e0e0..433f52d 100644 --- a/kicker-applets/mediacontrol/mediacontrol.cpp +++ b/kicker-applets/mediacontrol/mediacontrol.cpp @@ -35,13 +35,13 @@ #include "mcslider.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -57,7 +57,7 @@ const int NO_BUTTONS = 4; extern "C" { - KDE_EXPORT KPanelApplet *init( QWidget *parent, const QString &configFile) + KDE_EXPORT KPanelApplet *init( TQWidget *parent, const TQString &configFile) { KGlobal::locale()->insertCatalogue("mediacontrol"); return new MediaControl(configFile, KPanelApplet::Normal, @@ -71,27 +71,27 @@ extern "C" class MediaControlToolTip : public QToolTip { public: - MediaControlToolTip(QWidget *widget, PlayerInterface *pl_obj) : - QToolTip(widget), mWidget(widget), mPlayer(pl_obj) {} + MediaControlToolTip(TQWidget *widget, PlayerInterface *pl_obj) : + TQToolTip(widget), mWidget(widget), mPlayer(pl_obj) {} protected: - virtual void maybeTip(const QPoint &pt) + virtual void maybeTip(const TQPoint &pt) { - QRect rc( mWidget->rect()); + TQRect rc( mWidget->rect()); if (rc.contains(pt)) { tip ( rc, mPlayer->getTrackTitle() ); } } private: - QWidget *mWidget; + TQWidget *mWidget; PlayerInterface *mPlayer; }; // ============================================================================= -MediaControl::MediaControl(const QString &configFile, Type t, int actions, - QWidget *parent, const char *name) +MediaControl::MediaControl(const TQString &configFile, Type t, int actions, + TQWidget *parent, const char *name) : DCOPObject("MediaControl"), KPanelApplet(configFile, t, actions, parent, name), mInstance(new KInstance("mediacontrol")), @@ -139,7 +139,7 @@ MediaControl::MediaControl(const QString &configFile, Type t, int actions, playpause_button = new TrayButton (this, "PLAYPAUSE"); stop_button = new TrayButton (this, "STOP"); next_button = new TrayButton (this, "NEXT"); - time_slider = new MCSlider (QSlider::Horizontal, this, "time_slider" ); + time_slider = new MCSlider (TQSlider::Horizontal, this, "time_slider" ); time_slider->setRange(0,0); time_slider->setValue(0); time_slider->setTracking( false ); @@ -147,15 +147,15 @@ MediaControl::MediaControl(const QString &configFile, Type t, int actions, // request notification of changes in icon style kapp->addKipcEventMask(KIPC::IconChanged); - connect(kapp, SIGNAL(iconChanged(int)), this, SLOT(slotIconChanged())); + connect(kapp, TQT_SIGNAL(iconChanged(int)), this, TQT_SLOT(slotIconChanged())); reparseConfig(); rmbMenu = new KPopupMenu(this, "RMBMenu"); rmbMenu->insertTitle(i18n("MediaControl"), 0, 0); rmbMenu->insertItem(SmallIcon("configure"), i18n("Configure MediaControl..."), - this, SLOT(preferences())); - rmbMenu->insertItem(i18n("About MediaControl"), this, SLOT(about())); + this, TQT_SLOT(preferences())); + rmbMenu->insertItem(i18n("About MediaControl"), this, TQT_SLOT(about())); } MediaControl::~MediaControl() @@ -168,12 +168,12 @@ MediaControl::~MediaControl() // Drag-n-Drop stuff =========================================================== -void MediaControl::dragEnterEvent(QDragEnterEvent* event) +void MediaControl::dragEnterEvent(TQDragEnterEvent* event) { _player->dragEnterEvent(event); // Just pass dnd to the playerInterface } -void MediaControl::dropEvent(QDropEvent* event) +void MediaControl::dropEvent(TQDropEvent* event) { _player->dropEvent(event); // Just pass dnd to the playerInterface } @@ -202,7 +202,7 @@ void MediaControl::enableAll() { prev_button->setDisabled(false); playpause_button->setDisabled(false); - QToolTip::remove(playpause_button); + TQToolTip::remove(playpause_button); stop_button->setDisabled(false); next_button->setDisabled(false); time_slider->setDisabled(false); @@ -212,12 +212,12 @@ void MediaControl::disableAll() { prev_button->setDisabled(true); playpause_button->setDisabled(false); - QToolTip::add(playpause_button, i18n("Start the player")); + TQToolTip::add(playpause_button, i18n("Start the player")); stop_button->setDisabled(true); next_button->setDisabled(true); time_slider->setDisabled(true); if(_configFrontend->useCustomTheme()) { - QString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); + TQString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); playpause_button->setIconSet(SmallIconSet(locate("data",skindir+"play.png"))); } else @@ -230,7 +230,7 @@ void MediaControl::slotPlayingStatusChanged(int status) return; mLastStatus = status; - QString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); + TQString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); switch (status) { @@ -275,12 +275,12 @@ void MediaControl::preferences() else { _prefsDialog = new MediaControlConfig ( _configFrontend ); - connect ( _prefsDialog, SIGNAL(closing()), - this, SLOT(slotClosePrefsDialog()) ); - connect ( _prefsDialog, SIGNAL(destroyed()), - this, SLOT(slotPrefsDialogClosing()) ); - connect ( _prefsDialog, SIGNAL(configChanged()), - this, SLOT(slotConfigChanged()) ); + connect ( _prefsDialog, TQT_SIGNAL(closing()), + this, TQT_SLOT(slotClosePrefsDialog()) ); + connect ( _prefsDialog, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(slotPrefsDialogClosing()) ); + connect ( _prefsDialog, TQT_SIGNAL(configChanged()), + this, TQT_SLOT(slotConfigChanged()) ); } } @@ -352,7 +352,7 @@ void MediaControl::reparseConfig() mLastTime = -1; mLastStatus = -1; - QString playerString = _configFrontend->player(); + TQString playerString = _configFrontend->player(); #ifdef HAVE_XMMS @@ -396,21 +396,21 @@ void MediaControl::reparseConfig() } // this signal gets emitted by a playerInterface when the player's playtime changed - connect(_player, SIGNAL(newSliderPosition(int,int)), - this, SLOT(setSliderPosition(int,int))); + connect(_player, TQT_SIGNAL(newSliderPosition(int,int)), + this, TQT_SLOT(setSliderPosition(int,int))); - connect(_player, SIGNAL(playerStarted()), SLOT(enableAll())); - connect(_player, SIGNAL(playerStopped()), SLOT(disableAll())); - connect(_player, SIGNAL(playingStatusChanged(int)), SLOT(slotPlayingStatusChanged(int))); + connect(_player, TQT_SIGNAL(playerStarted()), TQT_SLOT(enableAll())); + connect(_player, TQT_SIGNAL(playerStopped()), TQT_SLOT(disableAll())); + connect(_player, TQT_SIGNAL(playingStatusChanged(int)), TQT_SLOT(slotPlayingStatusChanged(int))); // do we use our icons or the default ones from KDE? if(_configFrontend->useCustomTheme()) { // load theme - QString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); + TQString skindir = locate("data", "mediacontrol/"+_configFrontend->theme()+"/"); // the user has to take care if all pixmaps are there, we only check for one of them - if (QFile(skindir+"play.png").exists()) + if (TQFile(skindir+"play.png").exists()) { prev_button->setIconSet(SmallIconSet(locate("data",skindir+"prev.png"))); if (_player->playingStatus() == PlayerInterface::Playing) @@ -441,17 +441,17 @@ void MediaControl::reparseConfig() slider_tooltip = new MediaControlToolTip(time_slider, _player); - connect(prev_button, SIGNAL(clicked()), _player, SLOT(prev())); - connect(playpause_button, SIGNAL(clicked()), _player, SLOT(playpause())); - connect(stop_button, SIGNAL(clicked()), _player, SLOT(stop())); - connect(next_button, SIGNAL(clicked()), _player, SLOT(next())); - - connect(time_slider, SIGNAL(sliderPressed()), _player, SLOT(sliderStartDrag())); - connect(time_slider, SIGNAL(sliderReleased()), _player, SLOT(sliderStopDrag())); - connect(time_slider, SIGNAL(valueChanged(int)), this, SLOT(adjustTime(int))); - connect(time_slider, SIGNAL(volumeUp()), _player, SLOT(volumeUp())); - connect(time_slider, SIGNAL(volumeDown()), _player, SLOT(volumeDown())); - connect(this, SIGNAL(newJumpToTime(int)), _player, SLOT(jumpToTime(int))); + connect(prev_button, TQT_SIGNAL(clicked()), _player, TQT_SLOT(prev())); + connect(playpause_button, TQT_SIGNAL(clicked()), _player, TQT_SLOT(playpause())); + connect(stop_button, TQT_SIGNAL(clicked()), _player, TQT_SLOT(stop())); + connect(next_button, TQT_SIGNAL(clicked()), _player, TQT_SLOT(next())); + + connect(time_slider, TQT_SIGNAL(sliderPressed()), _player, TQT_SLOT(sliderStartDrag())); + connect(time_slider, TQT_SIGNAL(sliderReleased()), _player, TQT_SLOT(sliderStopDrag())); + connect(time_slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(adjustTime(int))); + connect(time_slider, TQT_SIGNAL(volumeUp()), _player, TQT_SLOT(volumeUp())); + connect(time_slider, TQT_SIGNAL(volumeDown()), _player, TQT_SLOT(volumeDown())); + connect(this, TQT_SIGNAL(newJumpToTime(int)), _player, TQT_SLOT(jumpToTime(int))); } // Widget Placement =================================================================== @@ -496,18 +496,18 @@ int MediaControl::heightForWidth(int width) const } } -void MediaControl::mousePressEvent(QMouseEvent* e) +void MediaControl::mousePressEvent(TQMouseEvent* e) { - if (e->button() == QMouseEvent::RightButton) + if (e->button() == TQMouseEvent::RightButton) rmbMenu->popup(e->globalPos()); } -bool MediaControl::eventFilter(QObject *, QEvent *e) +bool MediaControl::eventFilter(TQObject *, TQEvent *e) { - if (e->type() == QEvent::MouseButtonPress) + if (e->type() == TQEvent::MouseButtonPress) { - QMouseEvent *me = static_cast(e); - if (me->button() == QMouseEvent::RightButton) + TQMouseEvent *me = static_cast(e); + if (me->button() == TQMouseEvent::RightButton) { rmbMenu->popup(me->globalPos()); return true; @@ -516,25 +516,25 @@ bool MediaControl::eventFilter(QObject *, QEvent *e) return false; } -void MediaControl::paletteChange( const QPalette& ) +void MediaControl::paletteChange( const TQPalette& ) { time_slider->setBackground(); } -void MediaControl::moveEvent( QMoveEvent* ) +void MediaControl::moveEvent( TQMoveEvent* ) { time_slider->setBackground(); } // Danger: Weird Code ahead! ;)) -void MediaControl::resizeEvent( QResizeEvent* ) +void MediaControl::resizeEvent( TQResizeEvent* ) { // kdDebug(90200) << "resizeEvent()" << endl; int w = width(); int h = height(); if ( orientation() == Vertical ) { // ====== VERTICAL ================================================= - time_slider->setOrientation(QSlider::Vertical); + time_slider->setOrientation(TQSlider::Vertical); int slider_width = time_slider->minimumSizeHint().width(); // some styles need more space for sliders than avilable in very small panels :( if ( slider_width > w ) slider_width = w; @@ -566,7 +566,7 @@ void MediaControl::resizeEvent( QResizeEvent* ) } else // ====== HORIZONTAL =============================================== { - time_slider->setOrientation(QSlider::Horizontal); + time_slider->setOrientation(TQSlider::Horizontal); int slider_height = time_slider->minimumSizeHint().height(); // some styles need more space for sliders than avilable in very small panels :( if ( slider_height > h ) slider_height = h; @@ -600,15 +600,15 @@ void MediaControl::resizeEvent( QResizeEvent* ) // Our Button ======================================================================== -TrayButton::TrayButton(QWidget* parent, const char* name) +TrayButton::TrayButton(TQWidget* parent, const char* name) : SimpleButton (parent, name) { setBackgroundMode(PaletteBackground); setBackgroundOrigin(AncestorOrigin); } -void TrayButton::setIconSet(const QIconSet &iconSet) +void TrayButton::setIconSet(const TQIconSet &iconSet) { - setPixmap(iconSet.pixmap(QIconSet::Automatic, QIconSet::Normal, QIconSet::On)); + setPixmap(iconSet.pixmap(TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::On)); } diff --git a/kicker-applets/mediacontrol/mediacontrol.h b/kicker-applets/mediacontrol/mediacontrol.h index f5a6e5e..c6ec47b 100644 --- a/kicker-applets/mediacontrol/mediacontrol.h +++ b/kicker-applets/mediacontrol/mediacontrol.h @@ -29,10 +29,10 @@ #include #include -#include +#include // used everywhere :) -#include +#include #include "playerInterface.h" #include "configfrontend.h" @@ -55,9 +55,9 @@ class TrayButton : public SimpleButton Q_OBJECT public: - TrayButton(QWidget* parent, const char* name); + TrayButton(TQWidget* parent, const char* name); virtual ~TrayButton() {} - void setIconSet(const QIconSet &iconSet); + void setIconSet(const TQIconSet &iconSet); }; // ============================================================================= @@ -67,13 +67,13 @@ class MediaControl : public KPanelApplet, virtual public MediaControlIface Q_OBJECT public: - MediaControl(const QString&, Type, int ,QWidget * = 0, const char * = 0); + MediaControl(const TQString&, Type, int ,TQWidget * = 0, const char * = 0); virtual ~MediaControl(); int widthForHeight(int height) const; int heightForWidth(int width) const; - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); virtual void reparseConfig(); public slots: @@ -96,11 +96,11 @@ class MediaControl : public KPanelApplet, virtual public MediaControlIface int mLastLen, mLastTime, mLastStatus; KPopupMenu *rmbMenu; - virtual void mousePressEvent(QMouseEvent* e); - virtual void moveEvent(QMoveEvent*); - virtual void paletteChange(const QPalette&); - virtual void resizeEvent(QResizeEvent*); - virtual bool eventFilter(QObject *watched, QEvent *e); + virtual void mousePressEvent(TQMouseEvent* e); + virtual void moveEvent(TQMoveEvent*); + virtual void paletteChange(const TQPalette&); + virtual void resizeEvent(TQResizeEvent*); + virtual bool eventFilter(TQObject *watched, TQEvent *e); friend class MediaControlToolTip; MediaControlToolTip *slider_tooltip; diff --git a/kicker-applets/mediacontrol/mediacontrolconfig.cpp b/kicker-applets/mediacontrol/mediacontrolconfig.cpp index b146ff1..0217a25 100644 --- a/kicker-applets/mediacontrol/mediacontrolconfig.cpp +++ b/kicker-applets/mediacontrol/mediacontrolconfig.cpp @@ -25,12 +25,12 @@ #include "mediacontrolconfig.h" #include "mediacontrolconfigwidget.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,7 +42,7 @@ #include #include -MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, QWidget *parent, const char* name) +MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, TQWidget *parent, const char* name) : KDialogBase( parent, name, false, i18n("MediaControl"), Ok | Apply | Cancel, Ok, false ) { _configFrontend = cfg; @@ -64,16 +64,16 @@ MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, QWidget *parent, co _child->themeListBox->clear(); // fill with available skins KGlobal::dirs()->addResourceType("themes", KStandardDirs::kde_default("data") + "mediacontrol"); - QStringList list = KGlobal::dirs()->resourceDirs("themes"); - for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) + TQStringList list = KGlobal::dirs()->resourceDirs("themes"); + for (TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) readSkinDir(*it); - connect(_child->mWheelScrollAmount, SIGNAL(valueChanged(int)), SLOT(slotConfigChanged())); - connect(_child->playerListBox, SIGNAL(selectionChanged()), SLOT(slotConfigChanged())); - connect(_child->themeListBox, SIGNAL(selectionChanged()), SLOT(slotConfigChanged())); - connect(_child->themeListBox, SIGNAL(selectionChanged(QListBoxItem *)), SLOT(slotChangePreview(QListBoxItem *))); - connect(_child->mUseThemes, SIGNAL(toggled(bool)), SLOT(slotConfigChanged()) ); - connect(_child->mUseThemes, SIGNAL(toggled(bool)), SLOT(slotUseThemesToggled(bool)) ); + connect(_child->mWheelScrollAmount, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotConfigChanged())); + connect(_child->playerListBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotConfigChanged())); + connect(_child->themeListBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotConfigChanged())); + connect(_child->themeListBox, TQT_SIGNAL(selectionChanged(TQListBoxItem *)), TQT_SLOT(slotChangePreview(TQListBoxItem *))); + connect(_child->mUseThemes, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotConfigChanged()) ); + connect(_child->mUseThemes, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotUseThemesToggled(bool)) ); load(); show(); @@ -81,9 +81,9 @@ MediaControlConfig::MediaControlConfig( ConfigFrontend *cfg, QWidget *parent, co enableButtonApply ( false ); // apply id disabled until something changed } -void MediaControlConfig::readSkinDir( const QString &dir ) +void MediaControlConfig::readSkinDir( const TQString &dir ) { - QDir directory( dir ); + TQDir directory( dir ); if (!directory.exists()) return; @@ -93,7 +93,7 @@ void MediaControlConfig::readSkinDir( const QString &dir ) while ( it.current() ) { // append directory-name to our theme-listbox - if ( QFile(it.current()->absFilePath()+"/play.png").exists() ) + if ( TQFile(it.current()->absFilePath()+"/play.png").exists() ) _child->themeListBox->insertItem ( it.current()->baseName(), -1 ); ++it; } @@ -104,7 +104,7 @@ void MediaControlConfig::readSkinDir( const QString &dir ) void MediaControlConfig::load() { // find the playerstring from config in the playerlist and select it if found - QListBoxItem *item = 0; + TQListBoxItem *item = 0; item = _child->playerListBox->findItem( _configFrontend->player() ); if ( item ) @@ -178,9 +178,9 @@ void MediaControlConfig::slotConfigChanged() enableButtonApply ( true ); } -void MediaControlConfig::slotChangePreview(QListBoxItem *item) +void MediaControlConfig::slotChangePreview(TQListBoxItem *item) { - QString skindir = item->text(); + TQString skindir = item->text(); _child->previewPrev->setIconSet(SmallIconSet(locate("themes",skindir+"/prev.png"))); _child->previewPlay->setIconSet(SmallIconSet(locate("themes",skindir+"/play.png"))); _child->previewPause->setIconSet(SmallIconSet(locate("themes",skindir+"/pause.png"))); diff --git a/kicker-applets/mediacontrol/mediacontrolconfig.h b/kicker-applets/mediacontrol/mediacontrolconfig.h index 5869722..4467177 100644 --- a/kicker-applets/mediacontrol/mediacontrolconfig.h +++ b/kicker-applets/mediacontrol/mediacontrolconfig.h @@ -29,9 +29,9 @@ class MediaControlConfig: public KDialogBase { Q_OBJECT public: - MediaControlConfig(ConfigFrontend *cfg, QWidget *parent = 0, const char* name = "MediaControlConfig"); + MediaControlConfig(ConfigFrontend *cfg, TQWidget *parent = 0, const char* name = "MediaControlConfig"); - void readSkinDir(const QString &dir); + void readSkinDir(const TQString &dir); void load(); void save(); @@ -41,7 +41,7 @@ signals: protected slots: void slotConfigChanged(); - void slotChangePreview(QListBoxItem *item); + void slotChangePreview(TQListBoxItem *item); void slotUseThemesToggled(bool); virtual void slotApply(); virtual void slotOk(); diff --git a/kicker-applets/mediacontrol/mpdInterface.cpp b/kicker-applets/mediacontrol/mpdInterface.cpp index 8027f82..98ba0cb 100644 --- a/kicker-applets/mediacontrol/mpdInterface.cpp +++ b/kicker-applets/mediacontrol/mpdInterface.cpp @@ -23,7 +23,7 @@ #include -#include +#include #include #include @@ -39,16 +39,16 @@ MpdInterface::MpdInterface() , slider_timer(0) , reconnect_timer(0) { - connect(&sock, SIGNAL(error(int)), this, SLOT(connectionError(int))); - connect(&sock, SIGNAL(error(int)), this, SLOT(stopSliderClock())); + connect(&sock, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError(int))); + connect(&sock, TQT_SIGNAL(error(int)), this, TQT_SLOT(stopSliderClock())); - connect(&sock, SIGNAL(connected()), this, SLOT(startSliderClock())); - connect(&sock, SIGNAL(connected()), this, SLOT(stopReconnectClock())); - connect(&sock, SIGNAL(connected()), this, SLOT(connected())); + connect(&sock, TQT_SIGNAL(connected()), this, TQT_SLOT(startSliderClock())); + connect(&sock, TQT_SIGNAL(connected()), this, TQT_SLOT(stopReconnectClock())); + connect(&sock, TQT_SIGNAL(connected()), this, TQT_SLOT(connected())); - connect(&sock, SIGNAL(connectionClosed()), this, SLOT(stopSliderClock())); - connect(&sock, SIGNAL(connectionClosed()), this, SLOT(startReconnectClock())); - connect(&sock, SIGNAL(connectionClosed()), this, SIGNAL(playerStopped())); + connect(&sock, TQT_SIGNAL(connectionClosed()), this, TQT_SLOT(stopSliderClock())); + connect(&sock, TQT_SIGNAL(connectionClosed()), this, TQT_SLOT(startReconnectClock())); + connect(&sock, TQT_SIGNAL(connectionClosed()), this, TQT_SIGNAL(playerStopped())); reconnect(); } @@ -95,7 +95,7 @@ void MpdInterface::stopReconnectClock() } -void MpdInterface::timerEvent(QTimerEvent* te) +void MpdInterface::timerEvent(TQTimerEvent* te) { if (te->timerId() == slider_timer) updateSlider(); else if (te->timerId() == reconnect_timer) reconnect(); @@ -104,7 +104,7 @@ void MpdInterface::timerEvent(QTimerEvent* te) void MpdInterface::reconnect() const { - if (sock.state()==QSocket::Idle) + if (sock.state()==TQSocket::Idle) { sock_mutex.tryLock(); //kdDebug(90200) << "Connecting to " << hostname.latin1() << ":" << port << "...\n"; @@ -131,18 +131,18 @@ void MpdInterface::connectionError(int e) { sock_mutex.unlock(); emit playerStopped(); - QString message; + TQString message; if (messagebox_mutex.tryLock()) { switch (e) { - case QSocket::ErrConnectionRefused: + case TQSocket::ErrConnectionRefused: message=i18n("Connection refused to %1:%2.\nIs mpd running?").arg(hostname).arg(port); break; - case QSocket::ErrHostNotFound: + case TQSocket::ErrHostNotFound: message=i18n("Host '%1' not found.").arg(hostname); break; - case QSocket::ErrSocketRead: + case TQSocket::ErrSocketRead: message=i18n("Error reading socket."); break; default: @@ -166,7 +166,7 @@ void MpdInterface::connectionError(int e) bool MpdInterface::dispatch(const char* cmd) const { - if (sock.state()==QSocket::Connected && sock_mutex.tryLock()) + if (sock.state()==TQSocket::Connected && sock_mutex.tryLock()) { long cmd_len=strlen(cmd); //kdDebug(90200) << "sending: " << cmd; @@ -186,10 +186,10 @@ bool MpdInterface::dispatch(const char* cmd) const return false; } -bool MpdInterface::fetchLine(QString& res) const +bool MpdInterface::fetchLine(TQString& res) const { - QString errormessage; - while (sock.state()==QSocket::Connected) + TQString errormessage; + while (sock.state()==TQSocket::Connected) { if (!sock.canReadLine()) { @@ -231,7 +231,7 @@ bool MpdInterface::fetchLine(QString& res) const bool MpdInterface::fetchOk() const { - QString res; + TQString res; while (fetchLine(res)) { } if (res.startsWith("OK")) return true; @@ -244,8 +244,8 @@ void MpdInterface::updateSlider() //kdDebug(90200) << "update slider\n"; if (!dispatch("status\n")) return; - QString res; - QRegExp time_re("time: (\\d+):(\\d+)"); + TQString res; + TQRegExp time_re("time: (\\d+):(\\d+)"); while(fetchLine(res)) { if (res.startsWith("state: ")) @@ -265,7 +265,7 @@ void MpdInterface::updateSlider() } else if (time_re.search(res)>=0) { - QStringList timeinfo=time_re.capturedTexts(); + TQStringList timeinfo=time_re.capturedTexts(); timeinfo.pop_front(); int elapsed_seconds=timeinfo.first().toInt(); timeinfo.pop_front(); @@ -292,13 +292,13 @@ void MpdInterface::jumpToTime(int sec) long songid=-1; - QString res; - QRegExp songid_re("songid: (\\d+)"); + TQString res; + TQRegExp songid_re("songid: (\\d+)"); while(fetchLine(res)) { if (songid_re.search(res)>=0) { - QStringList songidinfo=songid_re.capturedTexts(); + TQStringList songidinfo=songid_re.capturedTexts(); songidinfo.pop_front(); songid=songidinfo.first().toInt(); } @@ -306,7 +306,7 @@ void MpdInterface::jumpToTime(int sec) if (songid>-1) { - if (dispatch(QString("seekid %1 %2\n").arg(songid).arg(sec).latin1())) + if (dispatch(TQString("seekid %1 %2\n").arg(songid).arg(sec).latin1())) { fetchOk(); // unlocks } @@ -349,13 +349,13 @@ void MpdInterface::changeVolume(int delta) int volume=-1; - QString res; - QRegExp volume_re("volume: (\\d+)"); + TQString res; + TQRegExp volume_re("volume: (\\d+)"); while(fetchLine(res)) { if (volume_re.search(res)>=0) { - QStringList info=volume_re.capturedTexts(); + TQStringList info=volume_re.capturedTexts(); info.pop_front(); volume=info.first().toInt(); } @@ -366,7 +366,7 @@ void MpdInterface::changeVolume(int delta) volume+=delta; if (volume<0) volume=0; if (volume>100) volume=100; - if (dispatch(QString("setvol %1\n").arg(volume).latin1())) + if (dispatch(TQString("setvol %1\n").arg(volume).latin1())) { fetchOk(); } @@ -385,12 +385,12 @@ void MpdInterface::volumeDown() changeVolume(-5); } -void MpdInterface::dragEnterEvent(QDragEnterEvent* event) +void MpdInterface::dragEnterEvent(TQDragEnterEvent* event) { event->accept( KURLDrag::canDecode(event) ); } -void MpdInterface::dropEvent(QDropEvent* event) +void MpdInterface::dropEvent(TQDropEvent* event) { reconnect(); @@ -403,15 +403,15 @@ void MpdInterface::dropEvent(QDropEvent* event) if (dispatch("playlistid\n")) { long songid=-1; - QString file; - QString res; + TQString file; + TQString res; while(fetchLine(res)) { - QRegExp file_re("file: (.+)"); - QRegExp id_re("Id: (.+)"); + TQRegExp file_re("file: (.+)"); + TQRegExp id_re("Id: (.+)"); if (file.isEmpty() && file_re.search(res)>=0) { - QStringList info=file_re.capturedTexts(); + TQStringList info=file_re.capturedTexts(); info.pop_front(); // if the dropped file ends with the same name, record it if (list.front().path().endsWith(info.first())) @@ -422,7 +422,7 @@ void MpdInterface::dropEvent(QDropEvent* event) else if (!file.isEmpty() && id_re.search(res)>=0) { // when we have the file, pick up the id (file scomes first) - QStringList info=id_re.capturedTexts(); + TQStringList info=id_re.capturedTexts(); info.pop_front(); songid=info.first().toInt(); fetchOk(); // skip to the end @@ -433,7 +433,7 @@ void MpdInterface::dropEvent(QDropEvent* event) // found song, so lets play it if (songid>-1) { - if (dispatch((QString("playid %1\n").arg(songid)).latin1())) + if (dispatch((TQString("playid %1\n").arg(songid)).latin1())) { if (fetchOk()) list.pop_front(); return; @@ -447,13 +447,13 @@ void MpdInterface::dropEvent(QDropEvent* event) { if ((*i).isLocalFile()) { - QStringList path=QStringList::split("/",(*i).path()); + TQStringList path=TQStringList::split("/",(*i).path()); while (!path.empty()) { - if (dispatch((QString("add \"") + if (dispatch((TQString("add \"") +path.join("/").replace("\"","\\\"") - +QString("\"\n")).latin1())) + +TQString("\"\n")).latin1())) { if (fetchOk()) break; } @@ -468,22 +468,22 @@ void MpdInterface::dropEvent(QDropEvent* event) } } -const QString MpdInterface::getTrackTitle() const +const TQString MpdInterface::getTrackTitle() const { - QString result; + TQString result; reconnect(); if (!dispatch("status\n")) return result; long songid=-1; - QString res; + TQString res; while(fetchLine(res)) { - QRegExp songid_re("songid: (\\d+)"); + TQRegExp songid_re("songid: (\\d+)"); if (songid_re.search(res)>=0) { - QStringList songidinfo=songid_re.capturedTexts(); + TQStringList songidinfo=songid_re.capturedTexts(); songidinfo.pop_front(); songid=songidinfo.first().toInt(); } @@ -491,48 +491,48 @@ const QString MpdInterface::getTrackTitle() const if (!(songid>-1)) return result; - if (!dispatch(QString("playlistid %1\n").arg(songid).latin1())) + if (!dispatch(TQString("playlistid %1\n").arg(songid).latin1())) return result; - QString artist; - QString album; - QString title; - QString track; - QString file; + TQString artist; + TQString album; + TQString title; + TQString track; + TQString file; while(fetchLine(res)) { - QRegExp artist_re("Artist: (.+)"); - QRegExp album_re("Album: (.+)"); - QRegExp track_re("Album: (.+)"); - QRegExp title_re("Title: (.+)"); - QRegExp file_re("file: (.+)"); + TQRegExp artist_re("Artist: (.+)"); + TQRegExp album_re("Album: (.+)"); + TQRegExp track_re("Album: (.+)"); + TQRegExp title_re("Title: (.+)"); + TQRegExp file_re("file: (.+)"); if (artist_re.search(res)>=0) { - QStringList info=artist_re.capturedTexts(); + TQStringList info=artist_re.capturedTexts(); info.pop_front(); artist=info.first(); } else if (album_re.search(res)>=0) { - QStringList info=album_re.capturedTexts(); + TQStringList info=album_re.capturedTexts(); info.pop_front(); album=info.first(); } else if (title_re.search(res)>=0) { - QStringList info=title_re.capturedTexts(); + TQStringList info=title_re.capturedTexts(); info.pop_front(); title=info.first(); } else if (track_re.search(res)>=0) { - QStringList info=track_re.capturedTexts(); + TQStringList info=track_re.capturedTexts(); info.pop_front(); track=info.first(); } else if (file_re.search(res)>=0) { - QStringList info=file_re.capturedTexts(); + TQStringList info=file_re.capturedTexts(); info.pop_front(); file=info.first(); } @@ -568,7 +568,7 @@ int MpdInterface::playingStatus() if (!dispatch("status\n")) return Stopped; PlayingStatus status=Stopped; - QString res; + TQString res; while(fetchLine(res)) { if (res.startsWith("state: ")) diff --git a/kicker-applets/mediacontrol/mpdInterface.h b/kicker-applets/mediacontrol/mpdInterface.h index d891586..ab95637 100644 --- a/kicker-applets/mediacontrol/mpdInterface.h +++ b/kicker-applets/mediacontrol/mpdInterface.h @@ -23,10 +23,10 @@ #define MPDINTERFACE_H #include "playerInterface.h" -#include +#include #include -#include -#include +#include +#include class MpdInterface : public PlayerInterface @@ -47,9 +47,9 @@ class MpdInterface virtual void prev(); virtual void volumeUp(); virtual void volumeDown(); - virtual void dragEnterEvent(QDragEnterEvent* event); - virtual void dropEvent(QDropEvent* event); - virtual const QString getTrackTitle() const; + virtual void dragEnterEvent(TQDragEnterEvent* event); + virtual void dropEvent(TQDropEvent* event); + virtual const TQString getTrackTitle() const; virtual int playingStatus(); void changeVolume(int delta); @@ -65,15 +65,15 @@ class MpdInterface protected: - virtual void timerEvent(QTimerEvent* te); + virtual void timerEvent(TQTimerEvent* te); private: - mutable QSocket sock; - mutable QMutex sock_mutex; + mutable TQSocket sock; + mutable TQMutex sock_mutex; - mutable QMutex messagebox_mutex; + mutable TQMutex messagebox_mutex; - QString hostname; + TQString hostname; int port; static const int SLIDER_TIMER_INTERVAL = 500; // ms @@ -94,7 +94,7 @@ class MpdInterface /** fetches a line and returns true, or false if OK or ACK (end of message). Will unlock the sock_mutex on the end of message. */ - bool fetchLine(QString& res) const; + bool fetchLine(TQString& res) const; }; #endif // MPDINTERFACE_H diff --git a/kicker-applets/mediacontrol/noatunInterface.cpp b/kicker-applets/mediacontrol/noatunInterface.cpp index f6cdfc8..c7355dc 100644 --- a/kicker-applets/mediacontrol/noatunInterface.cpp +++ b/kicker-applets/mediacontrol/noatunInterface.cpp @@ -20,8 +20,8 @@ #include #include -#include -#include +#include +#include #include #define TIMER_FAST 250 @@ -29,18 +29,18 @@ NoatunInterface::NoatunInterface() : PlayerInterface() { mTimerValue = TIMER_FAST; - mNoatunTimer = new QTimer(this, "mNoatunTimer"); + mNoatunTimer = new TQTimer(this, "mNoatunTimer"); - connect(mNoatunTimer, SIGNAL(timeout()), SLOT(updateSlider())); + connect(mNoatunTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateSlider())); - connect(kapp->dcopClient(), SIGNAL(applicationRegistered(const QCString&)), - SLOT(appRegistered(const QCString&)) ); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRegistered(const TQCString&)), + TQT_SLOT(appRegistered(const TQCString&)) ); - connect(kapp->dcopClient(), SIGNAL(applicationRemoved(const QCString&)), - SLOT(appRemoved(const QCString&))); + connect(kapp->dcopClient(), TQT_SIGNAL(applicationRemoved(const TQCString&)), + TQT_SLOT(appRemoved(const TQCString&))); kapp->dcopClient()->setNotifications(true); - QTimer::singleShot(0, this, SLOT(myInit())); + TQTimer::singleShot(0, this, TQT_SLOT(myInit())); } NoatunInterface::~NoatunInterface() @@ -64,7 +64,7 @@ void NoatunInterface::myInit() } } -void NoatunInterface::appRegistered(const QCString &appId) +void NoatunInterface::appRegistered(const TQCString &appId) { if (appId.contains("noatun",false)) { @@ -74,7 +74,7 @@ void NoatunInterface::appRegistered(const QCString &appId) } } -void NoatunInterface::appRemoved(const QCString &appId) +void NoatunInterface::appRemoved(const TQCString &appId) { if (appId.contains("noatun",false)) { @@ -91,8 +91,8 @@ void NoatunInterface::updateSlider() { // length/time in msecs, -1 means "no playobject in noatun" int len, time; - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (!kapp->dcopClient()->call(mAppId, "Noatun", "length()", data, replyType, replyData, false, 200)) { @@ -102,7 +102,7 @@ void NoatunInterface::updateSlider() } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") { reply >> len; @@ -127,7 +127,7 @@ void NoatunInterface::updateSlider() } else { - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") { reply >> time; @@ -150,8 +150,8 @@ void NoatunInterface::updateSlider() int NoatunInterface::playingStatus() { - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if (!kapp->dcopClient()->call(mAppId, "Noatun", "state()", data, replyType, replyData, false, 200)) @@ -161,7 +161,7 @@ int NoatunInterface::playingStatus() else { int status = 0; - QDataStream reply(replyData, IO_ReadOnly); + TQDataStream reply(replyData, IO_ReadOnly); if (replyType == "int") reply >> status; @@ -177,22 +177,22 @@ int NoatunInterface::playingStatus() // Drag-n-Drop stuff ================================================================= -void NoatunInterface::dragEnterEvent(QDragEnterEvent* event) +void NoatunInterface::dragEnterEvent(TQDragEnterEvent* event) { // kdDebug(90200) << "NoatunInterface::dragEnterEvent()" << endl; event->accept(KURLDrag::canDecode(event)); } -void NoatunInterface::dropEvent(QDropEvent* event) +void NoatunInterface::dropEvent(TQDropEvent* event) { // kdDebug(90200) << "NoatunInterface::dropEvent()" << endl; KURL::List list; if (KURLDrag::decode(event, list)) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << list.toStringList() << false; - kapp->dcopClient()->send(mAppId, "Noatun", "addFile(QStringList,bool)", data); + kapp->dcopClient()->send(mAppId, "Noatun", "addFile(TQStringList,bool)", data); } } @@ -210,8 +210,8 @@ void NoatunInterface::sliderStopDrag() void NoatunInterface::jumpToTime(int sec) { - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << (sec*1000); // noatun wants milliseconds kapp->dcopClient()->send(mAppId, "Noatun", "skipTo(int)", data); } @@ -220,46 +220,46 @@ void NoatunInterface::playpause() { if (!findRunningNoatun()) startPlayer("noatun"); - kapp->dcopClient()->send(mAppId, "Noatun", "playpause()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "playpause()", TQString::null); } void NoatunInterface::stop() { - kapp->dcopClient()->send(mAppId, "Noatun", "stop()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "stop()", TQString::null); } void NoatunInterface::next() { // fastForward() is noatun from kde2 - //kapp->dcopClient()->send("noatun", "Noatun", "fastForward()", QString::null); - kapp->dcopClient()->send(mAppId, "Noatun", "forward()", QString::null); + //kapp->dcopClient()->send("noatun", "Noatun", "fastForward()", TQString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "forward()", TQString::null); } void NoatunInterface::prev() { - kapp->dcopClient()->send(mAppId, "Noatun", "back()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "back()", TQString::null); } void NoatunInterface::volumeUp() { - kapp->dcopClient()->send(mAppId, "Noatun", "volumeDown()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "volumeDown()", TQString::null); } void NoatunInterface::volumeDown() { - kapp->dcopClient()->send(mAppId, "Noatun", "volumeUp()", QString::null); + kapp->dcopClient()->send(mAppId, "Noatun", "volumeUp()", TQString::null); } -const QString NoatunInterface::getTrackTitle() const +const TQString NoatunInterface::getTrackTitle() const { - QString title(""); - QByteArray data, replyData; - QCString replyType; + TQString title(""); + TQByteArray data, replyData; + TQCString replyType; if (kapp->dcopClient()->call(mAppId, "Noatun", "title()", data, replyType, replyData, false, 200)) { - QDataStream reply(replyData, IO_ReadOnly); - if (replyType == "QString") + TQDataStream reply(replyData, IO_ReadOnly); + if (replyType == "TQString") reply >> title; } return title; @@ -269,7 +269,7 @@ bool NoatunInterface::findRunningNoatun() { // FIXME: what if we have a dcop app named, let's say, 'noatunfrontend'? QCStringList allApps = kapp->dcopClient()->registeredApplications(); - QValueList::const_iterator iterator; + TQValueList::const_iterator iterator; for (iterator = allApps.constBegin(); iterator != allApps.constEnd(); ++iterator) { diff --git a/kicker-applets/mediacontrol/noatunInterface.h b/kicker-applets/mediacontrol/noatunInterface.h index 99191b5..36fa21c 100644 --- a/kicker-applets/mediacontrol/noatunInterface.h +++ b/kicker-applets/mediacontrol/noatunInterface.h @@ -23,7 +23,7 @@ #include #include -#include +#include class NoatunInterface : public PlayerInterface { @@ -43,19 +43,19 @@ class NoatunInterface : public PlayerInterface void prev(); void volumeUp(); void volumeDown(); - void dragEnterEvent(QDragEnterEvent* event); - void dropEvent(QDropEvent* event); - const QString getTrackTitle() const; - void appRegistered(const QCString &appId); - void appRemoved(const QCString &appId); + void dragEnterEvent(TQDragEnterEvent* event); + void dropEvent(TQDropEvent* event); + const TQString getTrackTitle() const; + void appRegistered(const TQCString &appId); + void appRemoved(const TQCString &appId); int playingStatus(); void myInit(void); private: - QTimer *mNoatunTimer; + TQTimer *mNoatunTimer; int mTimerValue; - QCString mAppId; + TQCString mAppId; /** * Tries to find a DCOP registered instance of Noatun diff --git a/kicker-applets/mediacontrol/playerInterface.cpp b/kicker-applets/mediacontrol/playerInterface.cpp index cc388c0..9517aa8 100644 --- a/kicker-applets/mediacontrol/playerInterface.cpp +++ b/kicker-applets/mediacontrol/playerInterface.cpp @@ -24,9 +24,9 @@ PlayerInterface::PlayerInterface() { } // Constructor PlayerInterface::~PlayerInterface() { } // Destructor -void PlayerInterface::startPlayer(const QString &desktopname) +void PlayerInterface::startPlayer(const TQString &desktopname) { - if (KApplication::startServiceByDesktopName(desktopname, QStringList(), + if (KApplication::startServiceByDesktopName(desktopname, TQStringList(), 0, 0, 0, "", false) > 0) { KMessageBox::error(0, i18n("Could not start media player.")); diff --git a/kicker-applets/mediacontrol/playerInterface.h b/kicker-applets/mediacontrol/playerInterface.h index aa4701e..4d7fa7c 100644 --- a/kicker-applets/mediacontrol/playerInterface.h +++ b/kicker-applets/mediacontrol/playerInterface.h @@ -18,8 +18,8 @@ #ifndef PLAYERINTERFACE_H #define PLAYERINTERFACE_H -#include -#include +#include +#include class PlayerInterface : public QObject { @@ -41,12 +41,12 @@ class PlayerInterface : public QObject virtual void prev()=0; virtual void volumeUp()=0; virtual void volumeDown()=0; - virtual void dragEnterEvent(QDragEnterEvent* event)=0; - virtual void dropEvent(QDropEvent* event)=0; - virtual const QString getTrackTitle() const=0; + virtual void dragEnterEvent(TQDragEnterEvent* event)=0; + virtual void dropEvent(TQDropEvent* event)=0; + virtual const TQString getTrackTitle() const=0; virtual int playingStatus()=0; - void startPlayer(const QString &desktopname); + void startPlayer(const TQString &desktopname); signals: void newSliderPosition(int, int); diff --git a/kicker-applets/mediacontrol/simplebutton.cpp b/kicker-applets/mediacontrol/simplebutton.cpp index 9daa926..478ca2d 100644 --- a/kicker-applets/mediacontrol/simplebutton.cpp +++ b/kicker-applets/mediacontrol/simplebutton.cpp @@ -20,8 +20,8 @@ #include "simplebutton.h" -#include -#include +#include +#include #include #include @@ -32,17 +32,17 @@ #include #include -SimpleButton::SimpleButton(QWidget *parent, const char *name) - : QButton(parent, name), +SimpleButton::SimpleButton(TQWidget *parent, const char *name) + : TQButton(parent, name), m_highlight(false), m_orientation(Qt::Horizontal) { setBackgroundOrigin( AncestorOrigin ); - connect( kapp, SIGNAL( settingsChanged( int ) ), - SLOT( slotSettingsChanged( int ) ) ); - connect( kapp, SIGNAL( iconChanged( int ) ), - SLOT( slotIconChanged( int ) ) ); + connect( kapp, TQT_SIGNAL( settingsChanged( int ) ), + TQT_SLOT( slotSettingsChanged( int ) ) ); + connect( kapp, TQT_SIGNAL( iconChanged( int ) ), + TQT_SLOT( slotIconChanged( int ) ) ); kapp->addKipcEventMask( KIPC::SettingsChanged ); kapp->addKipcEventMask( KIPC::IconChanged ); @@ -50,9 +50,9 @@ SimpleButton::SimpleButton(QWidget *parent, const char *name) slotSettingsChanged( KApplication::SETTINGS_MOUSE ); } -void SimpleButton::setPixmap(const QPixmap &pix) +void SimpleButton::setPixmap(const TQPixmap &pix) { - QButton::setPixmap(pix); + TQButton::setPixmap(pix); generateIcons(); update(); } @@ -63,39 +63,39 @@ void SimpleButton::setOrientation(Qt::Orientation orientation) update(); } -QSize SimpleButton::sizeHint() const +TQSize SimpleButton::sizeHint() const { - const QPixmap* pm = pixmap(); + const TQPixmap* pm = pixmap(); if (!pm) - return QButton::sizeHint(); + return TQButton::sizeHint(); else - return QSize(pm->width() + KDialog::spacingHint(), pm->height() + KDialog::spacingHint()); + return TQSize(pm->width() + KDialog::spacingHint(), pm->height() + KDialog::spacingHint()); } -QSize SimpleButton::minimumSizeHint() const +TQSize SimpleButton::minimumSizeHint() const { - const QPixmap* pm = pixmap(); + const TQPixmap* pm = pixmap(); if (!pm) - return QButton::minimumSizeHint(); + return TQButton::minimumSizeHint(); else - return QSize(pm->width(), pm->height()); + return TQSize(pm->width(), pm->height()); } -void SimpleButton::drawButton( QPainter *p ) +void SimpleButton::drawButton( TQPainter *p ) { drawButtonLabel(p); } -void SimpleButton::drawButtonLabel( QPainter *p ) +void SimpleButton::drawButtonLabel( TQPainter *p ) { if (!pixmap()) { return; } - QPixmap pix = isEnabled() ? (m_highlight? m_activeIcon : m_normalIcon) : m_disabledIcon; + TQPixmap pix = isEnabled() ? (m_highlight? m_activeIcon : m_normalIcon) : m_disabledIcon; if (isOn() || isDown()) { @@ -108,7 +108,7 @@ void SimpleButton::drawButtonLabel( QPainter *p ) int ph = pix.height(); int pw = pix.width(); int margin = KDialog::spacingHint(); - QPoint origin(margin / 2, margin / 2); + TQPoint origin(margin / 2, margin / 2); if (ph < (h - margin)) { @@ -130,7 +130,7 @@ void SimpleButton::generateIcons() return; } - QImage image = pixmap()->convertToImage(); + TQImage image = pixmap()->convertToImage(); KIconEffect effect; m_normalIcon = effect.apply(image, KIcon::Panel, KIcon::DefaultState); @@ -170,29 +170,29 @@ void SimpleButton::slotIconChanged( int group ) update(); } -void SimpleButton::enterEvent( QEvent *e ) +void SimpleButton::enterEvent( TQEvent *e ) { m_highlight = true; repaint( false ); - QButton::enterEvent( e ); + TQButton::enterEvent( e ); } -void SimpleButton::leaveEvent( QEvent *e ) +void SimpleButton::leaveEvent( TQEvent *e ) { m_highlight = false; repaint( false ); - QButton::enterEvent( e ); + TQButton::enterEvent( e ); } -void SimpleButton::resizeEvent( QResizeEvent * ) +void SimpleButton::resizeEvent( TQResizeEvent * ) { generateIcons(); } -SimpleArrowButton::SimpleArrowButton(QWidget *parent, Qt::ArrowType arrow, const char *name) +SimpleArrowButton::SimpleArrowButton(TQWidget *parent, Qt::ArrowType arrow, const char *name) : SimpleButton(parent, name) { setBackgroundOrigin(AncestorOrigin); @@ -200,9 +200,9 @@ SimpleArrowButton::SimpleArrowButton(QWidget *parent, Qt::ArrowType arrow, const _inside = false; } -QSize SimpleArrowButton::sizeHint() const +TQSize SimpleArrowButton::sizeHint() const { - return QSize( 12, 12 ); + return TQSize( 12, 12 ); } void SimpleArrowButton::setArrowType(Qt::ArrowType a) @@ -219,32 +219,32 @@ Qt::ArrowType SimpleArrowButton::arrowType() const return _arrow; } -void SimpleArrowButton::drawButton( QPainter *p ) +void SimpleArrowButton::drawButton( TQPainter *p ) { - QRect r(1, 1, width() - 2, height() - 2); + TQRect r(1, 1, width() - 2, height() - 2); - QStyle::PrimitiveElement pe = QStyle::PE_ArrowLeft; + TQStyle::PrimitiveElement pe = TQStyle::PE_ArrowLeft; switch (_arrow) { - case Qt::LeftArrow: pe = QStyle::PE_ArrowLeft; break; - case Qt::RightArrow: pe = QStyle::PE_ArrowRight; break; - case Qt::UpArrow: pe = QStyle::PE_ArrowUp; break; - case Qt::DownArrow: pe = QStyle::PE_ArrowDown; break; + case Qt::LeftArrow: pe = TQStyle::PE_ArrowLeft; break; + case Qt::RightArrow: pe = TQStyle::PE_ArrowRight; break; + case Qt::UpArrow: pe = TQStyle::PE_ArrowUp; break; + case Qt::DownArrow: pe = TQStyle::PE_ArrowDown; break; } - int flags = QStyle::Style_Default | QStyle::Style_Enabled; - if (isDown() || isOn()) flags |= QStyle::Style_Down; + int flags = TQStyle::Style_Default | TQStyle::Style_Enabled; + if (isDown() || isOn()) flags |= TQStyle::Style_Down; style().drawPrimitive(pe, p, r, colorGroup(), flags); } -void SimpleArrowButton::enterEvent( QEvent *e ) +void SimpleArrowButton::enterEvent( TQEvent *e ) { _inside = true; SimpleButton::enterEvent( e ); update(); } -void SimpleArrowButton::leaveEvent( QEvent *e ) +void SimpleArrowButton::leaveEvent( TQEvent *e ) { _inside = false; SimpleButton::enterEvent( e ); diff --git a/kicker-applets/mediacontrol/simplebutton.h b/kicker-applets/mediacontrol/simplebutton.h index 5423dff..1ea5c7a 100644 --- a/kicker-applets/mediacontrol/simplebutton.h +++ b/kicker-applets/mediacontrol/simplebutton.h @@ -21,8 +21,8 @@ #ifndef SIMPLEBUTTON_H #define SIMPLEBUTTON_H -#include -#include +#include +#include #include @@ -31,20 +31,20 @@ class KDE_EXPORT SimpleButton : public QButton Q_OBJECT public: - SimpleButton(QWidget *parent, const char *name = 0); - void setPixmap(const QPixmap &pix); + SimpleButton(TQWidget *parent, const char *name = 0); + void setPixmap(const TQPixmap &pix); void setOrientation(Qt::Orientation orientaton); - QSize sizeHint() const; - QSize minimumSizeHint() const; + TQSize sizeHint() const; + TQSize minimumSizeHint() const; protected: - void drawButton( QPainter *p ); - void drawButtonLabel( QPainter *p ); + void drawButton( TQPainter *p ); + void drawButtonLabel( TQPainter *p ); void generateIcons(); - void enterEvent( QEvent *e ); - void leaveEvent( QEvent *e ); - void resizeEvent( QResizeEvent *e ); + void enterEvent( TQEvent *e ); + void leaveEvent( TQEvent *e ); + void resizeEvent( TQResizeEvent *e ); protected slots: virtual void slotSettingsChanged( int category ); @@ -52,9 +52,9 @@ class KDE_EXPORT SimpleButton : public QButton private: bool m_highlight; - QPixmap m_normalIcon; - QPixmap m_activeIcon; - QPixmap m_disabledIcon; + TQPixmap m_normalIcon; + TQPixmap m_activeIcon; + TQPixmap m_disabledIcon; Qt::Orientation m_orientation; class SimpleButtonPrivate; SimpleButtonPrivate* d; @@ -65,14 +65,14 @@ class KDE_EXPORT SimpleArrowButton: public SimpleButton Q_OBJECT public: - SimpleArrowButton(QWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0); + SimpleArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0); virtual ~SimpleArrowButton() {}; - QSize sizeHint() const; + TQSize sizeHint() const; protected: - virtual void enterEvent( QEvent *e ); - virtual void leaveEvent( QEvent *e ); - virtual void drawButton(QPainter *p); + virtual void enterEvent( TQEvent *e ); + virtual void leaveEvent( TQEvent *e ); + virtual void drawButton(TQPainter *p); Qt::ArrowType arrowType() const; public slots: diff --git a/kicker-applets/mediacontrol/xmmsInterface.cpp b/kicker-applets/mediacontrol/xmmsInterface.cpp index e2512e5..7d8e236 100644 --- a/kicker-applets/mediacontrol/xmmsInterface.cpp +++ b/kicker-applets/mediacontrol/xmmsInterface.cpp @@ -34,9 +34,9 @@ XmmsInterface::XmmsInterface() : PlayerInterface() { timervalue = TIMER_FAST; bStartingXMMS = false; - xmms_timer = new QTimer ( this, "xmms_timer" ); + xmms_timer = new TQTimer ( this, "xmms_timer" ); - QObject::connect( xmms_timer, SIGNAL(timeout()), SLOT(updateSlider()) ); + TQObject::connect( xmms_timer, TQT_SIGNAL(timeout()), TQT_SLOT(updateSlider()) ); // Better start the timer as late as possible in initialization xmms_timer->start ( timervalue ); @@ -85,16 +85,16 @@ void XmmsInterface::updateSlider ( void ) // Drag-n-Drop stuff ================================================================= -void XmmsInterface::dragEnterEvent(QDragEnterEvent* event) +void XmmsInterface::dragEnterEvent(TQDragEnterEvent* event) { - event->accept( QTextDrag::canDecode(event) ); + event->accept( TQTextDrag::canDecode(event) ); } -void XmmsInterface::dropEvent(QDropEvent* event) +void XmmsInterface::dropEvent(TQDropEvent* event) { - QString text; + TQString text; // kdDebug(90200) << "XmmsInterface::dropEvent()" << endl; - if ( QTextDrag::decode(event, text) ) + if ( TQTextDrag::decode(event, text) ) { xmms_remote_playlist_add_url_string(XMMS_SESSION, (gchar *)text.local8Bit().data()); @@ -127,7 +127,7 @@ void XmmsInterface::playpause() return; startPlayer("xmms"); bStartingXMMS = true; - QTimer::singleShot(500, this, SLOT(playpause())); + TQTimer::singleShot(500, this, TQT_SLOT(playpause())); } else { @@ -174,9 +174,9 @@ int XmmsInterface::playingStatus() return Stopped; } -const QString XmmsInterface::getTrackTitle() const +const TQString XmmsInterface::getTrackTitle() const { - return QString::fromLocal8Bit( + return TQString::fromLocal8Bit( xmms_remote_get_playlist_title(XMMS_SESSION, xmms_remote_get_playlist_pos(XMMS_SESSION))); } diff --git a/kicker-applets/mediacontrol/xmmsInterface.h b/kicker-applets/mediacontrol/xmmsInterface.h index ca514b2..34db157 100644 --- a/kicker-applets/mediacontrol/xmmsInterface.h +++ b/kicker-applets/mediacontrol/xmmsInterface.h @@ -25,7 +25,7 @@ #define XMMSINTERFACE_H #include "playerInterface.h" -#include +#include class XmmsInterface : public PlayerInterface { @@ -45,13 +45,13 @@ class XmmsInterface : public PlayerInterface virtual void prev(); virtual void volumeUp(); virtual void volumeDown(); - virtual void dragEnterEvent(QDragEnterEvent* event); - virtual void dropEvent(QDropEvent* event); - virtual const QString getTrackTitle() const; + virtual void dragEnterEvent(TQDragEnterEvent* event); + virtual void dropEvent(TQDropEvent* event); + virtual const TQString getTrackTitle() const; virtual int playingStatus(); private: - QTimer *xmms_timer; + TQTimer *xmms_timer; int timervalue; bool bStartingXMMS; }; -- cgit v1.2.1