diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /filesharing/advanced/propsdlgplugin/propertiespage.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filesharing/advanced/propsdlgplugin/propertiespage.cpp')
-rw-r--r-- | filesharing/advanced/propsdlgplugin/propertiespage.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.cpp b/filesharing/advanced/propsdlgplugin/propertiespage.cpp index 52d772d7..d0f23a07 100644 --- a/filesharing/advanced/propsdlgplugin/propertiespage.cpp +++ b/filesharing/advanced/propsdlgplugin/propertiespage.cpp @@ -17,13 +17,13 @@ */ -#include <qcheckbox.h> -#include <qtooltip.h> -#include <qbuttongroup.h> -#include <qfileinfo.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqtooltip.h> +#include <tqbuttongroup.h> +#include <tqfileinfo.h> +#include <tqlabel.h> #include <kpushbutton.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kfileshare.h> #include <knfsshare.h> @@ -52,7 +52,7 @@ #define FILESHARE_DEBUG 5009 -PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUrl) +PropertiesPage::PropertiesPage(TQWidget* parent, KFileItemList items,bool enterUrl) : PropertiesPageGUI(parent), m_enterUrl(enterUrl), m_items(items), @@ -78,8 +78,8 @@ PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUr KFile::ExistingOnly | KFile::LocalOnly ); urlRq->setURL(m_path); - connect( urlRq, SIGNAL(textChanged(const QString&)), - this, SLOT(urlRqTextChanged(const QString&))); + connect( urlRq, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(urlRqTextChanged(const TQString&))); } else { urlRq->hide(); folderLbl->hide(); @@ -90,7 +90,7 @@ PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUr enableNFS(false,i18n("Reading NFS configuration file ...")); - //QTimer::singleShot(1, this, SLOT(load)); + //TQTimer::singleShot(1, this, TQT_SLOT(load)); load(); } @@ -100,13 +100,13 @@ PropertiesPage::~PropertiesPage() delete m_sambaFile; } -void PropertiesPage::urlRqTextChanged(const QString&) { +void PropertiesPage::urlRqTextChanged(const TQString&) { if (!m_enterUrl) return; KURL url(urlRq->url()); if (url.isLocalFile()) { - QFileInfo info(url.path(1)); + TQFileInfo info(url.path(1)); if (info.exists() && info.isDir()) { @@ -134,18 +134,18 @@ void PropertiesPage::load() { m_loaded = true; } -void PropertiesPage::enableNFS(bool b, const QString & message) { +void PropertiesPage::enableNFS(bool b, const TQString & message) { nfsChk->setEnabled(b); nfsGrp->setEnabled(b); - QToolTip::add(nfsChk,message); - QToolTip::add(nfsGrp,message); + TQToolTip::add(nfsChk,message); + TQToolTip::add(nfsGrp,message); } -void PropertiesPage::enableSamba(bool b, const QString & message) { +void PropertiesPage::enableSamba(bool b, const TQString & message) { sambaChk->setEnabled(b); sambaGrp->setEnabled(b); - QToolTip::add(sambaChk,message); - QToolTip::add(sambaGrp,message); + TQToolTip::add(sambaChk,message); + TQToolTip::add(sambaGrp,message); } @@ -171,11 +171,11 @@ bool PropertiesPage::save() { bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool samba) { - QString nfsFileName = KNFSShare::instance()->exportsPath(); + TQString nfsFileName = KNFSShare::instance()->exportsPath(); bool nfsNeedsKDEsu = false; if (nfs) { - if (QFileInfo(nfsFileName).isWritable()) { + if (TQFileInfo(nfsFileName).isWritable()) { nfsFile->saveTo(nfsFileName); } else { nfsNeedsKDEsu = true; @@ -185,10 +185,10 @@ bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool kdDebug(FILESHARE_DEBUG) << "PropertiesPage::save: nfs has not changed." << endl; - QString sambaFileName = KSambaShare::instance()->smbConfPath(); + TQString sambaFileName = KSambaShare::instance()->smbConfPath(); bool sambaNeedsKDEsu = false; if (samba) { - if (QFileInfo(sambaFileName).isWritable()) { + if (TQFileInfo(sambaFileName).isWritable()) { sambaFile->saveTo(sambaFileName); } else { sambaNeedsKDEsu = true; @@ -206,18 +206,18 @@ bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool KProcIO proc; - QString command; + TQString command; if (nfsNeedsKDEsu) { nfsFile->saveTo(nfsTempFile.name()); - command += QString("cp %1 %2;exportfs -ra;") + command += TQString("cp %1 %2;exportfs -ra;") .arg(KProcess::quote( nfsTempFile.name() )) .arg(KProcess::quote( nfsFileName )); } if (sambaNeedsKDEsu) { sambaFile->saveTo(sambaTempFile.name()); - command += QString("cp %1 %2;") + command += TQString("cp %1 %2;") .arg(KProcess::quote( sambaTempFile.name() )) .arg(KProcess::quote( sambaFileName )); } @@ -272,7 +272,7 @@ bool PropertiesPage::checkURL() { kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: enterUrl=true" << endl; KURL url(urlRq->url()); - QString path = url.path(1); + TQString path = url.path(1); kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: m_path='" << m_path << "'" << endl; @@ -306,7 +306,7 @@ bool PropertiesPage::checkURL() { kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: url is local file" << endl; - QFileInfo info(path); + TQFileInfo info(path); if (!info.exists()) { @@ -425,7 +425,7 @@ void PropertiesPage::updateNFSEntry() { void PropertiesPage::moreNFSBtn_clicked() { updateNFSEntry(); NFSDialog* dlg = new NFSDialog(this,m_nfsEntry); - if (dlg->exec()==QDialog::Accepted && + if (dlg->exec()==TQDialog::Accepted && dlg->modified()) { kdDebug(FILESHARE_DEBUG) << "NFSDialog::ok" << endl; @@ -450,7 +450,7 @@ bool PropertiesPage::loadSamba() { } enableSamba(true,""); - QString shareName = m_sambaFile->findShareByPath(m_path); + TQString shareName = m_sambaFile->findShareByPath(m_path); if (shareName.isNull()) { sambaChk->setChecked(false); kdDebug(FILESHARE_DEBUG) << "PropertiesPage::loadSamba: shareName is null!" @@ -552,8 +552,8 @@ bool PropertiesPage::updateSambaShare() { return true; } -void PropertiesPage::setSambaShareBoolValue(const QString & value, - QCheckBox* chk) +void PropertiesPage::setSambaShareBoolValue(const TQString & value, + TQCheckBox* chk) { bool v = m_sambaShare->getBoolValue(value); if (v == chk->isChecked()) @@ -563,13 +563,13 @@ void PropertiesPage::setSambaShareBoolValue(const QString & value, m_sambaChanged = true; } -QString PropertiesPage::getNewSambaName() { - QString path = m_path; +TQString PropertiesPage::getNewSambaName() { + TQString path = m_path; if (path.isNull() && m_enterUrl) { path = urlRq->url(); } - QString shareName = KURL(path).fileName(); + TQString shareName = KURL(path).fileName(); if (!sambaNameEdit->text().isEmpty()) shareName = sambaNameEdit->text(); @@ -599,7 +599,7 @@ void PropertiesPage::moreSambaBtnClicked() { ShareDlgImpl* dlg = new ShareDlgImpl(this,m_sambaShare); dlg->directoryGrp->hide(); dlg->pixmapFrame->hide(); - if (dlg->exec() == QDialog::Accepted && + if (dlg->exec() == TQDialog::Accepted && dlg->hasChanged()) { m_sambaChanged = true; changedSlot(); |