summaryrefslogtreecommitdiffstats
path: root/knewsticker/newssourcedlgimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knewsticker/newssourcedlgimpl.cpp')
-rw-r--r--knewsticker/newssourcedlgimpl.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/knewsticker/newssourcedlgimpl.cpp b/knewsticker/newssourcedlgimpl.cpp
index 2cf39511..03704155 100644
--- a/knewsticker/newssourcedlgimpl.cpp
+++ b/knewsticker/newssourcedlgimpl.cpp
@@ -19,44 +19,44 @@
#include <knuminput.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
-SuggestProgressDlg::SuggestProgressDlg(const KURL &url, QWidget *parent, const char *name)
+SuggestProgressDlg::SuggestProgressDlg(const KURL &url, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Downloading Data"), Cancel, Cancel),
m_gotSourceFile(false),
m_gotIcon(false)
{
- QVBox *mainWidget = makeVBoxMainWidget();
+ TQVBox *mainWidget = makeVBoxMainWidget();
- new QLabel(i18n("<qt>Please wait while KNewsTicker is downloading some "
+ new TQLabel(i18n("<qt>Please wait while KNewsTicker is downloading some "
"data necessary to suggest reasonable values.<br/>"
"<br/>"
"This will not take longer than one minute.</qt>" ),
mainWidget);
- m_progressBar = new QProgressBar(60, mainWidget);
+ m_progressBar = new TQProgressBar(60, mainWidget);
m_progressBar->setPercentageVisible(false);
- m_timeoutTimer = new QTimer(this);
- connect(m_timeoutTimer, SIGNAL(timeout()), this, SLOT(slotTimeoutTick()));
+ m_timeoutTimer = new TQTimer(this);
+ connect(m_timeoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeoutTick()));
m_timeoutTimer->start(1000);
m_xmlSrc = new XMLNewsSource;
- connect(m_xmlSrc, SIGNAL(loadComplete(XMLNewsSource *, bool)),
- this, SLOT(slotLoadComplete(XMLNewsSource *, bool)));
+ connect(m_xmlSrc, TQT_SIGNAL(loadComplete(XMLNewsSource *, bool)),
+ this, TQT_SLOT(slotLoadComplete(XMLNewsSource *, bool)));
m_xmlSrc->loadFrom(url);
- connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
KURL u = url;
if (url.isLocalFile())
- u = QString::null;
+ u = TQString::null;
else
- u.setEncodedPathAndQuery(QString::fromLatin1("/favicon.ico"));
+ u.setEncodedPathAndQuery(TQString::fromLatin1("/favicon.ico"));
NewsIconMgr::self()->getIcon(u);
}
@@ -82,25 +82,25 @@ void SuggestProgressDlg::slotLoadComplete(XMLNewsSource *, bool succeeded)
m_succeeded = succeeded;
if (m_gotIcon)
- done(succeeded ? QDialog::Accepted : QDialog::Rejected);
+ done(succeeded ? TQDialog::Accepted : TQDialog::Rejected);
}
-void SuggestProgressDlg::slotGotIcon(const KURL &url, const QPixmap &pixmap)
+void SuggestProgressDlg::slotGotIcon(const KURL &url, const TQPixmap &pixmap)
{
m_gotIcon = true;
m_icon = pixmap;
m_iconURL = url;
if (m_gotIcon)
- done(m_succeeded ? QDialog::Accepted : QDialog::Rejected);
+ done(m_succeeded ? TQDialog::Accepted : TQDialog::Rejected);
}
-NewsSourceDlgImpl::NewsSourceDlgImpl(QWidget *parent, const char *name, bool modal, WFlags fl)
+NewsSourceDlgImpl::NewsSourceDlgImpl(TQWidget *parent, const char *name, bool modal, WFlags fl)
: NewsSourceDlg(parent, name, modal, fl),
m_modified(false)
{
- connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
for (unsigned int i = 0; i < DEFAULT_SUBJECTS; i++)
comboCategory->insertItem(
@@ -138,12 +138,12 @@ void NewsSourceDlgImpl::slotOkClicked()
KURL iconURL ( leIcon->text() );
if (iconURL.protocol().isEmpty())
- if (iconURL.host().startsWith(QString::fromLatin1("ftp.")))
- iconURL.setProtocol(QString::fromLatin1("ftp"));
- else if (iconURL.host().startsWith(QString::fromLatin1("www.")))
- iconURL.setProtocol(QString::fromLatin1("http"));
+ if (iconURL.host().startsWith(TQString::fromLatin1("ftp.")))
+ iconURL.setProtocol(TQString::fromLatin1("ftp"));
+ else if (iconURL.host().startsWith(TQString::fromLatin1("www.")))
+ iconURL.setProtocol(TQString::fromLatin1("http"));
else
- iconURL.setProtocol(QString::fromLatin1("file"));
+ iconURL.setProtocol(TQString::fromLatin1("file"));
NewsSourceBase::Data nsd(leName->text(), url.url(), iconURL.url(), subject,
sbMaxArticles->value(), true, cbProgram->isChecked());
@@ -166,7 +166,7 @@ void NewsSourceDlgImpl::slotSuggestClicked()
return;
SuggestProgressDlg dlg(url, this);
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
pixmapIcon->setPixmap(dlg.icon());
if (NewsIconMgr::self()->isStdIcon(dlg.icon()))
leIcon->clear();
@@ -191,8 +191,8 @@ void NewsSourceDlgImpl::setup(const NewsSourceBase::Data &nsd, bool modify)
comboCategory->setCurrentItem(nsd.subject);
sbMaxArticles->setValue(nsd.maxArticles);
KURL iconURL ( nsd.icon );
- if (iconURL.protocol() == QString::fromLatin1("file"))
- iconURL.setProtocol(QString::null);
+ if (iconURL.protocol() == TQString::fromLatin1("file"))
+ iconURL.setProtocol(TQString::null);
leIcon->setText(iconURL.url());
NewsIconMgr::self()->getIcon(iconURL);
if (modify == true) {
@@ -205,10 +205,10 @@ KURL NewsSourceDlgImpl::polishedURL(const KURL &url) const
KURL newURL = url;
if (url.protocol().isEmpty())
- if (url.url().startsWith(QString::fromLatin1("ftp")))
- newURL = QString::fromLatin1("ftp://") + url.url();
+ if (url.url().startsWith(TQString::fromLatin1("ftp")))
+ newURL = TQString::fromLatin1("ftp://") + url.url();
else
- newURL = QString::fromLatin1("http://") + url.url();
+ newURL = TQString::fromLatin1("http://") + url.url();
return newURL;
}
@@ -222,7 +222,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url)
return false;
}
- if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == QString::fromLatin1("/")) {
+ if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == TQString::fromLatin1("/")) {
KMessageBox::error(this, i18n("KNewsTicker needs a valid RDF or RSS file to"
" suggest sensible values. The specified source file is invalid."),
i18n("Invalid Source File"));
@@ -232,7 +232,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url)
return true;
}
-void NewsSourceDlgImpl::slotGotIcon(const KURL &, const QPixmap &pixmap)
+void NewsSourceDlgImpl::slotGotIcon(const KURL &, const TQPixmap &pixmap)
{
pixmapIcon->setPixmap(pixmap);
}