diff options
Diffstat (limited to 'kdesktop/lock')
-rw-r--r-- | kdesktop/lock/autologout.cc | 46 | ||||
-rw-r--r-- | kdesktop/lock/autologout.h | 16 | ||||
-rw-r--r-- | kdesktop/lock/infodlg.cc | 48 | ||||
-rw-r--r-- | kdesktop/lock/infodlg.h | 18 | ||||
-rw-r--r-- | kdesktop/lock/lockdlg.cc | 194 | ||||
-rw-r--r-- | kdesktop/lock/lockdlg.h | 30 | ||||
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 164 | ||||
-rw-r--r-- | kdesktop/lock/lockprocess.h | 44 | ||||
-rw-r--r-- | kdesktop/lock/main.cc | 6 | ||||
-rw-r--r-- | kdesktop/lock/querydlg.cc | 56 | ||||
-rw-r--r-- | kdesktop/lock/querydlg.h | 18 |
11 files changed, 320 insertions, 320 deletions
diff --git a/kdesktop/lock/autologout.cc b/kdesktop/lock/autologout.cc index f351fe2e7..b51791d98 100644 --- a/kdesktop/lock/autologout.cc +++ b/kdesktop/lock/autologout.cc @@ -17,39 +17,39 @@ #include <kmessagebox.h> #include <kdialog.h> -#include <qlayout.h> -#include <qmessagebox.h> -#include <qlabel.h> -#include <qstyle.h> -#include <qapplication.h> -#include <qdialog.h> -#include <qprogressbar.h> +#include <tqlayout.h> +#include <tqmessagebox.h> +#include <tqlabel.h> +#include <tqstyle.h> +#include <tqapplication.h> +#include <tqdialog.h> +#include <tqprogressbar.h> #define COUNTDOWN 30 -AutoLogout::AutoLogout(LockProcess *parent) : QDialog(parent, "password dialog", true, WX11BypassWM) +AutoLogout::AutoLogout(LockProcess *parent) : TQDialog(parent, "password dialog", true, WX11BypassWM) { - frame = new QFrame(this); - frame->setFrameStyle(QFrame::Panel | QFrame::Raised); + frame = new TQFrame(this); + frame->setFrameStyle(TQFrame::Panel | TQFrame::Raised); frame->setLineWidth(2); - QLabel *pixLabel = new QLabel( frame, "pixlabel" ); + TQLabel *pixLabel = new TQLabel( frame, "pixlabel" ); pixLabel->setPixmap(DesktopIcon("exit")); - QLabel *greetLabel = new QLabel(i18n("<nobr><qt><b>Automatic Log Out</b></qt><nobr>"), frame); - QLabel *infoLabel = new QLabel(i18n("<qt>To prevent being logged out, resume using this session by moving the mouse or pressing a key.</qt>"), frame); + TQLabel *greetLabel = new TQLabel(i18n("<nobr><qt><b>Automatic Log Out</b></qt><nobr>"), frame); + TQLabel *infoLabel = new TQLabel(i18n("<qt>To prevent being logged out, resume using this session by moving the mouse or pressing a key.</qt>"), frame); - mStatusLabel = new QLabel("<b> </b>", frame); - mStatusLabel->setAlignment(QLabel::AlignCenter); + mStatusLabel = new TQLabel("<b> </b>", frame); + mStatusLabel->setAlignment(TQLabel::AlignCenter); - QLabel *mProgressLabel = new QLabel("Time Remaining:", frame); - mProgressRemaining = new QProgressBar(frame); + TQLabel *mProgressLabel = new TQLabel("Time Remaining:", frame); + mProgressRemaining = new TQProgressBar(frame); mProgressRemaining->setPercentageVisible(false); - QVBoxLayout *unlockDialogLayout = new QVBoxLayout( this ); + TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this ); unlockDialogLayout->addWidget( frame ); - frameLayout = new QGridLayout(frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint()); + frameLayout = new TQGridLayout(frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint()); frameLayout->addMultiCellWidget(pixLabel, 0, 2, 0, 0, Qt::AlignCenter | Qt::AlignTop); frameLayout->addWidget(greetLabel, 0, 1); frameLayout->addWidget(mStatusLabel, 1, 1); @@ -66,7 +66,7 @@ AutoLogout::AutoLogout(LockProcess *parent) : QDialog(parent, "password dialog", mCountdownTimerId = startTimer(1000/25); - connect(qApp, SIGNAL(activity()), SLOT(slotActivity())); + connect(qApp, TQT_SIGNAL(activity()), TQT_SLOT(slotActivity())); } AutoLogout::~AutoLogout() @@ -82,7 +82,7 @@ void AutoLogout::updateInfo(int timeout) mProgressRemaining->setProgress(timeout); } -void AutoLogout::timerEvent(QTimerEvent *ev) +void AutoLogout::timerEvent(TQTimerEvent *ev) { if (ev->timerId() == mCountdownTimerId) { @@ -108,8 +108,8 @@ void AutoLogout::logout() void AutoLogout::show() { - QDialog::show(); - QApplication::flushX(); + TQDialog::show(); + TQApplication::flushX(); } #include "autologout.moc" diff --git a/kdesktop/lock/autologout.h b/kdesktop/lock/autologout.h index e48716575..20c7afc6c 100644 --- a/kdesktop/lock/autologout.h +++ b/kdesktop/lock/autologout.h @@ -9,9 +9,9 @@ #ifndef __TIMEOUT_H__ #define __TIMEOUT_H__ -#include <qstringlist.h> +#include <tqstringlist.h> -#include <qlayout.h> +#include <tqlayout.h> class LockProcess; class QFrame; @@ -30,20 +30,20 @@ public: virtual void show(); protected: - virtual void timerEvent(QTimerEvent *); + virtual void timerEvent(TQTimerEvent *); private slots: void slotActivity(); private: void updateInfo(int); - QFrame *frame; - QGridLayout *frameLayout; - QLabel *mStatusLabel; + TQFrame *frame; + TQGridLayout *frameLayout; + TQLabel *mStatusLabel; int mCountdownTimerId; int mRemaining; - QTimer countDownTimer; - QProgressBar *mProgressRemaining; + TQTimer countDownTimer; + TQProgressBar *mProgressRemaining; void logout(); }; diff --git a/kdesktop/lock/infodlg.cc b/kdesktop/lock/infodlg.cc index 66b54c0bc..2249dc46e 100644 --- a/kdesktop/lock/infodlg.cc +++ b/kdesktop/lock/infodlg.cc @@ -25,18 +25,18 @@ #include <dcopref.h> #include <kmessagebox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qmessagebox.h> -#include <qsimplerichtext.h> -#include <qlabel.h> -#include <qstringlist.h> -#include <qfontmetrics.h> -#include <qstyle.h> -#include <qapplication.h> -#include <qlistview.h> -#include <qheader.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqmessagebox.h> +#include <tqsimplerichtext.h> +#include <tqlabel.h> +#include <tqstringlist.h> +#include <tqfontmetrics.h> +#include <tqstyle.h> +#include <tqapplication.h> +#include <tqlistview.h> +#include <tqheader.h> +#include <tqcheckbox.h> #include <ctype.h> #include <unistd.h> @@ -59,28 +59,28 @@ // Simple dialog for displaying an unlock status or recurring error message // InfoDlg::InfoDlg(LockProcess *parent) - : QDialog(parent, "information dialog", true, WX11BypassWM), + : TQDialog(parent, "information dialog", true, WX11BypassWM), mUnlockingFailed(false) { - frame = new QFrame( this ); - frame->setFrameStyle( QFrame::Panel | QFrame::Raised ); + frame = new TQFrame( this ); + frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setLineWidth( 2 ); - mpixLabel = new QLabel( frame, "pixlabel" ); + mpixLabel = new TQLabel( frame, "pixlabel" ); mpixLabel->setPixmap(DesktopIcon("unlock")); KUser user; - mStatusLabel = new QLabel( "<b> </b>", frame ); - mStatusLabel->setAlignment( QLabel::AlignCenter ); + mStatusLabel = new TQLabel( "<b> </b>", frame ); + mStatusLabel->setAlignment( TQLabel::AlignCenter ); - QVBoxLayout *unlockDialogLayout = new QVBoxLayout( this ); + TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this ); unlockDialogLayout->addWidget( frame ); - QHBoxLayout *layStatus = new QHBoxLayout( 0, 0, KDialog::spacingHint()); + TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint()); layStatus->addWidget( mStatusLabel ); - frameLayout = new QGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); + frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); frameLayout->addMultiCellWidget( mpixLabel, 0, 2, 0, 0, AlignTop ); frameLayout->addLayout( layStatus, 1, 1 ); @@ -92,7 +92,7 @@ InfoDlg::~InfoDlg() hide(); } -void InfoDlg::updateLabel(QString &txt) +void InfoDlg::updateLabel(TQString &txt) { mStatusLabel->setPaletteForegroundColor(Qt::black); mStatusLabel->setText("<b>" + txt + "</b>"); @@ -125,8 +125,8 @@ void InfoDlg::setErrorIcon() void InfoDlg::show() { - QDialog::show(); - QApplication::flushX(); + TQDialog::show(); + TQApplication::flushX(); } #include "infodlg.moc" diff --git a/kdesktop/lock/infodlg.h b/kdesktop/lock/infodlg.h index ffe8364c2..b0e98150f 100644 --- a/kdesktop/lock/infodlg.h +++ b/kdesktop/lock/infodlg.h @@ -8,8 +8,8 @@ #ifndef __INFODLG_H__ #define __INFODLG_H__ -#include <qdialog.h> -#include <qstringlist.h> +#include <tqdialog.h> +#include <tqstringlist.h> class QFrame; class QGridLayout; @@ -31,7 +31,7 @@ public: ~InfoDlg(); virtual void show(); - void updateLabel( QString &txt ); + void updateLabel( TQString &txt ); void setUnlockIcon(); void setKDEIcon(); void setInfoIcon(); @@ -39,14 +39,14 @@ public: void setErrorIcon(); private: - QFrame *frame; - QGridLayout *frameLayout; - QLabel *mStatusLabel; - QLabel *mpixLabel; + TQFrame *frame; + TQGridLayout *frameLayout; + TQLabel *mStatusLabel; + TQLabel *mpixLabel; int mCapsLocked; bool mUnlockingFailed; - QStringList layoutsList; - QStringList::iterator currLayout; + TQStringList layoutsList; + TQStringList::iterator currLayout; int sPid, sFd; }; diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc index 8006cf29d..2efe56a8a 100644 --- a/kdesktop/lock/lockdlg.cc +++ b/kdesktop/lock/lockdlg.cc @@ -29,18 +29,18 @@ #include <dcopref.h> #include <kmessagebox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qmessagebox.h> -#include <qsimplerichtext.h> -#include <qlabel.h> -#include <qstringlist.h> -#include <qfontmetrics.h> -#include <qstyle.h> -#include <qapplication.h> -#include <qlistview.h> -#include <qheader.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqmessagebox.h> +#include <tqsimplerichtext.h> +#include <tqlabel.h> +#include <tqstringlist.h> +#include <tqfontmetrics.h> +#include <tqstyle.h> +#include <tqapplication.h> +#include <tqlistview.h> +#include <tqheader.h> +#include <tqcheckbox.h> #include <ctype.h> #include <unistd.h> @@ -65,27 +65,27 @@ // Simple dialog for entering a password. // PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin) - : QDialog(parent, "password dialog", true, WX11BypassWM), + : TQDialog(parent, "password dialog", true, WX11BypassWM), mPlugin( plugin ), mCapsLocked(-1), mUnlockingFailed(false) { - frame = new QFrame( this ); - frame->setFrameStyle( QFrame::Panel | QFrame::Raised ); + frame = new TQFrame( this ); + frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setLineWidth( 2 ); - QLabel *pixLabel = new QLabel( frame, "pixlabel" ); + TQLabel *pixLabel = new TQLabel( frame, "pixlabel" ); pixLabel->setPixmap(DesktopIcon("lock")); KUser user; - QLabel *greetLabel = new QLabel( user.fullName().isEmpty() ? + TQLabel *greetLabel = new TQLabel( user.fullName().isEmpty() ? i18n("<nobr><b>The session is locked</b><br>") : i18n("<nobr><b>The session was locked by %1</b><br>").arg( user.fullName() ), frame ); - mStatusLabel = new QLabel( "<b> </b>", frame ); - mStatusLabel->setAlignment( QLabel::AlignCenter ); + mStatusLabel = new TQLabel( "<b> </b>", frame ); + mStatusLabel->setAlignment( TQLabel::AlignCenter ); - mLayoutButton = new QPushButton( frame ); + mLayoutButton = new TQPushButton( frame ); mLayoutButton->setFlat( true ); KSeparator *sep = new KSeparator( KSeparator::HLine, frame ); @@ -94,24 +94,24 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin) ok = new KPushButton( i18n("Unl&ock"), frame ); cancel = new KPushButton( KStdGuiItem::cancel(), frame ); - greet = plugin->info->create( this, 0, this, mLayoutButton, QString::null, + greet = plugin->info->create( this, 0, this, mLayoutButton, TQString::null, KGreeterPlugin::Authenticate, KGreeterPlugin::ExUnlock ); - QVBoxLayout *unlockDialogLayout = new QVBoxLayout( this ); + TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this ); unlockDialogLayout->addWidget( frame ); - QHBoxLayout *layStatus = new QHBoxLayout( 0, 0, KDialog::spacingHint()); + TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint()); layStatus->addWidget( mStatusLabel ); layStatus->addWidget( mLayoutButton ); - QHBoxLayout *layButtons = new QHBoxLayout( 0, 0, KDialog::spacingHint()); + TQHBoxLayout *layButtons = new TQHBoxLayout( 0, 0, KDialog::spacingHint()); layButtons->addWidget( mNewSessButton ); layButtons->addStretch(); layButtons->addWidget( ok ); layButtons->addWidget( cancel ); - frameLayout = new QGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); + frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); frameLayout->addMultiCellWidget( pixLabel, 0, 2, 0, 0, AlignTop ); frameLayout->addWidget( greetLabel, 0, 1 ); frameLayout->addItem( greet->getLayoutItem(), 1, 1 ); @@ -123,10 +123,10 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin) setTabOrder( cancel, mNewSessButton ); setTabOrder( mNewSessButton, mLayoutButton ); - connect(mLayoutButton, SIGNAL(clicked()), this, SLOT(layoutClicked())); - connect(cancel, SIGNAL(clicked()), SLOT(reject())); - connect(ok, SIGNAL(clicked()), SLOT(slotOK())); - connect(mNewSessButton, SIGNAL(clicked()), SLOT(slotSwitchUser())); + connect(mLayoutButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(layoutClicked())); + connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotOK())); + connect(mNewSessButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSwitchUser())); if (!DM().isSwitchable() || !kapp->authorize("switch_user")) mNewSessButton->hide(); @@ -135,14 +135,14 @@ PasswordDlg::PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin) mFailedTimerId = 0; mTimeoutTimerId = startTimer(PASSDLG_HIDE_TIMEOUT); - connect(qApp, SIGNAL(activity()), SLOT(slotActivity()) ); + connect(qApp, TQT_SIGNAL(activity()), TQT_SLOT(slotActivity()) ); greet->start(); DCOPRef kxkb("kxkb", "kxkb"); if( !kxkb.isNull() ) { layoutsList = kxkb.call("getLayoutsList"); - QString currentLayout = kxkb.call("getCurrentLayout"); + TQString currentLayout = kxkb.call("getCurrentLayout"); if( !currentLayout.isEmpty() && layoutsList.count() > 1 ) { currLayout = layoutsList.find(currentLayout); if (currLayout == layoutsList.end()) @@ -175,11 +175,11 @@ void PasswordDlg::layoutClicked() } -void PasswordDlg::setLayoutText( const QString &txt ) +void PasswordDlg::setLayoutText( const TQString &txt ) { mLayoutButton->setText( txt ); - QSize sz = mLayoutButton->fontMetrics().size( 0, txt ); - int mrg = mLayoutButton->style().pixelMetric( QStyle::PM_ButtonMargin ) * 2; + TQSize sz = mLayoutButton->fontMetrics().size( 0, txt ); + int mrg = mLayoutButton->style().pixelMetric( TQStyle::PM_ButtonMargin ) * 2; mLayoutButton->setFixedSize( sz.width() + mrg, sz.height() + mrg ); } @@ -206,7 +206,7 @@ void PasswordDlg::updateLabel() // // Handle timer events. // -void PasswordDlg::timerEvent(QTimerEvent *ev) +void PasswordDlg::timerEvent(TQTimerEvent *ev) { if (ev->timerId() == mTimeoutTimerId) { @@ -227,9 +227,9 @@ void PasswordDlg::timerEvent(QTimerEvent *ev) } } -bool PasswordDlg::eventFilter(QObject *, QEvent *ev) +bool PasswordDlg::eventFilter(TQObject *, TQEvent *ev) { - if (ev->type() == QEvent::KeyPress || ev->type() == QEvent::KeyRelease) + if (ev->type() == TQEvent::KeyPress || ev->type() == TQEvent::KeyRelease) capsLocked(); return false; } @@ -371,14 +371,14 @@ void PasswordDlg::handleVerify() if (!GRecvArr( &arr )) break; if (!greet->textMessage( arr, false )) - static_cast< LockProcess* >(parent())->msgBox( QMessageBox::Information, QString::fromLocal8Bit( arr ) ); + static_cast< LockProcess* >(parent())->msgBox( TQMessageBox::Information, TQString::fromLocal8Bit( arr ) ); ::free( arr ); continue; case ConvPutError: if (!GRecvArr( &arr )) break; if (!greet->textMessage( arr, true )) - static_cast< LockProcess* >(parent())->msgBox( QMessageBox::Warning, QString::fromLocal8Bit( arr ) ); + static_cast< LockProcess* >(parent())->msgBox( TQMessageBox::Warning, TQString::fromLocal8Bit( arr ) ); ::free( arr ); continue; } @@ -411,7 +411,7 @@ void PasswordDlg::gplugReturnBinary( const char *data ) handleVerify(); } -void PasswordDlg::gplugSetUser( const QString & ) +void PasswordDlg::gplugSetUser( const TQString & ) { // ignore ... } @@ -419,7 +419,7 @@ void PasswordDlg::gplugSetUser( const QString & ) void PasswordDlg::cantCheck() { greet->failed(); - static_cast< LockProcess* >(parent())->msgBox( QMessageBox::Critical, + static_cast< LockProcess* >(parent())->msgBox( TQMessageBox::Critical, i18n("Cannot unlock the session because the authentication system failed to work;\n" "you must kill kdesktop_lock (pid %1) manually.").arg(getpid()) ); greet->revive(); @@ -466,24 +466,24 @@ void PasswordDlg::gplugActivity() slotActivity(); } -void PasswordDlg::gplugMsgBox( QMessageBox::Icon type, const QString &text ) +void PasswordDlg::gplugMsgBox( TQMessageBox::Icon type, const TQString &text ) { - QDialog dialog( this, 0, true, WX11BypassWM ); - QFrame *winFrame = new QFrame( &dialog ); - winFrame->setFrameStyle( QFrame::WinPanel | QFrame::Raised ); + TQDialog dialog( this, 0, true, WX11BypassWM ); + TQFrame *winFrame = new TQFrame( &dialog ); + winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); winFrame->setLineWidth( 2 ); - QVBoxLayout *vbox = new QVBoxLayout( &dialog ); + TQVBoxLayout *vbox = new TQVBoxLayout( &dialog ); vbox->addWidget( winFrame ); - QLabel *label1 = new QLabel( winFrame ); - label1->setPixmap( QMessageBox::standardIcon( type ) ); - QLabel *label2 = new QLabel( text, winFrame ); + TQLabel *label1 = new TQLabel( winFrame ); + label1->setPixmap( TQMessageBox::standardIcon( type ) ); + TQLabel *label2 = new TQLabel( text, winFrame ); KPushButton *button = new KPushButton( KStdGuiItem::ok(), winFrame ); button->setDefault( true ); - button->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); - connect( button, SIGNAL( clicked() ), SLOT( accept() ) ); + button->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( accept() ) ); - QGridLayout *grid = new QGridLayout( winFrame, 2, 2, 10 ); + TQGridLayout *grid = new TQGridLayout( winFrame, 2, 2, 10 ); grid->addWidget( label1, 0, 0, Qt::AlignCenter ); grid->addWidget( label2, 0, 1, Qt::AlignCenter ); grid->addMultiCellWidget( button, 1,1, 0,1, Qt::AlignCenter ); @@ -499,8 +499,8 @@ void PasswordDlg::slotOK() void PasswordDlg::show() { - QDialog::show(); - QApplication::flushX(); + TQDialog::show(); + TQApplication::flushX(); } void PasswordDlg::slotStartNewSession() @@ -513,16 +513,16 @@ void PasswordDlg::slotStartNewSession() killTimer(mTimeoutTimerId); mTimeoutTimerId = 0; - QDialog *dialog = new QDialog( this, "warnbox", true, WX11BypassWM ); - QFrame *winFrame = new QFrame( dialog ); - winFrame->setFrameStyle( QFrame::WinPanel | QFrame::Raised ); + TQDialog *dialog = new TQDialog( this, "warnbox", true, WX11BypassWM ); + TQFrame *winFrame = new TQFrame( dialog ); + winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); winFrame->setLineWidth( 2 ); - QVBoxLayout *vbox = new QVBoxLayout( dialog ); + TQVBoxLayout *vbox = new TQVBoxLayout( dialog ); vbox->addWidget( winFrame ); - QLabel *label1 = new QLabel( winFrame ); - label1->setPixmap( QMessageBox::standardIcon( QMessageBox::Warning ) ); - QString qt_text = + TQLabel *label1 = new TQLabel( winFrame ); + label1->setPixmap( TQMessageBox::standardIcon( TQMessageBox::Warning ) ); + TQString qt_text = i18n("You have chosen to open another desktop session " "instead of resuming the current one.<br>" "The current session will be hidden " @@ -535,23 +535,23 @@ void PasswordDlg::slotStartNewSession() "Additionally, the KDE Panel and Desktop menus have " "actions for switching between sessions.") .arg(7).arg(8); - QLabel *label2 = new QLabel( qt_text, winFrame ); + TQLabel *label2 = new TQLabel( qt_text, winFrame ); KPushButton *okbutton = new KPushButton( KGuiItem(i18n("&Start New Session"), "fork"), winFrame ); okbutton->setDefault( true ); - connect( okbutton, SIGNAL( clicked() ), dialog, SLOT( accept() ) ); + connect( okbutton, TQT_SIGNAL( clicked() ), dialog, TQT_SLOT( accept() ) ); KPushButton *cbutton = new KPushButton( KStdGuiItem::cancel(), winFrame ); - connect( cbutton, SIGNAL( clicked() ), dialog, SLOT( reject() ) ); + connect( cbutton, TQT_SIGNAL( clicked() ), dialog, TQT_SLOT( reject() ) ); - QBoxLayout *mbox = new QVBoxLayout( winFrame, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout *mbox = new TQVBoxLayout( winFrame, KDialog::marginHint(), KDialog::spacingHint() ); - QGridLayout *grid = new QGridLayout( mbox, 2, 2, 2 * KDialog::spacingHint() ); + TQGridLayout *grid = new TQGridLayout( mbox, 2, 2, 2 * KDialog::spacingHint() ); grid->setMargin( KDialog::marginHint() ); grid->addWidget( label1, 0, 0, Qt::AlignCenter ); grid->addWidget( label2, 0, 1, Qt::AlignCenter ); - QCheckBox *cb = new QCheckBox( i18n("&Do not ask again"), winFrame ); + TQCheckBox *cb = new TQCheckBox( i18n("&Do not ask again"), winFrame ); grid->addMultiCellWidget( cb, 1,1, 0,1 ); - QBoxLayout *hbox = new QHBoxLayout( mbox, KDialog::spacingHint() ); + TQBoxLayout *hbox = new TQHBoxLayout( mbox, KDialog::spacingHint() ); hbox->addStretch( 1 ); hbox->addWidget( okbutton ); hbox->addStretch( 1 ); @@ -563,8 +563,8 @@ void PasswordDlg::slotStartNewSession() int pref_height = 0; // Calculate a proper size for the text. { - QSimpleRichText rt(qt_text, dialog->font()); - QRect rect = KGlobalSettings::desktopGeometry(dialog); + TQSimpleRichText rt(qt_text, dialog->font()); + TQRect rect = KGlobalSettings::desktopGeometry(dialog); pref_width = rect.width() / 3; rt.setWidth(pref_width); @@ -593,13 +593,13 @@ void PasswordDlg::slotStartNewSession() pref_width = used_width; } } - label2->setFixedSize(QSize(pref_width+10, pref_height)); + label2->setFixedSize(TQSize(pref_width+10, pref_height)); int ret = static_cast< LockProcess* >( parent())->execDialog( dialog ); delete dialog; - if (ret == QDialog::Accepted) { + if (ret == TQDialog::Accepted) { if (cb->isChecked()) KMessageBox::saveDontShowAgainContinue( ":confirmNewSession" ); DM().startReserve(); @@ -608,11 +608,11 @@ void PasswordDlg::slotStartNewSession() mTimeoutTimerId = startTimer(PASSDLG_HIDE_TIMEOUT); } -class LockListViewItem : public QListViewItem { +class LockListViewItem : public TQListViewItem { public: - LockListViewItem( QListView *parent, - const QString &sess, const QString &loc, int _vt ) - : QListViewItem( parent ) + LockListViewItem( TQListView *parent, + const TQString &sess, const TQString &loc, int _vt ) + : TQListViewItem( parent ) , vt( _vt ) { setText( 0, sess ); @@ -627,33 +627,33 @@ void PasswordDlg::slotSwitchUser() int p = 0; DM dm; - QDialog dialog( this, "sessbox", true, WX11BypassWM ); - QFrame *winFrame = new QFrame( &dialog ); - winFrame->setFrameStyle( QFrame::WinPanel | QFrame::Raised ); + TQDialog dialog( this, "sessbox", true, WX11BypassWM ); + TQFrame *winFrame = new TQFrame( &dialog ); + winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); winFrame->setLineWidth( 2 ); - QBoxLayout *vbox = new QVBoxLayout( &dialog ); + TQBoxLayout *vbox = new TQVBoxLayout( &dialog ); vbox->addWidget( winFrame ); - QBoxLayout *hbox = new QHBoxLayout( winFrame, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout *hbox = new TQHBoxLayout( winFrame, KDialog::marginHint(), KDialog::spacingHint() ); - QBoxLayout *vbox1 = new QVBoxLayout( hbox, KDialog::spacingHint() ); - QBoxLayout *vbox2 = new QVBoxLayout( hbox, KDialog::spacingHint() ); + TQBoxLayout *vbox1 = new TQVBoxLayout( hbox, KDialog::spacingHint() ); + TQBoxLayout *vbox2 = new TQVBoxLayout( hbox, KDialog::spacingHint() ); KPushButton *btn; SessList sess; if (dm.localSessions( sess )) { - lv = new QListView( winFrame ); - connect( lv, SIGNAL(doubleClicked(QListViewItem *, const QPoint&, int)), SLOT(slotSessionActivated()) ); - connect( lv, SIGNAL(doubleClicked(QListViewItem *, const QPoint&, int)), &dialog, SLOT(reject()) ); + lv = new TQListView( winFrame ); + connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), TQT_SLOT(slotSessionActivated()) ); + connect( lv, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), &dialog, TQT_SLOT(reject()) ); lv->setAllColumnsShowFocus( true ); lv->addColumn( i18n("Session") ); lv->addColumn( i18n("Location") ); - lv->setColumnWidthMode( 0, QListView::Maximum ); - lv->setColumnWidthMode( 1, QListView::Maximum ); - QListViewItem *itm = 0; - QString user, loc; + lv->setColumnWidthMode( 0, TQListView::Maximum ); + lv->setColumnWidthMode( 1, TQListView::Maximum ); + TQListViewItem *itm = 0; + TQString user, loc; int ns = 0; for (SessList::ConstIterator it = sess.begin(); it != sess.end(); ++it) { DM::sess2Str2( *it, user, loc ); @@ -667,17 +667,17 @@ void PasswordDlg::slotSwitchUser() ns++; } int fw = lv->frameWidth() * 2; - QSize hds( lv->header()->sizeHint() ); + TQSize hds( lv->header()->sizeHint() ); lv->setMinimumWidth( fw + hds.width() + - (ns > 10 ? style().pixelMetric(QStyle::PM_ScrollBarExtent) : 0 ) ); + (ns > 10 ? style().pixelMetric(TQStyle::PM_ScrollBarExtent) : 0 ) ); lv->setFixedHeight( fw + hds.height() + itm->height() * (ns < 6 ? 6 : ns > 10 ? 10 : ns) ); lv->header()->adjustHeaderSize(); vbox1->addWidget( lv ); btn = new KPushButton( KGuiItem(i18n("session", "&Activate"), "fork"), winFrame ); - connect( btn, SIGNAL(clicked()), SLOT(slotSessionActivated()) ); - connect( btn, SIGNAL(clicked()), &dialog, SLOT(reject()) ); + connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotSessionActivated()) ); + connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) ); vbox2->addWidget( btn ); vbox2->addStretch( 2 ); } @@ -685,8 +685,8 @@ void PasswordDlg::slotSwitchUser() if (kapp->authorize("start_new_session") && (p = dm.numReserve()) >= 0) { btn = new KPushButton( KGuiItem(i18n("Start &New Session"), "fork"), winFrame ); - connect( btn, SIGNAL(clicked()), SLOT(slotStartNewSession()) ); - connect( btn, SIGNAL(clicked()), &dialog, SLOT(reject()) ); + connect( btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotStartNewSession()) ); + connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) ); if (!p) btn->setEnabled( false ); vbox2->addWidget( btn ); @@ -694,7 +694,7 @@ void PasswordDlg::slotSwitchUser() } btn = new KPushButton( KStdGuiItem::cancel(), winFrame ); - connect( btn, SIGNAL(clicked()), &dialog, SLOT(reject()) ); + connect( btn, TQT_SIGNAL(clicked()), &dialog, TQT_SLOT(reject()) ); vbox2->addWidget( btn ); static_cast< LockProcess* >(parent())->execDialog( &dialog ); diff --git a/kdesktop/lock/lockdlg.h b/kdesktop/lock/lockdlg.h index 4bb468c03..592acd7ce 100644 --- a/kdesktop/lock/lockdlg.h +++ b/kdesktop/lock/lockdlg.h @@ -11,8 +11,8 @@ #include <kgreeterplugin.h> -#include <qdialog.h> -#include <qstringlist.h> +#include <tqdialog.h> +#include <tqstringlist.h> struct GreeterPluginHandle; class LockProcess; @@ -27,7 +27,7 @@ class QListView; // Simple dialog for entering a password. // It does not handle password validation. // -class PasswordDlg : public QDialog, public KGreeterPluginHandler +class PasswordDlg : public TQDialog, public KGreeterPluginHandler { Q_OBJECT @@ -39,14 +39,14 @@ public: // from KGreetPluginHandler virtual void gplugReturnText( const char *text, int tag ); virtual void gplugReturnBinary( const char *data ); - virtual void gplugSetUser( const QString & ); + virtual void gplugSetUser( const TQString & ); virtual void gplugStart(); virtual void gplugActivity(); - virtual void gplugMsgBox( QMessageBox::Icon type, const QString &text ); + virtual void gplugMsgBox( TQMessageBox::Icon type, const TQString &text ); protected: - virtual void timerEvent(QTimerEvent *); - virtual bool eventFilter(QObject *, QEvent *); + virtual void timerEvent(TQTimerEvent *); + virtual bool eventFilter(TQObject *, TQEvent *); private slots: void slotSwitchUser(); @@ -57,7 +57,7 @@ private slots: void slotActivity(); private: - void setLayoutText( const QString &txt ); + void setLayoutText( const TQString &txt ); void capsLocked(); void updateLabel(); int Reader (void *buf, int count); @@ -73,19 +73,19 @@ private: void cantCheck(); GreeterPluginHandle *mPlugin; KGreeterPlugin *greet; - QFrame *frame; - QGridLayout *frameLayout; - QLabel *mStatusLabel; + TQFrame *frame; + TQGridLayout *frameLayout; + TQLabel *mStatusLabel; KPushButton *mNewSessButton, *ok, *cancel; - QPushButton *mLayoutButton; + TQPushButton *mLayoutButton; int mFailedTimerId; int mTimeoutTimerId; int mCapsLocked; bool mUnlockingFailed; - QStringList layoutsList; - QStringList::iterator currLayout; + TQStringList layoutsList; + TQStringList::iterator currLayout; int sPid, sFd; - QListView *lv; + TQListView *lv; }; #endif diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 968eca7d7..d589232a1 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -40,17 +40,17 @@ #include <kpixmapeffect.h> #include <kpixmap.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qcursor.h> -#include <qtimer.h> -#include <qfile.h> -#include <qsocketnotifier.h> -#include <qvaluevector.h> -#include <qtooltip.h> - -#include <qdatetime.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcursor.h> +#include <tqtimer.h> +#include <tqfile.h> +#include <tqsocketnotifier.h> +#include <tqvaluevector.h> +#include <tqtooltip.h> + +#include <tqdatetime.h> #include <stdlib.h> #include <assert.h> @@ -125,7 +125,7 @@ static void segv_handler(int) // starting screensaver hacks, and password entry.f // LockProcess::LockProcess(bool child, bool useBlankOnly) - : QWidget(0L, "saver window", WX11BypassWM), + : TQWidget(0L, "saver window", WX11BypassWM), mOpenGLVisual(0), child_saver(child), mParent(0), @@ -155,8 +155,8 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) mRootWidth = rootAttr.width; mRootHeight = rootAttr.height; { // trigger creation of QToolTipManager, it does XSelectInput() on the root window - QWidget w; - QToolTip::add( &w, "foo" ); + TQWidget w; + TQToolTip::add( &w, "foo" ); } XSelectInput( qt_xdisplay(), qt_xrootwin(), SubstructureNotifyMask | rootAttr.your_event_mask ); @@ -167,7 +167,7 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) "System/ScreenSavers/"); // Add KDE specific screensaver path - QString relPath="System/ScreenSavers/"; + TQString relPath="System/ScreenSavers/"; KServiceGroup::Ptr servGroup = KServiceGroup::baseGroup( "screensavers"); if (servGroup) { @@ -182,15 +182,15 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) gXA_VROOT = XInternAtom (qt_xdisplay(), "__SWM_VROOT", False); gXA_SCREENSAVER_VERSION = XInternAtom (qt_xdisplay(), "_SCREENSAVER_VERSION", False); - connect(&mHackProc, SIGNAL(processExited(KProcess *)), - SLOT(hackExited(KProcess *))); + connect(&mHackProc, TQT_SIGNAL(processExited(KProcess *)), + TQT_SLOT(hackExited(KProcess *))); - connect(&mSuspendTimer, SIGNAL(timeout()), SLOT(suspend())); + connect(&mSuspendTimer, TQT_SIGNAL(timeout()), TQT_SLOT(suspend())); - QStringList dmopt = - QStringList::split(QChar(','), - QString::fromLatin1( ::getenv( "XDM_MANAGED" ))); - for (QStringList::ConstIterator it = dmopt.begin(); it != dmopt.end(); ++it) + TQStringList dmopt = + TQStringList::split(TQChar(','), + TQString::fromLatin1( ::getenv( "XDM_MANAGED" ))); + for (TQStringList::ConstIterator it = dmopt.begin(); it != dmopt.end(); ++it) if ((*it).startsWith("method=")) mMethod = (*it).mid(7); @@ -203,7 +203,7 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) DPMSInfo(qt_xdisplay(), &state, &on); if (on) { - connect(&mCheckDPMS, SIGNAL(timeout()), SLOT(checkDPMSActive())); + connect(&mCheckDPMS, TQT_SIGNAL(timeout()), TQT_SLOT(checkDPMSActive())); // we can save CPU if we stop it as quickly as possible // but we waste CPU if we check too often -> so take 10s mCheckDPMS.start(10000); @@ -212,7 +212,7 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) #endif #if (QT_VERSION-0 >= 0x030200) // XRANDR support - connect( kapp->desktop(), SIGNAL( resized( int )), SLOT( desktopResized())); + connect( kapp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized())); #endif greetPlugin.library = 0; @@ -250,7 +250,7 @@ static void sighup_handler(int) ::write( signal_pipe[1], &tmp, 1); } -void LockProcess::timerEvent(QTimerEvent *ev) +void LockProcess::timerEvent(TQTimerEvent *ev) { if (mAutoLogout && ev->timerId() == mAutoLogoutTimerId) { @@ -271,7 +271,7 @@ void LockProcess::setupPipe() mPipe_fd = open(FIFO_FILE, O_RDONLY | O_NONBLOCK); if (mPipe_fd > -1) { mPipeOpen = true; - QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) ); + TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) ); } mknod(FIFO_FILE_OUT, S_IFIFO|0600, 0); @@ -287,7 +287,7 @@ void LockProcess::checkPipe() { char readbuf[128]; int numread; - QString to_display; + TQString to_display; const char * pin_entry; if (mPipeOpen == true) { @@ -318,7 +318,7 @@ void LockProcess::checkPipe() } mDialogControlLock = false; // Display info message dialog - QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) ); + TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) ); InfoDlg inDlg( this ); inDlg.updateLabel(to_display); inDlg.setUnlockIcon(); @@ -339,7 +339,7 @@ void LockProcess::checkPipe() } mDialogControlLock = false; // Display info message dialog - QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) ); + TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) ); InfoDlg inDlg( this ); inDlg.updateLabel(to_display); if (readbuf[0] == 'K') inDlg.setKDEIcon(); @@ -363,7 +363,7 @@ void LockProcess::checkPipe() } mDialogControlLock = false; // Display query dialog - QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) ); + TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) ); QueryDlg qryDlg( this ); qryDlg.updateLabel(to_display); qryDlg.setUnlockIcon(); @@ -381,7 +381,7 @@ void LockProcess::checkPipe() return; } } - QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) ); + TQTimer::singleShot( PIPE_CHECK_INTERVAL, this, TQT_SLOT(checkPipe()) ); } } @@ -414,9 +414,9 @@ void LockProcess::setupSignals() sigaction(SIGHUP, &act, 0L); pipe(signal_pipe); - QSocketNotifier* notif = new QSocketNotifier(signal_pipe[0], - QSocketNotifier::Read, this ); - connect( notif, SIGNAL(activated(int)), SLOT(signalPipeSignal())); + TQSocketNotifier* notif = new TQSocketNotifier(signal_pipe[0], + TQSocketNotifier::Read, this ); + connect( notif, TQT_SIGNAL(activated(int)), TQT_SLOT(signalPipeSignal())); } @@ -444,7 +444,7 @@ bool LockProcess::lock() mBusy = true; if (startLock()) { - QTimer::singleShot(1000, this, SLOT(slotDeadTimePassed())); + TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed())); return true; } stopSaver(); @@ -464,7 +464,7 @@ bool LockProcess::defaultSave() mLocked = false; if (startSaver()) { if (mLockGrace >= 0) - QTimer::singleShot(mLockGrace, this, SLOT(startLock())); + TQTimer::singleShot(mLockGrace, this, TQT_SLOT(startLock())); return true; } return false; @@ -527,7 +527,7 @@ void LockProcess::configure() mPlugins = KDesktopSettings::pluginsUnlock(); if (mPlugins.isEmpty()) - mPlugins = QStringList("classic"); + mPlugins = TQStringList("classic"); mPluginOptions = KDesktopSettings::pluginOptions(); } @@ -539,15 +539,15 @@ void LockProcess::readSaver() { if (!mSaver.isEmpty()) { - QString file = locate("scrsav", mSaver); + TQString file = locate("scrsav", mSaver); bool opengl = kapp->authorize("opengl_screensavers"); bool manipulatescreen = kapp->authorize("manipulatescreen_screensavers"); KDesktopFile config(file, true); if (config.readEntry("X-KDE-Type").utf8()) { - QString saverType = config.readEntry("X-KDE-Type").utf8(); - QStringList saverTypes = QStringList::split(";", saverType); + TQString saverType = config.readEntry("X-KDE-Type").utf8(); + TQStringList saverTypes = TQStringList::split(";", saverType); for (uint i = 0; i < saverTypes.count(); i++) { if ((saverTypes[i] == "ManipulateScreen") && !manipulatescreen) @@ -652,7 +652,7 @@ void LockProcess::createSaverWindow() // set NoBackground so that the saver can capture the current // screen state if necessary - setBackgroundMode(QWidget::NoBackground); + setBackgroundMode(TQWidget::NoBackground); setCursor( blankCursor ); setGeometry(0, 0, mRootWidth, mRootHeight); @@ -677,8 +677,8 @@ void LockProcess::desktopResized() // This slot needs to be able to execute very rapidly so as to prevent the user's desktop from ever // being displayed, so we finish the hack restarting/display prettying operations in a separate timed slot if (resizeTimer == NULL) { - resizeTimer = new QTimer( this ); - connect( resizeTimer, SIGNAL(timeout()), this, SLOT(doDesktopResizeFinish()) ); + resizeTimer = new TQTimer( this ); + connect( resizeTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(doDesktopResizeFinish()) ); } resizeTimer->start( 100, TRUE ); // 100 millisecond single shot timer; should allow display switching operations to finish before hack is started } @@ -817,7 +817,7 @@ void LockProcess::removeVRoot(Window win) // bool LockProcess::grabKeyboard() { - int rv = XGrabKeyboard( qt_xdisplay(), QApplication::desktop()->winId(), + int rv = XGrabKeyboard( qt_xdisplay(), TQApplication::desktop()->winId(), True, GrabModeAsync, GrabModeAsync, CurrentTime ); return (rv == GrabSuccess); @@ -832,7 +832,7 @@ bool LockProcess::grabKeyboard() // bool LockProcess::grabMouse() { - int rv = XGrabPointer( qt_xdisplay(), QApplication::desktop()->winId(), + int rv = XGrabPointer( qt_xdisplay(), TQApplication::desktop()->winId(), True, GRABEVENTS, GrabModeAsync, GrabModeAsync, None, blankCursor.handle(), CurrentTime ); @@ -898,8 +898,8 @@ bool LockProcess::startSaver() saveVRoot(); if (mParent) { - QSocketNotifier *notifier = new QSocketNotifier(mParent, QSocketNotifier::Read, this, "notifier"); - connect(notifier, SIGNAL( activated (int)), SLOT( quitSaver())); + TQSocketNotifier *notifier = new TQSocketNotifier(mParent, TQSocketNotifier::Read, this, "notifier"); + connect(notifier, TQT_SIGNAL( activated (int)), TQT_SLOT( quitSaver())); } createSaverWindow(); move(0, 0); @@ -929,26 +929,26 @@ void LockProcess::stopSaver() DM().setLock( false ); ungrabInput(); const char *out = "GOAWAY!"; - for (QValueList<int>::ConstIterator it = child_sockets.begin(); it != child_sockets.end(); ++it) + for (TQValueList<int>::ConstIterator it = child_sockets.begin(); it != child_sockets.end(); ++it) write(*it, out, sizeof(out)); } } // private static -QVariant LockProcess::getConf(void *ctx, const char *key, const QVariant &dflt) +TQVariant LockProcess::getConf(void *ctx, const char *key, const TQVariant &dflt) { LockProcess *that = (LockProcess *)ctx; - QString fkey = QString::fromLatin1( key ) + '='; - for (QStringList::ConstIterator it = that->mPluginOptions.begin(); + TQString fkey = TQString::fromLatin1( key ) + '='; + for (TQStringList::ConstIterator it = that->mPluginOptions.begin(); it != that->mPluginOptions.end(); ++it) if ((*it).startsWith( fkey )) return (*it).mid( fkey.length() ); return dflt; } -void LockProcess::cantLock( const QString &txt) +void LockProcess::cantLock( const TQString &txt) { - msgBox( QMessageBox::Critical, i18n("Will not lock the session, as unlocking would be impossible:\n") + txt ); + msgBox( TQMessageBox::Critical, i18n("Will not lock the session, as unlocking would be impossible:\n") + txt ); } #if 0 // placeholders for later @@ -962,9 +962,9 @@ i18n("<i>kcheckpass</i> is unable to operate. Possibly it is not SetUID root."); // bool LockProcess::startLock() { - for (QStringList::ConstIterator it = mPlugins.begin(); it != mPlugins.end(); ++it) { + for (TQStringList::ConstIterator it = mPlugins.begin(); it != mPlugins.end(); ++it) { GreeterPluginHandle plugin; - QString path = KLibLoader::self()->findLibrary( + TQString path = KLibLoader::self()->findLibrary( ((*it)[0] == '/' ? *it : "kgreet_" + *it ).latin1() ); if (path.isEmpty()) { kdWarning(1204) << "GreeterPlugin " << *it << " does not exist" << endl; @@ -1018,10 +1018,10 @@ bool LockProcess::startHack() mHackProc.clearArguments(); - QTextStream ts(&mSaverExec, IO_ReadOnly); - QString word; + TQTextStream ts(&mSaverExec, IO_ReadOnly); + TQString word; ts >> word; - QString path = KStandardDirs::findExe(word); + TQString path = KStandardDirs::findExe(word); if (!path.isEmpty()) { @@ -1089,8 +1089,8 @@ void LockProcess::suspend() if(!mSuspended) { mHackProc.kill(SIGSTOP); - QApplication::syncX(); - mSavedScreen = QPixmap::grabWindow( winId()); + TQApplication::syncX(); + mSavedScreen = TQPixmap::grabWindow( winId()); } mSuspended = true; } @@ -1103,7 +1103,7 @@ void LockProcess::resume( bool force ) { XForceScreenSaver(qt_xdisplay(), ScreenSaverReset ); bitBlt( this, 0, 0, &mSavedScreen ); - QApplication::syncX(); + TQApplication::syncX(); mHackProc.kill(SIGCONT); } mSuspended = false; @@ -1124,7 +1124,7 @@ bool LockProcess::checkPass() int ret = execDialog( &passDlg ); if (mForceReject == true) { - ret = QDialog::Rejected; + ret = TQDialog::Rejected; } mForceReject = false; @@ -1138,7 +1138,7 @@ bool LockProcess::checkPass() SubstructureNotifyMask | rootAttr.your_event_mask ); } - return ret == QDialog::Accepted; + return ret == TQDialog::Accepted; } else { return 0; @@ -1161,13 +1161,13 @@ static void fakeFocusIn( WId window ) XSendEvent( qt_xdisplay(), window, False, NoEventMask, &ev ); } -int LockProcess::execDialog( QDialog *dlg ) +int LockProcess::execDialog( TQDialog *dlg ) { currentDialog=dlg; dlg->adjustSize(); - QRect rect = dlg->geometry(); - rect.moveCenter(KGlobalSettings::desktopGeometry(QCursor::pos()).center()); + TQRect rect = dlg->geometry(); + rect.moveCenter(KGlobalSettings::desktopGeometry(TQCursor::pos()).center()); dlg->move( rect.topLeft() ); if (mDialogs.isEmpty()) @@ -1193,14 +1193,14 @@ int LockProcess::execDialog( QDialog *dlg ) void LockProcess::preparePopup() { - QWidget *dlg = (QWidget *)sender(); + TQWidget *dlg = (TQWidget *)sender(); mDialogs.prepend( dlg ); fakeFocusIn( dlg->winId() ); } void LockProcess::cleanupPopup() { - QWidget *dlg = (QWidget *)sender(); + TQWidget *dlg = (TQWidget *)sender(); mDialogs.remove( dlg ); fakeFocusIn( mDialogs.first()->winId() ); } @@ -1208,7 +1208,7 @@ void LockProcess::cleanupPopup() void LockProcess::doFunctionKeyBroadcast() { // Provide a clean, pretty display switch by hiding the password dialog here mBusy=true; - QTimer::singleShot(1000, this, SLOT(slotDeadTimePassed())); + TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed())); if (mkeyCode == XKeysymToKeycode(qt_xdisplay(), XF86XK_Display)) { while (mDialogControlLock == true) sleep(1); mDialogControlLock = true; @@ -1244,7 +1244,7 @@ bool LockProcess::x11Event(XEvent *event) (event->xkey.keycode == XKeysymToKeycode(event->xkey.display, XF86XK_AudioRaiseVolume)) || \ (event->xkey.keycode == XKeysymToKeycode(event->xkey.display, XF86XK_AudioLowerVolume))) { mkeyCode = event->xkey.keycode; - QTimer::singleShot( 100, this, SLOT(doFunctionKeyBroadcast()) ); + TQTimer::singleShot( 100, this, TQT_SLOT(doFunctionKeyBroadcast()) ); return true; } } @@ -1330,7 +1330,7 @@ void LockProcess::stayOnTop() // and stack others below it Window* stack = new Window[ mDialogs.count() + 1 ]; int count = 0; - for( QValueList< QWidget* >::ConstIterator it = mDialogs.begin(); + for( TQValueList< TQWidget* >::ConstIterator it = mDialogs.begin(); it != mDialogs.end(); ++it ) stack[ count++ ] = (*it)->winId(); @@ -1404,23 +1404,23 @@ void LockProcess::unlockXF86() } #endif -void LockProcess::msgBox( QMessageBox::Icon type, const QString &txt ) +void LockProcess::msgBox( TQMessageBox::Icon type, const TQString &txt ) { - QDialog box( 0, "messagebox", true, WX11BypassWM ); - QFrame *winFrame = new QFrame( &box ); - winFrame->setFrameStyle( QFrame::WinPanel | QFrame::Raised ); + TQDialog box( 0, "messagebox", true, WX11BypassWM ); + TQFrame *winFrame = new TQFrame( &box ); + winFrame->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); winFrame->setLineWidth( 2 ); - QLabel *label1 = new QLabel( winFrame ); - label1->setPixmap( QMessageBox::standardIcon( type ) ); - QLabel *label2 = new QLabel( txt, winFrame ); + TQLabel *label1 = new TQLabel( winFrame ); + label1->setPixmap( TQMessageBox::standardIcon( type ) ); + TQLabel *label2 = new TQLabel( txt, winFrame ); KPushButton *button = new KPushButton( KStdGuiItem::ok(), winFrame ); button->setDefault( true ); - button->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred ) ); - connect( button, SIGNAL( clicked() ), &box, SLOT( accept() ) ); + button->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + connect( button, TQT_SIGNAL( clicked() ), &box, TQT_SLOT( accept() ) ); - QVBoxLayout *vbox = new QVBoxLayout( &box ); + TQVBoxLayout *vbox = new TQVBoxLayout( &box ); vbox->addWidget( winFrame ); - QGridLayout *grid = new QGridLayout( winFrame, 2, 2, 10 ); + TQGridLayout *grid = new TQGridLayout( winFrame, 2, 2, 10 ); grid->addWidget( label1, 0, 0, Qt::AlignCenter ); grid->addWidget( label2, 0, 1, Qt::AlignCenter ); grid->addMultiCellWidget( button, 1,1, 0,1, Qt::AlignCenter ); diff --git a/kdesktop/lock/lockprocess.h b/kdesktop/lock/lockprocess.h index e99034c71..cdbeb0da1 100644 --- a/kdesktop/lock/lockprocess.h +++ b/kdesktop/lock/lockprocess.h @@ -14,11 +14,11 @@ #include <kprocess.h> #include <kpixmap.h> -#include <qwidget.h> -#include <qtimer.h> -#include <qvaluestack.h> -#include <qmessagebox.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqtimer.h> +#include <tqvaluestack.h> +#include <tqmessagebox.h> +#include <tqpixmap.h> #include <X11/Xlib.h> @@ -53,11 +53,11 @@ public: bool dontLock(); - void setChildren(QValueList<int> children) { child_sockets = children; } + void setChildren(TQValueList<int> children) { child_sockets = children; } void setParent(int fd) { mParent = fd; } - void msgBox( QMessageBox::Icon type, const QString &txt ); - int execDialog( QDialog* dlg ); + void msgBox( TQMessageBox::Icon type, const TQString &txt ); + int execDialog( TQDialog* dlg ); public slots: void quitSaver(); @@ -70,7 +70,7 @@ public slots: protected: virtual bool x11Event(XEvent *); - virtual void timerEvent(QTimerEvent *); + virtual void timerEvent(TQTimerEvent *); private slots: void hackExited(KProcess *); @@ -92,7 +92,7 @@ private: bool grabMouse(); bool grabInput(); void ungrabInput(); - void cantLock(const QString &reason); + void cantLock(const TQString &reason); bool startSaver(); void stopSaver(); bool startHack(); @@ -104,7 +104,7 @@ private: void lockXF86(); void unlockXF86(); void resume( bool force ); - static QVariant getConf(void *ctx, const char *key, const QVariant &dflt); + static TQVariant getConf(void *ctx, const char *key, const TQVariant &dflt); bool mLocked; int mLockGrace; @@ -113,30 +113,30 @@ private: KProcess mHackProc; int mRootWidth; int mRootHeight; - QString mSaverExec; - QString mSaver; + TQString mSaverExec; + TQString mSaver; bool mOpenGLVisual; bool child_saver; - QValueList<int> child_sockets; + TQValueList<int> child_sockets; int mParent; bool mUseBlankOnly; bool mSuspended; - QTimer mSuspendTimer; + TQTimer mSuspendTimer; bool mVisibility; bool mDPMSDepend; - QTimer mCheckDPMS; - QValueStack< QWidget* > mDialogs; + TQTimer mCheckDPMS; + TQValueStack< TQWidget* > mDialogs; bool mRestoreXF86Lock; bool mForbidden; - QStringList mPlugins, mPluginOptions; - QString mMethod; + TQStringList mPlugins, mPluginOptions; + TQString mMethod; GreeterPluginHandle greetPlugin; - QPixmap mSavedScreen; + TQPixmap mSavedScreen; int mAutoLogoutTimerId; int mAutoLogoutTimeout; bool mAutoLogout; bool mInfoMessageDisplayed; - QDialog *currentDialog; + TQDialog *currentDialog; bool mDialogControlLock; bool mForceReject; @@ -145,7 +145,7 @@ private: bool mPipeOpen_out; int mPipe_fd_out; - QTimer *resizeTimer; + TQTimer *resizeTimer; unsigned int mkeyCode; }; diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc index b55e67ea6..6e032bebb 100644 --- a/kdesktop/lock/main.cc +++ b/kdesktop/lock/main.cc @@ -76,7 +76,7 @@ int main( int argc, char **argv ) bool child = false; int parent_connection = 0; // socket to the parent saver - QValueList<int> child_sockets; + TQValueList<int> child_sockets; if (KGlobalSettings::isMultiHead()) { @@ -91,7 +91,7 @@ int main( int argc, char **argv ) int number_of_screens = ScreenCount(dpy); starting_screen = kdesktop_screen_number = DefaultScreen(dpy); int pos; - QCString display_name = XDisplayString(dpy); + TQCString display_name = XDisplayString(dpy); XCloseDisplay(dpy); kdDebug() << "screen " << number_of_screens << " " << kdesktop_screen_number << " " << display_name << " " << starting_screen << endl; dpy = 0; @@ -99,7 +99,7 @@ int main( int argc, char **argv ) if ((pos = display_name.findRev('.')) != -1) display_name.remove(pos, 10); - QCString env; + TQCString env; if (number_of_screens != 1) { for (int i = 0; i < number_of_screens; i++) { if (i != starting_screen) { diff --git a/kdesktop/lock/querydlg.cc b/kdesktop/lock/querydlg.cc index 7bdedf0e8..d4ad06e88 100644 --- a/kdesktop/lock/querydlg.cc +++ b/kdesktop/lock/querydlg.cc @@ -25,18 +25,18 @@ #include <dcopref.h> #include <kmessagebox.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qmessagebox.h> -#include <qsimplerichtext.h> -#include <qlabel.h> -#include <qstringlist.h> -#include <qfontmetrics.h> -#include <qstyle.h> -#include <qapplication.h> -#include <qlistview.h> -#include <qheader.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqmessagebox.h> +#include <tqsimplerichtext.h> +#include <tqlabel.h> +#include <tqstringlist.h> +#include <tqfontmetrics.h> +#include <tqstyle.h> +#include <tqapplication.h> +#include <tqlistview.h> +#include <tqheader.h> +#include <tqcheckbox.h> #include <ctype.h> #include <unistd.h> @@ -59,49 +59,49 @@ // Simple dialog for displaying a password/PIN entry dialog // QueryDlg::QueryDlg(LockProcess *parent) - : QDialog(parent, "query dialog", true, WX11BypassWM), + : TQDialog(parent, "query dialog", true, WX11BypassWM), mUnlockingFailed(false) { - frame = new QFrame( this ); - frame->setFrameStyle( QFrame::Panel | QFrame::Raised ); + frame = new TQFrame( this ); + frame->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); frame->setLineWidth( 2 ); - mpixLabel = new QLabel( frame, "pixlabel" ); + mpixLabel = new TQLabel( frame, "pixlabel" ); mpixLabel->setPixmap(DesktopIcon("unlock")); KUser user; - mStatusLabel = new QLabel( "<b> </b>", frame ); - //mStatusLabel->setAlignment( QLabel::AlignCenter ); - mStatusLabel->setAlignment( QLabel::AlignLeft ); + mStatusLabel = new TQLabel( "<b> </b>", frame ); + //mStatusLabel->setAlignment( TQLabel::AlignCenter ); + mStatusLabel->setAlignment( TQLabel::AlignLeft ); KSeparator *sep = new KSeparator( KSeparator::HLine, frame ); ok = new KPushButton( i18n("Unl&ock"), frame ); - QVBoxLayout *unlockDialogLayout = new QVBoxLayout( this ); + TQVBoxLayout *unlockDialogLayout = new TQVBoxLayout( this ); unlockDialogLayout->addWidget( frame ); - QHBoxLayout *layStatus = new QHBoxLayout( 0, 0, KDialog::spacingHint()); + TQHBoxLayout *layStatus = new TQHBoxLayout( 0, 0, KDialog::spacingHint()); layStatus->addWidget( mStatusLabel ); - QHBoxLayout *layPin = new QHBoxLayout( 0, 0, KDialog::spacingHint()); + TQHBoxLayout *layPin = new TQHBoxLayout( 0, 0, KDialog::spacingHint()); pin_box = new KPasswordEdit( this, "pin_box" ); layPin->addWidget( pin_box ); pin_box->setFocus(); - QHBoxLayout *layButtons = new QHBoxLayout( 0, 0, KDialog::spacingHint()); + TQHBoxLayout *layButtons = new TQHBoxLayout( 0, 0, KDialog::spacingHint()); layButtons->addStretch(); layButtons->addWidget( ok ); - frameLayout = new QGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); + frameLayout = new TQGridLayout( frame, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); frameLayout->addMultiCellWidget( mpixLabel, 0, 2, 0, 0, AlignTop ); frameLayout->addLayout( layStatus, 0, 1 ); frameLayout->addLayout( layPin, 2, 1 ); frameLayout->addMultiCellWidget( sep, 3, 3, 0, 1 ); frameLayout->addMultiCellLayout( layButtons, 4, 4, 0, 1 ); - connect(ok, SIGNAL(clicked()), SLOT(slotOK())); + connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(slotOK())); installEventFilter(this); } @@ -121,7 +121,7 @@ const char * QueryDlg::getEntry() return pin_box->password(); } -void QueryDlg::updateLabel(QString &txt) +void QueryDlg::updateLabel(TQString &txt) { mStatusLabel->setPaletteForegroundColor(Qt::black); mStatusLabel->setText("<b>" + txt + "</b>"); @@ -139,8 +139,8 @@ void QueryDlg::setWarningIcon() void QueryDlg::show() { - QDialog::show(); - QApplication::flushX(); + TQDialog::show(); + TQApplication::flushX(); } #include "querydlg.moc" diff --git a/kdesktop/lock/querydlg.h b/kdesktop/lock/querydlg.h index caf73c180..d3f8f4be7 100644 --- a/kdesktop/lock/querydlg.h +++ b/kdesktop/lock/querydlg.h @@ -8,8 +8,8 @@ #ifndef __QUERYDLG_H__ #define __QUERYDLG_H__ -#include <qdialog.h> -#include <qstringlist.h> +#include <tqdialog.h> +#include <tqstringlist.h> #include <kpassdlg.h> @@ -33,7 +33,7 @@ public: ~QueryDlg(); virtual void show(); - void updateLabel( QString &txt ); + void updateLabel( TQString &txt ); void setUnlockIcon(); void setWarningIcon(); const char * getEntry(); @@ -42,14 +42,14 @@ private slots: void slotOK(); private: - QFrame *frame; - QGridLayout *frameLayout; - QLabel *mStatusLabel; - QLabel *mpixLabel; + TQFrame *frame; + TQGridLayout *frameLayout; + TQLabel *mStatusLabel; + TQLabel *mpixLabel; int mCapsLocked; bool mUnlockingFailed; - QStringList layoutsList; - QStringList::iterator currLayout; + TQStringList layoutsList; + TQStringList::iterator currLayout; int sPid, sFd; KPushButton *ok; KPasswordEdit *pin_box; |