diff options
Diffstat (limited to 'kuser/propdlg.cpp')
-rw-r--r-- | kuser/propdlg.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/kuser/propdlg.cpp b/kuser/propdlg.cpp index e1fb80e..1a375c5 100644 --- a/kuser/propdlg.cpp +++ b/kuser/propdlg.cpp @@ -38,38 +38,38 @@ #include "kglobal_.h" #include "misc.h" -void propdlg::addRow(TQWidget *parent, TQGridLayout *tqlayout, int row, +void propdlg::addRow(TQWidget *parent, TQGridLayout *layout, int row, TQWidget *widget, const TQString &label, const TQString &what, bool two_column, bool nochange) { TQLabel *lab = new TQLabel(widget, label, parent); lab->setMinimumSize(lab->sizeHint()); widget->setMinimumSize(widget->sizeHint()); - tqlayout->addWidget(lab, row, 0); + layout->addWidget(lab, row, 0); if (!what.isEmpty()) { TQWhatsThis::add(lab, what); TQWhatsThis::add(widget, what); } if (two_column) - tqlayout->addMultiCellWidget(widget, row, row, 1, 2); + layout->addMultiCellWidget(widget, row, row, 1, 2); else - tqlayout->addWidget(widget, row, 1); + layout->addWidget(widget, row, 1); if ( !nochange || ro ) return; TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); - tqlayout->addWidget( nc, row, 3 ); + layout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ widget ] = nc; } -KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *tqlayout, int row, +KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *layout, int row, const TQString &title, bool never) { KIntSpinBox *days; TQLabel *label = new TQLabel( title, parent ); - tqlayout->addMultiCellWidget( label, row, row, 0, 1, AlignRight ); + layout->addMultiCellWidget( label, row, row, 0, 1, AlignRight ); days = new KIntSpinBox( parent ); label->setBuddy( days ); @@ -84,12 +84,12 @@ KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *tqlayout, int { days->setMinValue( 0 ); } - tqlayout->addWidget( days, row, 2 ); + layout->addWidget( days, row, 2 ); connect(days, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); - tqlayout->addWidget( nc, row, 3 ); + layout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ days ] = nc; @@ -105,44 +105,44 @@ void propdlg::initDlg() // Tab 1: User Info { TQFrame *frame = addPage(i18n("User Info")); - TQGridLayout *tqlayout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; frontpage = frame; - fronttqlayout = tqlayout; + frontlayout = layout; lbuser = new TQLabel(frame); // whatstr = i18n("WHAT IS THIS: User login"); - addRow(frame, tqlayout, row++, lbuser, i18n("User login:"), whatstr, false, false); + 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 TQIntValidator(TQT_TQOBJECT(frame))); - addRow(frame, tqlayout, row++, leid, i18n("&User ID:"), whatstr); + addRow(frame, layout, row++, leid, i18n("&User ID:"), whatstr); connect(leid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); if ( !ro ) { pbsetpwd = new TQPushButton(i18n("Set &Password..."), frame); - tqlayout->addWidget(pbsetpwd, 0, 2); + layout->addWidget(pbsetpwd, 0, 2); connect(pbsetpwd, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpwd())); } lefname = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Full Name"); - addRow(frame, tqlayout, row++, lefname, i18n("Full &name:"), whatstr); + addRow(frame, layout, row++, lefname, i18n("Full &name:"), whatstr); 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, tqlayout, row++, lesurname, i18n("Surname:"), whatstr); + addRow(frame, layout, row++, lesurname, i18n("Surname:"), whatstr); connect(lesurname, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lemail = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Email"); - addRow(frame, tqlayout, row++, lemail, i18n("Email address:"), whatstr); + addRow(frame, layout, row++, lemail, i18n("Email address:"), whatstr); connect(lemail, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); } @@ -156,12 +156,12 @@ void propdlg::initDlg() 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, tqlayout, row++, leshell, i18n("&Login shell:"), whatstr); + addRow(frame, layout, row++, leshell, i18n("&Login shell:"), whatstr); lehome = new KLineEdit(frame); connect(lehome, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Home Directory"); - addRow(frame, tqlayout, row++, lehome, i18n("&Home folder:"), whatstr); + addRow(frame, layout, row++, lehome, i18n("&Home folder:"), whatstr); // FreeBSD appears to use the comma separated fields in the GECOS entry // differently than Linux. @@ -169,47 +169,47 @@ void propdlg::initDlg() leoffice = new KLineEdit(frame); connect(leoffice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office"); - addRow(frame, tqlayout, row++, leoffice, i18n("&Office:"), whatstr); + addRow(frame, layout, row++, leoffice, i18n("&Office:"), whatstr); leophone = new KLineEdit(frame); connect(leophone, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office Phone"); - addRow(frame, tqlayout, row++, leophone, i18n("Offi&ce Phone:"), whatstr); + addRow(frame, layout, row++, leophone, i18n("Offi&ce Phone:"), whatstr); lehphone = new KLineEdit(frame); connect(lehphone, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Home Phone"); - addRow(frame, tqlayout, row++, lehphone, i18n("Ho&me Phone:"), whatstr); + addRow(frame, layout, row++, lehphone, i18n("Ho&me Phone:"), whatstr); leclass = new KLineEdit(frame); connect(leclass, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Login class"); - addRow(frame, tqlayout, row++, leclass, i18n("Login class:"), whatstr, true); + addRow(frame, layout, row++, leclass, i18n("Login class:"), whatstr, true); } else { leoffice1 = new KLineEdit(frame); connect(leoffice1, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office1"); - addRow(frame, tqlayout, row++, leoffice1, i18n("&Office #1:"), whatstr); + addRow(frame, layout, row++, leoffice1, i18n("&Office #1:"), whatstr); leoffice2 = new KLineEdit(frame); connect(leoffice2, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office2"); - addRow(frame, tqlayout, row++, leoffice2, i18n("O&ffice #2:"), whatstr); + addRow(frame, layout, row++, leoffice2, i18n("O&ffice #2:"), whatstr); leaddress = new KLineEdit(frame); connect(leaddress, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Address"); - addRow(frame, tqlayout, row++, leaddress, i18n("&Address:"), whatstr); + addRow(frame, layout, row++, leaddress, i18n("&Address:"), whatstr); } cbdisabled = new TQCheckBox(frame); connect(cbdisabled, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); - addRow(frame, tqlayout, row++, cbdisabled, i18n("Account &disabled"), whatstr); + addRow(frame, layout, row++, cbdisabled, i18n("Account &disabled"), whatstr); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX ) { 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, tqlayout, row++, cbposix, i18n("Disable &POSIX account information"), whatstr); + addRow(frame, layout, row++, cbposix, i18n("Disable &POSIX account information"), whatstr); } else { cbposix = 0; } @@ -222,40 +222,40 @@ void propdlg::initDlg() // Tab 2 : Password Management TQFrame *frame = addPage(i18n("Password Management")); - TQGridLayout *tqlayout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; TQDateTime time; leslstchg = new TQLabel(frame); - addRow(frame, tqlayout, row++, leslstchg, i18n("Last password change:"), TQString(), true); + addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), TQString(), true); - tqlayout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); + layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow ) { - tqlayout->addWidget( new TQLabel( i18n("POSIX parameters:"), frame ), row++, 0 ); - lesmin = addDaysGroup(frame, tqlayout, row++, i18n("Time before password may ¬ be changed after last password change:"), false); - lesmax = addDaysGroup(frame, tqlayout, row++, i18n("Time when password &expires after last password change:") ); - leswarn = addDaysGroup(frame, tqlayout, row++, i18n("Time before password expires to &issue an expire warning:")); - lesinact = addDaysGroup(frame, tqlayout, row++, i18n("Time when account will be &disabled after expiration of password:")); - tqlayout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); + 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:")); + lesinact = addDaysGroup(frame, layout, row++, i18n("Time when account will be &disabled after expiration of password:")); + layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; } /* if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - tqlayout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 ); - tqlayout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); + layout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 ); + layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; } */ TQLabel *label = new TQLabel( i18n("&Account will expire on:"), frame ); - tqlayout->addWidget( label, row, 0 ); + layout->addWidget( label, row, 0 ); lesexpire = new KDateTimeWidget( frame ); label->setBuddy( lesexpire ); - tqlayout->addMultiCellWidget( lesexpire, row, row, 1, 2); + layout->addMultiCellWidget( lesexpire, row, row, 1, 2); cbexpire = new TQCheckBox( i18n("Never"), frame ); - tqlayout->addWidget( cbexpire, row++, 3 ); + layout->addWidget( cbexpire, row++, 3 ); connect( lesexpire, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(changed()) ); connect( cbexpire, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); @@ -265,60 +265,60 @@ void propdlg::initDlg() // Tab 3: Samba if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { TQFrame *frame = addPage(i18n("Samba")); - TQGridLayout *tqlayout = new TQGridLayout(frame, 10, 4, marginHint(), spacingHint()); + 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 TQIntValidator(TQT_TQOBJECT(frame))); - addRow(frame, tqlayout, row++, lerid, i18n("RID:"), whatstr); + addRow(frame, layout, row++, lerid, i18n("RID:"), whatstr); connect(lerid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leliscript = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); - addRow(frame, tqlayout, row++, leliscript, i18n("Login script:"), whatstr); + addRow(frame, layout, row++, leliscript, i18n("Login script:"), whatstr); connect(leliscript, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leprofile = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); - addRow(frame, tqlayout, row++, leprofile, i18n("Profile path:"), whatstr); + addRow(frame, layout, row++, leprofile, i18n("Profile path:"), whatstr); connect(leprofile, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lehomedrive = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); - addRow(frame, tqlayout, row++, lehomedrive, i18n("Home drive:"), whatstr); + addRow(frame, layout, row++, lehomedrive, i18n("Home drive:"), whatstr); connect(lehomedrive, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lehomepath = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); - addRow(frame, tqlayout, row++, lehomepath, i18n("Home path:"), whatstr); + addRow(frame, layout, row++, lehomepath, i18n("Home path:"), whatstr); connect(lehomepath, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leworkstations = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); - addRow(frame, tqlayout, row++, leworkstations, i18n("User workstations:"), whatstr); + addRow(frame, layout, row++, leworkstations, i18n("User workstations:"), whatstr); connect(leworkstations, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); ledomain = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); - addRow(frame, tqlayout, row++, ledomain, i18n("Domain name:"), whatstr); + addRow(frame, layout, row++, ledomain, i18n("Domain name:"), whatstr); connect(ledomain, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); ledomsid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); - addRow(frame, tqlayout, row++, ledomsid, i18n("Domain SID:"), whatstr); + addRow(frame, layout, row++, ledomsid, i18n("Domain SID:"), whatstr); connect(ledomsid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); 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, tqlayout, row++, cbsamba, i18n("Disable &Samba account information"), whatstr); + addRow(frame, layout, row++, cbsamba, i18n("Disable &Samba account information"), whatstr); } // Tab 4: Groups { TQFrame *frame = addPage(i18n("Groups")); - TQGridLayout *tqlayout = new TQGridLayout(frame, 2, 2, marginHint(), spacingHint()); + TQGridLayout *layout = new TQGridLayout(frame, 2, 2, marginHint(), spacingHint()); lstgrp = new KListView(frame); lstgrp->setFullWidth(true); // Single column, full widget width. @@ -326,12 +326,12 @@ void propdlg::initDlg() if ( ro ) lstgrp->setSelectionMode( TQListView::NoSelection ); // TQString whatstr = i18n("Select the groups that this user belongs to."); TQWhatsThis::add(lstgrp, whatstr); - tqlayout->addMultiCellWidget(lstgrp, 0, 0, 0, 1); + layout->addMultiCellWidget(lstgrp, 0, 0, 0, 1); leprigr = new TQLabel( i18n("Primary group: "), frame ); - tqlayout->addWidget( leprigr, 1, 0 ); + layout->addWidget( leprigr, 1, 0 ); if ( !ro ) { pbprigr = new TQPushButton( i18n("Set as Primary"), frame ); - tqlayout->addWidget( pbprigr, 1, 1 ); + layout->addWidget( pbprigr, 1, 1 ); connect( pbprigr, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpgroup()) ); } connect( lstgrp, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(gchanged()) ); |