diff options
Diffstat (limited to 'kcontrol/kdm/kdm-conv.cpp')
-rw-r--r-- | kcontrol/kdm/kdm-conv.cpp | 164 |
1 files changed, 82 insertions, 82 deletions
diff --git a/kcontrol/kdm/kdm-conv.cpp b/kcontrol/kdm/kdm-conv.cpp index 71d292c5f..155d5b380 100644 --- a/kcontrol/kdm/kdm-conv.cpp +++ b/kcontrol/kdm/kdm-conv.cpp @@ -23,13 +23,13 @@ #include <sys/types.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qhgroupbox.h> -#include <qvgroupbox.h> -#include <qvbuttongroup.h> -#include <qwhatsthis.h> -#include <qheader.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqhgroupbox.h> +#include <tqvgroupbox.h> +#include <tqvbuttongroup.h> +#include <tqwhatsthis.h> +#include <tqheader.h> #include <kdialog.h> #include <ksimpleconfig.h> @@ -39,122 +39,122 @@ extern KSimpleConfig *config; -KDMConvenienceWidget::KDMConvenienceWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KDMConvenienceWidget::KDMConvenienceWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QString wtstr; + TQString wtstr; - QLabel *paranoia = new QLabel( i18n("<qt><center><font color=red><big><b>Attention!<br>Read help!</b></big></font></center></qt>"), this ); + TQLabel *paranoia = new TQLabel( i18n("<qt><center><font color=red><big><b>Attention!<br>Read help!</b></big></font></center></qt>"), this ); - QSizePolicy vpref( QSizePolicy::Minimum, QSizePolicy::Fixed ); + TQSizePolicy vpref( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); - alGroup = new QVGroupBox( i18n("Enable Au&to-Login"), this ); + alGroup = new TQVGroupBox( i18n("Enable Au&to-Login"), this ); alGroup->setCheckable( true ); alGroup->setSizePolicy( vpref ); - QWhatsThis::add( alGroup, i18n("Turn on the auto-login feature." + TQWhatsThis::add( alGroup, i18n("Turn on the auto-login feature." " This applies only to KDM's graphical login." " Think twice before enabling this!") ); - connect(alGroup, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(alGroup, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - QWidget *hlpw1 = new QWidget( alGroup ); + TQWidget *hlpw1 = new TQWidget( alGroup ); userlb = new KComboBox( hlpw1 ); - u_label = new QLabel( userlb, i18n("Use&r:"), hlpw1 ); - QGridLayout *hlpl1 = new QGridLayout(hlpw1, 2, 2, 0, KDialog::spacingHint()); + u_label = new TQLabel( userlb, i18n("Use&r:"), hlpw1 ); + TQGridLayout *hlpl1 = new TQGridLayout(hlpw1, 2, 2, 0, KDialog::spacingHint()); hlpl1->setColStretch(2, 1); hlpl1->addWidget(u_label, 0, 0); hlpl1->addWidget(userlb, 0, 1); - connect(userlb, SIGNAL(highlighted(int)), SLOT(slotChanged())); + connect(userlb, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotChanged())); wtstr = i18n("Select the user to be logged in automatically."); - QWhatsThis::add( u_label, wtstr ); - QWhatsThis::add( userlb, wtstr ); - delaysb = new QSpinBox( 0, 3600, 5, hlpw1 ); + TQWhatsThis::add( u_label, wtstr ); + TQWhatsThis::add( userlb, wtstr ); + delaysb = new TQSpinBox( 0, 3600, 5, hlpw1 ); delaysb->setSpecialValueText( i18n("delay", "none") ); delaysb->setSuffix( i18n("seconds", " s") ); - d_label = new QLabel( delaysb, i18n("D&elay:"), hlpw1 ); + d_label = new TQLabel( delaysb, i18n("D&elay:"), hlpw1 ); hlpl1->addWidget(d_label, 1, 0); hlpl1->addWidget(delaysb, 1, 1); - connect(delaysb, SIGNAL(valueChanged(int)), SLOT(slotChanged())); + connect(delaysb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged())); wtstr = i18n("The delay (in seconds) before the automatic login kicks in. " "This feature is also known as \"timed login\"."); - QWhatsThis::add( d_label, wtstr ); - QWhatsThis::add( delaysb, wtstr ); - againcb = new QCheckBox( i18n("P&ersistent"), alGroup ); - connect( againcb, SIGNAL(toggled(bool)), SLOT(slotChanged()) ); - QWhatsThis::add( againcb, i18n("Normally, automatic login is performed only " + TQWhatsThis::add( d_label, wtstr ); + TQWhatsThis::add( delaysb, wtstr ); + againcb = new TQCheckBox( i18n("P&ersistent"), alGroup ); + connect( againcb, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()) ); + TQWhatsThis::add( againcb, i18n("Normally, automatic login is performed only " "when KDM starts up. If this is checked, automatic login will kick in " "after finishing a session as well.") ); - autoLockCheck = new QCheckBox( i18n("Loc&k session"), alGroup ); - connect( autoLockCheck, SIGNAL(toggled(bool)), SLOT(slotChanged()) ); - QWhatsThis::add( autoLockCheck, i18n("If checked, the automatically started session " + autoLockCheck = new TQCheckBox( i18n("Loc&k session"), alGroup ); + connect( autoLockCheck, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged()) ); + TQWhatsThis::add( autoLockCheck, i18n("If checked, the automatically started session " "will be locked immediately (provided it is a KDE session). This can " "be used to obtain a super-fast login restricted to one user.") ); - puGroup = new QVButtonGroup(i18n("Preselect User"), this ); + puGroup = new TQVButtonGroup(i18n("Preselect User"), this ); puGroup->setSizePolicy( vpref ); - connect(puGroup, SIGNAL(clicked(int)), SLOT(slotPresChanged())); - connect(puGroup, SIGNAL(clicked(int)), SLOT(slotChanged())); - npRadio = new QRadioButton(i18n("preselected user", "&None"), puGroup); - ppRadio = new QRadioButton(i18n("Prev&ious"), puGroup); - QWhatsThis::add( ppRadio, i18n("Preselect the user that logged in previously. " + connect(puGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotPresChanged())); + connect(puGroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotChanged())); + npRadio = new TQRadioButton(i18n("preselected user", "&None"), puGroup); + ppRadio = new TQRadioButton(i18n("Prev&ious"), puGroup); + TQWhatsThis::add( ppRadio, i18n("Preselect the user that logged in previously. " "Use this if this computer is usually used several consecutive times by one user.") ); - spRadio = new QRadioButton(i18n("Specif&y"), puGroup); - QWhatsThis::add( spRadio, i18n("Preselect the user specified in the combo box below. " + spRadio = new TQRadioButton(i18n("Specif&y"), puGroup); + TQWhatsThis::add( spRadio, i18n("Preselect the user specified in the combo box below. " "Use this if this computer is predominantly used by a certain user.") ); - QWidget *hlpw = new QWidget(puGroup); + TQWidget *hlpw = new TQWidget(puGroup); puserlb = new KComboBox(true, hlpw); - pu_label = new QLabel(puserlb, i18n("Us&er:"), hlpw); - connect(puserlb, SIGNAL(textChanged(const QString &)), SLOT(slotChanged())); + pu_label = new TQLabel(puserlb, i18n("Us&er:"), hlpw); + connect(puserlb, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotChanged())); wtstr = i18n("Select the user to be preselected for login. " "This box is editable, so you can specify an arbitrary non-existent " "user to mislead possible attackers."); - QWhatsThis::add( pu_label, wtstr ); - QWhatsThis::add( puserlb, wtstr ); - QBoxLayout *hlpl = new QHBoxLayout(hlpw, 0, KDialog::spacingHint()); + TQWhatsThis::add( pu_label, wtstr ); + TQWhatsThis::add( puserlb, wtstr ); + TQBoxLayout *hlpl = new TQHBoxLayout(hlpw, 0, KDialog::spacingHint()); hlpl->addWidget(pu_label); hlpl->addWidget(puserlb); hlpl->addStretch( 1 ); - cbjumppw = new QCheckBox(i18n("Focus pass&word"), puGroup); - QWhatsThis::add( cbjumppw, i18n("When this option is on, KDM will place the cursor " + cbjumppw = new TQCheckBox(i18n("Focus pass&word"), puGroup); + TQWhatsThis::add( cbjumppw, i18n("When this option is on, KDM will place the cursor " "in the password field instead of the user field after preselecting a user. " "Use this to save one key press per login, if the preselection usually does not need to " "be changed.") ); - connect(cbjumppw, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(cbjumppw, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - npGroup = new QVGroupBox(i18n("Enable Password-&Less Logins"), this ); + npGroup = new TQVGroupBox(i18n("Enable Password-&Less Logins"), this ); npGroup->setCheckable( true ); - QWhatsThis::add( npGroup, i18n("When this option is checked, the checked users from" + TQWhatsThis::add( npGroup, i18n("When this option is checked, the checked users from" " the list below will be allowed to log in without entering their" " password. This applies only to KDM's graphical login." " Think twice before enabling this!") ); - connect(npGroup, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(npGroup, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - pl_label = new QLabel(i18n("No password re&quired for:"), npGroup); + pl_label = new TQLabel(i18n("No password re&quired for:"), npGroup); npuserlv = new KListView(npGroup); pl_label->setBuddy(npuserlv); - npuserlv->addColumn(QString::null); + npuserlv->addColumn(TQString::null); npuserlv->header()->hide(); - npuserlv->setResizeMode(QListView::LastColumn); - QWhatsThis::add(npuserlv, i18n("Check all users you want to allow a password-less login for." + npuserlv->setResizeMode(TQListView::LastColumn); + TQWhatsThis::add(npuserlv, i18n("Check all users you want to allow a password-less login for." " Entries denoted with '@' are user groups. Checking a group is like checking all users in that group.")); - connect( npuserlv, SIGNAL(clicked( QListViewItem * )), - SLOT(slotChanged()) ); + connect( npuserlv, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotChanged()) ); - btGroup = new QVGroupBox( i18n("Miscellaneous"), this ); + btGroup = new TQVGroupBox( i18n("Miscellaneous"), this ); - cbarlen = new QCheckBox(i18n("Automatically log in again after &X server crash"), btGroup); - QWhatsThis::add( cbarlen, i18n("When this option is on, a user will be" + cbarlen = new TQCheckBox(i18n("Automatically log in again after &X server crash"), btGroup); + TQWhatsThis::add( cbarlen, i18n("When this option is on, a user will be" " logged in again automatically when their session is interrupted by an" " X server crash; note that this can open a security hole: if you use" " a screen locker than KDE's integrated one, this will make" " circumventing a password-secured screen lock possible.") ); - connect(cbarlen, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(cbarlen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - QGridLayout *main = new QGridLayout(this, 5, 2, 10); + TQGridLayout *main = new TQGridLayout(this, 5, 2, 10); main->addWidget(paranoia, 0, 0); main->addWidget(alGroup, 1, 0); main->addWidget(puGroup, 2, 0); @@ -164,23 +164,23 @@ KDMConvenienceWidget::KDMConvenienceWidget(QWidget *parent, const char *name) main->setColStretch(1, 2); main->setRowStretch(3, 1); - connect( userlb, SIGNAL(activated( const QString & )), - SLOT(slotSetAutoUser( const QString & )) ); - connect( puserlb, SIGNAL(textChanged( const QString & )), - SLOT(slotSetPreselUser( const QString & )) ); - connect( npuserlv, SIGNAL(clicked( QListViewItem * )), - SLOT(slotUpdateNoPassUser( QListViewItem * )) ); + connect( userlb, TQT_SIGNAL(activated( const TQString & )), + TQT_SLOT(slotSetAutoUser( const TQString & )) ); + connect( puserlb, TQT_SIGNAL(textChanged( const TQString & )), + TQT_SLOT(slotSetPreselUser( const TQString & )) ); + connect( npuserlv, TQT_SIGNAL(clicked( TQListViewItem * )), + TQT_SLOT(slotUpdateNoPassUser( TQListViewItem * )) ); } void KDMConvenienceWidget::makeReadOnly() { - ((QWidget*)alGroup->child("qt_groupbox_checkbox"))->setEnabled(false); + ((TQWidget*)alGroup->child("qt_groupbox_checkbox"))->setEnabled(false); userlb->setEnabled(false); delaysb->setEnabled(false); againcb->setEnabled(false); autoLockCheck->setEnabled(false); - ((QWidget*)npGroup->child("qt_groupbox_checkbox"))->setEnabled(false); + ((TQWidget*)npGroup->child("qt_groupbox_checkbox"))->setEnabled(false); npuserlv->setEnabled(false); cbarlen->setEnabled(false); npRadio->setEnabled(false); @@ -243,7 +243,7 @@ void KDMConvenienceWidget::load() cbarlen->setChecked(config->readBoolEntry( "AutoReLogin", false) ); config->setGroup("X-:*-Greeter"); - QString presstr = config->readEntry( "PreselectUser", "None" ); + TQString presstr = config->readEntry( "PreselectUser", "None" ); if (presstr == "Previous") ppRadio->setChecked(true); else if (presstr == "Default") @@ -280,22 +280,22 @@ void KDMConvenienceWidget::slotChanged() emit changed(true); } -void KDMConvenienceWidget::slotSetAutoUser( const QString &user ) +void KDMConvenienceWidget::slotSetAutoUser( const TQString &user ) { autoUser = user; } -void KDMConvenienceWidget::slotSetPreselUser( const QString &user ) +void KDMConvenienceWidget::slotSetPreselUser( const TQString &user ) { preselUser = user; } -void KDMConvenienceWidget::slotUpdateNoPassUser( QListViewItem *item ) +void KDMConvenienceWidget::slotUpdateNoPassUser( TQListViewItem *item ) { if ( !item ) return; - QCheckListItem *itm = (QCheckListItem *)item; - QStringList::iterator it = noPassUsers.find( itm->text() ); + TQCheckListItem *itm = (TQCheckListItem *)item; + TQStringList::iterator it = noPassUsers.find( itm->text() ); if (itm->isOn()) { if (it == noPassUsers.end()) noPassUsers.append( itm->text() ); @@ -316,9 +316,9 @@ void KDMConvenienceWidget::slotClearUsers() puserlb->insertItem(preselUser); } -void KDMConvenienceWidget::slotAddUsers(const QMap<QString,int> &users) +void KDMConvenienceWidget::slotAddUsers(const TQMap<TQString,int> &users) { - QMapConstIterator<QString,int> it; + TQMapConstIterator<TQString,int> it; for (it = users.begin(); it != users.end(); ++it) { if (it.data() > 0) { if (it.key() != autoUser) @@ -327,7 +327,7 @@ void KDMConvenienceWidget::slotAddUsers(const QMap<QString,int> &users) puserlb->insertItem(it.key()); } if (it.data() != 0) - (new QCheckListItem(npuserlv, it.key(), QCheckListItem::CheckBox))-> + (new TQCheckListItem(npuserlv, it.key(), TQCheckListItem::CheckBox))-> setOn(noPassUsers.find(it.key()) != noPassUsers.end()); } @@ -342,9 +342,9 @@ void KDMConvenienceWidget::slotAddUsers(const QMap<QString,int> &users) puserlb->setCurrentItem(preselUser); } -void KDMConvenienceWidget::slotDelUsers(const QMap<QString,int> &users) +void KDMConvenienceWidget::slotDelUsers(const TQMap<TQString,int> &users) { - QMapConstIterator<QString,int> it; + TQMapConstIterator<TQString,int> it; for (it = users.begin(); it != users.end(); ++it) { if (it.data() > 0) { if (it.key() != autoUser && userlb->listBox()) |