summaryrefslogtreecommitdiffstats
path: root/filesharing/advanced/propsdlgplugin
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /filesharing/advanced/propsdlgplugin
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-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')
-rw-r--r--filesharing/advanced/propsdlgplugin/propertiespage.cpp70
-rw-r--r--filesharing/advanced/propsdlgplugin/propertiespage.h14
-rw-r--r--filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp28
-rw-r--r--filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h2
4 files changed, 57 insertions, 57 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();
diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.h b/filesharing/advanced/propsdlgplugin/propertiespage.h
index 832518c7..f03de5c1 100644
--- a/filesharing/advanced/propsdlgplugin/propertiespage.h
+++ b/filesharing/advanced/propsdlgplugin/propertiespage.h
@@ -33,7 +33,7 @@ class PropertiesPage : public PropertiesPageGUI
{
Q_OBJECT
public:
- PropertiesPage(QWidget* parent, KFileItemList items, bool enterUrl=false);
+ PropertiesPage(TQWidget* parent, KFileItemList items, bool enterUrl=false);
virtual ~PropertiesPage();
bool save();
@@ -45,7 +45,7 @@ public slots:
protected:
bool m_enterUrl;
- QString m_path;
+ TQString m_path;
KFileItemList m_items;
NFSFile *m_nfsFile;
NFSEntry *m_nfsEntry;
@@ -61,7 +61,7 @@ protected slots:
virtual void moreNFSBtn_clicked();
virtual void moreSambaBtnClicked();
virtual void sambaChkToggled( bool b );
- virtual void urlRqTextChanged(const QString&);
+ virtual void urlRqTextChanged(const TQString&);
private:
bool loadNFS();
@@ -75,12 +75,12 @@ private:
bool saveSamba();
bool checkURL();
- void setSambaShareBoolValue(const QString & value, QCheckBox* chk);
+ void setSambaShareBoolValue(const TQString & value, TQCheckBox* chk);
void createNewSambaShare();
- QString getNewSambaName();
+ TQString getNewSambaName();
- void enableNFS(bool b,const QString & message);
- void enableSamba(bool b,const QString & message);
+ void enableNFS(bool b,const TQString & message);
+ void enableSamba(bool b,const TQString & message);
};
diff --git a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
index b5a2ef26..fafb4ece 100644
--- a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
+++ b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp
@@ -16,10 +16,10 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqstring.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kgenericfactory.h>
#include <kdebug.h>
@@ -46,7 +46,7 @@ class PropsDlgSharePlugin::Private
};
PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
- const char *, const QStringList & )
+ const char *, const TQStringList & )
: KPropsDlgPlugin(dlg), d(0)
{
KGlobal::locale()->insertCatalogue("kfileshare");
@@ -57,30 +57,30 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
}
- QVBox* vbox = properties->addVBoxPage(i18n("&Share"));
+ TQVBox* vbox = properties->addVBoxPage(i18n("&Share"));
properties->setFileSharingPage(vbox);
if (KFileShare::authorization() == KFileShare::UserNotAllowed) {
- QWidget* widget = new QWidget( vbox );
- QVBoxLayout * vLayout = new QVBoxLayout( widget );
+ TQWidget* widget = new TQWidget( vbox );
+ TQVBoxLayout * vLayout = new TQVBoxLayout( widget );
vLayout->setSpacing( KDialog::spacingHint() );
vLayout->setMargin( 0 );
if (KFileShare::sharingEnabled()) {
vLayout->addWidget(
- new QLabel( i18n("You need to be authorized to share directories."),
+ new TQLabel( i18n("You need to be authorized to share directories."),
widget ));
} else {
vLayout->addWidget(
- new QLabel( i18n("File sharing is disabled."), widget));
+ new TQLabel( i18n("File sharing is disabled."), widget));
}
KPushButton* btn = new KPushButton( i18n("Configure File Sharing..."), widget );
- connect( btn, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ connect( btn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
btn->setDefault(false);
- QHBoxLayout* hBox = new QHBoxLayout( (QWidget *)0L );
+ TQHBoxLayout* hBox = new TQHBoxLayout( (TQWidget *)0L );
hBox->addWidget( btn, 0, Qt::AlignLeft );
vLayout->addLayout(hBox);
vLayout->addStretch( 10 ); // align items on top
@@ -91,8 +91,8 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg,
d = new Private();
d->page = new PropertiesPage(vbox, properties->items(),false);
- connect(d->page, SIGNAL(changed()),
- this, SIGNAL(changed()));
+ connect(d->page, TQT_SIGNAL(changed()),
+ this, TQT_SIGNAL(changed()));
kdDebug(5009) << "Fileshare properties dialog plugin loaded" << endl;
diff --git a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
index 4604467e..56556dae 100644
--- a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
+++ b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h
@@ -26,7 +26,7 @@ class PropsDlgSharePlugin : public KPropsDlgPlugin
{
Q_OBJECT
public:
- PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const QStringList & );
+ PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const TQStringList & );
virtual ~PropsDlgSharePlugin();
virtual void applyChanges();