summaryrefslogtreecommitdiffstats
path: root/ktalkd/ktalkdlg/ktalkdlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ktalkd/ktalkdlg/ktalkdlg.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktalkd/ktalkdlg/ktalkdlg.cpp')
-rw-r--r--ktalkd/ktalkdlg/ktalkdlg.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/ktalkd/ktalkdlg/ktalkdlg.cpp b/ktalkd/ktalkdlg/ktalkdlg.cpp
index b843c990..336c9a04 100644
--- a/ktalkd/ktalkdlg/ktalkdlg.cpp
+++ b/ktalkd/ktalkdlg/ktalkdlg.cpp
@@ -26,8 +26,8 @@
#include <fcntl.h>
#include <unistd.h>
-#include <qmessagebox.h>
-#include <qfile.h>
+#include <tqmessagebox.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -42,21 +42,21 @@
#define MAX_DLG_LIFE RING_WAIT
/* so that the dialog lasts exactly the time of an announce */
-class TimeoutDialog : public QMessageBox {
+class TimeoutDialog : public TQMessageBox {
public:
TimeoutDialog (int timeout_ms,
- const QString& caption, const QString &text, Icon icon,
+ const TQString& caption, const TQString &text, Icon icon,
int button0, int button1, int button2,
- QWidget *parent=0, const char *name=0, bool modal=TRUE,
+ TQWidget *parent=0, const char *name=0, bool modal=TRUE,
WFlags f=WStyle_DialogBorder ):
- QMessageBox (caption, text, icon, button0, button1, button2,
+ TQMessageBox (caption, text, icon, button0, button1, button2,
parent, name, modal, f)
{startTimer (timeout_ms);}
~TimeoutDialog ()
{killTimers ();}
- virtual void timerEvent (QTimerEvent *)
+ virtual void timerEvent (TQTimerEvent *)
{killTimers (); done (Rejected);}
};
@@ -89,7 +89,7 @@ int main (int argc, char **argv)
if (args->count() == 0)
KCmdLineArgs::usage(i18n("'user@host' expected."));
- QString s;
+ TQString s;
s.sprintf ("%d:%02d", localclock->tm_hour, localclock->tm_min);
s = i18n ("Message from talk demon at ") + s + " ...\n" +
i18n ("Talk connection requested by ") + args->arg(0);
@@ -97,7 +97,7 @@ int main (int argc, char **argv)
if ( args->count() == 2 )
{
s += '\n';
- QString callee = args->arg(1);
+ TQString callee = args->arg(1);
s += i18n ("for user %1").arg( callee.isEmpty() ? i18n("<nobody>") : callee );
}
@@ -105,12 +105,12 @@ int main (int argc, char **argv)
TimeoutDialog dialog (MAX_DLG_LIFE * 1000,
i18n ("Talk requested..."), s,
- QMessageBox::Information,
- QMessageBox::Yes | QMessageBox::Default,
- QMessageBox::No | QMessageBox::Escape,
+ TQMessageBox::Information,
+ TQMessageBox::Yes | TQMessageBox::Default,
+ TQMessageBox::No | TQMessageBox::Escape,
0 );
- dialog.setButtonText( QMessageBox::Yes, i18n ("Respond") );
- dialog.setButtonText( QMessageBox::No, i18n ("Ignore") );
+ dialog.setButtonText( TQMessageBox::Yes, i18n ("Respond") );
+ dialog.setButtonText( TQMessageBox::No, i18n ("Ignore") );
a.setTopWidget (&dialog);
@@ -123,7 +123,7 @@ int main (int argc, char **argv)
bool bSound = cfg->readNumEntry ("Sound", 0);
if (bSound) {
- QString soundFile = cfg->readPathEntry ("SoundFile");
+ TQString soundFile = cfg->readPathEntry ("SoundFile");
if (soundFile[0] != '/')
soundFile = locate( "sound", soundFile );
@@ -134,17 +134,17 @@ int main (int argc, char **argv)
//if (!audio) a.beep (); // If no audio is played (whatever reason), beep!
int result = dialog.exec ();
- if (result == QMessageBox::Yes) {
+ if (result == TQMessageBox::Yes) {
dialog.killTimers ();
kdDebug() << "Running talk client..." << endl;
- QString konsole = locate("exe", "konsole");
- QString konsole_dir = konsole;
+ TQString konsole = locate("exe", "konsole");
+ TQString konsole_dir = konsole;
konsole_dir.truncate( konsole.findRev('/') );
- setenv("KDEBINDIR", QFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/);
- QString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk");
+ setenv("KDEBINDIR", TQFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/);
+ TQString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk");
- QString cmd = cmd0.stripWhiteSpace();
+ TQString cmd = cmd0.stripWhiteSpace();
cmd += " '";
cmd += args->arg(0);
cmd += "' &";
@@ -160,7 +160,7 @@ int main (int argc, char **argv)
/* XXX: The sender's name or hostname may contain `rm -rf .`
* That's why it's bad to use system()
*/
- system (QFile::encodeName(cmd));
+ system (TQFile::encodeName(cmd));
kapp->quit();
}