summaryrefslogtreecommitdiffstats
path: root/ksmserver
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /ksmserver
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksmserver')
-rw-r--r--ksmserver/KSMServerInterface.h12
-rw-r--r--ksmserver/client.cpp34
-rw-r--r--ksmserver/client.h32
-rw-r--r--ksmserver/legacy.cpp64
-rw-r--r--ksmserver/main.cpp32
-rw-r--r--ksmserver/server.cpp120
-rw-r--r--ksmserver/server.h100
-rw-r--r--ksmserver/shutdown.cpp40
-rw-r--r--ksmserver/shutdowndlg.cpp230
-rw-r--r--ksmserver/shutdowndlg.h56
-rw-r--r--ksmserver/startup.cpp62
-rw-r--r--ksmserver/test.cpp2
12 files changed, 392 insertions, 392 deletions
diff --git a/ksmserver/KSMServerInterface.h b/ksmserver/KSMServerInterface.h
index 904b50927..52fdf0942 100644
--- a/ksmserver/KSMServerInterface.h
+++ b/ksmserver/KSMServerInterface.h
@@ -2,7 +2,7 @@
#define KSMSERVER_INTERFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KSMServerInterface : virtual public DCOPObject
{
@@ -12,16 +12,16 @@ k_dcop:
virtual void logout(int, int, int ) = 0;
virtual void restoreSessionInternal() = 0;
virtual void restoreSessionDoneInternal() = 0;
- virtual QStringList sessionList() = 0;
+ virtual TQStringList sessionList() = 0;
- virtual QString currentSession() = 0;
+ virtual TQString currentSession() = 0;
virtual void saveCurrentSession() = 0;
- virtual void saveCurrentSessionAs( QString ) = 0;
+ virtual void saveCurrentSessionAs( TQString ) = 0;
virtual void autoStart2() = 0;
- virtual void suspendStartup( QCString ) = 0;
- virtual void resumeStartup( QCString ) = 0;
+ virtual void suspendStartup( TQCString ) = 0;
+ virtual void resumeStartup( TQCString ) = 0;
};
#endif
diff --git a/ksmserver/client.cpp b/ksmserver/client.cpp
index 784de496c..2f6708963 100644
--- a/ksmserver/client.cpp
+++ b/ksmserver/client.cpp
@@ -63,7 +63,7 @@ KSMClient::~KSMClient()
SmProp* KSMClient::property( const char* name ) const
{
- for ( QPtrListIterator<SmProp> it( properties ); it.current(); ++it ) {
+ for ( TQPtrListIterator<SmProp> it( properties ); it.current(); ++it ) {
if ( !qstrcmp( it.current()->name, name ) )
return it.current();
}
@@ -83,17 +83,17 @@ void KSMClient::resetState()
* In this case SmsGenerateClientID() returns NULL, but we really want a
* client ID, so we fake one.
*/
-static KStaticDeleter<QString> smy_addr;
+static KStaticDeleter<TQString> smy_addr;
static char * safeSmsGenerateClientID( SmsConn /*c*/ )
{
// Causes delays with misconfigured network :-/.
// char *ret = SmsGenerateClientID(c);
char* ret = NULL;
if (!ret) {
- static QString *my_addr = 0;
+ static TQString *my_addr = 0;
if (!my_addr) {
// qWarning("Can't get own host name. Your system is severely misconfigured\n");
- smy_addr.setObject(my_addr,new QString);
+ smy_addr.setObject(my_addr,new TQString);
/* Faking our IP address, the 0 below is "unknown" address format
(1 would be IP, 2 would be DEC-NET format) */
@@ -112,7 +112,7 @@ static char * safeSmsGenerateClientID( SmsConn /*c*/ )
for( int i = 0;
i < 4;
++i )
- *my_addr += QString::number( addr[ i ], 16 );
+ *my_addr += TQString::number( addr[ i ], 16 );
}
}
/* Needs to be malloc(), to look the same as libSM */
@@ -141,33 +141,33 @@ void KSMClient::registerClient( const char* previousId )
}
-QString KSMClient::program() const
+TQString KSMClient::program() const
{
SmProp* p = property( SmProgram );
if ( !p || qstrcmp( p->type, SmARRAY8) || p->num_vals < 1)
- return QString::null;
- return QString::fromLatin1( (const char*) p->vals[0].value );
+ return TQString::null;
+ return TQString::fromLatin1( (const char*) p->vals[0].value );
}
-QStringList KSMClient::restartCommand() const
+TQStringList KSMClient::restartCommand() const
{
- QStringList result;
+ TQStringList result;
SmProp* p = property( SmRestartCommand );
if ( !p || qstrcmp( p->type, SmLISTofARRAY8) || p->num_vals < 1)
return result;
for ( int i = 0; i < p->num_vals; i++ )
- result +=QString::fromLatin1( (const char*) p->vals[i].value );
+ result +=TQString::fromLatin1( (const char*) p->vals[i].value );
return result;
}
-QStringList KSMClient::discardCommand() const
+TQStringList KSMClient::discardCommand() const
{
- QStringList result;
+ TQStringList result;
SmProp* p = property( SmDiscardCommand );
if ( !p || qstrcmp( p->type, SmLISTofARRAY8) || p->num_vals < 1)
return result;
for ( int i = 0; i < p->num_vals; i++ )
- result +=QString::fromLatin1( (const char*) p->vals[i].value );
+ result +=TQString::fromLatin1( (const char*) p->vals[i].value );
return result;
}
@@ -179,12 +179,12 @@ int KSMClient::restartStyleHint() const
return *((int*)p->vals[0].value);
}
-QString KSMClient::userId() const
+TQString KSMClient::userId() const
{
SmProp* p = property( SmUserID );
if ( !p || qstrcmp( p->type, SmARRAY8) || p->num_vals < 1)
- return QString::null;
- return QString::fromLatin1( (const char*) p->vals[0].value );
+ return TQString::null;
+ return TQString::fromLatin1( (const char*) p->vals[0].value );
}
diff --git a/ksmserver/client.h b/ksmserver/client.h
index 46dc28fa2..d950275ce 100644
--- a/ksmserver/client.h
+++ b/ksmserver/client.h
@@ -9,18 +9,18 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
// needed to avoid clash with INT8 defined in X11/Xmd.h on solaris
#define QT_CLEAN_NAMESPACE 1
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qsocketnotifier.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qdict.h>
-#include <qptrqueue.h>
-#include <qptrdict.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqdict.h>
+#include <tqptrqueue.h>
+#include <tqptrdict.h>
#include <kapplication.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <dcopobject.h>
#include "server2.h"
@@ -42,14 +42,14 @@ public:
uint waitForPhase2 : 1;
uint wasPhase2 : 1;
- QPtrList<SmProp> properties;
+ TQPtrList<SmProp> properties;
SmProp* property( const char* name ) const;
- QString program() const;
- QStringList restartCommand() const;
- QStringList discardCommand() const;
+ TQString program() const;
+ TQStringList restartCommand() const;
+ TQStringList discardCommand() const;
int restartStyleHint() const;
- QString userId() const;
+ TQString userId() const;
const char* clientId() { return id ? id : ""; }
private:
diff --git a/ksmserver/legacy.cpp b/ksmserver/legacy.cpp
index 464ded3d8..a8f439745 100644
--- a/ksmserver/legacy.cpp
+++ b/ksmserver/legacy.cpp
@@ -46,7 +46,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <unistd.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -100,7 +100,7 @@ void KSMServer::performLegacySessionSave()
wm_protocols = atoms[ 1 ];
wm_client_leader = atoms[ 2 ];
}
- for ( QValueList<WId>::ConstIterator it = module.windows().begin();
+ for ( TQValueList<WId>::ConstIterator it = module.windows().begin();
it != module.windows().end(); ++it) {
WId leader = windowWmClientLeader( *it );
if (!legacyWindows.contains(leader) && windowSessionId( *it, leader ).isEmpty()) {
@@ -160,7 +160,7 @@ void KSMServer::performLegacySessionSave()
}
// Wait for change in WM_COMMAND with timeout
XFlush(newdisplay);
- QTime start = QTime::currentTime();
+ TQTime start = TQTime::currentTime();
while (awaiting_replies > 0) {
if (XPending(newdisplay)) {
/* Process pending event */
@@ -224,9 +224,9 @@ void KSMServer::storeLegacySession( KConfig* config )
continue;
if ( !(*it).wmCommand.isEmpty() && !(*it).wmClientMachine.isEmpty() ) {
count++;
- QString n = QString::number(count);
- config->writeEntry( QString("command")+n, (*it).wmCommand );
- config->writeEntry( QString("clientMachine")+n, (*it).wmClientMachine );
+ TQString n = TQString::number(count);
+ config->writeEntry( TQString("command")+n, (*it).wmCommand );
+ config->writeEntry( TQString("clientMachine")+n, (*it).wmClientMachine );
}
}
}
@@ -245,12 +245,12 @@ void KSMServer::restoreLegacySession( KConfig* config )
KConfigGroupSaver saver( config, sessionGroup );
int count = config->readNumEntry( "count", 0 );
for ( int i = 1; i <= count; i++ ) {
- QString n = QString::number(i);
- if ( config->readEntry( QString("program")+n ) != wm )
+ TQString n = TQString::number(i);
+ if ( config->readEntry( TQString("program")+n ) != wm )
continue;
- QStringList restartCommand =
- config->readListEntry( QString("restartCommand")+n );
- for( QStringList::ConstIterator it = restartCommand.begin();
+ TQStringList restartCommand =
+ config->readListEntry( TQString("restartCommand")+n );
+ for( TQStringList::ConstIterator it = restartCommand.begin();
it != restartCommand.end();
++it ) {
if( (*it) == "-session" ) {
@@ -270,26 +270,26 @@ void KSMServer::restoreLegacySessionInternal( KConfig* config, char sep )
{
int count = config->readNumEntry( "count" );
for ( int i = 1; i <= count; i++ ) {
- QString n = QString::number(i);
- QStringList wmCommand = config->readListEntry( QString("command")+n, sep );
+ TQString n = TQString::number(i);
+ TQStringList wmCommand = config->readListEntry( TQString("command")+n, sep );
if( wmCommand.isEmpty())
continue;
if( isWM( wmCommand.first()))
continue;
startApplication( wmCommand,
- config->readEntry( QString("clientMachine")+n ),
- config->readEntry( QString("userId")+n ));
+ config->readEntry( TQString("clientMachine")+n ),
+ config->readEntry( TQString("userId")+n ));
}
}
-static QCString getQCStringProperty(WId w, Atom prop)
+static TQCString getQCStringProperty(WId w, Atom prop)
{
Atom type;
int format, status;
unsigned long nitems = 0;
unsigned long extra = 0;
unsigned char *data = 0;
- QCString result = "";
+ TQCString result = "";
status = XGetWindowProperty( qt_xdisplay(), w, prop, 0, 10000,
FALSE, XA_STRING, &type, &format,
&nitems, &extra, &data );
@@ -301,14 +301,14 @@ static QCString getQCStringProperty(WId w, Atom prop)
return result;
}
-static QStringList getQStringListProperty(WId w, Atom prop)
+static TQStringList getQStringListProperty(WId w, Atom prop)
{
Atom type;
int format, status;
unsigned long nitems = 0;
unsigned long extra = 0;
unsigned char *data = 0;
- QStringList result;
+ TQStringList result;
status = XGetWindowProperty( qt_xdisplay(), w, prop, 0, 10000,
FALSE, XA_STRING, &type, &format,
@@ -317,7 +317,7 @@ static QStringList getQStringListProperty(WId w, Atom prop)
if (!data)
return result;
for (int i=0; i<(int)nitems; i++) {
- result << QString::fromLatin1( (const char*)data + i );
+ result << TQString::fromLatin1( (const char*)data + i );
while(data[i]) i++;
}
XFree(data);
@@ -325,30 +325,30 @@ static QStringList getQStringListProperty(WId w, Atom prop)
return result;
}
-QStringList KSMServer::windowWmCommand(WId w)
+TQStringList KSMServer::windowWmCommand(WId w)
{
- QStringList ret = getQStringListProperty(w, XA_WM_COMMAND);
+ TQStringList ret = getQStringListProperty(w, XA_WM_COMMAND);
// hacks here
if( ret.count() == 1 ) {
- QString command = ret.first();
+ TQString command = ret.first();
// Mozilla is launched using wrapper scripts, so it's launched using "mozilla",
// but the actual binary is "mozilla-bin" or "<path>/mozilla-bin", and that's what
// will be also in WM_COMMAND - using this "mozilla-bin" doesn't work at all though
if( command.endsWith( "mozilla-bin" ))
- return QStringList() << "mozilla";
+ return TQStringList() << "mozilla";
if( command.endsWith( "firefox-bin" ))
- return QStringList() << "firefox";
+ return TQStringList() << "firefox";
if( command.endsWith( "thunderbird-bin" ))
- return QStringList() << "thunderbird";
+ return TQStringList() << "thunderbird";
if( command.endsWith( "sunbird-bin" ))
- return QStringList() << "sunbird";
+ return TQStringList() << "sunbird";
}
return ret;
}
-QString KSMServer::windowWmClientMachine(WId w)
+TQString KSMServer::windowWmClientMachine(WId w)
{
- QCString result = getQCStringProperty(w, XA_WM_CLIENT_MACHINE);
+ TQCString result = getQCStringProperty(w, XA_WM_CLIENT_MACHINE);
if (result.isEmpty()) {
result = "localhost";
} else {
@@ -365,7 +365,7 @@ QString KSMServer::windowWmClientMachine(WId w)
}
}
}
- return QString::fromLatin1(result);
+ return TQString::fromLatin1(result);
}
WId KSMServer::windowWmClientLeader(WId w)
@@ -393,9 +393,9 @@ WId KSMServer::windowWmClientLeader(WId w)
taken either from its window or from the leader window.
*/
extern Atom qt_sm_client_id;
-QCString KSMServer::windowSessionId(WId w, WId leader)
+TQCString KSMServer::windowSessionId(WId w, WId leader)
{
- QCString result = getQCStringProperty(w, qt_sm_client_id);
+ TQCString result = getQCStringProperty(w, qt_sm_client_id);
if (result.isEmpty() && leader != (WId)None && leader != w)
result = getQCStringProperty(leader, qt_sm_client_id);
return result;
diff --git a/ksmserver/main.cpp b/ksmserver/main.cpp
index 8602e1b02..d41cfc1fa 100644
--- a/ksmserver/main.cpp
+++ b/ksmserver/main.cpp
@@ -13,8 +13,8 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <string.h>
#include <dcopclient.h>
-#include <qmessagebox.h>
-#include <qdir.h>
+#include <tqmessagebox.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -46,7 +46,7 @@ void IoErrorHandler ( IceConn iceConn)
the_server->ioError( iceConn );
}
-bool writeTest(QCString path)
+bool writeTest(TQCString path)
{
path += "/XXXXXX";
int fd = mkstemp(path.data());
@@ -67,9 +67,9 @@ bool writeTest(QCString path)
void sanity_check( int argc, char* argv[] )
{
- QCString msg;
- QCString path = getenv("HOME");
- QCString readOnly = getenv("KDE_HOME_READONLY");
+ TQCString msg;
+ TQCString path = getenv("HOME");
+ TQCString readOnly = getenv("KDE_HOME_READONLY");
if (path.isEmpty())
{
msg = "$HOME not set!";
@@ -94,7 +94,7 @@ void sanity_check( int argc, char* argv[] )
msg = "$HOME directory (%s) is out of disk space.";
else
msg = "Writing to the $HOME directory (%s) failed with\n "
- "the error '"+QCString(strerror(errno))+"'";
+ "the error '"+TQCString(strerror(errno))+"'";
}
if (msg.isEmpty())
{
@@ -131,7 +131,7 @@ void sanity_check( int argc, char* argv[] )
msg = "Temp directory (%s) is out of disk space.";
else
msg = "Writing to the temp directory (%s) failed with\n "
- "the error '"+QCString(strerror(errno))+"'";
+ "the error '"+TQCString(strerror(errno))+"'";
}
}
if (msg.isEmpty() && (path != "/tmp"))
@@ -143,7 +143,7 @@ void sanity_check( int argc, char* argv[] )
msg = "Temp directory (%s) is out of disk space.";
else
msg = "Writing to the temp directory (%s) failed with\n "
- "the error '"+QCString(strerror(errno))+"'";
+ "the error '"+TQCString(strerror(errno))+"'";
}
}
if (msg.isEmpty())
@@ -165,12 +165,12 @@ void sanity_check( int argc, char* argv[] )
fprintf(stderr, msg.data(), path.data());
fputs(msg_post, stderr);
- QApplication a(argc, argv);
- QCString qmsg(256+path.length());
+ TQApplication a(argc, argv);
+ TQCString qmsg(256+path.length());
qmsg.sprintf(msg.data(), path.data());
qmsg = msg_pre+qmsg+msg_post;
- QMessageBox::critical(0, "KDE Installation Problem!",
- QString::fromLatin1(qmsg.data()));
+ TQMessageBox::critical(0, "KDE Installation Problem!",
+ TQString::fromLatin1(qmsg.data()));
exit(255);
}
}
@@ -202,7 +202,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] )
return 1;
}
- QCString wm = args->getOption("windowmanager");
+ TQCString wm = args->getOption("windowmanager");
if ( wm.isEmpty() )
wm = "kwin";
@@ -218,7 +218,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] )
only_local = false;
#endif
- KSMServer *server = new KSMServer( QString::fromLatin1(wm), only_local);
+ KSMServer *server = new KSMServer( TQString::fromLatin1(wm), only_local);
kapp->dcopClient()->setDefaultObject( server->objId() );
IceSetIOErrorHandler( IoErrorHandler );
@@ -230,7 +230,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char* argv[] )
bool screenCountChanged =
( config->readNumEntry( "screenCount", realScreenCount ) != realScreenCount );
- QString loginMode = config->readEntry( "loginMode", "restorePreviousLogout" );
+ TQString loginMode = config->readEntry( "loginMode", "restorePreviousLogout" );
if ( args->isSet("restore") && ! screenCountChanged )
server->restoreSession( SESSION_BY_USER );
diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp
index 1bcdea9ac..d98faf09a 100644
--- a/ksmserver/server.cpp
+++ b/ksmserver/server.cpp
@@ -56,15 +56,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <limits.h>
#endif
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qptrstack.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatastream.h>
+#include <tqptrstack.h>
+#include <tqpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kglobal.h>
@@ -98,14 +98,14 @@ KSMServer* KSMServer::self()
/*! Utility function to execute a command on the local machine. Used
* to restart applications.
*/
-void KSMServer::startApplication( QStringList command, const QString& clientMachine,
- const QString& userId )
+void KSMServer::startApplication( TQStringList command, const TQString& clientMachine,
+ const TQString& userId )
{
if ( command.isEmpty() )
return;
if ( !userId.isEmpty()) {
struct passwd* pw = getpwuid( getuid());
- if( pw != NULL && userId != QString::fromLocal8Bit( pw->pw_name )) {
+ if( pw != NULL && userId != TQString::fromLocal8Bit( pw->pw_name )) {
command.prepend( "--" );
command.prepend( userId );
command.prepend( "-u" );
@@ -117,22 +117,22 @@ void KSMServer::startApplication( QStringList command, const QString& clientMach
command.prepend( xonCommand ); // "xon" by default
}
int n = command.count();
- QCString app = command[0].latin1();
- QValueList<QCString> argList;
+ TQCString app = command[0].latin1();
+ TQValueList<TQCString> argList;
for ( int i=1; i < n; i++)
- argList.append( QCString(command[i].latin1()));
- DCOPRef( launcher ).send( "exec_blind", app, DCOPArg( argList, "QValueList<QCString>" ) );
+ argList.append( TQCString(command[i].latin1()));
+ DCOPRef( launcher ).send( "exec_blind", app, DCOPArg( argList, "TQValueList<TQCString>" ) );
}
/*! Utility function to execute a command on the local machine. Used
* to discard session data
*/
-void KSMServer::executeCommand( const QStringList& command )
+void KSMServer::executeCommand( const TQStringList& command )
{
if ( command.isEmpty() )
return;
KProcess proc;
- for ( QStringList::ConstIterator it = command.begin();
+ for ( TQStringList::ConstIterator it = command.begin();
it != command.end(); ++it )
proc << (*it).latin1();
proc.start( KProcess::Block );
@@ -301,8 +301,8 @@ class KSMListener : public QSocketNotifier
{
public:
KSMListener( IceListenObj obj )
- : QSocketNotifier( IceGetListenConnectionNumber( obj ),
- QSocketNotifier::Read, 0, 0)
+ : TQSocketNotifier( IceGetListenConnectionNumber( obj ),
+ TQSocketNotifier::Read, 0, 0)
{
listenObj = obj;
}
@@ -314,8 +314,8 @@ class KSMConnection : public QSocketNotifier
{
public:
KSMConnection( IceConn conn )
- : QSocketNotifier( IceConnectionNumber( conn ),
- QSocketNotifier::Read, 0, 0 )
+ : TQSocketNotifier( IceConnectionNumber( conn ),
+ TQSocketNotifier::Read, 0, 0 )
{
iceConn = conn;
}
@@ -432,7 +432,7 @@ Status SetAuthentication (int count, IceListenObj *listenObjs,
addAuthFile.close();
remAuthFile->close();
- QString iceAuth = KGlobal::dirs()->findExe("iceauth");
+ TQString iceAuth = KGlobal::dirs()->findExe("iceauth");
if (iceAuth.isEmpty())
{
qWarning("KSMServer: could not find iceauth");
@@ -462,7 +462,7 @@ void FreeAuthenticationData(int count, IceAuthDataEntry *authDataEntries)
free (authDataEntries);
- QString iceAuth = KGlobal::dirs()->findExe("iceauth");
+ TQString iceAuth = KGlobal::dirs()->findExe("iceauth");
if (iceAuth.isEmpty())
{
qWarning("KSMServer: could not find iceauth");
@@ -578,7 +578,7 @@ static Status KSMNewClientProc ( SmsConn conn, SmPointer manager_data,
extern "C" int _IceTransNoListen(const char * protocol);
#endif
-KSMServer::KSMServer( const QString& windowManager, bool _only_local )
+KSMServer::KSMServer( const TQString& windowManager, bool _only_local )
: DCOPObject("ksmserver"), sessionGroup( "" )
{
the_server = this;
@@ -596,9 +596,9 @@ KSMServer::KSMServer( const QString& windowManager, bool _only_local )
clientInteracting = 0;
xonCommand = config->readEntry( "xonCommand", "xon" );
- connect( &knotifyTimeoutTimer, SIGNAL( timeout()), SLOT( knotifyTimeout()));
- connect( &startupSuspendTimeoutTimer, SIGNAL( timeout()), SLOT( startupSuspendTimeout()));
- connect( &pendingShutdown, SIGNAL( timeout()), SLOT( pendingShutdownTimeout()));
+ connect( &knotifyTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( knotifyTimeout()));
+ connect( &startupSuspendTimeoutTimer, TQT_SIGNAL( timeout()), TQT_SLOT( startupSuspendTimeout()));
+ connect( &pendingShutdown, TQT_SIGNAL( timeout()), TQT_SLOT( pendingShutdownTimeout()));
only_local = _only_local;
#ifdef HAVE__ICETRANSNOLISTEN
@@ -629,10 +629,10 @@ KSMServer::KSMServer( const QString& windowManager, bool _only_local )
{
// publish available transports.
- QCString fName = QFile::encodeName(locateLocal("socket", "KSMserver"));
- QCString display = ::getenv("DISPLAY");
+ TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver"));
+ TQCString display = ::getenv("DISPLAY");
// strip the screen number from the display
- display.replace(QRegExp("\\.[0-9]+$"), "");
+ display.replace(TQRegExp("\\.[0-9]+$"), "");
int i;
while( (i = display.find(':')) >= 0)
display[i] = '_';
@@ -669,7 +669,7 @@ KSMServer::KSMServer( const QString& windowManager, bool _only_local )
for ( int i = 0; i < numTransports; i++) {
con = new KSMListener( listenObjs[i] );
listener.append( con );
- connect( con, SIGNAL( activated(int) ), this, SLOT( newConnection(int) ) );
+ connect( con, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( newConnection(int) ) );
}
signal(SIGHUP, sighandler);
@@ -677,9 +677,9 @@ KSMServer::KSMServer( const QString& windowManager, bool _only_local )
signal(SIGINT, sighandler);
signal(SIGPIPE, SIG_IGN);
- connect( &protectionTimer, SIGNAL( timeout() ), this, SLOT( protectionTimeout() ) );
- connect( &restoreTimer, SIGNAL( timeout() ), this, SLOT( tryRestoreNext() ) );
- connect( kapp, SIGNAL( shutDown() ), this, SLOT( cleanUp() ) );
+ connect( &protectionTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( protectionTimeout() ) );
+ connect( &restoreTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( tryRestoreNext() ) );
+ connect( kapp, TQT_SIGNAL( shutDown() ), this, TQT_SLOT( cleanUp() ) );
}
KSMServer::~KSMServer()
@@ -694,10 +694,10 @@ void KSMServer::cleanUp()
clean = true;
IceFreeListenObjs (numTransports, listenObjs);
- QCString fName = QFile::encodeName(locateLocal("socket", "KSMserver"));
- QCString display = ::getenv("DISPLAY");
+ TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver"));
+ TQCString display = ::getenv("DISPLAY");
// strip the screen number from the display
- display.replace(QRegExp("\\.[0-9]+$"), "");
+ display.replace(TQRegExp("\\.[0-9]+$"), "");
int i;
while( (i = display.find(':')) >= 0)
display[i] = '_';
@@ -717,7 +717,7 @@ void KSMServer::cleanUp()
void* KSMServer::watchConnection( IceConn iceConn )
{
KSMConnection* conn = new KSMConnection( iceConn );
- connect( conn, SIGNAL( activated(int) ), this, SLOT( processData(int) ) );
+ connect( conn, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( processData(int) ) );
return (void*) conn;
}
@@ -740,7 +740,7 @@ void KSMServer::processData( int /*socket*/ )
IceProcessMessagesStatus status = IceProcessMessages( iceConn, 0, 0 );
if ( status == IceProcessMessagesIOError ) {
IceSetShutdownNegotiation( iceConn, False );
- QPtrListIterator<KSMClient> it ( clients );
+ TQPtrListIterator<KSMClient> it ( clients );
while ( it.current() &&SmsGetIceConnection( it.current()->connection() ) != iceConn )
++it;
if ( it.current() ) {
@@ -797,7 +797,7 @@ void KSMServer::newConnection( int /*socket*/ )
}
-QString KSMServer::currentSession()
+TQString KSMServer::currentSession()
{
if ( sessionGroup.startsWith( "Session: " ) )
return sessionGroup.mid( 9 );
@@ -810,7 +810,7 @@ void KSMServer::discardSession()
config->setGroup( sessionGroup );
int count = config->readNumEntry( "count", 0 );
for ( KSMClient* c = clients.first(); c; c = clients.next() ) {
- QStringList discardCommand = c->discardCommand();
+ TQStringList discardCommand = c->discardCommand();
if ( discardCommand.isEmpty())
continue;
// check that non of the old clients used the exactly same
@@ -818,7 +818,7 @@ void KSMServer::discardSession()
// case up to KDE and Qt < 3.1
int i = 1;
while ( i <= count &&
- config->readPathListEntry( QString("discardCommand") + QString::number(i) ) != discardCommand )
+ config->readPathListEntry( TQString("discardCommand") + TQString::number(i) ) != discardCommand )
i++;
if ( i <= count )
executeCommand( discardCommand );
@@ -830,11 +830,11 @@ void KSMServer::storeSession()
KConfig* config = KGlobal::config();
config->reparseConfiguration(); // config may have changed in the KControl module
config->setGroup("General" );
- excludeApps = QStringList::split( QRegExp( "[,:]" ), config->readEntry( "excludeApps" ).lower());
+ excludeApps = TQStringList::split( TQRegExp( "[,:]" ), config->readEntry( "excludeApps" ).lower());
config->setGroup( sessionGroup );
int count = config->readNumEntry( "count" );
for ( int i = 1; i <= count; i++ ) {
- QStringList discardCommand = config->readPathListEntry( QString("discardCommand") + QString::number(i) );
+ TQStringList discardCommand = config->readPathListEntry( TQString("discardCommand") + TQString::number(i) );
if ( discardCommand.isEmpty())
continue;
// check that non of the new clients uses the exactly same
@@ -864,22 +864,22 @@ void KSMServer::storeSession()
int restartHint = c->restartStyleHint();
if (restartHint == SmRestartNever)
continue;
- QString program = c->program();
- QStringList restartCommand = c->restartCommand();
+ TQString program = c->program();
+ TQStringList restartCommand = c->restartCommand();
if (program.isEmpty() && restartCommand.isEmpty())
continue;
if (excludeApps.contains( program.lower()))
continue;
count++;
- QString n = QString::number(count);
- config->writeEntry( QString("program")+n, program );
- config->writeEntry( QString("clientId")+n, c->clientId() );
- config->writeEntry( QString("restartCommand")+n, restartCommand );
- config->writePathEntry( QString("discardCommand")+n, c->discardCommand() );
- config->writeEntry( QString("restartStyleHint")+n, restartHint );
- config->writeEntry( QString("userId")+n, c->userId() );
- config->writeEntry( QString("wasWm")+n, isWM( c ));
+ TQString n = TQString::number(count);
+ config->writeEntry( TQString("program")+n, program );
+ config->writeEntry( TQString("clientId")+n, c->clientId() );
+ config->writeEntry( TQString("restartCommand")+n, restartCommand );
+ config->writePathEntry( TQString("discardCommand")+n, c->discardCommand() );
+ config->writeEntry( TQString("restartStyleHint")+n, restartHint );
+ config->writeEntry( TQString("userId")+n, c->userId() );
+ config->writeEntry( TQString("wasWm")+n, isWM( c ));
}
config->writeEntry( "count", count );
@@ -891,12 +891,12 @@ void KSMServer::storeSession()
}
-QStringList KSMServer::sessionList()
+TQStringList KSMServer::sessionList()
{
- QStringList sessions = "default";
+ TQStringList sessions = "default";
KConfig* config = KGlobal::config();
- QStringList groups = config->groupList();
- for ( QStringList::ConstIterator it = groups.begin(); it != groups.end(); it++ )
+ TQStringList groups = config->groupList();
+ for ( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); it++ )
if ( (*it).startsWith( "Session: " ) )
sessions << (*it).mid( 9 );
return sessions;
@@ -907,7 +907,7 @@ bool KSMServer::isWM( const KSMClient* client ) const
return isWM( client->program());
}
-bool KSMServer::isWM( const QString& program ) const
+bool KSMServer::isWM( const TQString& program ) const
{
// KWin relies on ksmserver's special treatment in phase1,
// therefore make sure it's recognized even if ksmserver
diff --git a/ksmserver/server.h b/ksmserver/server.h
index feb6004ef..3d5904e53 100644
--- a/ksmserver/server.h
+++ b/ksmserver/server.h
@@ -9,18 +9,18 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
// needed to avoid clash with INT8 defined in X11/Xmd.h on solaris
#define QT_CLEAN_NAMESPACE 1
-#include <qobject.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qsocketnotifier.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qcstring.h>
-#include <qdict.h>
-#include <qptrqueue.h>
-#include <qptrdict.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqsocketnotifier.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqcstring.h>
+#include <tqdict.h>
+#include <tqptrqueue.h>
+#include <tqptrdict.h>
#include <kapplication.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <dcopobject.h>
#include "server2.h"
@@ -30,7 +30,7 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#define SESSION_PREVIOUS_LOGOUT "saved at previous logout"
#define SESSION_BY_USER "saved by user"
-typedef QValueList<QCString> QCStringList;
+typedef TQValueList<TQCString> QCStringList;
class KSMListener;
class KSMConnection;
class KSMClient;
@@ -39,18 +39,18 @@ enum SMType { SM_ERROR, SM_WMCOMMAND, SM_WMSAVEYOURSELF };
struct SMData
{
SMType type;
- QStringList wmCommand;
- QString wmClientMachine;
- QString wmclass1, wmclass2;
+ TQStringList wmCommand;
+ TQString wmClientMachine;
+ TQString wmclass1, wmclass2;
};
-typedef QMap<WId,SMData> WindowMap;
+typedef TQMap<WId,SMData> WindowMap;
-class KSMServer : public QObject, public KSMServerInterface
+class KSMServer : public TQObject, public KSMServerInterface
{
Q_OBJECT
K_DCOP
k_dcop:
- void notifySlot(QString,QString,QString,QString,QString,int,int,int,int);
+ void notifySlot(TQString,TQString,TQString,TQString,TQString,int,int,int,int);
void logoutSoundFinished(int,int);
void autoStart0Done();
void autoStart1Done();
@@ -58,7 +58,7 @@ k_dcop:
void kcmPhase1Done();
void kcmPhase2Done();
public:
- KSMServer( const QString& windowManager, bool only_local );
+ KSMServer( const TQString& windowManager, bool only_local );
~KSMServer();
static KSMServer* self();
@@ -83,14 +83,14 @@ public:
void clientRegistered( const char* previousId );
// public API
- void restoreSession( QString sessionName );
+ void restoreSession( TQString sessionName );
void startDefaultSession();
void shutdown( KApplication::ShutdownConfirm confirm,
KApplication::ShutdownType sdtype,
KApplication::ShutdownMode sdmode );
- virtual void suspendStartup( QCString app );
- virtual void resumeStartup( QCString app );
+ virtual void suspendStartup( TQCString app );
+ virtual void resumeStartup( TQCString app );
public slots:
void cleanUp();
@@ -132,13 +132,13 @@ private:
void startProtection();
void endProtection();
- void startApplication( QStringList command,
- const QString& clientMachine = QString::null,
- const QString& userId = QString::null );
- void executeCommand( const QStringList& command );
+ void startApplication( TQStringList command,
+ const TQString& clientMachine = TQString::null,
+ const TQString& userId = TQString::null );
+ void executeCommand( const TQStringList& command );
bool isWM( const KSMClient* client ) const;
- bool isWM( const QString& program ) const;
+ bool isWM( const TQString& program ) const;
bool defaultSession() const; // empty session
void setupXIOErrorHandler();
@@ -146,10 +146,10 @@ private:
void storeLegacySession( KConfig* config );
void restoreLegacySession( KConfig* config );
void restoreLegacySessionInternal( KConfig* config, char sep = ',' );
- QStringList windowWmCommand(WId w);
- QString windowWmClientMachine(WId w);
+ TQStringList windowWmCommand(WId w);
+ TQString windowWmClientMachine(WId w);
WId windowWmClientLeader(WId w);
- QCString windowSessionId(WId w, WId leader);
+ TQCString windowSessionId(WId w, WId leader);
bool checkStartupSuspend();
void finishStartup();
@@ -157,14 +157,14 @@ private:
// public dcop interface
void logout( int, int, int );
- QStringList sessionList();
- QString currentSession();
+ TQStringList sessionList();
+ TQString currentSession();
void saveCurrentSession();
- void saveCurrentSessionAs( QString );
+ void saveCurrentSessionAs( TQString );
private:
- QPtrList<KSMListener> listener;
- QPtrList<KSMClient> clients;
+ TQPtrList<KSMListener> listener;
+ TQPtrList<KSMClient> clients;
enum State
{
@@ -177,41 +177,41 @@ private:
bool saveSession;
int wmPhase1WaitingCount;
int saveType;
- QMap< QCString, int > startupSuspendCount;
+ TQMap< TQCString, int > startupSuspendCount;
KApplication::ShutdownType shutdownType;
KApplication::ShutdownMode shutdownMode;
- QString bootOption;
+ TQString bootOption;
bool clean;
KSMClient* clientInteracting;
- QString wm;
- QString sessionGroup;
- QString sessionName;
- QCString launcher;
- QTimer protectionTimer;
- QTimer restoreTimer;
- QString xonCommand;
+ TQString wm;
+ TQString sessionGroup;
+ TQString sessionName;
+ TQCString launcher;
+ TQTimer protectionTimer;
+ TQTimer restoreTimer;
+ TQString xonCommand;
int logoutSoundEvent;
- QTimer knotifyTimeoutTimer;
- QTimer startupSuspendTimeoutTimer;
+ TQTimer knotifyTimeoutTimer;
+ TQTimer startupSuspendTimeoutTimer;
bool waitAutoStart2;
bool waitKcmInit2;
- QTimer pendingShutdown;
+ TQTimer pendingShutdown;
KApplication::ShutdownConfirm pendingShutdown_confirm;
KApplication::ShutdownType pendingShutdown_sdtype;
KApplication::ShutdownMode pendingShutdown_sdmode;
// ksplash interface
- void upAndRunning( const QString& msg );
+ void upAndRunning( const TQString& msg );
void publishProgress( int progress, bool max = false );
// sequential startup
int appsToStart;
int lastAppStarted;
- QString lastIdStarted;
+ TQString lastIdStarted;
- QStringList excludeApps;
+ TQStringList excludeApps;
WindowMap legacyWindows;
};
diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp
index 1c3906e44..16fab8b4d 100644
--- a/ksmserver/shutdown.cpp
+++ b/ksmserver/shutdown.cpp
@@ -56,15 +56,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <limits.h>
#endif
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qptrstack.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatastream.h>
+#include <tqptrstack.h>
+#include <tqpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kglobal.h>
@@ -138,7 +138,7 @@ void KSMServer::shutdown( KApplication::ShutdownConfirm confirm,
sdmode = KApplication::ShutdownModeInteractive;
dialogActive = true;
- QString bopt;
+ TQString bopt;
if ( !logoutConfirmed ) {
KSMShutdownFeedback::start(); // make the screen gray
logoutConfirmed =
@@ -160,7 +160,7 @@ void KSMServer::shutdown( KApplication::ShutdownConfirm confirm,
saveSession = ( config->readEntry( "loginMode", "restorePreviousLogout" ) == "restorePreviousLogout" );
if ( saveSession )
- sessionGroup = QString("Session: ") + SESSION_PREVIOUS_LOGOUT;
+ sessionGroup = TQString("Session: ") + SESSION_PREVIOUS_LOGOUT;
// Set the real desktop background to black so that exit looks
// clean regardless of what was on "our" desktop.
@@ -215,7 +215,7 @@ void KSMServer::saveCurrentSession()
return;
if ( currentSession().isEmpty() || currentSession() == SESSION_PREVIOUS_LOGOUT )
- sessionGroup = QString("Session: ") + SESSION_BY_USER;
+ sessionGroup = TQString("Session: ") + SESSION_BY_USER;
state = Checkpoint;
wmPhase1WaitingCount = 0;
@@ -237,7 +237,7 @@ void KSMServer::saveCurrentSession()
completeShutdownOrCheckpoint();
}
-void KSMServer::saveCurrentSessionAs( QString session )
+void KSMServer::saveCurrentSessionAs( TQString session )
{
if ( state != Idle || dialogActive )
return;
@@ -253,7 +253,7 @@ void KSMServer::saveYourselfDone( KSMClient* client, bool success )
// a shutdown was cancelled and the client is finished saving
// only now. Discard the saved state in order to avoid
// the saved data building up.
- QStringList discard = client->discardCommand();
+ TQStringList discard = client->discardCommand();
if( !discard.isEmpty())
executeCommand( discard );
return;
@@ -352,7 +352,7 @@ void KSMServer::cancelShutdown( KSMClient* c )
SmsShutdownCancelled( c->connection() );
if( c->saveYourselfDone ) {
// Discard also saved state.
- QStringList discard = c->discardCommand();
+ TQStringList discard = c->discardCommand();
if( !discard.isEmpty())
executeCommand( discard );
}
@@ -419,8 +419,8 @@ void KSMServer::completeShutdownOrCheckpoint()
if ( state == Shutdown ) {
bool waitForKNotify = true;
if( !kapp->dcopClient()->connectDCOPSignal( "knotify", "",
- "notifySignal(QString,QString,QString,QString,QString,int,int,int,int)",
- "ksmserver", "notifySlot(QString,QString,QString,QString,QString,int,int,int,int)", false )) {
+ "notifySignal(TQString,TQString,TQString,TQString,TQString,int,int,int,int)",
+ "ksmserver", "notifySlot(TQString,TQString,TQString,TQString,TQString,int,int,int,int)", false )) {
waitForKNotify = false;
}
if( !kapp->dcopClient()->connectDCOPSignal( "knotify", "",
@@ -461,7 +461,7 @@ void KSMServer::startKilling()
kdDebug( 1218 ) << " We killed all clients. We have now clients.count()=" <<
clients.count() << endl;
completeKilling();
- QTimer::singleShot( 10000, this, SLOT( timeoutQuit() ) );
+ TQTimer::singleShot( 10000, this, TQT_SLOT( timeoutQuit() ) );
}
void KSMServer::completeKilling()
@@ -494,7 +494,7 @@ void KSMServer::killWM()
}
if( iswm ) {
completeKillingWM();
- QTimer::singleShot( 5000, this, SLOT( timeoutWMQuit() ) );
+ TQTimer::singleShot( 5000, this, TQT_SLOT( timeoutWMQuit() ) );
}
else
killingCompleted();
@@ -517,7 +517,7 @@ void KSMServer::killingCompleted()
}
// called when KNotify performs notification for logout (not when sound is finished though)
-void KSMServer::notifySlot(QString event ,QString app,QString,QString,QString,int present,int,int,int)
+void KSMServer::notifySlot(TQString event ,TQString app,TQString,TQString,TQString,int present,int,int,int)
{
if( state != WaitingForKNotify )
return;
diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp
index 25e4aaf30..7b0493559 100644
--- a/ksmserver/shutdowndlg.cpp
+++ b/ksmserver/shutdowndlg.cpp
@@ -7,26 +7,26 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#include <config.h>
#include "shutdowndlg.h"
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qvbuttongroup.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qtimer.h>
-#include <qstyle.h>
-#include <qcombobox.h>
-#include <qcursor.h>
-#include <qmessagebox.h>
-#include <qbuttongroup.h>
-#include <qiconset.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qtooltip.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qfontmetrics.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqvbuttongroup.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
+#include <tqstyle.h>
+#include <tqcombobox.h>
+#include <tqcursor.h>
+#include <tqmessagebox.h>
+#include <tqbuttongroup.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqfontmetrics.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kapplication.h>
@@ -63,7 +63,7 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
KSMShutdownFeedback * KSMShutdownFeedback::s_pSelf = 0L;
KSMShutdownFeedback::KSMShutdownFeedback()
- : QWidget( 0L, "feedbackwidget", WType_Popup ),
+ : TQWidget( 0L, "feedbackwidget", WType_Popup ),
m_currentY( 0 ),
m_grayOpacity( 0.0f ),
m_compensation( 0.0f ),
@@ -74,11 +74,11 @@ KSMShutdownFeedback::KSMShutdownFeedback()
m_pmio()
{
- m_grayImage = QImage::QImage();
- m_unfadedImage = QImage::QImage();
+ m_grayImage = TQImage::TQImage();
+ m_unfadedImage = TQImage::TQImage();
resize(0, 0);
setShown(true);
- QTimer::singleShot( 500, this, SLOT( slotPaintEffect() ) );
+ TQTimer::singleShot( 500, this, TQT_SLOT( slotPaintEffect() ) );
}
// called after stopping shutdown-feedback -> smooth fade-back to color-mode
@@ -111,11 +111,11 @@ void KSMShutdownFeedback::slotPaintEffect()
// logout-UI would be too much delayed...
if ( m_grayImage.isNull() )
{
- setBackgroundMode( QWidget::NoBackground );
- setGeometry( QApplication::desktop()->geometry() );
+ setBackgroundMode( TQWidget::NoBackground );
+ setGeometry( TQApplication::desktop()->geometry() );
m_root.resize( width(), height() ); // for the default logout
- m_grayImage = QPixmap::grabWindow(qt_xrootwin(), 0, 0, QApplication::desktop()->width(), QApplication::desktop()->height()).convertToImage();
+ m_grayImage = TQPixmap::grabWindow(qt_xrootwin(), 0, 0, TQApplication::desktop()->width(), TQApplication::desktop()->height()).convertToImage();
m_unfadedImage = m_grayImage.copy();
register uchar * r = m_grayImage.bits();
register uchar * g = m_grayImage.bits() + 1;
@@ -169,12 +169,12 @@ void KSMShutdownFeedback::slotPaintEffect()
{
if( y1 > 0 && y1 < imgHeight && y1-m_rowsDone > 0 && m_rowsDone < imgHeight )
{
- QImage img( imgWidth, y1-m_rowsDone, 32 );
+ TQImage img( imgWidth, y1-m_rowsDone, 32 );
memcpy( img.bits(), m_grayImage.scanLine( m_rowsDone ), imgWidth*(y1-m_rowsDone)*4 );
// conversion is slow as hell if desktop-depth != 24bpp...
//Pixmap pm = m_pmio.convertToPixmap( img );
//bitBlt( this, 0, m_rowsDone, &pm );
-// QImage pm = m_pmio.convertToImage( img );
+// TQImage pm = m_pmio.convertToImage( img );
bitBlt( this, 0, m_rowsDone, &img );
m_rowsDone = y1;
}
@@ -184,10 +184,10 @@ void KSMShutdownFeedback::slotPaintEffect()
// when fading back we have to blit area which isnt gray anymore to unfaded image
if( y2 > 0 && y2 < imgHeight && m_rowsDone > y2 )
{
- QImage img( imgWidth, m_rowsDone-y2, 32 );
+ TQImage img( imgWidth, m_rowsDone-y2, 32 );
memcpy( img.bits(), m_unfadedImage.scanLine( y2 ), imgWidth*(m_rowsDone-y2)*4 );
// conversion is slow as hell if desktop-depth != 24bpp...
- //QPixmap pm = m_pmio.convertToPixmap( img );
+ //TQPixmap pm = m_pmio.convertToPixmap( img );
//bitBlt( this, 0, y2, &pm );
bitBlt( this, 0, y2, &img );
m_rowsDone = y2;
@@ -199,7 +199,7 @@ void KSMShutdownFeedback::slotPaintEffect()
start_y1 = 0;
if( y2 > start_y1 )
{
- QImage img( imgWidth, y2-start_y1, 32 );
+ TQImage img( imgWidth, y2-start_y1, 32 );
memcpy( img.bits(), m_grayImage.scanLine( start_y1 ), ( y2-start_y1 ) * imgWidth * 4 );
register uchar * rs = m_unfadedImage.scanLine( start_y1 );
register uchar * gs = rs + 1;
@@ -222,59 +222,59 @@ void KSMShutdownFeedback::slotPaintEffect()
}
}
// conversion is slow as hell if desktop-depth != 24bpp...
- //QPixmap pm = m_pmio.convertToPixmap( img );
+ //TQPixmap pm = m_pmio.convertToPixmap( img );
//bitBlt( this, 0, start_y1, &pm );
bitBlt( this, 0, start_y1, &img );
}
- QTimer::singleShot( 5, this, SLOT( slotPaintEffect() ) );
+ TQTimer::singleShot( 5, this, TQT_SLOT( slotPaintEffect() ) );
}
// standard logout fade
else
{
if ( m_currentY >= height() ) {
- if ( backgroundMode() == QWidget::NoBackground ) {
- setBackgroundMode( QWidget::NoBackground );
+ if ( backgroundMode() == TQWidget::NoBackground ) {
+ setBackgroundMode( TQWidget::NoBackground );
setBackgroundPixmap( m_root );
}
return;
}
KPixmap pixmap;
- pixmap = QPixmap::grabWindow( qt_xrootwin(), 0, m_currentY, width(), 10 );
- QImage image = pixmap.convertToImage();
+ pixmap = TQPixmap::grabWindow( qt_xrootwin(), 0, m_currentY, width(), 10 );
+ TQImage image = pixmap.convertToImage();
KImageEffect::blend( Qt::black, image, 0.4 );
KImageEffect::toGray( image, true );
pixmap.convertFromImage( image );
bitBlt( this, 0, m_currentY, &pixmap );
bitBlt( &m_root, 0, m_currentY, &pixmap );
m_currentY += 10;
- QTimer::singleShot( 1, this, SLOT( slotPaintEffect() ) );
+ TQTimer::singleShot( 1, this, TQT_SLOT( slotPaintEffect() ) );
}
}
//////
-KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
+KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
bool maysd, KApplication::ShutdownType sdtype )
- : QDialog( parent, 0, TRUE, WType_Popup ), targets(0)
+ : TQDialog( parent, 0, TRUE, WType_Popup ), targets(0)
// this is a WType_Popup on purpose. Do not change that! Not
// having a popup here has severe side effects.
{
- QVBoxLayout* vbox = new QVBoxLayout( this );
+ TQVBoxLayout* vbox = new TQVBoxLayout( this );
- QFrame* frame = new QFrame( this );
- frame->setFrameStyle( QFrame::StyledPanel | QFrame::Raised );
- frame->setLineWidth( style().pixelMetric( QStyle::PM_DefaultFrameWidth, frame ) );
+ TQFrame* frame = new TQFrame( this );
+ frame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised );
+ frame->setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth, frame ) );
// we need to set the minimum size for the logout box, since it
// gets too small if there isn't all options available
frame->setMinimumWidth(400);
vbox->addWidget( frame );
- vbox = new QVBoxLayout( frame, 2 * KDialog::marginHint(),
+ vbox = new TQVBoxLayout( frame, 2 * KDialog::marginHint(),
2 * KDialog::spacingHint() );
// default factor
@@ -288,8 +288,8 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
factor = 8;
}
else {
- QLabel* label = new QLabel( i18n("End Session for \"%1\"").arg(KUser().loginName()), frame );
- QFont fnt = label->font();
+ TQLabel* label = new TQLabel( i18n("End Session for \"%1\"").arg(KUser().loginName()), frame );
+ TQFont fnt = label->font();
fnt.setBold( true );
fnt.setPointSize( fnt.pointSize() * 3 / 2 );
label->setFont( fnt );
@@ -298,41 +298,41 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
// for the basic layout, within this box either the ubuntu dialog or
// standard konqy+buttons will be placed.
- QHBoxLayout* hbox = new QHBoxLayout( vbox, factor * KDialog::spacingHint() );
+ TQHBoxLayout* hbox = new TQHBoxLayout( vbox, factor * KDialog::spacingHint() );
// from here on we have to adapt to the two different dialogs
- QFrame* lfrm;
- QVBoxLayout* buttonlay;
- QHBoxLayout* hbuttonbox;
- QFont btnFont;
+ TQFrame* lfrm;
+ TQVBoxLayout* buttonlay;
+ TQHBoxLayout* hbuttonbox;
+ TQFont btnFont;
if(doUbuntuLogout)
{
// first line of buttons
- hbuttonbox = new QHBoxLayout( hbox, factor * KDialog::spacingHint() );
+ hbuttonbox = new TQHBoxLayout( hbox, factor * KDialog::spacingHint() );
hbuttonbox->setAlignment( Qt::AlignHCenter );
// End session
FlatButton* btnLogout = new FlatButton( frame );
- btnLogout->setTextLabel( QString("&") + i18n("Log out"), false );
+ btnLogout->setTextLabel( TQString("&") + i18n("Log out"), false );
btnLogout->setPixmap( DesktopIcon( "back") );
- int i = btnLogout->textLabel().find( QRegExp("\\&"), 0 ); // i == 1
+ int i = btnLogout->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnLogout->setAccel( "ALT+" + btnLogout->textLabel().lower()[i+1] ) ;
hbuttonbox->addWidget ( btnLogout );
- connect(btnLogout, SIGNAL(clicked()), SLOT(slotLogout()));
+ connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout()));
}
else
{
// konqy
- lfrm = new QFrame( frame );
- lfrm->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ lfrm = new TQFrame( frame );
+ lfrm->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
hbox->addWidget( lfrm, AlignCenter );
- buttonlay = new QVBoxLayout( hbox, factor * KDialog::spacingHint() );
+ buttonlay = new TQVBoxLayout( hbox, factor * KDialog::spacingHint() );
buttonlay->setAlignment( Qt::AlignHCenter );
- QLabel* icon = new QLabel( lfrm );
+ TQLabel* icon = new TQLabel( lfrm );
icon->setPixmap( UserIcon( "shutdownkonq" ) );
lfrm->setFixedSize( icon->sizeHint());
icon->setFixedSize( icon->sizeHint());
@@ -342,7 +342,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
KPushButton* btnLogout = new KPushButton( KGuiItem( i18n("&End Current Session"), "undo"), frame );
btnFont = btnLogout->font();
buttonlay->addWidget( btnLogout );
- connect(btnLogout, SIGNAL(clicked()), SLOT(slotLogout()));
+ connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout()));
}
@@ -425,10 +425,10 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
FlatButton* btnSuspend = new FlatButton( frame );
btnSuspend->setTextLabel( i18n("&Suspend"), false );
btnSuspend->setPixmap( DesktopIcon( "suspend") );
- int i = btnSuspend->textLabel().find( QRegExp("\\&"), 0 ); // i == 1
+ int i = btnSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnSuspend->setAccel( "ALT+" + btnSuspend->textLabel().lower()[i+1] ) ;
hbuttonbox->addWidget ( btnSuspend);
- connect(btnSuspend, SIGNAL(clicked()), SLOT(slotSuspend()));
+ connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend()));
}
if (canHibernate && !disableHibernate)
@@ -437,27 +437,27 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
FlatButton* btnHibernate = new FlatButton( frame );
btnHibernate->setTextLabel( i18n("&Hibernate"), false );
btnHibernate->setPixmap( DesktopIcon( "hibernate") );
- int i = btnHibernate->textLabel().find( QRegExp("\\&"), 0 ); // i == 1
+ int i = btnHibernate->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnHibernate->setAccel( "ALT+" + btnHibernate->textLabel().lower()[i+1] ) ;
hbuttonbox->addWidget ( btnHibernate);
- connect(btnHibernate, SIGNAL(clicked()), SLOT(slotHibernate()));
+ connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate()));
}
// Separator (within buttonlay)
vbox->addWidget( new KSeparator( frame ) );
// bottom buttons
- QHBoxLayout* hbuttonbox2 = new QHBoxLayout( vbox, factor * KDialog::spacingHint() );
+ TQHBoxLayout* hbuttonbox2 = new TQHBoxLayout( vbox, factor * KDialog::spacingHint() );
hbuttonbox2->setAlignment( Qt::AlignHCenter );
// Reboot
FlatButton* btnReboot = new FlatButton( frame );
btnReboot->setTextLabel( i18n("&Restart"), false );
btnReboot->setPixmap( DesktopIcon( "reload") );
- int i = btnReboot->textLabel().find( QRegExp("\\&"), 0 ); // i == 1
+ int i = btnReboot->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ;
hbuttonbox2->addWidget ( btnReboot);
- connect(btnReboot, SIGNAL(clicked()), SLOT(slotReboot()));
+ connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot()));
if ( sdtype == KApplication::ShutdownTypeReboot )
btnReboot->setFocus();
@@ -465,14 +465,14 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
int def, cur;
if ( DM().bootOptions( rebootOptions, def, cur ) ) {
btnReboot->setPopupDelay(300); // visually add dropdown
- targets = new QPopupMenu( frame );
+ targets = new TQPopupMenu( frame );
if ( cur == -1 )
cur = def;
int index = 0;
- for (QStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index)
+ for (TQStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index)
{
- QString label = (*it);
+ TQString label = (*it);
label=label.replace('&',"&&");
if (index == cur)
targets->insertItem( label + i18n("current option in boot loader", " (current)"), index);
@@ -481,7 +481,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
}
btnReboot->setPopup(targets);
- connect( targets, SIGNAL(activated(int)), SLOT(slotReboot(int)) );
+ connect( targets, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReboot(int)) );
}
// BAD CARMA .. this code is copied line by line from standard konqy dialog [EOF]
@@ -489,21 +489,21 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
FlatButton* btnHalt = new FlatButton( frame );
btnHalt->setTextLabel( i18n("&Turn Off"), false );
btnHalt->setPixmap( DesktopIcon( "exit") );
- i = btnHalt->textLabel().find( QRegExp("\\&"), 0 ); // i == 1
+ i = btnHalt->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ;
hbuttonbox2->addWidget ( btnHalt );
- connect(btnHalt, SIGNAL(clicked()), SLOT(slotHalt()));
+ connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt()));
if ( sdtype == KApplication::ShutdownTypeHalt )
btnHalt->setFocus();
// cancel buttonbox
- QHBoxLayout* hbuttonbox3 = new QHBoxLayout( vbox, factor * KDialog::spacingHint() );
+ TQHBoxLayout* hbuttonbox3 = new TQHBoxLayout( vbox, factor * KDialog::spacingHint() );
hbuttonbox3->setAlignment( Qt::AlignRight );
// Back to Desktop
KSMPushButton* btnBack = new KSMPushButton( KStdGuiItem::cancel(), frame );
hbuttonbox3->addWidget( btnBack );
- connect(btnBack, SIGNAL(clicked()), SLOT(reject()));
+ connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
}
else
@@ -512,7 +512,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
KPushButton* btnHalt = new KPushButton( KGuiItem( i18n("&Turn Off Computer"), "exit"), frame );
btnHalt->setFont( btnFont );
buttonlay->addWidget( btnHalt );
- connect(btnHalt, SIGNAL(clicked()), SLOT(slotHalt()));
+ connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt()));
if ( sdtype == KApplication::ShutdownTypeHalt )
btnHalt->setFocus();
@@ -521,21 +521,21 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
btnReboot->setFont( btnFont );
buttonlay->addWidget( btnReboot );
- connect(btnReboot, SIGNAL(clicked()), SLOT(slotReboot()));
+ connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot()));
if ( sdtype == KApplication::ShutdownTypeReboot )
btnReboot->setFocus();
// this section is copied as-is into ubuntulogout as well
int def, cur;
if ( DM().bootOptions( rebootOptions, def, cur ) ) {
- targets = new QPopupMenu( frame );
+ targets = new TQPopupMenu( frame );
if ( cur == -1 )
cur = def;
int index = 0;
- for (QStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index)
+ for (TQStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index)
{
- QString label = (*it);
+ TQString label = (*it);
label=label.replace('&',"&&");
if (index == cur)
targets->insertItem( label + i18n("current option in boot loader", " (current)"), index);
@@ -544,7 +544,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
}
btnReboot->setPopup(targets);
- connect( targets, SIGNAL(activated(int)), SLOT(slotReboot(int)) );
+ connect( targets, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReboot(int)) );
}
@@ -553,7 +553,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
KPushButton* btnSuspend = new KPushButton( KGuiItem( i18n("&Suspend Computer"), "suspend"), frame );
btnSuspend->setFont( btnFont );
buttonlay->addWidget( btnSuspend );
- connect(btnSuspend, SIGNAL(clicked()), SLOT(slotSuspend()));
+ connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend()));
}
if (canHibernate && !disableHibernate)
@@ -561,7 +561,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
KPushButton* btnHibernate = new KPushButton( KGuiItem( i18n("&Hibernate Computer"), "hibernate"), frame );
btnHibernate->setFont( btnFont );
buttonlay->addWidget( btnHibernate );
- connect(btnHibernate, SIGNAL(clicked()), SLOT(slotHibernate()));
+ connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate()));
}
buttonlay->addStretch( 1 );
@@ -572,7 +572,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
// Back to Desktop
KPushButton* btnBack = new KPushButton( KStdGuiItem::cancel(), frame );
buttonlay->addWidget( btnBack );
- connect(btnBack, SIGNAL(clicked()), SLOT(reject()));
+ connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
}
@@ -582,14 +582,14 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
if(doUbuntuLogout)
{
// cancel buttonbox
- QHBoxLayout* hbuttonbox3 = new QHBoxLayout( vbox, factor * KDialog::spacingHint() );
+ TQHBoxLayout* hbuttonbox3 = new TQHBoxLayout( vbox, factor * KDialog::spacingHint() );
hbuttonbox3->setAlignment( Qt::AlignRight );
// Back to Desktop
KSMPushButton* btnBack = new KSMPushButton( KStdGuiItem::cancel(), frame );
hbuttonbox3->addWidget( btnBack );
- connect(btnBack, SIGNAL(clicked()), SLOT(reject()));
+ connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
}
else
{
@@ -600,7 +600,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
KPushButton* btnBack = new KPushButton( KStdGuiItem::cancel(), frame );
buttonlay->addWidget( btnBack );
- connect(btnBack, SIGNAL(clicked()), SLOT(reject()));
+ connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject()));
}
@@ -632,7 +632,7 @@ void KSMShutdownDlg::slotLogout()
void KSMShutdownDlg::slotReboot()
{
// no boot option selected -> current
- m_bootOption = QString::null;
+ m_bootOption = TQString::null;
m_shutdownType = KApplication::ShutdownTypeReboot;
accept();
}
@@ -648,7 +648,7 @@ void KSMShutdownDlg::slotReboot(int opt)
void KSMShutdownDlg::slotHalt()
{
- m_bootOption = QString::null;
+ m_bootOption = TQString::null;
m_shutdownType = KApplication::ShutdownTypeHalt;
accept();
}
@@ -700,7 +700,7 @@ void KSMShutdownDlg::slotHibernate()
reject(); // continue on resume
}
-bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, QString& bootOption )
+bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, TQString& bootOption )
{
kapp->enableStyles();
KSMShutdownDlg* l = new KSMShutdownDlg( 0,
@@ -708,8 +708,8 @@ bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sd
maysd, sdtype );
// Show dialog (will save the background in showEvent)
- QSize sh = l->sizeHint();
- QRect rect = KGlobalSettings::desktopGeometry(QCursor::pos());
+ TQSize sh = l->sizeHint();
+ TQRect rect = KGlobalSettings::desktopGeometry(TQCursor::pos());
l->move(rect.x() + (rect.width() - sh.width())/2,
rect.y() + (rect.height() - sh.height())/2);
@@ -724,17 +724,17 @@ bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sd
}
KSMDelayedPushButton::KSMDelayedPushButton( const KGuiItem &item,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: KPushButton( item, parent, name), pop(0), popt(0)
{
- connect(this, SIGNAL(pressed()), SLOT(slotPressed()));
- connect(this, SIGNAL(released()), SLOT(slotReleased()));
- popt = new QTimer(this);
- connect(popt, SIGNAL(timeout()), SLOT(slotTimeout()));
+ connect(this, TQT_SIGNAL(pressed()), TQT_SLOT(slotPressed()));
+ connect(this, TQT_SIGNAL(released()), TQT_SLOT(slotReleased()));
+ popt = new TQTimer(this);
+ connect(popt, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
}
-void KSMDelayedPushButton::setPopup(QPopupMenu *p)
+void KSMDelayedPushButton::setPopup(TQPopupMenu *p)
{
pop = p;
setIsMenuButton(p != 0);
@@ -743,7 +743,7 @@ void KSMDelayedPushButton::setPopup(QPopupMenu *p)
void KSMDelayedPushButton::slotPressed()
{
if (pop)
- popt->start(QApplication::startDragTime());
+ popt->start(TQApplication::startDragTime());
}
void KSMDelayedPushButton::slotReleased()
@@ -753,16 +753,16 @@ void KSMDelayedPushButton::slotReleased()
void KSMDelayedPushButton::slotTimeout()
{
- QPoint bl = mapToGlobal(rect().bottomLeft());
- QWidget *par = (QWidget*)parent();
- QPoint br = par->mapToGlobal(par->rect().bottomRight());
+ TQPoint bl = mapToGlobal(rect().bottomLeft());
+ TQWidget *par = (TQWidget*)parent();
+ TQPoint br = par->mapToGlobal(par->rect().bottomRight());
pop->popup( bl );
popt->stop();
setDown(false);
}
KSMPushButton::KSMPushButton( const KGuiItem &item,
- QWidget *parent,
+ TQWidget *parent,
const char *name)
: KPushButton( item, parent, name),
m_pressed(false)
@@ -772,7 +772,7 @@ KSMPushButton::KSMPushButton( const KGuiItem &item,
}
-void KSMPushButton::keyPressEvent( QKeyEvent* e )
+void KSMPushButton::keyPressEvent( TQKeyEvent* e )
{
switch ( e->key() )
{
@@ -790,11 +790,11 @@ switch ( e->key() )
e->ignore();
}
- QPushButton::keyPressEvent(e);
+ TQPushButton::keyPressEvent(e);
}
-void KSMPushButton::keyReleaseEvent( QKeyEvent* e )
+void KSMPushButton::keyReleaseEvent( TQKeyEvent* e )
{
switch ( e->key() )
{
@@ -821,8 +821,8 @@ void KSMPushButton::keyReleaseEvent( QKeyEvent* e )
-FlatButton::FlatButton( QWidget *parent, const char *name )
- : QToolButton( parent, name/*, WNoAutoErase*/ ),
+FlatButton::FlatButton( TQWidget *parent, const char *name )
+ : TQToolButton( parent, name/*, WNoAutoErase*/ ),
m_pressed(false)
{
init();
@@ -837,12 +837,12 @@ void FlatButton::init()
setUsesTextLabel(true);
setUsesBigPixmap(true);
setAutoRaise(true);
- setTextPosition( QToolButton::Under );
- setFocusPolicy(QWidget::StrongFocus);
+ setTextPosition( TQToolButton::Under );
+ setFocusPolicy(TQWidget::StrongFocus);
}
-void FlatButton::keyPressEvent( QKeyEvent* e )
+void FlatButton::keyPressEvent( TQKeyEvent* e )
{
switch ( e->key() )
{
@@ -860,11 +860,11 @@ void FlatButton::keyPressEvent( QKeyEvent* e )
e->ignore();
}
- QToolButton::keyPressEvent(e);
+ TQToolButton::keyPressEvent(e);
}
-void FlatButton::keyReleaseEvent( QKeyEvent* e )
+void FlatButton::keyReleaseEvent( TQKeyEvent* e )
{
switch ( e->key() )
{
diff --git a/ksmserver/shutdowndlg.h b/ksmserver/shutdowndlg.h
index d696dff71..8361d30a8 100644
--- a/ksmserver/shutdowndlg.h
+++ b/ksmserver/shutdowndlg.h
@@ -7,15 +7,15 @@ Copyright (C) 2000 Matthias Ettrich <ettrich@kde.org>
#ifndef SHUTDOWNDLG_H
#define SHUTDOWNDLG_H
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qdatetime.h>
-#include <qdialog.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqdatetime.h>
+#include <tqdialog.h>
#include <kpushbutton.h>
-#include <qpushbutton.h>
-#include <qframe.h>
+#include <tqpushbutton.h>
+#include <tqframe.h>
#include <kguiitem.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
class QPushButton;
class QVButtonGroup;
@@ -54,15 +54,15 @@ private:
static KSMShutdownFeedback * s_pSelf;
KSMShutdownFeedback();
int m_currentY;
- QPixmap m_root;
+ TQPixmap m_root;
void fadeBack( void );
float m_grayOpacity;
float m_compensation;
bool m_fadeBackwards;
bool m_readDelayComplete;
- QImage m_unfadedImage;
- QImage m_grayImage;
- QTime m_fadeTime;
+ TQImage m_unfadedImage;
+ TQImage m_grayImage;
+ TQTime m_fadeTime;
int m_rowsDone;
KPixmapIO m_pmio;
@@ -75,7 +75,7 @@ class KSMShutdownDlg : public QDialog
Q_OBJECT
public:
- static bool confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, QString& bopt );
+ static bool confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, TQString& bopt );
public slots:
void slotLogout();
@@ -89,11 +89,11 @@ protected:
~KSMShutdownDlg();
private:
- KSMShutdownDlg( QWidget* parent, bool maysd, KApplication::ShutdownType sdtype );
+ KSMShutdownDlg( TQWidget* parent, bool maysd, KApplication::ShutdownType sdtype );
KApplication::ShutdownType m_shutdownType;
- QString m_bootOption;
- QPopupMenu *targets;
- QStringList rebootOptions;
+ TQString m_bootOption;
+ TQPopupMenu *targets;
+ TQStringList rebootOptions;
LibHalContext* m_halCtx;
DBusConnection *m_dbusConn;
bool m_lockOnResume;
@@ -105,8 +105,8 @@ class KSMDelayedPushButton : public KPushButton
public:
- KSMDelayedPushButton( const KGuiItem &item, QWidget *parent, const char *name = 0 );
- void setPopup( QPopupMenu *pop);
+ KSMDelayedPushButton( const KGuiItem &item, TQWidget *parent, const char *name = 0 );
+ void setPopup( TQPopupMenu *pop);
private slots:
void slotTimeout();
@@ -114,8 +114,8 @@ private slots:
void slotReleased();
private:
- QPopupMenu *pop;
- QTimer *popt;
+ TQPopupMenu *pop;
+ TQTimer *popt;
};
class KSMPushButton : public KPushButton
@@ -124,11 +124,11 @@ class KSMPushButton : public KPushButton
public:
- KSMPushButton( const KGuiItem &item, QWidget *parent, const char *name = 0 );
+ KSMPushButton( const KGuiItem &item, TQWidget *parent, const char *name = 0 );
protected:
- virtual void keyPressEvent(QKeyEvent*e);
- virtual void keyReleaseEvent(QKeyEvent*e);
+ virtual void keyPressEvent(TQKeyEvent*e);
+ virtual void keyReleaseEvent(TQKeyEvent*e);
private:
@@ -144,12 +144,12 @@ class FlatButton : public QToolButton
public:
- FlatButton( QWidget *parent = 0, const char *name = 0 );
+ FlatButton( TQWidget *parent = 0, const char *name = 0 );
~FlatButton();
protected:
- virtual void keyPressEvent(QKeyEvent*e);
- virtual void keyReleaseEvent(QKeyEvent*e);
+ virtual void keyPressEvent(TQKeyEvent*e);
+ virtual void keyReleaseEvent(TQKeyEvent*e);
private slots:
@@ -157,8 +157,8 @@ class FlatButton : public QToolButton
void init();
bool m_pressed;
- QString m_text;
- QPixmap m_pixmap;
+ TQString m_text;
+ TQPixmap m_pixmap;
};
diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp
index 9bc984a79..2778b9dd9 100644
--- a/ksmserver/startup.cpp
+++ b/ksmserver/startup.cpp
@@ -56,14 +56,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <limits.h>
#endif
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatastream.h>
-#include <qptrstack.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include <qguardedptr.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatastream.h>
+#include <tqptrstack.h>
+#include <tqpushbutton.h>
+#include <tqmessagebox.h>
+#include <tqguardedptr.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kglobal.h>
@@ -88,7 +88,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/*! Restores the previous session. Ensures the window manager is
running (if specified).
*/
-void KSMServer::restoreSession( QString sessionName )
+void KSMServer::restoreSession( TQString sessionName )
{
if( state != Idle )
return;
@@ -104,17 +104,17 @@ void KSMServer::restoreSession( QString sessionName )
int count = config->readNumEntry( "count" );
appsToStart = count;
- QValueList<QStringList> wmCommands;
+ TQValueList<TQStringList> wmCommands;
if ( !wm.isEmpty() ) {
for ( int i = 1; i <= count; i++ ) {
- QString n = QString::number(i);
- if ( wm == config->readEntry( QString("program")+n ) ) {
- wmCommands << config->readListEntry( QString("restartCommand")+n );
+ TQString n = TQString::number(i);
+ if ( wm == config->readEntry( TQString("program")+n ) ) {
+ wmCommands << config->readListEntry( TQString("restartCommand")+n );
}
}
}
if ( wmCommands.isEmpty() )
- wmCommands << ( QStringList() << wm );
+ wmCommands << ( TQStringList() << wm );
publishProgress( appsToStart, true );
connectDCOPSignal( launcher, launcher, "autoStart0Done()",
@@ -131,7 +131,7 @@ void KSMServer::restoreSession( QString sessionName )
// visually more appealing startup.
for (uint i = 0; i < wmCommands.count(); i++)
startApplication( wmCommands[i] );
- QTimer::singleShot( 4000, this, SLOT( autoStart0() ) );
+ TQTimer::singleShot( 4000, this, TQT_SLOT( autoStart0() ) );
} else {
autoStart0();
}
@@ -158,7 +158,7 @@ void KSMServer::startDefaultSession()
connectDCOPSignal( launcher, launcher, "autoStart2Done()",
"autoStart2Done()", true);
startApplication( wm );
- QTimer::singleShot( 4000, this, SLOT( autoStart0() ) );
+ TQTimer::singleShot( 4000, this, TQT_SLOT( autoStart0() ) );
}
@@ -192,7 +192,7 @@ void KSMServer::autoStart0Done()
connectDCOPSignal( "kcminit", "kcminit", "phase1Done()",
"kcmPhase1Done()", true);
state = KcmInitPhase1;
- QTimer::singleShot( 10000, this, SLOT( kcmPhase1Timeout())); // protection
+ TQTimer::singleShot( 10000, this, TQT_SLOT( kcmPhase1Timeout())); // protection
DCOPRef( "kcminit", "kcminit" ).send( "runPhase1" );
}
@@ -232,7 +232,7 @@ void KSMServer::autoStart1Done()
return;
kdDebug( 1218 ) << "Autostart 1 done" << endl;
lastAppStarted = 0;
- lastIdStarted = QString::null;
+ lastIdStarted = TQString::null;
state = Restoring;
if( defaultSession()) {
autoStart2();
@@ -258,20 +258,20 @@ void KSMServer::tryRestoreNext()
while ( lastAppStarted < appsToStart ) {
publishProgress ( appsToStart - lastAppStarted );
lastAppStarted++;
- QString n = QString::number(lastAppStarted);
- QStringList restartCommand = config->readListEntry( QString("restartCommand")+n );
+ TQString n = TQString::number(lastAppStarted);
+ TQStringList restartCommand = config->readListEntry( TQString("restartCommand")+n );
if ( restartCommand.isEmpty() ||
- (config->readNumEntry( QString("restartStyleHint")+n ) == SmRestartNever)) {
+ (config->readNumEntry( TQString("restartStyleHint")+n ) == SmRestartNever)) {
continue;
}
- if ( wm == config->readEntry( QString("program")+n ) )
+ if ( wm == config->readEntry( TQString("program")+n ) )
continue; // wm already started
- if( config->readBoolEntry( QString( "wasWm" )+n, false ))
+ if( config->readBoolEntry( TQString( "wasWm" )+n, false ))
continue; // it was wm before, but not now, don't run it (some have --replace in command :( )
startApplication( restartCommand,
- config->readEntry( QString("clientMachine")+n ),
- config->readEntry( QString("userId")+n ));
- lastIdStarted = config->readEntry( QString("clientId")+n );
+ config->readEntry( TQString("clientMachine")+n ),
+ config->readEntry( TQString("userId")+n ));
+ lastIdStarted = config->readEntry( TQString("clientId")+n );
if ( !lastIdStarted.isEmpty() ) {
restoreTimer.start( 2000, TRUE );
return; // we get called again from the clientRegistered handler
@@ -279,7 +279,7 @@ void KSMServer::tryRestoreNext()
}
appsToStart = 0;
- lastIdStarted = QString::null;
+ lastIdStarted = TQString::null;
publishProgress( 0 );
autoStart2();
@@ -299,7 +299,7 @@ void KSMServer::autoStart2()
DCOPRef( "kdesktop", "KDesktopIface" ).send( "runAutoStart" );
connectDCOPSignal( "kcminit", "kcminit", "phase2Done()",
"kcmPhase2Done()", true);
- QTimer::singleShot( 10000, this, SLOT( kcmPhase2Timeout())); // protection
+ TQTimer::singleShot( 10000, this, TQT_SLOT( kcmPhase2Timeout())); // protection
DCOPRef( "kcminit", "kcminit" ).send( "runPhase2" );
if( !defaultSession())
restoreLegacySession( KGlobal::config());
@@ -361,14 +361,14 @@ bool KSMServer::checkStartupSuspend()
return false;
}
-void KSMServer::suspendStartup( QCString app )
+void KSMServer::suspendStartup( TQCString app )
{
if( !startupSuspendCount.contains( app ))
startupSuspendCount[ app ] = 0;
++startupSuspendCount[ app ];
}
-void KSMServer::resumeStartup( QCString app )
+void KSMServer::resumeStartup( TQCString app )
{
if( !startupSuspendCount.contains( app ))
return;
@@ -415,7 +415,7 @@ void KSMServer::publishProgress( int progress, bool max )
}
-void KSMServer::upAndRunning( const QString& msg )
+void KSMServer::upAndRunning( const TQString& msg )
{
DCOPRef( "ksplash" ).send( "upAndRunning", msg );
XEvent e;
diff --git a/ksmserver/test.cpp b/ksmserver/test.cpp
index 57a6c51d6..846c449db 100644
--- a/ksmserver/test.cpp
+++ b/ksmserver/test.cpp
@@ -15,7 +15,7 @@ main(int argc, char *argv[])
KSMShutdownFeedback::start();
KApplication::ShutdownType sdtype = KApplication::ShutdownTypeNone;
- QString bopt;
+ TQString bopt;
(void)KSMShutdownDlg::confirmShutdown( true,
sdtype,
bopt );