summaryrefslogtreecommitdiffstats
path: root/quanta/project/projectnewweb.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/project/projectnewweb.cpp
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/project/projectnewweb.cpp')
-rw-r--r--quanta/project/projectnewweb.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/quanta/project/projectnewweb.cpp b/quanta/project/projectnewweb.cpp
index 20685021..5959d01e 100644
--- a/quanta/project/projectnewweb.cpp
+++ b/quanta/project/projectnewweb.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
// qt includes
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qlistview.h>
-#include <qfileinfo.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqlistview.h>
+#include <tqfileinfo.h>
+#include <tqcombobox.h>
// kde includes
#include <klocale.h>
@@ -38,7 +38,7 @@
#include "quantacommon.h"
#include "uploadtreeview.h"
-ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
+ProjectNewWeb::ProjectNewWeb(TQWidget *parent, const char *name )
: ProjectNewWebS(parent,name)
{
button->setEnabled(false);
@@ -49,14 +49,14 @@ ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
listView->removeColumn(1);
listView->removeColumn(1);
- connect( commandLine, SIGNAL(textChanged(const QString&)),
- this, SLOT (enableStart(const QString&)));
- connect( siteUrl, SIGNAL(textChanged(const QString&)),
- this, SLOT (setCommandL(const QString&)));
- connect( button, SIGNAL(clicked()),
- this, SLOT (slotStart()));
- connect( protocolCombo,SIGNAL(highlighted(const QString&)),
- this, SLOT (setProtocol(const QString&)));
+ connect( commandLine, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT (enableStart(const TQString&)));
+ connect( siteUrl, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT (setCommandL(const TQString&)));
+ connect( button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT (slotStart()));
+ connect( protocolCombo,TQT_SIGNAL(highlighted(const TQString&)),
+ this, TQT_SLOT (setProtocol(const TQString&)));
start = false;
KLed1->setState(KLed::Off);
@@ -66,21 +66,21 @@ ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
ProjectNewWeb::~ProjectNewWeb(){
}
-void ProjectNewWeb::enableStart(const QString&)
+void ProjectNewWeb::enableStart(const TQString&)
{
if ( !commandLine->text().isEmpty() ) button->setEnabled(true);
else button->setEnabled(false);
}
-void ProjectNewWeb::setCommandL(const QString& url)
+void ProjectNewWeb::setCommandL(const TQString& url)
{
- QString siteurl = url;
+ TQString siteurl = url;
commandLine->setText("wget -c -np -r --level=5 -nH "+ protocolCombo->currentText().lower()+ "://"+siteurl);
}
/** No descriptions */
-void ProjectNewWeb::setProtocol(const QString& protocol)
+void ProjectNewWeb::setProtocol(const TQString& protocol)
{
commandLine->setText("wget -c -np -r --level=5 -nH "+ protocol.lower()+ "://"+siteUrl->text());
}
@@ -108,25 +108,25 @@ void ProjectNewWeb::slotStart()
proc = new KProcess();
proc ->clearArguments();
- QStringList list = QStringList::split (" ", commandLine->text());
+ TQStringList list = TQStringList::split (" ", commandLine->text());
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
*proc << *it;
}
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetWgetOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetWgetOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess *)), this,
- SLOT( slotGetWgetExited(KProcess *)));
+ connect( proc, TQT_SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetWgetOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetWgetOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(processExited( KProcess *)), this,
+ TQT_SLOT( slotGetWgetExited(KProcess *)));
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
{
start = true;
button->setText( i18n("Stop") );
- emit enableNextButton((QWidget *)this->parent(),false);
+ emit enableNextButton((TQWidget *)this->parent(),false);
} else
{
KMessageBox::error(this, i18n("There was an error while trying to run the \"wget\" application.\
@@ -138,14 +138,14 @@ void ProjectNewWeb::slotStart()
KMessageBox::sorry(this,i18n("This feature is available only if the project lies on a local disk."));
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
} else
{
QuantaCommon::dirCreationError(this, baseURL);
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
} else {
@@ -155,7 +155,7 @@ void ProjectNewWeb::slotStart()
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
}
@@ -166,18 +166,18 @@ void ProjectNewWeb::slotGetWgetExited(KProcess*)
start = false;
button->setText( i18n("Start") );
emit messages(i18n("wget finished...\n"));
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
void ProjectNewWeb::slotGetWgetOutput(KProcess *, char *buffer, int buflen)
{
- QString output = buffer;
+ TQString output = buffer;
output = output.left( buflen );
emit messages(output);
int pos;
- QString basePath = baseURL.path(1);
+ TQString basePath = baseURL.path(1);
while ( (pos = output.find("saved")) != -1 )
{
if (KLed1->state() == KLed::Off)
@@ -201,7 +201,7 @@ void ProjectNewWeb::slotGetWgetOutput(KProcess *, char *buffer, int buflen)
continue;
}
- QString fileName = output.left(endName);
+ TQString fileName = output.left(endName);
fileName = fileName.right( endName - begName-1);
output = output.remove(0,pos+1);
@@ -218,8 +218,8 @@ KURL::List ProjectNewWeb::files()
KURL::List r;
KURL u;
- QListViewItem *item;
- QListViewItemIterator it(listView);
+ TQListViewItem *item;
+ TQListViewItemIterator it(listView);
for ( ; it.current(); ++it )
{
item = it.current();
@@ -236,7 +236,7 @@ KURL::List ProjectNewWeb::files()
return r;
}
-void ProjectNewWeb::resizeEvent ( QResizeEvent *t )
+void ProjectNewWeb::resizeEvent ( TQResizeEvent *t )
{
ProjectNewWebS::resizeEvent(t);
// listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);