diff options
Diffstat (limited to 'kuser/editGroup.cpp')
-rw-r--r-- | kuser/editGroup.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/kuser/editGroup.cpp b/kuser/editGroup.cpp index 1ef74d8..2f6a4cf 100644 --- a/kuser/editGroup.cpp +++ b/kuser/editGroup.cpp @@ -19,11 +19,11 @@ **/ -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qvalidator.h> -#include <qwhatsthis.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqvalidator.h> +#include <tqwhatsthis.h> #include <kapplication.h> #include <klocale.h> @@ -35,7 +35,7 @@ #include "editGroup.h" editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, - QWidget* parent, const char* name) + TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Group Properties"), Ok | Cancel, Ok, true) { kg = akg; @@ -50,17 +50,17 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, rid.rid = 513; rid.name = i18n("Domain Users"); rid.desc = i18n("Users"); mRids.append( rid ); rid.rid = 514; rid.name = i18n("Domain Guests"); rid.desc = i18n("Guests"); mRids.append( rid ); - QFrame *page = makeMainWidget(); - QGridLayout *layout = new QGridLayout( page, 10, 3, marginHint(), spacingHint() ); - QLabel *lb; + TQFrame *page = makeMainWidget(); + TQGridLayout *layout = new TQGridLayout( page, 10, 3, marginHint(), spacingHint() ); + TQLabel *lb; - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Group number:")); legid = new KLineEdit(page); // ensure it fits at least 20 characters legid->setText( "XXXXXXXXXXXXXXXXXXX" ); - legid->setText( QString::number(kg->getGID()) ); - legid->setValidator( new QIntValidator(this) ); + legid->setText( TQString::number(kg->getGID()) ); + legid->setValidator( new TQIntValidator(this) ); legid->setEnabled( mAdd ); legid->setReadOnly( ro ); lb->setBuddy( legid ); @@ -68,25 +68,25 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addMultiCellWidget( legid, 0, 0, 1, 2 ); if ( mSamba ) { - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Group rid:")); lerid = new KComboBox( page ); lerid->setEditable( !ro ); - QValueList<RID>::Iterator it; + TQValueList<RID>::Iterator it; for ( it = mRids.begin(); it != mRids.end(); ++it ) { - lerid->insertItem( QString::number( (*it).rid ) + " - " + (*it).name ); + lerid->insertItem( TQString::number( (*it).rid ) + " - " + (*it).name ); } - lerid->setCurrentText( QString::number( sid.getRID() ) ); - lerid->setValidator (new QIntValidator(this) ); + lerid->setCurrentText( TQString::number( sid.getRID() ) ); + lerid->setValidator (new TQIntValidator(this) ); lerid->setEnabled( mAdd ); - connect( lerid, SIGNAL(activated(int)), SLOT(ridSelected(int)) ); + connect( lerid, TQT_SIGNAL(activated(int)), TQT_SLOT(ridSelected(int)) ); lb->setBuddy( lerid ); layout->addWidget( lb, 1, 0 ); layout->addMultiCellWidget( lerid, 1, 1, 1, 2 ); } - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Group name:")); legrpname = new KLineEdit( page ); @@ -100,7 +100,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addMultiCellWidget( legrpname, 2, 2, 1, 2 ); if ( mSamba ) { - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Description:")); ledesc = new KLineEdit(page); ledesc->setText( kg->getDesc() ); @@ -109,7 +109,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addWidget( lb, 3, 0 ); layout->addMultiCellWidget( ledesc, 3, 3, 1, 2 ); - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Display name:")); ledispname = new KLineEdit(page); ledispname->setText( kg->getDisplayName() ); @@ -118,7 +118,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addWidget( lb, 4, 0 ); layout->addMultiCellWidget( ledispname, 4, 4, 1, 2 ); - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Type:")); letype = new KComboBox( page ); letype->insertItem( i18n("Domain") ); @@ -139,7 +139,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addWidget( lb, 5, 0 ); layout->addMultiCellWidget( letype, 5, 5, 1, 2 ); - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Domain SID:")); ledomsid = new KLineEdit(page); ledomsid->setText( sid.getDOM() ); @@ -148,42 +148,42 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addWidget( lb, 6, 0 ); layout->addMultiCellWidget( ledomsid, 6, 6, 1, 2 ); - cbsamba = new QCheckBox( i18n("Disable Samba group information"), page ); + cbsamba = new TQCheckBox( i18n("Disable Samba group information"), page ); layout->addMultiCellWidget( cbsamba, 7, 7, 0, 2 ); - connect( cbsamba, SIGNAL(toggled(bool)), ledesc, SLOT(setDisabled(bool)) ); - connect( cbsamba, SIGNAL(toggled(bool)), ledispname, SLOT(setDisabled(bool)) ); - connect( cbsamba, SIGNAL(toggled(bool)), letype, SLOT(setDisabled(bool)) ); - connect( cbsamba, SIGNAL(toggled(bool)), ledomsid, SLOT(setDisabled(bool)) ); - if ( mAdd ) connect( cbsamba, SIGNAL(toggled(bool)), lerid, SLOT(setDisabled(bool)) ); + connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledesc, TQT_SLOT(setDisabled(bool)) ); + connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledispname, TQT_SLOT(setDisabled(bool)) ); + connect( cbsamba, TQT_SIGNAL(toggled(bool)), letype, TQT_SLOT(setDisabled(bool)) ); + connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledomsid, TQT_SLOT(setDisabled(bool)) ); + if ( mAdd ) connect( cbsamba, TQT_SIGNAL(toggled(bool)), lerid, TQT_SLOT(setDisabled(bool)) ); if ( !mAdd ) cbsamba->setChecked( !( kg->getCaps() & KU::KGroup::Cap_Samba ) ); } m_list_in = new KListView(page); m_list_in->setFullWidth(true); // Single column, full widget width. m_list_in->addColumn(i18n("Users in Group")); - m_list_in->setSelectionMode( QListView::Extended ); + m_list_in->setSelectionMode( TQListView::Extended ); layout->addWidget( m_list_in, 8, 0 ); - QVBox *vbox = new QVBox(page); - QPushButton *btadd = new QPushButton(i18n("Add <-"), vbox); - QPushButton *btdel = new QPushButton(i18n("Remove ->"), vbox); + TQVBox *vbox = new TQVBox(page); + TQPushButton *btadd = new TQPushButton(i18n("Add <-"), vbox); + TQPushButton *btdel = new TQPushButton(i18n("Remove ->"), vbox); layout->addWidget( vbox, 8, 1 ); m_list_notin = new KListView(page); m_list_notin->setFullWidth(true); // Single column, full widget width. m_list_notin->addColumn(i18n("Users NOT in Group")); - m_list_notin->setSelectionMode(QListView::Extended); + m_list_notin->setSelectionMode(TQListView::Extended); layout->addWidget( m_list_notin, 8, 2 ); -// QString whatstr = i18n("Select the users that should be in this kg->"); -// QWhatsThis::add(m_list, whatstr); -// connect(this,SIGNAL(okClicked(void)), - //this,SLOT(okClicked())); +// TQString whatstr = i18n("Select the users that should be in this kg->"); +// TQWhatsThis::add(m_list, whatstr); +// connect(this,TQT_SIGNAL(okClicked(void)), + //this,TQT_SLOT(okClicked())); for (unsigned int i = 0; i<kug->getUsers().count(); i++) { KU::KUser *user; user = kug->getUsers()[i]; - QString userName = user->getName(); + TQString userName = user->getName(); if ( kg->lookup_user(userName) || user->getGID() == kg->getGID() ) { KListViewItem *item = new KListViewItem(m_list_in, userName); if ( user->getGID() == kg->getGID() ) item->setSelectable( false ); @@ -192,8 +192,8 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, } } - connect(btadd, SIGNAL(clicked()), SLOT(addClicked())); - connect(btdel, SIGNAL(clicked()), SLOT(delClicked())); + connect(btadd, TQT_SIGNAL(clicked()), TQT_SLOT(addClicked())); + connect(btdel, TQT_SIGNAL(clicked()), TQT_SLOT(delClicked())); if ( ro ) { btadd->setEnabled( false ); @@ -207,7 +207,7 @@ editGroup::~editGroup() void editGroup::ridSelected( int index ) { - lerid->setCurrentText( QString::number( mRids[ index ].rid ) ); + lerid->setCurrentText( TQString::number( mRids[ index ].rid ) ); legrpname->setText( mRids[ index ].name ); ledesc->setText( mRids[ index ].desc ); ledispname->setText( mRids[ index ].name ); @@ -215,8 +215,8 @@ void editGroup::ridSelected( int index ) void editGroup::addClicked() { - QListViewItem *item, *next; - QString name; + TQListViewItem *item, *next; + TQString name; item = m_list_notin->firstChild(); while ( item ) { @@ -232,8 +232,8 @@ void editGroup::addClicked() void editGroup::delClicked() { - QListViewItem *item, *next; - QString name; + TQListViewItem *item, *next; + TQString name; item = m_list_in->firstChild(); while ( item ) { @@ -256,7 +256,7 @@ void editGroup::slotOk() SID sid; kg->clear(); - QString s; + TQString s; s = legid->text(); if ( mSamba && !cbsamba->isChecked() ) { @@ -311,13 +311,13 @@ void editGroup::slotOk() kg->setDisplayName( ledispname->text() ); } else { kg->setCaps( 0 ); - kg->setSID( QString::null ); - kg->setDesc( QString::null ); - kg->setDisplayName( QString::null ); + kg->setSID( TQString::null ); + kg->setDesc( TQString::null ); + kg->setDisplayName( TQString::null ); kg->setType( 0 ); } - QListViewItem *item; + TQListViewItem *item; item = m_list_in->firstChild(); while ( item ) { kg->addUser( item->text( 0 ) ); |