diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:58:15 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:58:15 -0600 |
commit | 377fa3a2775cdb3194315bb83e21744dc7c97bbf (patch) | |
tree | b6f515484589d67271adb168a1ead39f1c98493d /kuser/propdlg.cpp | |
parent | d1248617107f659af9d03cf1ef6d783571a0cba8 (diff) | |
download | tdeadmin-377fa3a2775cdb3194315bb83e21744dc7c97bbf.tar.gz tdeadmin-377fa3a2775cdb3194315bb83e21744dc7c97bbf.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit d1248617107f659af9d03cf1ef6d783571a0cba8.
Diffstat (limited to 'kuser/propdlg.cpp')
-rw-r--r-- | kuser/propdlg.cpp | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/kuser/propdlg.cpp b/kuser/propdlg.cpp index ac3b00e..dbd73d0 100644 --- a/kuser/propdlg.cpp +++ b/kuser/propdlg.cpp @@ -23,7 +23,7 @@ #include <tqdatetime.h> #include <tqwhatsthis.h> -#include <layout.h> +#include <tqlayout.h> #include <tqgroupbox.h> #include <tqfile.h> @@ -38,38 +38,38 @@ #include "kglobal_.h" #include "misc.h" -void propdlg::addRow(TQWidget *parent, TQGridLayout *layout, int row, +void propdlg::addRow(TQWidget *parent, TQGridLayout *tqlayout, 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()); - layout->addWidget(lab, row, 0); + lab->setMinimumSize(lab->tqsizeHint()); + widget->setMinimumSize(widget->tqsizeHint()); + tqlayout->addWidget(lab, row, 0); if (!what.isEmpty()) { TQWhatsThis::add(lab, what); TQWhatsThis::add(widget, what); } if (two_column) - layout->addMultiCellWidget(widget, row, row, 1, 2); + tqlayout->addMultiCellWidget(widget, row, row, 1, 2); else - layout->addWidget(widget, row, 1); + tqlayout->addWidget(widget, row, 1); if ( !nochange || ro ) return; TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); - layout->addWidget( nc, row, 3 ); + tqlayout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ widget ] = nc; } -KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *layout, int row, +KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *tqlayout, int row, const TQString &title, bool never) { KIntSpinBox *days; TQLabel *label = new TQLabel( title, parent ); - layout->addMultiCellWidget( label, row, row, 0, 1, AlignRight ); + tqlayout->addMultiCellWidget( label, row, row, 0, 1, AlignRight ); days = new KIntSpinBox( parent ); label->setBuddy( days ); @@ -84,12 +84,12 @@ KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *layout, int r { days->setMinValue( 0 ); } - layout->addWidget( days, row, 2 ); + tqlayout->addWidget( days, row, 2 ); connect(days, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); - layout->addWidget( nc, row, 3 ); + tqlayout->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 *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQGridLayout *tqlayout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; frontpage = frame; - frontlayout = layout; + fronttqlayout = tqlayout; lbuser = new TQLabel(frame); // whatstr = i18n("WHAT IS THIS: User login"); - addRow(frame, layout, row++, lbuser, i18n("User login:"), whatstr, false, false); + addRow(frame, tqlayout, 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, layout, row++, leid, i18n("&User ID:"), whatstr); + addRow(frame, tqlayout, 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); - layout->addWidget(pbsetpwd, 0, 2); + tqlayout->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, layout, row++, lefname, i18n("Full &name:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, lesurname, i18n("Surname:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, lemail, i18n("Email address:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leshell, i18n("&Login shell:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, lehome, i18n("&Home folder:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leoffice, i18n("&Office:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leophone, i18n("Offi&ce Phone:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, lehphone, i18n("Ho&me Phone:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leclass, i18n("Login class:"), whatstr, true); + addRow(frame, tqlayout, 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, layout, row++, leoffice1, i18n("&Office #1:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leoffice2, i18n("O&ffice #2:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leaddress, i18n("&Address:"), whatstr); + addRow(frame, tqlayout, row++, leaddress, i18n("&Address:"), whatstr); } cbdisabled = new TQCheckBox(frame); connect(cbdisabled, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); - addRow(frame, layout, row++, cbdisabled, i18n("Account &disabled"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, cbposix, i18n("Disable &POSIX account information"), whatstr); + addRow(frame, tqlayout, 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 *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQGridLayout *tqlayout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; TQDateTime time; leslstchg = new TQLabel(frame); - addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), TQString(), true); + addRow(frame, tqlayout, row++, leslstchg, i18n("Last password change:"), TQString(), true); - layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); + tqlayout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow ) { - 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); + 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); row++; } /* if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - layout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 ); - layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); + tqlayout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 ); + tqlayout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; } */ TQLabel *label = new TQLabel( i18n("&Account will expire on:"), frame ); - layout->addWidget( label, row, 0 ); + tqlayout->addWidget( label, row, 0 ); lesexpire = new KDateTimeWidget( frame ); label->setBuddy( lesexpire ); - layout->addMultiCellWidget( lesexpire, row, row, 1, 2); + tqlayout->addMultiCellWidget( lesexpire, row, row, 1, 2); cbexpire = new TQCheckBox( i18n("Never"), frame ); - layout->addWidget( cbexpire, row++, 3 ); + tqlayout->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 *layout = new TQGridLayout(frame, 10, 4, marginHint(), spacingHint()); + TQGridLayout *tqlayout = 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, layout, row++, lerid, i18n("RID:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leliscript, i18n("Login script:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leprofile, i18n("Profile path:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, lehomedrive, i18n("Home drive:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, lehomepath, i18n("Home path:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, leworkstations, i18n("User workstations:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, ledomain, i18n("Domain name:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, ledomsid, i18n("Domain SID:"), whatstr); + addRow(frame, tqlayout, 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, layout, row++, cbsamba, i18n("Disable &Samba account information"), whatstr); + addRow(frame, tqlayout, row++, cbsamba, i18n("Disable &Samba account information"), whatstr); } // Tab 4: Groups { TQFrame *frame = addPage(i18n("Groups")); - TQGridLayout *layout = new TQGridLayout(frame, 2, 2, marginHint(), spacingHint()); + TQGridLayout *tqlayout = 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); - layout->addMultiCellWidget(lstgrp, 0, 0, 0, 1); + tqlayout->addMultiCellWidget(lstgrp, 0, 0, 0, 1); leprigr = new TQLabel( i18n("Primary group: "), frame ); - layout->addWidget( leprigr, 1, 0 ); + tqlayout->addWidget( leprigr, 1, 0 ); if ( !ro ) { pbprigr = new TQPushButton( i18n("Set as Primary"), frame ); - layout->addWidget( pbprigr, 1, 1 ); + tqlayout->addWidget( pbprigr, 1, 1 ); connect( pbprigr, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpgroup()) ); } connect( lstgrp, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(gchanged()) ); @@ -346,7 +346,7 @@ propdlg::propdlg( const TQPtrList<KU::KUser> &users, { mUsers = users; if ( mUsers.getFirst() != mUsers.getLast() ) - setCaption( i18n("User Properties - %1 Selected Users").arg( mUsers.count() ) ); + setCaption( i18n("User Properties - %1 Selected Users").tqarg( mUsers.count() ) ); initDlg(); loadgroups( false ); selectuser(); @@ -658,14 +658,14 @@ void propdlg::setpgroup() { item->setEnabled(true); item->setOn(prevPrimaryGroupWasOn); - item->repaint(); + item->tqrepaint(); } if ( groupName == primaryGroup ) { primaryGroupWasOn = item->isOn(); item->setEnabled(false); item->setOn(true); - item->repaint(); + item->tqrepaint(); } item = (TQCheckListItem *) item->nextSibling(); @@ -941,7 +941,7 @@ void propdlg::slotOk() { if (kug->getUsers().lookup(newuid)) { KMessageBox::sorry( 0, - i18n("User with UID %1 already exists").arg(newuid) ); + i18n("User with UID %1 already exists").tqarg(newuid) ); return; } } @@ -951,7 +951,7 @@ void propdlg::slotOk() if ( oldrid != newrid ) { if (kug->getUsers().lookup_sam(newrid)) { KMessageBox::sorry( 0, - i18n("User with RID %1 already exists").arg(newrid) ); + i18n("User with RID %1 already exists").tqarg(newrid) ); return; } } @@ -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(TQFile::decodeName(SHELL_FILE)), + "<p>Do you want to add it now?").tqarg(newshell).tqarg(TQFile::decodeName(SHELL_FILE)), i18n("Unlisted Shell"), i18n("&Add Shell"), i18n("Do &Not Add")); |