diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:20:30 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:20:30 +0000 |
commit | 28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c (patch) | |
tree | a2f011f22aa31d0839c6e2118501b7a6d2f2ae96 /kmousetool | |
parent | 0285229d858c8f03cde7354c679a752598cf4515 (diff) | |
download | tdeaccessibility-28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c.tar.gz tdeaccessibility-28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1157633 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmousetool')
-rw-r--r-- | kmousetool/kmousetool/kmousetool.cpp | 92 | ||||
-rw-r--r-- | kmousetool/kmousetool/kmousetool.h | 16 | ||||
-rw-r--r-- | kmousetool/kmousetool/main.cpp | 8 | ||||
-rw-r--r-- | kmousetool/kmousetool/mtstroke.cpp | 6 |
4 files changed, 61 insertions, 61 deletions
diff --git a/kmousetool/kmousetool/kmousetool.cpp b/kmousetool/kmousetool/kmousetool.cpp index ee27ba4..c54da8a 100644 --- a/kmousetool/kmousetool/kmousetool.cpp +++ b/kmousetool/kmousetool/kmousetool.cpp @@ -30,18 +30,18 @@ #include <X11/extensions/XTest.h> /* Standard Name-String definitions*/ #include <kdialog.h> #include <klocale.h> -#include <qpushbutton.h> -#include <qpoint.h> -#include <qnamespace.h> +#include <tqpushbutton.h> +#include <tqpoint.h> +#include <tqnamespace.h> #include <kmessagebox.h> #include <kaudioplayer.h> #include <kstandarddirs.h> -#include <qsound.h> +#include <tqsound.h> #include <kglobalsettings.h> #include <kdebug.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> #include <ksystemtray.h> #include <kiconloader.h> #include <kpushbutton.h> @@ -93,7 +93,7 @@ void KMouseTool::init_vars() loadOptions(); // If the ~/.mousetool directory doesn't exist, create it -// mSoundFileName = QDir::homeDirPath(); +// mSoundFileName = TQDir::homeDirPath(); mSoundFileName = locate("appdata", "sounds/mousetool_tap.wav"); mplayer = new KAudioPlayer(mSoundFileName); @@ -107,7 +107,7 @@ void KMouseTool::init_vars() // SimpleSoundServer server(Reference("global:Arts_SimpleSoundServer")); // sound_server(Reference("global:Arts_SimpleSoundServer")); - QDesktopWidget *d = QApplication::desktop(); + TQDesktopWidget *d = TQApplication::desktop(); int w = d->width(); int h = d->height(); MTStroke::setUpperLeft(0,0); @@ -141,7 +141,7 @@ void KMouseTool::setDefaultSettings() } -void KMouseTool::timerEvent( QTimerEvent * ) +void KMouseTool::timerEvent( TQTimerEvent * ) { if (!mousetool_is_running) return; @@ -244,39 +244,39 @@ void KMouseTool::playTickSound() // return; // sound_server.play(mSoundFileName.latin1()); - // Another approach is to try using QSound. - // QSound depends on Network Audio Server, which doesn't seem to work on my Debian Woody system. + // Another approach is to try using TQSound. + // TQSound depends on Network Audio Server, which doesn't seem to work on my Debian Woody system. // I haven't spent much time working on it, though. -// QSound::play(mSoundFileName); +// TQSound::play(mSoundFileName); } -KMouseTool::KMouseTool(QWidget *parent, const char *name) : KMouseToolUI(parent, name) +KMouseTool::KMouseTool(TQWidget *parent, const char *name) : KMouseToolUI(parent, name) { init_vars(); resetSettings(); - connect(movementEdit, SIGNAL(valueChanged(int)), this, SLOT(settingsChanged())); - connect(dwellTimeEdit, SIGNAL(valueChanged(int)), this, SLOT(settingsChanged())); - connect(dragTimeEdit, SIGNAL(valueChanged(int)), this, SLOT(settingsChanged())); - connect(cbDrag, SIGNAL(stateChanged(int)), this, SLOT(settingsChanged())); - connect(cbStroke, SIGNAL(stateChanged(int)), this, SLOT(settingsChanged())); - connect(cbClick, SIGNAL(stateChanged(int)), this, SLOT(settingsChanged())); - connect(cbStart, SIGNAL(stateChanged(int)), this, SLOT(settingsChanged())); + connect(movementEdit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(settingsChanged())); + connect(dwellTimeEdit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(settingsChanged())); + connect(dragTimeEdit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(settingsChanged())); + connect(cbDrag, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(settingsChanged())); + connect(cbStroke, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(settingsChanged())); + connect(cbClick, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(settingsChanged())); + connect(cbStart, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(settingsChanged())); - connect(buttonStartStop, SIGNAL(clicked()), this, SLOT(startStopSelected())); + connect(buttonStartStop, TQT_SIGNAL(clicked()), this, TQT_SLOT(startStopSelected())); buttonDefault->setGuiItem(KStdGuiItem::defaults()); - connect(buttonDefault, SIGNAL(clicked()), this, SLOT(defaultSelected())); - connect(buttonReset, SIGNAL(clicked()), this, SLOT(resetSelected())); + connect(buttonDefault, TQT_SIGNAL(clicked()), this, TQT_SLOT(defaultSelected())); + connect(buttonReset, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetSelected())); buttonApply->setGuiItem(KStdGuiItem::apply()); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(applySelected())); + connect(buttonApply, TQT_SIGNAL(clicked()), this, TQT_SLOT(applySelected())); buttonHelp->setGuiItem(KStdGuiItem::help()); - connect(buttonHelp, SIGNAL(clicked()), this, SLOT(helpSelected())); + connect(buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(helpSelected())); buttonClose->setGuiItem(KStdGuiItem::close()); - connect(buttonClose, SIGNAL(clicked()), this, SLOT(closeSelected())); + connect(buttonClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeSelected())); #if KDE_VERSION >= KDE_MAKE_VERSION (3,1,90) buttonQuit->setGuiItem(KStdGuiItem::quit()); #endif // KDE 3.2 - connect(buttonQuit, SIGNAL(clicked()), this, SLOT(quitSelected())); + connect(buttonQuit, TQT_SIGNAL(clicked()), this, TQT_SLOT(quitSelected())); // When we first start, it's nice to not click immediately. // So, tell MT we're just starting @@ -285,11 +285,11 @@ KMouseTool::KMouseTool(QWidget *parent, const char *name) : KMouseToolUI(parent, startTimer(100); trayIcon = new KMouseToolTray (this, "systemTrayIcon"); updateStartStopText (); - connect(trayIcon, SIGNAL(startStopSelected()), this, SLOT(startStopSelected())); - connect(trayIcon, SIGNAL(configureSelected()), this, SLOT(configureSelected())); - connect(trayIcon, SIGNAL(aboutSelected()), this, SLOT(aboutSelected())); - connect(trayIcon, SIGNAL(helpSelected()), this, SLOT(helpSelected())); - connect(trayIcon, SIGNAL(quitSelected()), this, SLOT(quitSelected())); + connect(trayIcon, TQT_SIGNAL(startStopSelected()), this, TQT_SLOT(startStopSelected())); + connect(trayIcon, TQT_SIGNAL(configureSelected()), this, TQT_SLOT(configureSelected())); + connect(trayIcon, TQT_SIGNAL(aboutSelected()), this, TQT_SLOT(aboutSelected())); + connect(trayIcon, TQT_SIGNAL(helpSelected()), this, TQT_SLOT(helpSelected())); + connect(trayIcon, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitSelected())); aboutDlg = new KAboutApplication (0, "KMouseToolDlg", false); } @@ -381,19 +381,19 @@ int CursorHasMoved (int minMovement) bool KMouseTool::isAutostart() { - QString sym = autostartdirname; + TQString sym = autostartdirname; sym += "kmousetool"; // sym is now full path to symlink - QFileInfo fi(sym); + TQFileInfo fi(sym); return fi.exists(); } void KMouseTool::setAutostart (bool start) { - QString sym = autostartdirname; + TQString sym = autostartdirname; sym += "kmousetool"; // sym is now full path to symlink - QFileInfo fi(sym); - QString cmd; + TQFileInfo fi(sym); + TQString cmd; if (start) { if (!fi.exists()) // if it doesn't exist, make it @@ -448,7 +448,7 @@ void KMouseTool::loadOptions() min_movement = kapp->config()->readNumEntry("Movement",5); strokesEnabled = kapp->config()->readBoolEntry("strokesEnabled",false); - QPoint p; + TQPoint p; int x = kapp->config()->readNumEntry("x",0); int y = kapp->config()->readNumEntry("y",0); p.setX(x); @@ -462,7 +462,7 @@ void KMouseTool::loadOptions() // Save options to kmousetoolrc file void KMouseTool::saveOptions() { - QPoint p = pos(); + TQPoint p = pos(); int x = p.x(); int y = p.y(); @@ -608,17 +608,17 @@ void KMouseTool::aboutSelected() -KMouseToolTray::KMouseToolTray (QWidget *parent, const char *name) : KSystemTray (parent, name) +KMouseToolTray::KMouseToolTray (TQWidget *parent, const char *name) : KSystemTray (parent, name) { - startStopId = contextMenu()->insertItem (i18n("&Start"), this, SIGNAL(startStopSelected())); + startStopId = contextMenu()->insertItem (i18n("&Start"), this, TQT_SIGNAL(startStopSelected())); contextMenu()->insertSeparator(); contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("configure", KIcon::Small), - i18n("&Configure KMouseTool..."), this, SIGNAL(configureSelected())); + i18n("&Configure KMouseTool..."), this, TQT_SIGNAL(configureSelected())); contextMenu()->insertSeparator(); contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("contents", KIcon::Small), - i18n("KMousetool &Handbook"), this, SIGNAL(helpSelected())); + i18n("KMousetool &Handbook"), this, TQT_SIGNAL(helpSelected())); contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("kmousetool", KIcon::Small), - i18n("&About KMouseTool"), this, SIGNAL(aboutSelected())); + i18n("&About KMouseTool"), this, TQT_SIGNAL(aboutSelected())); } KMouseToolTray::~KMouseToolTray() { @@ -626,7 +626,7 @@ KMouseToolTray::~KMouseToolTray() { void KMouseToolTray::updateStartStopText(bool mousetool_is_running) { - QPixmap icon; + TQPixmap icon; if (mousetool_is_running) { contextMenu()->changeItem (startStopId, i18n("&Stop")); diff --git a/kmousetool/kmousetool/kmousetool.h b/kmousetool/kmousetool/kmousetool.h index 88a05ec..add8f08 100644 --- a/kmousetool/kmousetool/kmousetool.h +++ b/kmousetool/kmousetool/kmousetool.h @@ -22,7 +22,7 @@ #ifndef KMOUSETOOL_H #define KMOUSETOOL_H -#include <qdir.h> +#include <tqdir.h> #ifdef HAVE_CONFIG_H #include <config.h> @@ -32,7 +32,7 @@ #include <kapplication.h> #include <ksystemtray.h> -#include <qwidget.h> +#include <tqwidget.h> #include "mtstroke.h" #include "kmousetoolui.h" @@ -74,9 +74,9 @@ private: bool moving; bool strokesEnabled; - QString autostartdirname; - QString rcfilename; - QString appfilename; + TQString autostartdirname; + TQString rcfilename; + TQString appfilename; QString mSoundFileName; KAudioPlayer *mplayer; KMouseToolTray *trayIcon; @@ -175,7 +175,7 @@ public: * current mouse position to its previous position to see * whether to send a down click, and up click, or wait. */ - void timerEvent (QTimerEvent *e); + void timerEvent (TQTimerEvent *e); /** * This generates a normal click event -- @@ -186,7 +186,7 @@ public: /** * construtor */ - KMouseTool(QWidget* parent=0, const char *name=0); + KMouseTool(TQWidget* parent=0, const char *name=0); /** destructor */ ~KMouseTool(); @@ -196,7 +196,7 @@ class KMouseToolTray : public KSystemTray { Q_OBJECT int startStopId; public: - KMouseToolTray (QWidget *parent=0, const char *name=0); + KMouseToolTray (TQWidget *parent=0, const char *name=0); ~KMouseToolTray(); void updateStartStopText (bool mousetool_is_running); diff --git a/kmousetool/kmousetool/main.cpp b/kmousetool/kmousetool/main.cpp index 29c5e30..6267d57 100644 --- a/kmousetool/kmousetool/main.cpp +++ b/kmousetool/kmousetool/main.cpp @@ -23,7 +23,7 @@ #include <kstandarddirs.h> #include <kuniqueapplication.h> #include <dcopclient.h> -#include <qmessagebox.h> +#include <tqmessagebox.h> #include <kconfig.h> #include "kmousetool.h" @@ -57,9 +57,9 @@ int main(int argc, char *argv[]) if (!KUniqueApplication::start()) { DCOPClient *client = new DCOPClient(); client->attach(); - QByteArray data; - QCString replyType; - QByteArray replyData; + TQByteArray data; + TQCString replyType; + TQByteArray replyData; if ( !client->call("kmousetool", "qt/KMouseToolUI", "show()", data, replyType, replyData, true) || !client->call("kmousetool", "qt/KMouseToolUI", "raise()", diff --git a/kmousetool/kmousetool/mtstroke.cpp b/kmousetool/kmousetool/mtstroke.cpp index 16b1078..d4ec242 100644 --- a/kmousetool/kmousetool/mtstroke.cpp +++ b/kmousetool/kmousetool/mtstroke.cpp @@ -23,7 +23,7 @@ // these are for locating the stroke information file #include <kstandarddirs.h> -#include <qstring.h> +#include <tqstring.h> // #include <string> @@ -186,7 +186,7 @@ void MTStroke::getExtent() // if unable to create it, bool MTStroke::readSequence() { - QString strokefilename; + TQString strokefilename; strokefilename = locate("config", "kmousetool_strokes.txt"); if (strokefilename.isEmpty()) { // make default @@ -222,7 +222,7 @@ bool MTStroke::readSequence() bool MTStroke::writeSequence() { - QString strokefilename; + TQString strokefilename; strokefilename = locateLocal("config", "kmousetool_strokes.txt"); ofstream outfile (strokefilename.ascii(), ios::out); |