diff options
Diffstat (limited to 'konversation/src/urlcatcher.cpp')
-rw-r--r-- | konversation/src/urlcatcher.cpp | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/konversation/src/urlcatcher.cpp b/konversation/src/urlcatcher.cpp index 142d5f2..cb92742 100644 --- a/konversation/src/urlcatcher.cpp +++ b/konversation/src/urlcatcher.cpp @@ -18,12 +18,12 @@ #include "konversationapplication.h" #include "viewcontainer.h" -#include <qhbox.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qclipboard.h> -#include <qwhatsthis.h> -#include <qlayout.h> +#include <tqhbox.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqclipboard.h> +#include <tqwhatsthis.h> +#include <tqlayout.h> #include <kapplication.h> #include <kactionclasses.h> @@ -38,7 +38,7 @@ #include <klistviewsearchline.h> -UrlCatcher::UrlCatcher(QWidget* parent) : ChatWindow(parent) +UrlCatcher::UrlCatcher(TQWidget* parent) : ChatWindow(parent) { layout()->setAutoAdd(false); setName(i18n("URL Catcher")); @@ -49,49 +49,49 @@ UrlCatcher::UrlCatcher(QWidget* parent) : ChatWindow(parent) urlListView->addColumn(i18n("URL")); urlListView->setFullWidth(true); urlListView->setAllColumnsShowFocus(true); - QString urlListViewWT = i18n( + TQString urlListViewWT = i18n( "List of Uniform Resource Locators mentioned in any of the Konversation windows " "during this session."); - QWhatsThis::add(urlListView, urlListViewWT); + TQWhatsThis::add(urlListView, urlListViewWT); searchWidget = new KListViewSearchLineWidget(urlListView, this, "search_line"); searchWidget->setEnabled(false); - QHBox* buttonBox=new QHBox(this); + TQHBox* buttonBox=new TQHBox(this); buttonBox->setSpacing(spacing()); - openUrlButton=new QPushButton(i18n("&Open URL"),buttonBox,"open_url_button"); - QString openUrlButtonWT = i18n( + openUrlButton=new TQPushButton(i18n("&Open URL"),buttonBox,"open_url_button"); + TQString openUrlButtonWT = i18n( "<p>Select a <b>URL</b> above, then click this button to launch the " "application associated with the mimetype of the URL.</p>" "<p>In the <b>Settings</b>, under <b>Behavior</b> | <b>General</b>, " "you can specify a custom web browser for web URLs.</p>"); - QWhatsThis::add(openUrlButton, openUrlButtonWT); - copyUrlButton=new QPushButton(i18n("&Copy URL"),buttonBox,"copy_url_button"); - QString copyUrlButtonWT = i18n( + TQWhatsThis::add(openUrlButton, openUrlButtonWT); + copyUrlButton=new TQPushButton(i18n("&Copy URL"),buttonBox,"copy_url_button"); + TQString copyUrlButtonWT = i18n( "Select a <b>URL</b> above, then click this button to copy the URL to the clipboard."); - QWhatsThis::add(copyUrlButton, copyUrlButtonWT); - deleteUrlButton=new QPushButton(i18n("&Delete URL"),buttonBox,"delete_url_button"); - QString deleteUrlButtonWT = i18n( + TQWhatsThis::add(copyUrlButton, copyUrlButtonWT); + deleteUrlButton=new TQPushButton(i18n("&Delete URL"),buttonBox,"delete_url_button"); + TQString deleteUrlButtonWT = i18n( "Select a <b>URL</b> above, then click this button to delete the URL from the list."); - QWhatsThis::add(deleteUrlButton, deleteUrlButtonWT); - saveListButton=new QPushButton(i18n("Sa&ve List..."),buttonBox,"save_list_button"); - QString saveListButtonWT = i18n( + TQWhatsThis::add(deleteUrlButton, deleteUrlButtonWT); + saveListButton=new TQPushButton(i18n("Sa&ve List..."),buttonBox,"save_list_button"); + TQString saveListButtonWT = i18n( "Click to save the entire list to a file."); - QWhatsThis::add(saveListButton, saveListButtonWT); - clearListButton=new QPushButton(i18n("C&lear List"),buttonBox,"clear_list_button"); - QString clearListButtonWT = i18n( + TQWhatsThis::add(saveListButton, saveListButtonWT); + clearListButton=new TQPushButton(i18n("C&lear List"),buttonBox,"clear_list_button"); + TQString clearListButtonWT = i18n( "Click to erase the entire list."); - QWhatsThis::add(clearListButton, clearListButtonWT); + TQWhatsThis::add(clearListButton, clearListButtonWT); - connect(urlListView,SIGNAL (executed(QListViewItem*)),this,SLOT (openUrl(QListViewItem*)) ); - connect(urlListView,SIGNAL (selectionChanged()),this,SLOT (urlSelected()) ); + connect(urlListView,TQT_SIGNAL (executed(TQListViewItem*)),this,TQT_SLOT (openUrl(TQListViewItem*)) ); + connect(urlListView,TQT_SIGNAL (selectionChanged()),this,TQT_SLOT (urlSelected()) ); - connect(openUrlButton,SIGNAL (clicked()),this,SLOT (openUrlClicked()) ); - connect(copyUrlButton,SIGNAL (clicked()),this,SLOT (copyUrlClicked()) ); - connect(deleteUrlButton,SIGNAL (clicked()),this,SLOT (deleteUrlClicked()) ); - connect(saveListButton,SIGNAL (clicked()),this,SLOT (saveListClicked()) ); - connect(clearListButton,SIGNAL (clicked()),this,SLOT (clearListClicked()) ); + connect(openUrlButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (openUrlClicked()) ); + connect(copyUrlButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (copyUrlClicked()) ); + connect(deleteUrlButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (deleteUrlClicked()) ); + connect(saveListButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (saveListClicked()) ); + connect(clearListButton,TQT_SIGNAL (clicked()),this,TQT_SLOT (clearListClicked()) ); saveListButton->setEnabled(false); clearListButton->setEnabled(false); @@ -110,7 +110,7 @@ UrlCatcher::~UrlCatcher() void UrlCatcher::urlSelected() { - QListViewItem* item=urlListView->selectedItem(); + TQListViewItem* item=urlListView->selectedItem(); if(item) { openUrlButton->setEnabled(true); @@ -125,7 +125,7 @@ void UrlCatcher::urlSelected() } } -void UrlCatcher::addUrl(const QString& who,const QString& url) +void UrlCatcher::addUrl(const TQString& who,const TQString& url) { new KListViewItem(urlListView,who,url); clearListButton->setEnabled(true); @@ -133,19 +133,19 @@ void UrlCatcher::addUrl(const QString& who,const QString& url) searchWidget->setEnabled(true); } -void UrlCatcher::openUrl(QListViewItem* item) +void UrlCatcher::openUrl(TQListViewItem* item) { - QString url = item->text(1); + TQString url = item->text(1); if (!Preferences::useCustomBrowser() || url.lower().startsWith("mailto:") ) { new KRun(KURL(url)); } else { - QString cmd = Preferences::webBrowserCmd(); + TQString cmd = Preferences::webBrowserCmd(); cmd.replace("%u", url); KProcess *proc = new KProcess; - QStringList cmdAndArgs = KShell::splitArgs(cmd); + TQStringList cmdAndArgs = KShell::splitArgs(cmd); *proc << cmdAndArgs; // This code will also work, but starts an extra shell process. // kdDebug() << "UrlCatcher::openUrl(): cmd = " << cmd << endl; @@ -158,13 +158,13 @@ void UrlCatcher::openUrl(QListViewItem* item) void UrlCatcher::openUrlClicked() { - QListViewItem* item=urlListView->selectedItem(); + TQListViewItem* item=urlListView->selectedItem(); if(item) openUrl(item); } void UrlCatcher::copyUrlClicked() { - QListViewItem* item=urlListView->selectedItem(); + TQListViewItem* item=urlListView->selectedItem(); if(item) { QClipboard *cb=KApplication::kApplication()->clipboard(); @@ -175,7 +175,7 @@ void UrlCatcher::copyUrlClicked() void UrlCatcher::deleteUrlClicked() { - QListViewItem* item=urlListView->selectedItem(); + TQListViewItem* item=urlListView->selectedItem(); if(item) { emit deleteUrl(item->text(0),item->text(1)); @@ -204,20 +204,20 @@ void UrlCatcher::clearListClicked() void UrlCatcher::saveListClicked() { // Ask user for file name - QString fileName=KFileDialog::getSaveFileName( - QString(), - QString(), + TQString fileName=KFileDialog::getSaveFileName( + TQString(), + TQString(), this, i18n("Save URL List")); if(!fileName.isEmpty()) { // now save the list to disk - QFile listFile(fileName); + TQFile listFile(fileName); listFile.open(IO_WriteOnly); // wrap the file into a stream - QTextStream stream(&listFile); - QListViewItem* item=urlListView->itemAtIndex(0); + TQTextStream stream(&listFile); + TQListViewItem* item=urlListView->itemAtIndex(0); while(item) { stream << item->text(0) << ": " << item->text(1) << endl; |