diff options
Diffstat (limited to 'kiosktool/userManagement.cpp')
-rw-r--r-- | kiosktool/userManagement.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/kiosktool/userManagement.cpp b/kiosktool/userManagement.cpp index 3493b97..d93e834 100644 --- a/kiosktool/userManagement.cpp +++ b/kiosktool/userManagement.cpp @@ -24,9 +24,9 @@ #include <pwd.h> #include <sys/types.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <kapplication.h> #include <kconfig.h> @@ -42,7 +42,7 @@ #define AVAILABLE_SINCE "KDE 3.2.3" -UserManagementPage::UserManagementPage(QWidget* parent, const char* name, WFlags fl) +UserManagementPage::UserManagementPage(TQWidget* parent, const char* name, WFlags fl) : UserManagementUI(parent, name, fl), PageWidget(this) { setCaption(i18n("Assign Profiles")); @@ -52,13 +52,13 @@ UserManagementPage::UserManagementPage(QWidget* parent, const char* name, WFlags // actionButton(KDialogBase::Ok)->setFocus(); - connect(buttonAddGroup, SIGNAL(clicked()), this, SLOT(slotAddGroup())); - connect(buttonDeleteGroup, SIGNAL(clicked()), this, SLOT(slotDeleteGroup())); - connect(buttonAddUser, SIGNAL(clicked()), this, SLOT(slotAddUser())); - connect(buttonDeleteUser, SIGNAL(clicked()), this, SLOT(slotDeleteUser())); + connect(buttonAddGroup, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddGroup())); + connect(buttonDeleteGroup, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteGroup())); + connect(buttonAddUser, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddUser())); + connect(buttonDeleteUser, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteUser())); - connect(listGroups, SIGNAL(selectionChanged()), this, SLOT(slotUpdateButtons())); - connect(listUsers, SIGNAL(selectionChanged()), this, SLOT(slotUpdateButtons())); + connect(listGroups, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateButtons())); + connect(listUsers, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateButtons())); // init(); static bool firstTime = true; @@ -66,7 +66,7 @@ UserManagementPage::UserManagementPage(QWidget* parent, const char* name, WFlags if (firstTime) { firstTime = false; - QTimer::singleShot(0, this, SLOT(slotShowNotice())); + TQTimer::singleShot(0, this, TQT_SLOT(slotShowNotice())); } } @@ -82,7 +82,7 @@ void UserManagementPage::slotShowNotice() "If you want to use these profiles in combination with older versions you need " "to manually set the $KDEDIRS environment variable from the <b>startkde</b> " "script by adding the following line:<br><br>" - "<i>export KDEDIRS=$(kiosktool-kdedirs)</i><br><br>").arg(AVAILABLE_SINCE), + "<i>export KDEDIRS=$(kiosktool-kdedirs)</i><br><br>").tqarg(AVAILABLE_SINCE), i18n("Attention"), "user-profiles"); } @@ -96,24 +96,24 @@ void UserManagementPage::load() KioskRun::ProfileMapping groups; KioskRun::ProfileMapping users; - QStringList groupOrder; + TQStringList groupOrder; KioskRun::self()->getUserProfileMappings(groups, users, groupOrder); - for ( QStringList::ConstIterator it = groupOrder.begin(); + for ( TQStringList::ConstIterator it = groupOrder.begin(); it != groupOrder.end(); ++it ) { - QString group = *it; - QString profile = groups[group].join(","); - new QListViewItem(listGroups, group, profile); + TQString group = *it; + TQString profile = groups[group].join(","); + new TQListViewItem(listGroups, group, profile); } for ( KioskRun::ProfileMapping::Iterator it = users.begin(); it != users.end(); ++it ) { - QString user = it.key(); - QString profile = it.data().join(","); - new QListViewItem(listUsers, user, profile); + TQString user = it.key(); + TQString profile = it.data().join(","); + new TQListViewItem(listUsers, user, profile); } slotUpdateButtons(); } @@ -128,13 +128,13 @@ bool UserManagementPage::save() { KioskRun::ProfileMapping groups; KioskRun::ProfileMapping users; - QStringList groupOrder; + TQStringList groupOrder; - QListViewItem *item = listGroups->firstChild(); + TQListViewItem *item = listGroups->firstChild(); for(; item; item = item->nextSibling()) { - QString group = item->text(0); - QStringList profiles = QStringList::split(",", item->text(1)); + TQString group = item->text(0); + TQStringList profiles = TQStringList::split(",", item->text(1)); groups.insert(group, profiles); groupOrder.prepend(group); } @@ -142,8 +142,8 @@ bool UserManagementPage::save() item = listUsers->firstChild(); for(; item; item = item->nextSibling()) { - QString user = item->text(0); - QStringList profiles = QStringList::split(",", item->text(1)); + TQString user = item->text(0); + TQStringList profiles = TQStringList::split(",", item->text(1)); users.insert(user, profiles); } @@ -154,13 +154,13 @@ void UserManagementPage::slotAddGroup() { KConfig *config = kapp->config(); config->setGroup("General"); - QStringList groupBlacklist = config->readListEntry("GroupBlacklist"); + TQStringList groupBlacklist = config->readListEntry("GroupBlacklist"); m_allGroups.clear(); setgrent(); for (struct group *grp; (grp = getgrent()); ) { - QString group = QString::fromUtf8(grp->gr_name); + TQString group = TQString::fromUtf8(grp->gr_name); if (!groupBlacklist.contains(group)) m_allGroups.append(group); } @@ -171,19 +171,19 @@ void UserManagementPage::slotAddGroup() KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); UserManagementGroupUI *wid = new UserManagementGroupUI(&dlg); - wid->labelCaption->setFixedSize(wid->labelCaption->sizeHint()); + wid->labelCaption->setFixedSize(wid->labelCaption->tqsizeHint()); wid->comboGroup->insertStringList(m_allGroups); wid->comboProfile->insertStringList(m_allProfiles); - wid->setFixedSize(wid->sizeHint()); + wid->setFixedSize(wid->tqsizeHint()); dlg.setMainWidget(wid); - dlg.setFixedSize(dlg.sizeHint()); + dlg.setFixedSize(dlg.tqsizeHint()); while (dlg.exec() == KDialogBase::Accepted) { - QString group = wid->comboGroup->currentText(); - QString profile = wid->comboProfile->currentText(); + TQString group = wid->comboGroup->currentText(); + TQString profile = wid->comboProfile->currentText(); // Check for dupes - QListViewItem *item = listGroups->firstChild(); + TQListViewItem *item = listGroups->firstChild(); for( ;item; item = item->nextSibling()) { if (item->text(0) == group) @@ -193,7 +193,7 @@ void UserManagementPage::slotAddGroup() { int result = KMessageBox::warningContinueCancel(this, i18n("<qt>You already have a profile defined for group <b>%1</b>. " - "Do you want to replace it?</qt>").arg(group), + "Do you want to replace it?</qt>").tqarg(group), i18n("Duplicate Warning"), i18n("&Replace")); if (result != KMessageBox::Continue) @@ -201,7 +201,7 @@ void UserManagementPage::slotAddGroup() delete item; } - item = new QListViewItem(listGroups, group, profile); + item = new TQListViewItem(listGroups, group, profile); listGroups->setSelected(item, true); slotUpdateButtons(); return; @@ -210,7 +210,7 @@ void UserManagementPage::slotAddGroup() void UserManagementPage::slotDeleteGroup() { - QListViewItem *item = listGroups->selectedItem(); + TQListViewItem *item = listGroups->selectedItem(); if (!item) return; @@ -233,7 +233,7 @@ void UserManagementPage::slotAddUser() for (struct passwd *user; (user = getpwent()); ) { if ((user->pw_uid >= (uid_t) minUID) || (user->pw_uid == 0)) - m_allUsers.append(QString::fromUtf8(user->pw_name)); + m_allUsers.append(TQString::fromUtf8(user->pw_name)); } endpwent(); m_allUsers.sort(); @@ -242,19 +242,19 @@ void UserManagementPage::slotAddUser() KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); UserManagementUserUI *wid = new UserManagementUserUI(&dlg); - wid->labelCaption->setFixedSize(wid->labelCaption->sizeHint()); + wid->labelCaption->setFixedSize(wid->labelCaption->tqsizeHint()); wid->comboUser->insertStringList(m_allUsers); wid->comboProfile->insertStringList(m_allProfiles); - wid->setFixedSize(wid->sizeHint()); + wid->setFixedSize(wid->tqsizeHint()); dlg.setMainWidget(wid); - dlg.setFixedSize(dlg.sizeHint()); + dlg.setFixedSize(dlg.tqsizeHint()); while (dlg.exec() == KDialogBase::Accepted) { - QString user = wid->comboUser->currentText(); - QString profile = wid->comboProfile->currentText(); + TQString user = wid->comboUser->currentText(); + TQString profile = wid->comboProfile->currentText(); // Check for dupes - QListViewItem *item = listUsers->firstChild(); + TQListViewItem *item = listUsers->firstChild(); for( ;item; item = item->nextSibling()) { if (item->text(0) == user) @@ -264,7 +264,7 @@ void UserManagementPage::slotAddUser() { int result = KMessageBox::warningContinueCancel(this, i18n("<qt>You already have a profile defined for user <b>%1</b>. " - "Do you want to replace it?</<qt>").arg(user), + "Do you want to replace it?</<qt>").tqarg(user), i18n("Duplicate Warning"), i18n("&Replace")); if (result != KMessageBox::Continue) @@ -272,7 +272,7 @@ void UserManagementPage::slotAddUser() delete item; } - item = new QListViewItem(listUsers, user, profile); + item = new TQListViewItem(listUsers, user, profile); listUsers->setSelected(item, true); slotUpdateButtons(); return; @@ -281,7 +281,7 @@ void UserManagementPage::slotAddUser() void UserManagementPage::slotDeleteUser() { - QListViewItem *item = listUsers->selectedItem(); + TQListViewItem *item = listUsers->selectedItem(); if (!item) return; @@ -298,7 +298,7 @@ void UserManagementPage::setFocus() // TODO } -QString UserManagementPage::subCaption() +TQString UserManagementPage::subCaption() { return i18n("Assign Profiles"); } |