summaryrefslogtreecommitdiffstats
path: root/filesharing/simple
diff options
context:
space:
mode:
Diffstat (limited to 'filesharing/simple')
-rw-r--r--filesharing/simple/fileshare.cpp116
-rw-r--r--filesharing/simple/fileshare.h14
-rw-r--r--filesharing/simple/groupconfigdlg.cpp132
-rw-r--r--filesharing/simple/groupconfigdlg.h16
-rw-r--r--filesharing/simple/groupconfiggui.ui.h2
-rw-r--r--filesharing/simple/krichtextlabel.cpp42
-rw-r--r--filesharing/simple/krichtextlabel.h18
7 files changed, 170 insertions, 170 deletions
diff --git a/filesharing/simple/fileshare.cpp b/filesharing/simple/fileshare.cpp
index 6572ef1a..5b796823 100644
--- a/filesharing/simple/fileshare.cpp
+++ b/filesharing/simple/fileshare.cpp
@@ -16,15 +16,15 @@
*/
#include <unistd.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-#include <qvgroupbox.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
+#include <tqvgroupbox.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqvbox.h>
#include <kpushbutton.h>
#include <kdebug.h>
@@ -53,41 +53,41 @@
#include "fileshare.h"
#include "groupconfigdlg.h"
-typedef KGenericFactory<KFileShareConfig, QWidget > ShareFactory;
+typedef KGenericFactory<KFileShareConfig, TQWidget > ShareFactory;
K_EXPORT_COMPONENT_FACTORY (kcm_fileshare, ShareFactory("kcmfileshare") )
#define FILESHARECONF "/etc/security/fileshare.conf"
#define FILESHARE_DEBUG 5009
-KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStringList &):
+KFileShareConfig::KFileShareConfig(TQWidget *parent, const char *name, const TQStringList &):
KCModule(ShareFactory::instance(), parent, name)
{
KGlobal::locale()->insertCatalogue("kfileshare");
- QBoxLayout* layout = new QVBoxLayout(this,0,
+ TQBoxLayout* layout = new TQVBoxLayout(this,0,
KDialog::spacingHint());
/*
- QVButtonGroup *box = new QVButtonGroup( i18n("File Sharing"), this );
+ TQVButtonGroup *box = new TQVButtonGroup( i18n("File Sharing"), this );
box->layout()->setSpacing( KDialog::spacingHint() );
layout->addWidget(box);
- noSharing=new QRadioButton( i18n("Do &not allow users to share files"), box );
- sharing=new QRadioButton( i18n("&Allow users to share files from their HOME folder"), box);
+ noSharing=new TQRadioButton( i18n("Do &not allow users to share files"), box );
+ sharing=new TQRadioButton( i18n("&Allow users to share files from their HOME folder"), box);
*/
m_ccgui = new ControlCenterGUI(this);
- connect( m_ccgui, SIGNAL( changed()), this, SLOT(configChanged()));
- connect( m_ccgui->allowedUsersBtn, SIGNAL( clicked()),
- this, SLOT(allowedUsersBtnClicked()));
+ connect( m_ccgui, TQT_SIGNAL( changed()), this, TQT_SLOT(configChanged()));
+ connect( m_ccgui->allowedUsersBtn, TQT_SIGNAL( clicked()),
+ this, TQT_SLOT(allowedUsersBtnClicked()));
- QString path = QString::fromLocal8Bit( getenv( "PATH" ) );
- path += QString::fromLatin1(":/usr/sbin");
- QString sambaExec = KStandardDirs::findExe( QString::fromLatin1("smbd"), path );
- QString nfsExec = KStandardDirs::findExe( QString::fromLatin1("rpc.nfsd"), path );
+ TQString path = TQString::fromLocal8Bit( getenv( "PATH" ) );
+ path += TQString::fromLatin1(":/usr/sbin");
+ TQString sambaExec = KStandardDirs::findExe( TQString::fromLatin1("smbd"), path );
+ TQString nfsExec = KStandardDirs::findExe( TQString::fromLatin1("rpc.nfsd"), path );
if ( nfsExec.isEmpty() && sambaExec.isEmpty())
{
- QMessageBox::critical( 0, "File Sharing", QString("SMB and NFS servers are not installed on this machine, to enable this module the servers must be installed."));
+ TQMessageBox::critical( 0, "File Sharing", TQString("SMB and NFS servers are not installed on this machine, to enable this module the servers must be installed."));
m_ccgui->shareGrp->setDisabled(true);
m_ccgui->sharedFoldersGroupBox->setDisabled(true);
}
@@ -96,22 +96,22 @@ KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStr
if (nfsExec.isEmpty()) {
m_ccgui->nfsChk->setDisabled(true);
m_ccgui->nfsChk->setChecked(false);
- QToolTip::add(m_ccgui->nfsChk,i18n("No NFS server installed on this system"));
+ TQToolTip::add(m_ccgui->nfsChk,i18n("No NFS server installed on this system"));
}
if (sambaExec.isEmpty()) {
m_ccgui->sambaChk->setDisabled(true);
m_ccgui->sambaChk->setChecked(false);
- QToolTip::add(m_ccgui->sambaChk,i18n("No Samba server installed on this system"));
+ TQToolTip::add(m_ccgui->sambaChk,i18n("No Samba server installed on this system"));
}
m_ccgui->infoLbl->hide();
layout->addWidget(m_ccgui);
updateShareListView();
- connect( KNFSShare::instance(), SIGNAL( changed()),
- this, SLOT(updateShareListView()));
- connect( KSambaShare::instance(), SIGNAL( changed()),
- this, SLOT(updateShareListView()));
+ connect( KNFSShare::instance(), TQT_SIGNAL( changed()),
+ this, TQT_SLOT(updateShareListView()));
+ connect( KSambaShare::instance(), TQT_SIGNAL( changed()),
+ this, TQT_SLOT(updateShareListView()));
}
@@ -120,13 +120,13 @@ KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStr
((KFileShare::shareMode() == KFileShare::Advanced) &&
(KFileShare::authorization() == KFileShare::Authorized)))
{
- connect( m_ccgui->addShareBtn, SIGNAL(clicked()),
- this, SLOT(addShareBtnClicked()));
- connect( m_ccgui->changeShareBtn, SIGNAL(clicked()),
- this, SLOT(changeShareBtnClicked()));
- connect( m_ccgui->removeShareBtn, SIGNAL(clicked()),
- this, SLOT(removeShareBtnClicked()));
- m_ccgui->listView->setSelectionMode(QListView::Extended);
+ connect( m_ccgui->addShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(addShareBtnClicked()));
+ connect( m_ccgui->changeShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(changeShareBtnClicked()));
+ connect( m_ccgui->removeShareBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(removeShareBtnClicked()));
+ m_ccgui->listView->setSelectionMode(TQListView::Extended);
m_ccgui->shareBtnPnl->setEnabled(true);
}
@@ -147,10 +147,10 @@ void KFileShareConfig::updateShareListView()
KNFSShare* nfs = KNFSShare::instance();
KSambaShare* samba = KSambaShare::instance();
- QStringList dirs = nfs->sharedDirectories();
- QStringList sambaDirs = samba->sharedDirectories();
+ TQStringList dirs = nfs->sharedDirectories();
+ TQStringList sambaDirs = samba->sharedDirectories();
- for ( QStringList::ConstIterator it = sambaDirs.begin(); it != sambaDirs.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = sambaDirs.begin(); it != sambaDirs.end(); ++it ) {
// Do not insert duplicates
if (nfs->isDirectoryShared(*it))
continue;
@@ -158,11 +158,11 @@ void KFileShareConfig::updateShareListView()
dirs += *it;
}
- QPixmap folderPix = SmallIcon("folder",0,KIcon::ShareOverlay);
- QPixmap okPix = SmallIcon("button_ok");
- QPixmap cancelPix = SmallIcon("button_cancel");
+ TQPixmap folderPix = SmallIcon("folder",0,KIcon::ShareOverlay);
+ TQPixmap okPix = SmallIcon("button_ok");
+ TQPixmap cancelPix = SmallIcon("button_cancel");
- for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) {
+ for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) {
KListViewItem* item = new KListViewItem(m_ccgui->listView);
item->setText(0,*it);
item->setPixmap(0, folderPix);
@@ -184,7 +184,7 @@ void KFileShareConfig::updateShareListView()
void KFileShareConfig::allowedUsersBtnClicked() {
GroupConfigDlg dlg(this,m_fileShareGroup,m_restricted,m_rootPassNeeded,
m_ccgui->simpleRadio->isChecked());
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
m_fileShareGroup = dlg.fileShareGroup().name();
m_restricted = dlg.restricted();
m_rootPassNeeded = dlg.rootPassNeeded();
@@ -196,7 +196,7 @@ void KFileShareConfig::allowedUsersBtnClicked() {
void KFileShareConfig::load()
{
- KSimpleConfig config(QString::fromLatin1(FILESHARECONF),true);
+ KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true);
m_ccgui->shareGrp->setChecked( config.readEntry("FILESHARING", "yes") == "yes" );
@@ -220,7 +220,7 @@ void KFileShareConfig::load()
m_smbConf = KSambaShare::instance()->smbConfPath();
}
-bool KFileShareConfig::addGroupAccessesToFile(const QString & file) {
+bool KFileShareConfig::addGroupAccessesToFile(const TQString & file) {
KProcess chgrp;
chgrp << "chgrp" << m_fileShareGroup << file;
KProcess chmod;
@@ -241,7 +241,7 @@ bool KFileShareConfig::addGroupAccessesToFile(const QString & file) {
}
-bool KFileShareConfig::removeGroupAccessesFromFile(const QString & file) {
+bool KFileShareConfig::removeGroupAccessesFromFile(const TQString & file) {
KProcess chgrp;
chgrp << "chgrp" << "root" << file;
KProcess chmod;
@@ -291,11 +291,11 @@ void KFileShareConfig::save()
{
setGroupAccesses();
- QDir dir("/etc/security");
+ TQDir dir("/etc/security");
if ( !dir.exists())
dir.mkdir("/etc/security");
- QFile file(FILESHARECONF);
+ TQFile file(FILESHARECONF);
if ( ! file.open(IO_WriteOnly)) {
KMessageBox::detailedError(this,
i18n("Could not save settings."),
@@ -306,7 +306,7 @@ void KFileShareConfig::save()
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << "FILESHARING=";
stream << (m_ccgui->shareGrp->isChecked() ? "yes" : "no");
@@ -340,7 +340,7 @@ void KFileShareConfig::defaults()
m_ccgui->shareGrp->setChecked( false );
}
-QString KFileShareConfig::quickHelp() const
+TQString KFileShareConfig::quickHelp() const
{
return i18n("<h1>File Sharing</h1><p>This module can be used "
"to enable file sharing over the network using "
@@ -354,11 +354,11 @@ void KFileShareConfig::addShareBtnClicked() {
}
-PropertiesPageDlg::PropertiesPageDlg(QWidget*parent, KFileItemList files)
+PropertiesPageDlg::PropertiesPageDlg(TQWidget*parent, KFileItemList files)
: KDialogBase(parent, "sharedlg", true,
i18n("Share Folder"), Ok|Cancel, Ok, true)
{
- QVBox* vbox = makeVBoxMainWidget();
+ TQVBox* vbox = makeVBoxMainWidget();
m_page = new PropertiesPage(vbox,files,true);
}
@@ -380,7 +380,7 @@ void PropertiesPageDlg::slotOk() {
void KFileShareConfig::showShareDialog(const KFileItemList & files) {
PropertiesPageDlg* dlg = new PropertiesPageDlg(this,files);
- if (dlg->exec() == QDialog::Accepted) {
+ if (dlg->exec() == TQDialog::Accepted) {
if ( dlg->hasChanged() ) {
updateShareListView();
}
@@ -390,9 +390,9 @@ void KFileShareConfig::showShareDialog(const KFileItemList & files) {
void KFileShareConfig::changeShareBtnClicked() {
KFileItemList files;
- QPtrList<QListViewItem> items = m_ccgui->listView->selectedItems();
+ TQPtrList<TQListViewItem> items = m_ccgui->listView->selectedItems();
- QListViewItem* item;
+ TQListViewItem* item;
for ( item = items.first(); item; item = items.next() ) {
files.append(new KFileItem(KURL::fromPathOrURL(item->text(0)),"",0));
}
@@ -402,8 +402,8 @@ void KFileShareConfig::changeShareBtnClicked() {
void KFileShareConfig::removeShareBtnClicked() {
- QPtrList<QListViewItem> items = m_ccgui->listView->selectedItems();
- QListViewItem *item;
+ TQPtrList<TQListViewItem> items = m_ccgui->listView->selectedItems();
+ TQListViewItem *item;
bool nfs = false;
bool samba = false;
diff --git a/filesharing/simple/fileshare.h b/filesharing/simple/fileshare.h
index 1f5da9e7..d6e8719a 100644
--- a/filesharing/simple/fileshare.h
+++ b/filesharing/simple/fileshare.h
@@ -33,22 +33,22 @@ class KFileShareConfig : public KCModule
Q_OBJECT
public:
- KFileShareConfig(QWidget *parent, const char *name, const QStringList &);
+ KFileShareConfig(TQWidget *parent, const char *name, const TQStringList &);
virtual void load();
virtual void save();
virtual void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
protected:
ControlCenterGUI* m_ccgui;
- QString m_fileShareGroup;
+ TQString m_fileShareGroup;
bool m_restricted;
bool m_rootPassNeeded;
- QString m_smbConf;
+ TQString m_smbConf;
void showShareDialog(const KFileItemList & files);
- bool addGroupAccessesToFile(const QString & file);
- bool removeGroupAccessesFromFile(const QString & file);
+ bool addGroupAccessesToFile(const TQString & file);
+ bool removeGroupAccessesFromFile(const TQString & file);
bool setGroupAccesses();
protected slots:
@@ -66,7 +66,7 @@ class PropertiesPageDlg : public KDialogBase
{
Q_OBJECT
public:
- PropertiesPageDlg(QWidget * parent, KFileItemList files);
+ PropertiesPageDlg(TQWidget * parent, KFileItemList files);
~PropertiesPageDlg() {};
bool hasChanged();
protected:
diff --git a/filesharing/simple/groupconfigdlg.cpp b/filesharing/simple/groupconfigdlg.cpp
index f313719d..470f024f 100644
--- a/filesharing/simple/groupconfigdlg.cpp
+++ b/filesharing/simple/groupconfigdlg.cpp
@@ -18,13 +18,13 @@
*/
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include <klocale.h>
#include <kuser.h>
@@ -40,16 +40,16 @@
#include "groupconfigdlg.h"
-static QString groupListToString(const QValueList<KUserGroup> & list);
-static QString prettyString(const KUser &user);
-static QString fromPrettyString(const QString & s);
-static void removeList(QValueList<KUser> & from, const QValueList<KUser> & that);
-static bool userMod(const QString & user, const QValueList<KUserGroup> & groups);
+static TQString groupListToString(const TQValueList<KUserGroup> & list);
+static TQString prettyString(const KUser &user);
+static TQString fromPrettyString(const TQString & s);
+static void removeList(TQValueList<KUser> & from, const TQValueList<KUser> & that);
+static bool userMod(const TQString & user, const TQValueList<KUserGroup> & groups);
-GroupConfigDlg::GroupConfigDlg(QWidget * parent,
- const QString & fileShareGroup, bool restricted,
+GroupConfigDlg::GroupConfigDlg(TQWidget * parent,
+ const TQString & fileShareGroup, bool restricted,
bool rootPassNeeded, bool simpleSharing)
: KDialogBase(parent,"groupconfigdlg", true,
i18n("Allowed Users"), Ok|Cancel, Ok, true) ,
@@ -81,12 +81,12 @@ void GroupConfigDlg::initGUI() {
m_gui->groupUsersRadio->setChecked(m_restricted);
m_gui->writeAccessChk->setChecked(!m_rootPassNeeded);
- connect( m_gui->addBtn, SIGNAL(clicked()),
- this, SLOT(slotAddUser()));
- connect( m_gui->removeBtn, SIGNAL(clicked()),
- this, SLOT(slotRemoveUser()));
- connect( m_gui->otherGroupBtn, SIGNAL(clicked()),
- this, SLOT(slotChangeGroup()));
+ connect( m_gui->addBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddUser()));
+ connect( m_gui->removeBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveUser()));
+ connect( m_gui->otherGroupBtn, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeGroup()));
if (m_simpleSharing) {
// if simple sharing users never need the root password
@@ -96,23 +96,23 @@ void GroupConfigDlg::initGUI() {
void GroupConfigDlg::updateListBox() {
m_gui->listBox->clear();
- QValueList<KUser>::iterator it;
+ TQValueList<KUser>::iterator it;
for ( it = m_users.begin(); it != m_users.end(); ++it ) {
m_gui->listBox->insertItem(prettyString(*it));
kdDebug(5009) << "GroupConfigDlg::updateListBox: " << (*it).loginName() << endl;
}
}
-QString prettyString(const KUser &user) {
+TQString prettyString(const KUser &user) {
return user.fullName()+" ("+user.loginName()+")";
}
-QString fromPrettyString(const QString & s) {
+TQString fromPrettyString(const TQString & s) {
// Jan Schaefer (jan)
// i j
int i = s.find('(');
int j = s.find(')');
- QString loginName = s.mid(i+1,j-i-1);
+ TQString loginName = s.mid(i+1,j-i-1);
return loginName;
}
@@ -121,7 +121,7 @@ bool GroupConfigDlg::restricted() {
}
void GroupConfigDlg::slotAddUser() {
- QValueList<KUser> allUsers = KUser::allUsers();
+ TQValueList<KUser> allUsers = KUser::allUsers();
removeList(allUsers,m_users);
@@ -132,18 +132,18 @@ void GroupConfigDlg::slotAddUser() {
return;
}
- QStringList stringList;
+ TQStringList stringList;
- QValueList<KUser>::iterator it;
+ TQValueList<KUser>::iterator it;
for ( it = allUsers.begin(); it != allUsers.end(); ++it ) {
- QString s = (*it).fullName()+" ("+(*it).loginName()+")";
+ TQString s = (*it).fullName()+" ("+(*it).loginName()+")";
stringList.append(s);
}
stringList.sort();
bool ok;
- QString userName = KInputDialog::getItem(
+ TQString userName = KInputDialog::getItem(
i18n("Select User"),
i18n("Select a user:"),
stringList,
@@ -154,14 +154,14 @@ void GroupConfigDlg::slotAddUser() {
if (!ok)
return;
- QString loginName = fromPrettyString(userName);
+ TQString loginName = fromPrettyString(userName);
KUser user(loginName);
m_users.append(KUser(loginName));
updateListBox();
}
-void removeList(QValueList<KUser> & from, const QValueList<KUser> & that) {
- QValueList<KUser>::ConstIterator it;
+void removeList(TQValueList<KUser> & from, const TQValueList<KUser> & that) {
+ TQValueList<KUser>::ConstIterator it;
for ( it = that.begin(); it != that.end(); ++it ) {
from.remove(*it);
}
@@ -169,7 +169,7 @@ void removeList(QValueList<KUser> & from, const QValueList<KUser> & that) {
}
bool GroupConfigDlg::addUser(const KUser & user, const KUserGroup & group) {
- QValueList<KUserGroup> groups = user.groups();
+ TQValueList<KUserGroup> groups = user.groups();
groups.append(group);
if (!userMod(user.loginName(),groups)) {
KMessageBox::sorry(this,i18n("Could not add user '%1' to group '%2'")
@@ -181,7 +181,7 @@ bool GroupConfigDlg::addUser(const KUser & user, const KUserGroup & group) {
bool GroupConfigDlg::removeUser(const KUser & user, const KUserGroup & group) {
- QValueList<KUserGroup> groups = user.groups();
+ TQValueList<KUserGroup> groups = user.groups();
groups.remove(group);
if (!userMod(user.loginName(),groups)) {
KMessageBox::sorry(this,i18n("Could not remove user '%1' from group '%2'")
@@ -203,12 +203,12 @@ void GroupConfigDlg::slotOk() {
return;
}
- QValueList<KUser> addedUsers = m_users;
+ TQValueList<KUser> addedUsers = m_users;
removeList(addedUsers,m_origUsers);
- QValueList<KUser> removedUsers = m_origUsers;
+ TQValueList<KUser> removedUsers = m_origUsers;
removeList(removedUsers,m_users);
- QValueList<KUser>::ConstIterator it;
+ TQValueList<KUser>::ConstIterator it;
for ( it = addedUsers.begin(); it != addedUsers.end(); ++it ) {
addUser(*it, m_fileShareGroup);
}
@@ -221,27 +221,27 @@ void GroupConfigDlg::slotOk() {
KDialogBase::slotOk();
}
-bool userMod(const QString & user, const QValueList<KUserGroup> & groups) {
+bool userMod(const TQString & user, const TQValueList<KUserGroup> & groups) {
KProcess proc;
proc << "usermod" << "-G" << groupListToString(groups) << user;
return proc.start(KProcess::Block) && proc.normalExit();
}
void GroupConfigDlg::slotRemoveUser() {
- QListBoxItem* item = m_gui->listBox->selectedItem();
+ TQListBoxItem* item = m_gui->listBox->selectedItem();
if (!item)
return;
- QString loginName = fromPrettyString(item->text());
+ TQString loginName = fromPrettyString(item->text());
KUser user(loginName);
m_users.remove(KUser(loginName));
updateListBox();
m_gui->removeBtn->setEnabled(false);
}
-QString groupListToString(const QValueList<KUserGroup> & list) {
- QValueList<KUserGroup>::ConstIterator it;
- QString result;
+TQString groupListToString(const TQValueList<KUserGroup> & list) {
+ TQValueList<KUserGroup>::ConstIterator it;
+ TQString result;
for ( it = list.begin(); it != list.end(); ++it ) {
result+=(*it).name()+",";
@@ -253,13 +253,13 @@ QString groupListToString(const QValueList<KUserGroup> & list) {
}
void GroupConfigDlg::slotChangeGroup() {
- QValueList<KUserGroup> allGroups = KUserGroup::allGroups();
+ TQValueList<KUserGroup> allGroups = KUserGroup::allGroups();
- QStringList stringList;
+ TQStringList stringList;
- QValueList<KUserGroup>::iterator it;
+ TQValueList<KUserGroup>::iterator it;
for ( it = allGroups.begin(); it != allGroups.end(); ++it ) {
- QString s = (*it).name();
+ TQString s = (*it).name();
stringList.append(s);
}
@@ -268,31 +268,31 @@ void GroupConfigDlg::slotChangeGroup() {
KDialogBase* dlg = new KDialogBase(this,"groupconfigdlg", true,
i18n("Allowed Users"), Ok|Cancel, Ok, true);
- QVBox* vbox = dlg->makeVBoxMainWidget();
+ TQVBox* vbox = dlg->makeVBoxMainWidget();
- QHBox* hbox = new QHBox(vbox);
- QLabel* lbl = new QLabel(i18n("New file share group:"),hbox);
+ TQHBox* hbox = new TQHBox(vbox);
+ TQLabel* lbl = new TQLabel(i18n("New file share group:"),hbox);
KComboBox* combo = new KComboBox(hbox);
combo->insertStringList(stringList);
combo->setEditable(true);
combo->setCurrentText(m_fileShareGroup.name());
- QCheckBox* addChk = new QCheckBox(
+ TQCheckBox* addChk = new TQCheckBox(
i18n("Add users from the old file share group to the new one"),
vbox);
- QCheckBox* removeUsersChk = new QCheckBox(
+ TQCheckBox* removeUsersChk = new TQCheckBox(
i18n("Remove users from old file share group"),
vbox);
- QCheckBox* removeGroupChk = new QCheckBox(
+ TQCheckBox* removeGroupChk = new TQCheckBox(
i18n("Delete the old file share group"),
vbox);
- if (dlg->exec() == QDialog::Accepted) {
- QString groupName = combo->currentText();
+ if (dlg->exec() == TQDialog::Accepted) {
+ TQString groupName = combo->currentText();
if (groupName != m_fileShareGroup.name()) {
- QString oldGroup = m_fileShareGroup.name();
+ TQString oldGroup = m_fileShareGroup.name();
if (allGroups.contains(KUserGroup(groupName)))
setFileShareGroup(KUserGroup(groupName));
else {
@@ -348,8 +348,8 @@ void GroupConfigDlg::setFileShareGroup(const KUserGroup & group) {
}
-bool GroupConfigDlg::addUsersToGroup(QValueList<KUser> users,const KUserGroup & group) {
- QValueList<KUser>::ConstIterator it;
+bool GroupConfigDlg::addUsersToGroup(TQValueList<KUser> users,const KUserGroup & group) {
+ TQValueList<KUser>::ConstIterator it;
bool result = true;
for ( it = users.begin(); it != users.end(); ++it ) {
if (!addUser(*it, group))
@@ -358,16 +358,16 @@ bool GroupConfigDlg::addUsersToGroup(QValueList<KUser> users,const KUserGroup &
return result;
}
-bool GroupConfigDlg::emptyGroup(const QString & s) {
+bool GroupConfigDlg::emptyGroup(const TQString & s) {
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("Do you really want to remove all users from group '%1'?").arg(s), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
+ i18n("Do you really want to remove all users from group '%1'?").arg(s), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
return false;
}
- QValueList<KUser> allUsers = KUser::allUsers();
+ TQValueList<KUser> allUsers = KUser::allUsers();
bool result = true;
KUserGroup group(s);
- QValueList<KUser>::ConstIterator it;
+ TQValueList<KUser>::ConstIterator it;
for ( it = allUsers.begin(); it != allUsers.end(); ++it ) {
if (!removeUser(*it, group))
result = false;
@@ -375,9 +375,9 @@ bool GroupConfigDlg::emptyGroup(const QString & s) {
return result;
}
-bool GroupConfigDlg::deleteGroup(const QString & s) {
+bool GroupConfigDlg::deleteGroup(const TQString & s) {
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("Do you really want to delete group '%1'?").arg(s), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
+ i18n("Do you really want to delete group '%1'?").arg(s), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) {
return false;
}
@@ -391,14 +391,14 @@ bool GroupConfigDlg::deleteGroup(const QString & s) {
return result;
}
-bool GroupConfigDlg::createFileShareGroup(const QString & s) {
+bool GroupConfigDlg::createFileShareGroup(const TQString & s) {
if (s.isEmpty()) {
KMessageBox::sorry(this,i18n("Please choose a valid group."));
return false;
}
if (KMessageBox::No == KMessageBox::questionYesNo(this,
- i18n("This group '%1' does not exist. Should it be created?").arg(s), QString::null, i18n("Create"), i18n("Do Not Create")))
+ i18n("This group '%1' does not exist. Should it be created?").arg(s), TQString::null, i18n("Create"), i18n("Do Not Create")))
return false;
//debug("CreateFileShareGroup: "+s);
diff --git a/filesharing/simple/groupconfigdlg.h b/filesharing/simple/groupconfigdlg.h
index eab24152..1258422c 100644
--- a/filesharing/simple/groupconfigdlg.h
+++ b/filesharing/simple/groupconfigdlg.h
@@ -21,7 +21,7 @@
#define GROUPCONFIGDLG_H
#include <kdialogbase.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kuser.h>
class GroupConfigGUI;
@@ -30,7 +30,7 @@ class GroupConfigDlg : public KDialogBase
{
Q_OBJECT
public:
- GroupConfigDlg(QWidget * parent, const QString & fileShareGroup, bool restricted,
+ GroupConfigDlg(TQWidget * parent, const TQString & fileShareGroup, bool restricted,
bool rootPassNeeded, bool simpleSharing);
~GroupConfigDlg();
KUserGroup fileShareGroup() { return m_fileShareGroup; }
@@ -49,16 +49,16 @@ protected slots:
virtual void slotOk();
private:
- bool createFileShareGroup(const QString & s);
- bool deleteGroup(const QString & s);
- bool emptyGroup(const QString & s);
+ bool createFileShareGroup(const TQString & s);
+ bool deleteGroup(const TQString & s);
+ bool emptyGroup(const TQString & s);
bool addUser(const KUser & user, const KUserGroup & group);
bool removeUser(const KUser & user, const KUserGroup & group);
- bool addUsersToGroup(QValueList<KUser> users,const KUserGroup & group);
+ bool addUsersToGroup(TQValueList<KUser> users,const KUserGroup & group);
void setFileShareGroup(const KUserGroup & group);
- QValueList<KUser> m_origUsers;
- QValueList<KUser> m_users;
+ TQValueList<KUser> m_origUsers;
+ TQValueList<KUser> m_users;
KUserGroup m_fileShareGroup;
bool m_restricted;
bool m_rootPassNeeded;
diff --git a/filesharing/simple/groupconfiggui.ui.h b/filesharing/simple/groupconfiggui.ui.h
index 35e82f7f..055fd6c3 100644
--- a/filesharing/simple/groupconfiggui.ui.h
+++ b/filesharing/simple/groupconfiggui.ui.h
@@ -8,7 +8,7 @@
*****************************************************************************/
-void GroupConfigGUI::listBox_selectionChanged( QListBoxItem * i)
+void GroupConfigGUI::listBox_selectionChanged( TQListBoxItem * i)
{
removeBtn->setEnabled(i);
}
diff --git a/filesharing/simple/krichtextlabel.cpp b/filesharing/simple/krichtextlabel.cpp
index 458ade62..089635d7 100644
--- a/filesharing/simple/krichtextlabel.cpp
+++ b/filesharing/simple/krichtextlabel.cpp
@@ -18,35 +18,35 @@
#include "krichtextlabel.h"
-#include <qtooltip.h>
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
+#include <tqtooltip.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
#include <kglobalsettings.h>
-static QString qrichtextify( const QString& text )
+static TQString qrichtextify( const TQString& text )
{
if ( text.isEmpty() || text[0] == '<' )
return text;
- QStringList lines = QStringList::split('\n', text);
- for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split('\n', text);
+ for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal );
+ *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal );
}
- return lines.join(QString::null);
+ return lines.join(TQString::null);
}
-KRichTextLabel::KRichTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5);
setAlignment( Qt::WordBreak );
setText(text);
}
-KRichTextLabel::KRichTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5);
setAlignment( Qt::WordBreak );
}
@@ -57,17 +57,17 @@ void KRichTextLabel::setDefaultWidth(int defaultWidth)
updateGeometry();
}
-QSizePolicy KRichTextLabel::sizePolicy() const
+TQSizePolicy KRichTextLabel::sizePolicy() const
{
- return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum, false);
+ return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum, false);
}
-QSize KRichTextLabel::minimumSizeHint() const
+TQSize KRichTextLabel::minimumSizeHint() const
{
- QString qt_text = qrichtextify( text() );
+ TQString qt_text = qrichtextify( text() );
int pref_width = 0;
int pref_height = 0;
- QSimpleRichText rt(qt_text, font());
+ TQSimpleRichText rt(qt_text, font());
pref_width = m_defaultWidth;
rt.setWidth(pref_width);
int used_width = rt.widthUsed();
@@ -94,16 +94,16 @@ QSize KRichTextLabel::minimumSizeHint() const
pref_width = used_width;
}
- return QSize(pref_width, rt.height());
+ return TQSize(pref_width, rt.height());
}
-QSize KRichTextLabel::sizeHint() const
+TQSize KRichTextLabel::sizeHint() const
{
return minimumSizeHint();
}
-void KRichTextLabel::setText( const QString &text ) {
- QLabel::setText(text);
+void KRichTextLabel::setText( const TQString &text ) {
+ TQLabel::setText(text);
}
void KRichTextLabel::virtual_hook( int, void* )
diff --git a/filesharing/simple/krichtextlabel.h b/filesharing/simple/krichtextlabel.h
index e03fe250..40ead037 100644
--- a/filesharing/simple/krichtextlabel.h
+++ b/filesharing/simple/krichtextlabel.h
@@ -19,12 +19,12 @@
#ifndef KRICHTEXTLABEL_H
#define KRICHTEXTLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
/**
- * @short A replacement for QLabel that supports richtext and proper layout management
+ * @short A replacement for TQLabel that supports richtext and proper layout management
*
* @author Waldo Bastian <[email protected]>
*/
@@ -32,25 +32,25 @@
/*
* QLabel
*/
-class KDEUI_EXPORT KRichTextLabel : public QLabel {
+class KDEUI_EXPORT KRichTextLabel : public TQLabel {
Q_OBJECT
public:
/**
* Default constructor.
*/
- KRichTextLabel( QWidget *parent, const char *name = 0 );
- KRichTextLabel( const QString &text, QWidget *parent, const char *name = 0 );
+ KRichTextLabel( TQWidget *parent, const char *name = 0 );
+ KRichTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
int defaultWidth() const { return m_defaultWidth; }
void setDefaultWidth(int defaultWidth);
- virtual QSize minimumSizeHint() const;
- virtual QSize sizeHint() const;
- QSizePolicy sizePolicy() const;
+ virtual TQSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ TQSizePolicy sizePolicy() const;
public slots:
- void setText( const QString & );
+ void setText( const TQString & );
protected:
int m_defaultWidth;