diff options
Diffstat (limited to 'kuser/propdlg.cpp')
-rw-r--r-- | kuser/propdlg.cpp | 264 |
1 files changed, 132 insertions, 132 deletions
diff --git a/kuser/propdlg.cpp b/kuser/propdlg.cpp index 726cec1..17c96d4 100644 --- a/kuser/propdlg.cpp +++ b/kuser/propdlg.cpp @@ -21,35 +21,35 @@ #include <stdio.h> #include <stdlib.h> -#include <qdatetime.h> -#include <qwhatsthis.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qfile.h> +#include <tqdatetime.h> +#include <tqwhatsthis.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqfile.h> #include <kseparator.h> #include <kmessagebox.h> #include <kdebug.h> -#include <qvalidator.h> +#include <tqvalidator.h> #include "propdlg.h" #include "pwddlg.h" #include "kglobal_.h" #include "misc.h" -void propdlg::addRow(QWidget *parent, QGridLayout *layout, int row, - QWidget *widget, const QString &label, const QString &what, +void propdlg::addRow(TQWidget *parent, TQGridLayout *layout, int row, + TQWidget *widget, const TQString &label, const TQString &what, bool two_column, bool nochange) { - QLabel *lab = new QLabel(widget, label, parent); + TQLabel *lab = new TQLabel(widget, label, parent); lab->setMinimumSize(lab->sizeHint()); widget->setMinimumSize(widget->sizeHint()); layout->addWidget(lab, row, 0); if (!what.isEmpty()) { - QWhatsThis::add(lab, what); - QWhatsThis::add(widget, what); + TQWhatsThis::add(lab, what); + TQWhatsThis::add(widget, what); } if (two_column) layout->addMultiCellWidget(widget, row, row, 1, 2); @@ -57,18 +57,18 @@ void propdlg::addRow(QWidget *parent, QGridLayout *layout, int row, layout->addWidget(widget, row, 1); if ( !nochange || ro ) return; - QCheckBox *nc = new QCheckBox( i18n("Do not change"), parent ); + TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); layout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ widget ] = nc; } -KIntSpinBox *propdlg::addDaysGroup(QWidget *parent, QGridLayout *layout, int row, - const QString &title, bool never) +KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *layout, int row, + const TQString &title, bool never) { KIntSpinBox *days; - QLabel *label = new QLabel( title, parent ); + TQLabel *label = new TQLabel( title, parent ); layout->addMultiCellWidget( label, row, row, 0, 1, AlignRight ); days = new KIntSpinBox( parent ); @@ -86,9 +86,9 @@ KIntSpinBox *propdlg::addDaysGroup(QWidget *parent, QGridLayout *layout, int row } layout->addWidget( days, row, 2 ); - connect(days, SIGNAL(valueChanged(int)), this, SLOT(changed())); + connect(days, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); - QCheckBox *nc = new QCheckBox( i18n("Do not change"), parent ); + TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); layout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ days ] = nc; @@ -100,66 +100,66 @@ void propdlg::initDlg() { ro = kug->getUsers().getCaps() & KU::KUsers::Cap_ReadOnly; - QString whatstr; + TQString whatstr; // Tab 1: User Info { - QFrame *frame = addPage(i18n("User Info")); - QGridLayout *layout = new QGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQFrame *frame = addPage(i18n("User Info")); + TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; frontpage = frame; frontlayout = layout; - lbuser = new QLabel(frame); + lbuser = new TQLabel(frame); // whatstr = i18n("WHAT IS THIS: User login"); addRow(frame, layout, row++, lbuser, i18n("User login:"), whatstr, false, false); leid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: User Id"); - leid->setValidator(new QIntValidator(frame)); + leid->setValidator(new TQIntValidator(frame)); addRow(frame, layout, row++, leid, i18n("&User ID:"), whatstr); - connect(leid, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); if ( !ro ) { - pbsetpwd = new QPushButton(i18n("Set &Password..."), frame); + pbsetpwd = new TQPushButton(i18n("Set &Password..."), frame); layout->addWidget(pbsetpwd, 0, 2); - connect(pbsetpwd, SIGNAL(clicked()), this, SLOT(setpwd())); + connect(pbsetpwd, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpwd())); } lefname = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Full Name"); addRow(frame, layout, row++, lefname, i18n("Full &name:"), whatstr); - connect(lefname, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lefname, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lefname->setFocus(); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_InetOrg ) { lesurname = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Surname"); addRow(frame, layout, row++, lesurname, i18n("Surname:"), whatstr); - connect(lesurname, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lesurname, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lemail = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Email"); addRow(frame, layout, row++, lemail, i18n("Email address:"), whatstr); - connect(lemail, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lemail, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); } leshell = new KComboBox(true, frame); leshell->clear(); leshell->insertItem(i18n("<Empty>")); - QStringList shells = readShells(); + TQStringList shells = readShells(); shells.sort(); leshell->insertStringList(shells); - connect(leshell, SIGNAL(activated(const QString &)), this, SLOT(changed())); - connect(leshell, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leshell, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(changed())); + connect(leshell, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Login Shell"); addRow(frame, layout, row++, leshell, i18n("&Login shell:"), whatstr); lehome = new KLineEdit(frame); - connect(lehome, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lehome, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Home Directory"); addRow(frame, layout, row++, lehome, i18n("&Home folder:"), whatstr); @@ -167,48 +167,48 @@ void propdlg::initDlg() // differently than Linux. if ( kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) { leoffice = new KLineEdit(frame); - connect(leoffice, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leoffice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office"); addRow(frame, layout, row++, leoffice, i18n("&Office:"), whatstr); leophone = new KLineEdit(frame); - connect(leophone, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leophone, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office Phone"); addRow(frame, layout, row++, leophone, i18n("Offi&ce Phone:"), whatstr); lehphone = new KLineEdit(frame); - connect(lehphone, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lehphone, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Home Phone"); addRow(frame, layout, row++, lehphone, i18n("Ho&me Phone:"), whatstr); leclass = new KLineEdit(frame); - connect(leclass, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leclass, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Login class"); addRow(frame, layout, row++, leclass, i18n("Login class:"), whatstr, true); } else { leoffice1 = new KLineEdit(frame); - connect(leoffice1, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leoffice1, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office1"); addRow(frame, layout, row++, leoffice1, i18n("&Office #1:"), whatstr); leoffice2 = new KLineEdit(frame); - connect(leoffice2, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leoffice2, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office2"); addRow(frame, layout, row++, leoffice2, i18n("O&ffice #2:"), whatstr); leaddress = new KLineEdit(frame); - connect(leaddress, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leaddress, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Address"); addRow(frame, layout, row++, leaddress, i18n("&Address:"), whatstr); } - cbdisabled = new QCheckBox(frame); - connect(cbdisabled, SIGNAL(stateChanged(int)), this, SLOT(changed())); + cbdisabled = new TQCheckBox(frame); + connect(cbdisabled, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); addRow(frame, layout, row++, cbdisabled, i18n("Account &disabled"), whatstr); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX ) { - cbposix = new QCheckBox(frame); - connect(cbposix, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(cbposix, SIGNAL(stateChanged(int)), this, SLOT(cbposixChanged())); + cbposix = new TQCheckBox(frame); + connect(cbposix, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(cbposix, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(cbposixChanged())); addRow(frame, layout, row++, cbposix, i18n("Disable &POSIX account information"), whatstr); } else { cbposix = 0; @@ -221,19 +221,19 @@ void propdlg::initDlg() kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) { // Tab 2 : Password Management - QFrame *frame = addPage(i18n("Password Management")); - QGridLayout *layout = new QGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQFrame *frame = addPage(i18n("Password Management")); + TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; - QDateTime time; - leslstchg = new QLabel(frame); - addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), QString::null, true); + TQDateTime time; + leslstchg = new TQLabel(frame); + addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), TQString::null, true); layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow ) { - layout->addWidget( new QLabel( i18n("POSIX parameters:"), frame ), row++, 0 ); + layout->addWidget( new TQLabel( i18n("POSIX parameters:"), frame ), row++, 0 ); lesmin = addDaysGroup(frame, layout, row++, i18n("Time before password may ¬ be changed after last password change:"), false); lesmax = addDaysGroup(frame, layout, row++, i18n("Time when password &expires after last password change:") ); leswarn = addDaysGroup(frame, layout, row++, i18n("Time before password expires to &issue an expire warning:")); @@ -243,104 +243,104 @@ void propdlg::initDlg() } /* if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - layout->addWidget( new QLabel( "SAMBA parameters:", frame ), row++, 0 ); + layout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 ); layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; } */ - QLabel *label = new QLabel( i18n("&Account will expire on:"), frame ); + TQLabel *label = new TQLabel( i18n("&Account will expire on:"), frame ); layout->addWidget( label, row, 0 ); lesexpire = new KDateTimeWidget( frame ); label->setBuddy( lesexpire ); layout->addMultiCellWidget( lesexpire, row, row, 1, 2); - cbexpire = new QCheckBox( i18n("Never"), frame ); + cbexpire = new TQCheckBox( i18n("Never"), frame ); layout->addWidget( cbexpire, row++, 3 ); - connect( lesexpire, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(changed()) ); - connect( cbexpire, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); - connect( cbexpire, SIGNAL(toggled(bool)), lesexpire, SLOT(setDisabled(bool)) ); + connect( lesexpire, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(changed()) ); + connect( cbexpire, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); + connect( cbexpire, TQT_SIGNAL(toggled(bool)), lesexpire, TQT_SLOT(setDisabled(bool)) ); } // Tab 3: Samba if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - QFrame *frame = addPage(i18n("Samba")); - QGridLayout *layout = new QGridLayout(frame, 10, 4, marginHint(), spacingHint()); + TQFrame *frame = addPage(i18n("Samba")); + TQGridLayout *layout = new TQGridLayout(frame, 10, 4, marginHint(), spacingHint()); int row = 0; lerid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Rid"); - lerid->setValidator(new QIntValidator(frame)); + lerid->setValidator(new TQIntValidator(frame)); addRow(frame, layout, row++, lerid, i18n("RID:"), whatstr); - connect(lerid, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lerid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leliscript = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, leliscript, i18n("Login script:"), whatstr); - connect(leliscript, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leliscript, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leprofile = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, leprofile, i18n("Profile path:"), whatstr); - connect(leprofile, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leprofile, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lehomedrive = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, lehomedrive, i18n("Home drive:"), whatstr); - connect(lehomedrive, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lehomedrive, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lehomepath = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, lehomepath, i18n("Home path:"), whatstr); - connect(lehomepath, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lehomepath, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leworkstations = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, leworkstations, i18n("User workstations:"), whatstr); - connect(leworkstations, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leworkstations, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); ledomain = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, ledomain, i18n("Domain name:"), whatstr); - connect(ledomain, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(ledomain, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); ledomsid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, ledomsid, i18n("Domain SID:"), whatstr); - connect(ledomsid, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(ledomsid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); - cbsamba = new QCheckBox(frame); - connect(cbsamba, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(cbsamba, SIGNAL(stateChanged(int)), this, SLOT(cbsambaChanged())); + cbsamba = new TQCheckBox(frame); + connect(cbsamba, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(cbsamba, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(cbsambaChanged())); addRow(frame, layout, row++, cbsamba, i18n("Disable &Samba account information"), whatstr); } // Tab 4: Groups { - QFrame *frame = addPage(i18n("Groups")); - QGridLayout *layout = new QGridLayout(frame, 2, 2, marginHint(), spacingHint()); + TQFrame *frame = addPage(i18n("Groups")); + TQGridLayout *layout = new TQGridLayout(frame, 2, 2, marginHint(), spacingHint()); lstgrp = new KListView(frame); lstgrp->setFullWidth(true); // Single column, full widget width. lstgrp->addColumn( i18n("Groups") ); - if ( ro ) lstgrp->setSelectionMode( QListView::NoSelection ); -// QString whatstr = i18n("Select the groups that this user belongs to."); - QWhatsThis::add(lstgrp, whatstr); + if ( ro ) lstgrp->setSelectionMode( TQListView::NoSelection ); +// TQString whatstr = i18n("Select the groups that this user belongs to."); + TQWhatsThis::add(lstgrp, whatstr); layout->addMultiCellWidget(lstgrp, 0, 0, 0, 1); - leprigr = new QLabel( i18n("Primary group: "), frame ); + leprigr = new TQLabel( i18n("Primary group: "), frame ); layout->addWidget( leprigr, 1, 0 ); if ( !ro ) { - pbprigr = new QPushButton( i18n("Set as Primary"), frame ); + pbprigr = new TQPushButton( i18n("Set as Primary"), frame ); layout->addWidget( pbprigr, 1, 1 ); - connect( pbprigr, SIGNAL(clicked()), this, SLOT(setpgroup()) ); + connect( pbprigr, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpgroup()) ); } - connect( lstgrp, SIGNAL(clicked(QListViewItem *)), this, SLOT(gchanged()) ); + connect( lstgrp, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(gchanged()) ); } } -propdlg::propdlg( const QPtrList<KU::KUser> &users, - QWidget *parent, const char *name ) : +propdlg::propdlg( const TQPtrList<KU::KUser> &users, + TQWidget *parent, const char *name ) : KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, parent, name, true) { @@ -355,7 +355,7 @@ propdlg::propdlg( const QPtrList<KU::KUser> &users, } propdlg::propdlg( KU::KUser *AUser, bool fixedprivgroup, - QWidget *parent, const char *name ) : + TQWidget *parent, const char *name ) : KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, parent, name, true) { @@ -373,7 +373,7 @@ propdlg::~propdlg() void propdlg::cbposixChanged() { - bool posix = !( cbposix->state() == QButton::On ); + bool posix = !( cbposix->state() == TQButton::On ); leid->setEnabled( posix & ( mUsers.getFirst() == mUsers.getLast() ) ); leshell->setEnabled( posix ); lehome->setEnabled( posix ); @@ -387,7 +387,7 @@ void propdlg::cbposixChanged() void propdlg::cbsambaChanged() { - bool samba = !( cbsamba->state() == QButton::On ); + bool samba = !( cbsamba->state() == TQButton::On ); lerid->setEnabled( samba & ( mUsers.getFirst() == mUsers.getLast() ) ); leliscript->setEnabled( samba ); leprofile->setEnabled( samba ); @@ -398,7 +398,7 @@ void propdlg::cbsambaChanged() ledomsid->setEnabled( samba ); } -void propdlg::setLE( KLineEdit *le, const QString &val, bool first ) +void propdlg::setLE( KLineEdit *le, const TQString &val, bool first ) { if ( first ) { le->setText( val ); @@ -415,7 +415,7 @@ void propdlg::setLE( KLineEdit *le, const QString &val, bool first ) } } -void propdlg::setCB( QCheckBox *cb, bool val, bool first ) +void propdlg::setCB( TQCheckBox *cb, bool val, bool first ) { if ( first ) { cb->setChecked( val ); @@ -455,7 +455,7 @@ void propdlg::selectuser() oldrid = user->getSID().getRID(); oldshell = user->getShell(); lstchg = user->getLastChange(); - QDateTime datetime; + TQDateTime datetime; datetime.setTime_t( lstchg ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow || kug->getUsers().getCaps() & KU::KUsers::Cap_Samba || @@ -466,10 +466,10 @@ void propdlg::selectuser() if ( one ) { lbuser->setText( user->getName() ); - leid->setText( QString::number( user->getUID() ) ); + leid->setText( TQString::number( user->getUID() ) ); if ( ro ) leid->setReadOnly( true ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - lerid->setText( QString::number( user->getSID().getRID() ) ); + lerid->setText( TQString::number( user->getSID().getRID() ) ); if ( ro ) lerid->setReadOnly( true ); } } else { @@ -483,12 +483,12 @@ void propdlg::selectuser() while ( user ) { setLE( lefname, user->getFullName(), first ); - QString home; + TQString home; home = user->getHomeDir(); if ( !one ) home.replace( user->getName(), "%U" ); setLE( lehome, home, first ); - QString shell = user->getShell(); + TQString shell = user->getShell(); if ( first ) { if ( !shell.isEmpty() ) { bool tested = false; @@ -521,7 +521,7 @@ void propdlg::selectuser() if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { setLE( leliscript, user->getLoginScript(), first ); - QString profile; + TQString profile; profile = user->getProfilePath(); if ( !one ) profile.replace( user->getName(), "%U" ); setLE( leprofile, profile, first ); @@ -544,7 +544,7 @@ void propdlg::selectuser() lstchg = 0; } - QDateTime expire; + TQDateTime expire; expire.setTime_t( user->getExpire() ); kdDebug() << "expiration: " << user->getExpire() << endl; setCB( cbexpire, (int) expire.toTime_t() == -1, first ); @@ -594,8 +594,8 @@ void propdlg::loadgroups( bool fixedprivgroup ) KU::KGroup *group = kug->getGroups().first(); while ( group ) { - QString groupName = group->getName(); - QCheckListItem *item = new QCheckListItem(lstgrp, groupName, QCheckListItem::CheckBox); + TQString groupName = group->getName(); + TQCheckListItem *item = new TQCheckListItem(lstgrp, groupName, TQCheckListItem::CheckBox); KU::KUser *user = mUsers.first(); while ( user ) { bool prigr = @@ -618,7 +618,7 @@ void propdlg::loadgroups( bool fixedprivgroup ) else if ( item->isOn() != on ) { item->setTristate( true ); - item->setState( QCheckListItem::NoChange ); + item->setState( TQCheckListItem::NoChange ); } user = mUsers.next(); } @@ -629,7 +629,7 @@ void propdlg::loadgroups( bool fixedprivgroup ) KU::KUser *user = mUsers.first(); kdDebug() << "privgroup: " << user->getName() << endl; if ( !wasprivgr ) { - QCheckListItem *item = new QCheckListItem(lstgrp, user->getName(), QCheckListItem::CheckBox); + TQCheckListItem *item = new TQCheckListItem(lstgrp, user->getName(), TQCheckListItem::CheckBox); item->setOn(true); item->setEnabled(false); primaryGroup = user->getName(); @@ -641,19 +641,19 @@ void propdlg::loadgroups( bool fixedprivgroup ) void propdlg::setpgroup() { isgchanged = true; - QCheckListItem *item; - item = (QCheckListItem *) lstgrp->selectedItem(); + TQCheckListItem *item; + item = (TQCheckListItem *) lstgrp->selectedItem(); if ( item == 0 || item->text() == primaryGroup ) return; bool prevPrimaryGroupWasOn = primaryGroupWasOn; - primaryGroup = ((QCheckListItem *) lstgrp->selectedItem())->text(); + primaryGroup = ((TQCheckListItem *) lstgrp->selectedItem())->text(); - item = (QCheckListItem *) lstgrp->firstChild(); + item = (TQCheckListItem *) lstgrp->firstChild(); while(item) { - QString groupName = item->text(); + TQString groupName = item->text(); if ( !item->isEnabled() ) { item->setEnabled(true); @@ -668,14 +668,14 @@ void propdlg::setpgroup() item->repaint(); } - item = (QCheckListItem *) item->nextSibling(); + item = (TQCheckListItem *) item->nextSibling(); } leprigr->setText( i18n("Primary group: ") + primaryGroup ); } void propdlg::changed() { - QWidget *widget = (QWidget*) sender(); + TQWidget *widget = (TQWidget*) sender(); if ( mNoChanges.contains( widget ) ) mNoChanges[ widget ]->setChecked( false ); ischanged = true; kdDebug() << "changed" << endl; @@ -686,30 +686,30 @@ void propdlg::gchanged() isgchanged = true; } -QString propdlg::mergeLE( KLineEdit *le, const QString &val, bool one ) +TQString propdlg::mergeLE( KLineEdit *le, const TQString &val, bool one ) { - QCheckBox *cb = 0; + TQCheckBox *cb = 0; if ( mNoChanges.contains( le ) ) cb = mNoChanges[ le ]; return ( one || ( cb && !cb->isChecked() ) ) ? le->text() : val; } int propdlg::mergeSB( KIntSpinBox *sb, int val, bool one ) { - QCheckBox *cb = 0; + TQCheckBox *cb = 0; if ( mNoChanges.contains( sb ) ) cb = mNoChanges[ sb ]; return ( one || ( cb && !cb->isChecked() ) ) ? sb->value() : val; } void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) { - QDateTime epoch ; + TQDateTime epoch ; epoch.setTime_t(0); bool one = ( mUsers.getFirst() == mUsers.getLast() ); bool posix, samba = false; newuser->copy( user ); - if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX && cbposix->state() != QButton::NoChange ) { + if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX && cbposix->state() != TQButton::NoChange ) { if ( cbposix->isChecked() ) newuser->setCaps( newuser->getCaps() & ~KU::KUser::Cap_POSIX ); else @@ -727,7 +727,7 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) } newuser->setFullName( mergeLE( lefname, user->getFullName(), one ) ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - if ( cbsamba->state() != QButton::NoChange ) { + if ( cbsamba->state() != TQButton::NoChange ) { if ( cbsamba->isChecked() ) newuser->setCaps( newuser->getCaps() & ~KU::KUser::Cap_Samba ); else @@ -743,17 +743,17 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) } newuser->setSID( sid ); newuser->setLoginScript( samba ? - mergeLE( leliscript, user->getLoginScript(), one ) : QString::null ); + mergeLE( leliscript, user->getLoginScript(), one ) : TQString::null ); newuser->setProfilePath( samba ? - mergeLE( leprofile, user->getProfilePath(), one ).replace( "%U", newuser->getName() ) : QString::null ); + mergeLE( leprofile, user->getProfilePath(), one ).replace( "%U", newuser->getName() ) : TQString::null ); newuser->setHomeDrive( samba ? - mergeLE( lehomedrive, user->getHomeDrive(), one ) : QString::null ); + mergeLE( lehomedrive, user->getHomeDrive(), one ) : TQString::null ); newuser->setHomePath( samba ? - mergeLE( lehomepath, user->getHomePath(), one ).replace( "%U", newuser->getName() ) : QString::null ); + mergeLE( lehomepath, user->getHomePath(), one ).replace( "%U", newuser->getName() ) : TQString::null ); newuser->setWorkstations( samba ? - mergeLE( leworkstations, user->getWorkstations(), one ) : QString::null ); + mergeLE( leworkstations, user->getWorkstations(), one ) : TQString::null ); newuser->setDomain( samba ? - mergeLE( ledomain, user->getDomain(), one ) : QString::null ); + mergeLE( ledomain, user->getDomain(), one ) : TQString::null ); } if ( kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) { @@ -769,7 +769,7 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) newuser->setHomeDir( posix ? mergeLE( lehome, user->getHomeDir(), one ).replace( "%U", newuser->getName() ) : - QString::null ); + TQString::null ); if ( posix ) { if ( leshell->currentItem() == 0 && ismoreshells ) { newuser->setShell( user->getShell() ); @@ -777,15 +777,15 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) ( leshell->currentItem() == 0 && !ismoreshells ) || ( leshell->currentItem() == 1 && ismoreshells ) ) { - newuser->setShell( QString::null ); + newuser->setShell( TQString::null ); } else { // TODO: Check shell. newuser->setShell( leshell->currentText() ); } } else - newuser->setShell( QString::null ); + newuser->setShell( TQString::null ); - newuser->setDisabled( (cbdisabled->state() == QButton::NoChange) ? user->getDisabled() : cbdisabled->isChecked() ); + newuser->setDisabled( (cbdisabled->state() == TQButton::NoChange) ? user->getDisabled() : cbdisabled->isChecked() ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_InetOrg ) { newuser->setSurname( mergeLE( lesurname, user->getSurname(), one ) ); @@ -804,13 +804,13 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) ( (kug->getUsers().getCaps() & KU::KUsers::Cap_BSD) && posix ) ) { switch ( cbexpire->state() ) { - case QButton::NoChange: + case TQButton::NoChange: newuser->setExpire( user->getExpire() ); break; - case QButton::On: + case TQButton::On: newuser->setExpire( -1 ); break; - case QButton::Off: + case TQButton::Off: newuser->setExpire( !one && lesexpire->dateTime().toTime_t() == 0 ? user->getExpire() : lesexpire->dateTime().toTime_t() ); break; @@ -834,14 +834,14 @@ bool propdlg::saveg() { if ( !isgchanged ) return true; - QCheckListItem *item = (QCheckListItem *) lstgrp->firstChild(); + TQCheckListItem *item = (TQCheckListItem *) lstgrp->firstChild(); KU::KGroup *group; while(item) { kdDebug() << "saveg: group name: " << item->text() << endl; group = kug->getGroups().lookup(item->text()); - if ( group && item->state() != QCheckListItem::NoChange ) { + if ( group && item->state() != TQCheckListItem::NoChange ) { KU::KGroup newgroup( group ); bool mod = false; @@ -860,16 +860,16 @@ bool propdlg::saveg() if ( mod ) kug->getGroups().mod( group, newgroup ); } - item = (QCheckListItem *) item->nextSibling(); + item = (TQCheckListItem *) item->nextSibling(); } return true; } -bool propdlg::checkShell(const QString &shell) +bool propdlg::checkShell(const TQString &shell) { if (shell.isEmpty()) return true; - QStringList shells = readShells(); + TQStringList shells = readShells(); return shells.contains(shell); } @@ -909,11 +909,11 @@ void propdlg::setpwd() { pwddlg pd( this ); - if ( pd.exec() == QDialog::Accepted ) { + if ( pd.exec() == TQDialog::Accepted ) { ischanged = true; newpass = pd.getPassword(); lstchg = now(); - QDateTime datetime; + TQDateTime datetime; datetime.setTime_t( lstchg ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow || kug->getUsers().getCaps() & KU::KUsers::Cap_Samba || @@ -957,7 +957,7 @@ void propdlg::slotOk() } } - QString newshell; + TQString newshell; if (leshell->currentItem() != 0) newshell = leshell->currentText(); @@ -968,7 +968,7 @@ void propdlg::slotOk() i18n("<p>The shell %1 is not yet listed in the file %2. " "In order to use this shell you must add it to " "this file first." - "<p>Do you want to add it now?").arg(newshell).arg(QFile::decodeName(SHELL_FILE)), + "<p>Do you want to add it now?").arg(newshell).arg(TQFile::decodeName(SHELL_FILE)), i18n("Unlisted Shell"), i18n("&Add Shell"), i18n("Do &Not Add")); |