From 7346aee26bf190a7e70333c40fab4caca847cd27 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:22:56 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konq-plugins/adblock/adblock.cpp | 50 +-- konq-plugins/adblock/adblock.h | 30 +- konq-plugins/adblock/adblockdialogue.cpp | 70 ++--- konq-plugins/adblock/adblockdialogue.h | 28 +- konq-plugins/akregator/akregatorplugin.cpp | 22 +- konq-plugins/akregator/akregatorplugin.h | 8 +- konq-plugins/akregator/feeddetector.cpp | 46 +-- konq-plugins/akregator/feeddetector.h | 20 +- konq-plugins/akregator/konqfeedicon.cpp | 54 ++-- konq-plugins/akregator/konqfeedicon.h | 8 +- konq-plugins/akregator/pluginbase.cpp | 14 +- konq-plugins/akregator/pluginbase.h | 6 +- konq-plugins/arkplugin/arkplugin.cpp | 124 ++++---- konq-plugins/arkplugin/arkplugin.h | 24 +- konq-plugins/autorefresh/autorefresh.cpp | 20 +- konq-plugins/autorefresh/autorefresh.h | 4 +- konq-plugins/babelfish/plugin_babelfish.cpp | 138 ++++----- konq-plugins/babelfish/plugin_babelfish.h | 4 +- konq-plugins/crashes/crashesplugin.cpp | 30 +- konq-plugins/crashes/crashesplugin.h | 18 +- konq-plugins/dirfilter/dirfilterplugin.cpp | 128 ++++---- konq-plugins/dirfilter/dirfilterplugin.h | 42 +-- konq-plugins/domtreeviewer/domlistviewitem.cpp | 36 +-- konq-plugins/domtreeviewer/domlistviewitem.h | 24 +- konq-plugins/domtreeviewer/domtreecommands.cpp | 50 +-- konq-plugins/domtreeviewer/domtreecommands.h | 44 +-- konq-plugins/domtreeviewer/domtreeview.cpp | 242 +++++++-------- konq-plugins/domtreeviewer/domtreeview.h | 36 +-- konq-plugins/domtreeviewer/domtreewindow.cpp | 92 +++--- konq-plugins/domtreeviewer/domtreewindow.h | 26 +- konq-plugins/domtreeviewer/messagedialog.ui.h | 4 +- .../domtreeviewer/plugin_domtreeviewer.cpp | 8 +- konq-plugins/domtreeviewer/plugin_domtreeviewer.h | 4 +- konq-plugins/domtreeviewer/signalreceiver.cpp | 4 +- konq-plugins/domtreeviewer/signalreceiver.h | 6 +- konq-plugins/fsview/fsview.cpp | 92 +++--- konq-plugins/fsview/fsview.h | 32 +- konq-plugins/fsview/fsview_part.cpp | 104 +++---- konq-plugins/fsview/fsview_part.h | 8 +- konq-plugins/fsview/inode.cpp | 56 ++-- konq-plugins/fsview/inode.h | 24 +- konq-plugins/fsview/main.cpp | 20 +- konq-plugins/fsview/scan.cpp | 32 +- konq-plugins/fsview/scan.h | 34 +-- konq-plugins/fsview/treemap.cpp | 338 ++++++++++----------- konq-plugins/fsview/treemap.h | 178 +++++------ .../khtmlsettingsplugin/settingsplugin.cpp | 60 ++-- konq-plugins/khtmlsettingsplugin/settingsplugin.h | 6 +- konq-plugins/kimgalleryplugin/imgallerydialog.cpp | 166 +++++----- konq-plugins/kimgalleryplugin/imgallerydialog.h | 54 ++-- konq-plugins/kimgalleryplugin/imgalleryplugin.cpp | 160 +++++----- konq-plugins/kimgalleryplugin/imgalleryplugin.h | 24 +- konq-plugins/kuick/kcmkuick/kcmkuick.cpp | 42 +-- konq-plugins/kuick/kcmkuick/kcmkuick.h | 6 +- konq-plugins/kuick/kdirmenu.cpp | 58 ++-- konq-plugins/kuick/kdirmenu.h | 28 +- konq-plugins/kuick/kimcontactmenu.cpp | 14 +- konq-plugins/kuick/kimcontactmenu.h | 10 +- konq-plugins/kuick/kmetamenu.cpp | 62 ++-- konq-plugins/kuick/kmetamenu.h | 24 +- konq-plugins/kuick/kuick_plugin.cpp | 30 +- konq-plugins/kuick/kuick_plugin.h | 8 +- konq-plugins/microformat/konqmficon.cpp | 64 ++-- konq-plugins/microformat/konqmficon.h | 8 +- konq-plugins/microformat/pluginbase.cpp | 2 +- konq-plugins/microformat/pluginbase.h | 2 +- konq-plugins/minitools/minitoolsplugin.cpp | 48 +-- konq-plugins/minitools/minitoolsplugin.h | 18 +- konq-plugins/rellinks/plugin_rellinks.cpp | 114 +++---- konq-plugins/rellinks/plugin_rellinks.h | 22 +- konq-plugins/rsync/rsyncconfigdialog.cpp | 72 ++--- konq-plugins/rsync/rsyncconfigdialog.h | 40 +-- konq-plugins/rsync/rsyncplugin.cpp | 224 +++++++------- konq-plugins/rsync/rsyncplugin.h | 36 +-- konq-plugins/searchbar/searchbar.cpp | 168 +++++----- konq-plugins/searchbar/searchbar.h | 48 +-- .../sidebar/delicious/bookmarkListItem.cpp | 16 +- konq-plugins/sidebar/delicious/bookmarkListItem.h | 16 +- konq-plugins/sidebar/delicious/mainWidget.cpp | 120 ++++---- konq-plugins/sidebar/delicious/mainWidget.h | 20 +- konq-plugins/sidebar/delicious/plugin.cpp | 28 +- konq-plugins/sidebar/delicious/plugin.h | 12 +- konq-plugins/sidebar/delicious/tagListItem.cpp | 20 +- konq-plugins/sidebar/delicious/tagListItem.h | 18 +- konq-plugins/sidebar/mediaplayer/controls.cpp | 38 +-- konq-plugins/sidebar/mediaplayer/controls.h | 34 +-- konq-plugins/sidebar/mediaplayer/engine.cpp | 10 +- konq-plugins/sidebar/mediaplayer/engine.h | 4 +- konq-plugins/sidebar/mediaplayer/mediaplayer.cpp | 12 +- konq-plugins/sidebar/mediaplayer/mediaplayer.h | 8 +- konq-plugins/sidebar/mediaplayer/mediawidget.cpp | 54 ++-- konq-plugins/sidebar/mediaplayer/mediawidget.h | 8 +- konq-plugins/sidebar/mediaplayer/player.cpp | 10 +- konq-plugins/sidebar/mediaplayer/player.h | 10 +- konq-plugins/sidebar/metabar/src/configdialog.cpp | 290 +++++++++--------- konq-plugins/sidebar/metabar/src/configdialog.h | 38 +-- konq-plugins/sidebar/metabar/src/defaultplugin.cpp | 80 ++--- konq-plugins/sidebar/metabar/src/defaultplugin.h | 8 +- konq-plugins/sidebar/metabar/src/httpplugin.cpp | 8 +- konq-plugins/sidebar/metabar/src/metabar.cpp | 8 +- konq-plugins/sidebar/metabar/src/metabar.h | 8 +- .../sidebar/metabar/src/metabarfunctions.cpp | 24 +- .../sidebar/metabar/src/metabarfunctions.h | 10 +- konq-plugins/sidebar/metabar/src/metabarwidget.cpp | 128 ++++---- konq-plugins/sidebar/metabar/src/metabarwidget.h | 24 +- .../sidebar/metabar/src/protocolplugin.cpp | 12 +- konq-plugins/sidebar/metabar/src/serviceloader.cpp | 56 ++-- konq-plugins/sidebar/metabar/src/serviceloader.h | 18 +- .../sidebar/metabar/src/settingsplugin.cpp | 18 +- konq-plugins/sidebar/newsticker/configfeeds.cpp | 2 +- konq-plugins/sidebar/newsticker/configfeeds.h | 2 +- konq-plugins/sidebar/newsticker/norsswidget.cpp | 22 +- konq-plugins/sidebar/newsticker/norsswidget.h | 4 +- konq-plugins/sidebar/newsticker/nspanel.cpp | 48 +-- konq-plugins/sidebar/newsticker/nspanel.h | 44 +-- .../sidebar/newsticker/nsstacktabwidget.cpp | 110 +++---- konq-plugins/sidebar/newsticker/nsstacktabwidget.h | 26 +- konq-plugins/sidebar/newsticker/sidebar_news.cpp | 80 ++--- konq-plugins/sidebar/newsticker/sidebar_news.h | 24 +- konq-plugins/uachanger/uachangerplugin.cpp | 66 ++-- konq-plugins/uachanger/uachangerplugin.h | 26 +- konq-plugins/validators/plugin_validators.cpp | 32 +- konq-plugins/validators/plugin_validators.h | 8 +- konq-plugins/validators/validatorsdialog.cpp | 48 +-- konq-plugins/validators/validatorsdialog.h | 24 +- konq-plugins/webarchiver/archivedialog.cpp | 106 +++---- konq-plugins/webarchiver/archivedialog.h | 32 +- konq-plugins/webarchiver/plugin_webarchiver.cpp | 24 +- konq-plugins/webarchiver/plugin_webarchiver.h | 4 +- konq-plugins/webarchiver/webarchivecreator.cpp | 22 +- konq-plugins/webarchiver/webarchivecreator.h | 6 +- 131 files changed, 2964 insertions(+), 2964 deletions(-) (limited to 'konq-plugins') diff --git a/konq-plugins/adblock/adblock.cpp b/konq-plugins/adblock/adblock.cpp index 30878fd..c18c061 100644 --- a/konq-plugins/adblock/adblock.cpp +++ b/konq-plugins/adblock/adblock.cpp @@ -49,14 +49,14 @@ #include using namespace DOM; -#include -#include -#include +#include +#include +#include typedef KGenericFactory AdBlockFactory; K_EXPORT_COMPONENT_FACTORY( libadblock, AdBlockFactory( "adblock" ) ) -AdBlock::AdBlock(QObject *parent, const char *name, const QStringList &) : +AdBlock::AdBlock(TQObject *parent, const char *name, const TQStringList &) : KParts::Plugin(parent, name), m_label(0), m_menu(0) { @@ -65,10 +65,10 @@ AdBlock::AdBlock(QObject *parent, const char *name, const QStringList &) : m_menu = new KPopupMenu(m_part->widget()); m_menu->insertTitle(i18n("Adblock")); - m_menu->insertItem(i18n("Configure"), this, SLOT(showKCModule())); - m_menu->insertItem(i18n("Show Elements"), this, SLOT(showDialogue())); + m_menu->insertItem(i18n("Configure"), this, TQT_SLOT(showKCModule())); + m_menu->insertItem(i18n("Show Elements"), this, TQT_SLOT(showDialogue())); - connect(m_part, SIGNAL(completed()), this, SLOT(initLabel())); + connect(m_part, TQT_SIGNAL(completed()), this, TQT_SLOT(initLabel())); } AdBlock::~AdBlock() @@ -95,14 +95,14 @@ void AdBlock::initLabel() KIconLoader *loader = instance()->iconLoader(); m_label->setFixedHeight(loader->currentSize(KIcon::Small)); - m_label->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); + m_label->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_label->setUseCursor(false); m_label->setPixmap(loader->loadIcon("filter", KIcon::Small)); statusBarEx->addStatusBarItem(m_label, 0, false); - connect(m_label, SIGNAL(leftClickedURL()), this, SLOT(showDialogue())); - connect(m_label, SIGNAL(rightClickedURL()), this, SLOT(contextMenu())); + connect(m_label, TQT_SIGNAL(leftClickedURL()), this, TQT_SLOT(showDialogue())); + connect(m_label, TQT_SIGNAL(rightClickedURL()), this, TQT_SLOT(contextMenu())); } void AdBlock::showDialogue() @@ -120,9 +120,9 @@ void AdBlock::showDialogue() fillBlockableElements(elements); AdBlockDlg *dialogue = new AdBlockDlg(m_part->widget(), elements); - connect(dialogue, SIGNAL( notEmptyFilter(const QString&) ), this, SLOT( addAdFilter(const QString&) )); - connect(dialogue, SIGNAL( cancelClicked() ), dialogue, SLOT( delayedDestruct() )); - connect(dialogue, SIGNAL( closeClicked() ), dialogue, SLOT( delayedDestruct() )); + connect(dialogue, TQT_SIGNAL( notEmptyFilter(const TQString&) ), this, TQT_SLOT( addAdFilter(const TQString&) )); + connect(dialogue, TQT_SIGNAL( cancelClicked() ), dialogue, TQT_SLOT( delayedDestruct() )); + connect(dialogue, TQT_SIGNAL( closeClicked() ), dialogue, TQT_SLOT( delayedDestruct() )); dialogue->show(); } @@ -130,14 +130,14 @@ void AdBlock::showKCModule() { KCMultiDialog* dialogue = new KCMultiDialog(m_part->widget()); dialogue->addModule("khtml_filter"); - connect(dialogue, SIGNAL( cancelClicked() ), dialogue, SLOT( delayedDestruct() )); - connect(dialogue, SIGNAL( closeClicked() ), dialogue, SLOT( delayedDestruct() )); + connect(dialogue, TQT_SIGNAL( cancelClicked() ), dialogue, TQT_SLOT( delayedDestruct() )); + connect(dialogue, TQT_SIGNAL( closeClicked() ), dialogue, TQT_SLOT( delayedDestruct() )); dialogue->show(); } void AdBlock::contextMenu() { - m_menu->popup(QCursor::pos()); + m_menu->popup(TQCursor::pos()); } void AdBlock::fillBlockableElements(AdElementList &elements) @@ -172,7 +172,7 @@ void AdBlock::fillWithImages(AdElementList &elements) DOMString src = image.src(); - QString url = htmlDoc.completeURL(src).string(); + TQString url = htmlDoc.completeURL(src).string(); if (!url.isEmpty() && url != m_part->baseURL().url()) { AdElement element(url, "image", "IMG", false); @@ -185,7 +185,7 @@ void AdBlock::fillWithImages(AdElementList &elements) void AdBlock::fillWithHtmlTag(AdElementList &elements, const DOMString &tagName, const DOMString &attrName, - const QString &category) + const TQString &category) { Document doc = m_part->document(); @@ -199,7 +199,7 @@ void AdBlock::fillWithHtmlTag(AdElementList &elements, DOMString src = attr.nodeValue(); if (src.isNull()) continue; - QString url = doc.completeURL(src).string(); + TQString url = doc.completeURL(src).string(); if (!url.isEmpty() && url != m_part->baseURL().url()) { AdElement element(url, tagName.string(), category, false); @@ -209,7 +209,7 @@ void AdBlock::fillWithHtmlTag(AdElementList &elements, } } -void AdBlock::addAdFilter(const QString &url) +void AdBlock::addAdFilter(const TQString &url) { //FIXME hackish KHTMLSettings *settings = const_cast(m_part->settings()); @@ -221,8 +221,8 @@ void AdBlock::addAdFilter(const QString &url) AdElement::AdElement() : m_url(0), m_category(0), m_type(0), m_blocked(false) {} -AdElement::AdElement(const QString &url, const QString &category, - const QString &type, bool blocked) : +AdElement::AdElement(const TQString &url, const TQString &category, + const TQString &type, bool blocked) : m_url(url), m_category(category), m_type(type), m_blocked(blocked) {} AdElement &AdElement::operator=(const AdElement &obj) @@ -250,17 +250,17 @@ void AdElement::setBlocked(bool blocked) m_blocked = blocked; } -const QString &AdElement::url() const +const TQString &AdElement::url() const { return m_url; } -const QString &AdElement::category() const +const TQString &AdElement::category() const { return m_category; } -const QString &AdElement::type() const +const TQString &AdElement::type() const { return m_type; } diff --git a/konq-plugins/adblock/adblock.h b/konq-plugins/adblock/adblock.h index 4b6154e..0a9b15b 100644 --- a/konq-plugins/adblock/adblock.h +++ b/konq-plugins/adblock/adblock.h @@ -21,8 +21,8 @@ #ifndef KONQ_ADBLOCK_H #define KONQ_ADBLOCK_H -#include -#include +#include +#include #include class KHTMLPart; @@ -41,18 +41,18 @@ namespace DOM class DOMString; } -typedef QValueList AdElementList; +typedef TQValueList AdElementList; class AdBlock : public KParts::Plugin { Q_OBJECT public: - AdBlock(QObject *parent, const char *name, const QStringList &); + AdBlock(TQObject *parent, const char *name, const TQStringList &); ~AdBlock(); private: - QGuardedPtr m_part; + TQGuardedPtr m_part; KURLLabel *m_label; KPopupMenu *m_menu; @@ -61,12 +61,12 @@ private: void fillWithHtmlTag(AdElementList &elements, const DOM::DOMString &tagName, const DOM::DOMString &attrName, - const QString &category); + const TQString &category); private slots: void initLabel(); void showDialogue(); - void addAdFilter(const QString &url); + void addAdFilter(const TQString &url); void contextMenu(); void showKCModule(); }; @@ -76,24 +76,24 @@ private slots: class AdElement { private: - QString m_url; - QString m_category; - QString m_type; + TQString m_url; + TQString m_category; + TQString m_type; bool m_blocked; public: AdElement(); - AdElement(const QString &url, const QString &category, - const QString &type, bool blocked); + AdElement(const TQString &url, const TQString &category, + const TQString &type, bool blocked); AdElement &operator=(const AdElement &); bool operator==(const AdElement &e1); bool isBlocked() const; void setBlocked(bool blocked); - const QString &url() const; - const QString &category() const; - const QString &type() const; + const TQString &url() const; + const TQString &category() const; + const TQString &type() const; }; #endif diff --git a/konq-plugins/adblock/adblockdialogue.cpp b/konq-plugins/adblock/adblockdialogue.cpp index 5de6efa..1aff0f6 100644 --- a/konq-plugins/adblock/adblockdialogue.cpp +++ b/konq-plugins/adblock/adblockdialogue.cpp @@ -24,30 +24,30 @@ #include #include -#include -#include -#include -#include -#include -#include -#include - -AdBlockDlg::AdBlockDlg(QWidget *parent, AdElementList &elements) : +#include +#include +#include +#include +#include +#include +#include + +AdBlockDlg::AdBlockDlg(TQWidget *parent, AdElementList &elements) : KDialogBase( parent, "Adblock dialogue", true, "Adblock - able Items", Ok|Cancel, Ok, true ) { - QVBox *page = makeVBoxMainWidget(); - m_label1 = new QLabel( i18n("All blockable items in this page:"), page, "label1" ); + TQVBox *page = makeVBoxMainWidget(); + m_label1 = new TQLabel( i18n("All blockable items in this page:"), page, "label1" ); - m_list = new QListView(page); + m_list = new TQListView(page); m_list->setAllColumnsShowFocus( true ); m_list->addColumn( i18n("Source") ); m_list->addColumn( i18n("Category") ); m_list->addColumn( i18n("Node Name") ); - m_list->setColumnWidthMode(0, QListView::Manual); - m_list->setColumnWidthMode(1, QListView::Manual); - m_list->setColumnWidthMode(2, QListView::Manual); + m_list->setColumnWidthMode(0, TQListView::Manual); + m_list->setColumnWidthMode(1, TQListView::Manual); + m_list->setColumnWidthMode(2, TQListView::Manual); m_list->setColumnWidth(0, 600); m_list->setColumnWidth(1, 90); @@ -58,30 +58,30 @@ AdBlockDlg::AdBlockDlg(QWidget *parent, AdElementList &elements) : { AdElement &element = (*it); - QString url = element.url(); + TQString url = element.url(); ListViewItem *item = new ListViewItem( m_list, url, element.category(), element.type() ); item->setBlocked(element.isBlocked()); } - m_label2 = new QLabel( i18n("New filter (use * as a wildcard):"), page, "label2" ); + m_label2 = new TQLabel( i18n("New filter (use * as a wildcard):"), page, "label2" ); - m_filter = new QLineEdit( "", page, "lineedit" ); + m_filter = new TQLineEdit( "", page, "lineedit" ); - connect(this, SIGNAL( okClicked() ), this, SLOT( validateFilter() )); - connect(m_list, SIGNAL( doubleClicked(QListViewItem *, const QPoint &, int) ), this, SLOT(updateFilter(QListViewItem *)) ); + connect(this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( validateFilter() )); + connect(m_list, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint &, int) ), this, TQT_SLOT(updateFilter(TQListViewItem *)) ); m_menu = new KPopupMenu(this); - m_menu->insertItem(i18n("Filter this item"), this, SLOT(filterItem())); - m_menu->insertItem(i18n("Filter all items at same path"), this, SLOT(filterPath())); + m_menu->insertItem(i18n("Filter this item"), this, TQT_SLOT(filterItem())); + m_menu->insertItem(i18n("Filter all items at same path"), this, TQT_SLOT(filterPath())); connect(m_list, - SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), + TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ), this, - SLOT( showContextMenu(QListViewItem *, const QPoint &) ) ); + TQT_SLOT( showContextMenu(TQListViewItem *, const TQPoint &) ) ); } -void AdBlockDlg::updateFilter(QListViewItem *selected) +void AdBlockDlg::updateFilter(TQListViewItem *selected) { ListViewItem *item = dynamic_cast(selected); @@ -96,7 +96,7 @@ void AdBlockDlg::updateFilter(QListViewItem *selected) void AdBlockDlg::validateFilter() { - const QString text = m_filter->text().stripWhiteSpace(); + const TQString text = m_filter->text().stripWhiteSpace(); if (!text.isEmpty()) emit notEmptyFilter(text); @@ -104,7 +104,7 @@ void AdBlockDlg::validateFilter() delayedDestruct(); } -void AdBlockDlg::showContextMenu(QListViewItem *item, const QPoint &point) +void AdBlockDlg::showContextMenu(TQListViewItem *item, const TQPoint &point) { if (!item) return; m_menu->popup(point); @@ -112,14 +112,14 @@ void AdBlockDlg::showContextMenu(QListViewItem *item, const QPoint &point) void AdBlockDlg::filterItem() { - QListViewItem* item = m_list->selectedItem(); + TQListViewItem* item = m_list->selectedItem(); m_filter->setText( item->text(0) ); } void AdBlockDlg::filterPath() { - QListViewItem* item = m_list->selectedItem(); - QString value = item->text(0); + TQListViewItem* item = m_list->selectedItem(); + TQString value = item->text(0); m_filter->setText( value.section( '/', 0, -2 ).append("/*") ); } @@ -133,20 +133,20 @@ AdBlockDlg::~AdBlockDlg() // ---------------------------------------------------------------------------- -void ListViewItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align) +void ListViewItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align) { p->save(); - QColorGroup g( cg ); + TQColorGroup g( cg ); if ( isBlocked() ) { - g.setColor(QColorGroup::Text, red); - QFont font; + g.setColor(TQColorGroup::Text, red); + TQFont font; font.setItalic(true); p->setFont(font); } - QListViewItem::paintCell(p, g, column, width, align); + TQListViewItem::paintCell(p, g, column, width, align); p->restore(); } diff --git a/konq-plugins/adblock/adblockdialogue.h b/konq-plugins/adblock/adblockdialogue.h index ab41bc2..8645d65 100644 --- a/konq-plugins/adblock/adblockdialogue.h +++ b/konq-plugins/adblock/adblockdialogue.h @@ -21,7 +21,7 @@ #define KONQ_ADBLOCKDLG_H #include -#include +#include class QLabel; class QLineEdit; @@ -32,25 +32,25 @@ class AdBlockDlg : public KDialogBase Q_OBJECT private: - QLineEdit *m_filter; - QListView *m_list; - QLabel *m_label1; - QLabel *m_label2; + TQLineEdit *m_filter; + TQListView *m_list; + TQLabel *m_label1; + TQLabel *m_label2; KPopupMenu *m_menu; public: - AdBlockDlg(QWidget *parent, AdElementList &elements); + AdBlockDlg(TQWidget *parent, AdElementList &elements); ~AdBlockDlg(); private slots: void validateFilter (); - void updateFilter(QListViewItem *item); - void showContextMenu(QListViewItem *item, const QPoint &point); + void updateFilter(TQListViewItem *item); + void showContextMenu(TQListViewItem *item, const TQPoint &point); void filterPath(); void filterItem(); signals: - void notEmptyFilter (const QString &url); + void notEmptyFilter (const TQString &url); }; // ---------------------------------------------------------------------------- @@ -61,13 +61,13 @@ private: bool m_blocked; public: - ListViewItem(QListView *listView, - const QString &label1, - const QString &label2, - const QString &label3) : QListViewItem(listView, label1, label2, label3), + ListViewItem(TQListView *listView, + const TQString &label1, + const TQString &label2, + const TQString &label3) : TQListViewItem(listView, label1, label2, label3), m_blocked(false){}; - void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align); + void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align); bool isBlocked(); void setBlocked(bool blocked); diff --git a/konq-plugins/akregator/akregatorplugin.cpp b/konq-plugins/akregator/akregatorplugin.cpp index a2a82f2..2f59adc 100644 --- a/konq-plugins/akregator/akregatorplugin.cpp +++ b/konq-plugins/akregator/akregatorplugin.cpp @@ -38,21 +38,21 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include using namespace Akregator; typedef KGenericFactory AkregatorMenuFactory; K_EXPORT_COMPONENT_FACTORY( libakregatorkonqplugin, AkregatorMenuFactory("akregatorkonqplugin") ) -AkregatorMenu::AkregatorMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList& /* list */ ) +AkregatorMenu::AkregatorMenu( KonqPopupMenu * popupmenu, const char *name, const TQStringList& /* list */ ) : KonqPopupMenuPlugin( popupmenu, name), PluginBase(), m_conf(0), m_part(0) { kdDebug() << "AkregatorMenu::AkregatorMenu()" << endl; - if ( QCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) ) + if ( TQCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) ) return; // Do nothing if user has turned us off. @@ -84,7 +84,7 @@ AkregatorMenu::AkregatorMenu( KonqPopupMenu * popupmenu, const char *name, const if (isFeedUrl(it)) { kdDebug() << "AkregatorMenu: found feed URL " << it->url().prettyURL() << endl; - KAction *action = new KAction( i18n( "Add Feed to Akregator" ), "akregator", 0, this, SLOT( slotAddFeed() ), actionCollection(), "akregatorkonqplugin_mnu" ); + KAction *action = new KAction( i18n( "Add Feed to Akregator" ), "akregator", 0, this, TQT_SLOT( slotAddFeed() ), actionCollection(), "akregatorkonqplugin_mnu" ); addAction( action ); addSeparator(); m_feedURL = it->url().url(); @@ -101,7 +101,7 @@ AkregatorMenu::~AkregatorMenu() delete m_conf; } -bool AkregatorMenu::isFeedUrl(const QString &url) +bool AkregatorMenu::isFeedUrl(const TQString &url) { if (url.contains(".htm", false) != 0) return false; if (url.contains("rss", false) != 0) return true; @@ -116,7 +116,7 @@ bool AkregatorMenu::isFeedUrl(const KFileItem * item) return true; else { - QString url = item->url().url(); + TQString url = item->url().url(); // If URL ends in .htm or .html, it is not a feed url. return isFeedUrl(url); } @@ -125,9 +125,9 @@ bool AkregatorMenu::isFeedUrl(const KFileItem * item) void AkregatorMenu::slotAddFeed() { - QString url = m_part ? fixRelativeURL(m_feedURL, m_part->baseURL()) : m_feedURL; + TQString url = m_part ? fixRelativeURL(m_feedURL, m_part->baseURL()) : m_feedURL; if(akregatorRunning()) - addFeedsViaDCOP(QStringList(url)); + addFeedsViaDCOP(TQStringList(url)); else addFeedViaCmdLine(url); } diff --git a/konq-plugins/akregator/akregatorplugin.h b/konq-plugins/akregator/akregatorplugin.h index 8074f2f..9fb6787 100644 --- a/konq-plugins/akregator/akregatorplugin.h +++ b/konq-plugins/akregator/akregatorplugin.h @@ -37,21 +37,21 @@ class AkregatorMenu : public KonqPopupMenuPlugin, PluginBase { Q_OBJECT public: - AkregatorMenu( KonqPopupMenu *, const char *name, const QStringList &list ); + AkregatorMenu( KonqPopupMenu *, const char *name, const TQStringList &list ); virtual ~AkregatorMenu(); public slots: void slotAddFeed(); protected: - bool isFeedUrl(const QString &s); + bool isFeedUrl(const TQString &s); bool isFeedUrl(const KFileItem *item); private: - QStringList m_feedMimeTypes; + TQStringList m_feedMimeTypes; KConfig *m_conf; KHTMLPart *m_part; - QString m_feedURL; + TQString m_feedURL; }; } diff --git a/konq-plugins/akregator/feeddetector.cpp b/konq-plugins/akregator/feeddetector.cpp index 928a282..57a333c 100644 --- a/konq-plugins/akregator/feeddetector.cpp +++ b/konq-plugins/akregator/feeddetector.cpp @@ -22,10 +22,10 @@ without including the source code for Qt in the source distribution. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "feeddetector.h" @@ -33,26 +33,26 @@ using namespace Akregator; -FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s) +FeedDetectorEntryList FeedDetector::extractFromLinkTags(const TQString& s) { //reduce all sequences of spaces, newlines etc. to one space: - QString str = s.simplifyWhiteSpace(); + TQString str = s.simplifyWhiteSpace(); // extracts tags - QRegExp reLinkTag("<[\\s]?LINK[^>]*REL[\\s]?=[\\s]?\\\"[\\s]?(ALTERNATE|SERVICE\\.FEED)[\\s]?\\\"[^>]*>", false); + TQRegExp reLinkTag("<[\\s]?LINK[^>]*REL[\\s]?=[\\s]?\\\"[\\s]?(ALTERNATE|SERVICE\\.FEED)[\\s]?\\\"[^>]*>", false); // extracts the URL (href="url") - QRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); + TQRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); // extracts type attribute - QRegExp reType("TYPE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); + TQRegExp reType("TYPE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); // extracts the title (title="title") - QRegExp reTitle("TITLE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); + TQRegExp reTitle("TITLE[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); int pos = 0; int matchpos = 0; // get all tags - QStringList linkTags; + TQStringList linkTags; //int strlength = str.length(); while ( matchpos != -1 ) { @@ -66,9 +66,9 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s) FeedDetectorEntryList list; - for ( QStringList::Iterator it = linkTags.begin(); it != linkTags.end(); ++it ) + for ( TQStringList::Iterator it = linkTags.begin(); it != linkTags.end(); ++it ) { - QString type; + TQString type; int pos = reType.search(*it, 0); if (pos != -1) type = reType.cap(1).lower(); @@ -78,14 +78,14 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s) && type != "application/atom+xml" && type != "text/xml" ) continue; - QString title; + TQString title; pos = reTitle.search(*it, 0); if (pos != -1) title = reTitle.cap(1); title = KCharsets::resolveEntities(title); - QString url; + TQString url; pos = reHref.search(*it, 0); if (pos != -1) url = reHref.cap(1); @@ -104,33 +104,33 @@ FeedDetectorEntryList FeedDetector::extractFromLinkTags(const QString& s) return list; } -QStringList FeedDetector::extractBruteForce(const QString& s) +TQStringList FeedDetector::extractBruteForce(const TQString& s) { - QString str = s.simplifyWhiteSpace(); + TQString str = s.simplifyWhiteSpace(); - QRegExp reAhrefTag("<[\\s]?A[^>]?HREF=[\\s]?\\\"[^\\\"]*\\\"[^>]*>", false); + TQRegExp reAhrefTag("<[\\s]?A[^>]?HREF=[\\s]?\\\"[^\\\"]*\\\"[^>]*>", false); // extracts the URL (href="url") - QRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); + TQRegExp reHref("HREF[\\s]?=[\\s]?\\\"([^\\\"]*)\\\"", false); - QRegExp rssrdfxml(".*(RSS|RDF|XML)", false); + TQRegExp rssrdfxml(".*(RSS|RDF|XML)", false); int pos = 0; int matchpos = 0; // get all tags and capture url - QStringList list; + TQStringList list; //int strlength = str.length(); while ( matchpos != -1 ) { matchpos = reAhrefTag.search(str, pos); if ( matchpos != -1 ) { - QString ahref = str.mid(matchpos, reAhrefTag.matchedLength()); + TQString ahref = str.mid(matchpos, reAhrefTag.matchedLength()); int hrefpos = reHref.search(ahref, 0); if ( hrefpos != -1 ) { - QString url = reHref.cap(1); + TQString url = reHref.cap(1); url = KCharsets::resolveEntities(url); diff --git a/konq-plugins/akregator/feeddetector.h b/konq-plugins/akregator/feeddetector.h index b557e33..8002d42 100644 --- a/konq-plugins/akregator/feeddetector.h +++ b/konq-plugins/akregator/feeddetector.h @@ -25,8 +25,8 @@ #ifndef AKREGATORFEEDDETECTOR_H #define AKREGATORFEEDDETECTOR_H -#include -#include +#include +#include class QStringList; @@ -37,18 +37,18 @@ namespace Akregator { public: FeedDetectorEntry() {} - FeedDetectorEntry(const QString& url, const QString& title) + FeedDetectorEntry(const TQString& url, const TQString& title) : m_url(url), m_title(title) {} - const QString& url() const { return m_url; } - const QString& title() const { return m_title; } + const TQString& url() const { return m_url; } + const TQString& title() const { return m_title; } private: - const QString m_url; - const QString m_title; + const TQString m_url; + const TQString m_title; }; - typedef QValueList FeedDetectorEntryList; + typedef TQValueList FeedDetectorEntryList; /** a class providing functions to detect linked feeds in HTML sources */ class FeedDetector @@ -60,14 +60,14 @@ namespace Akregator @param s the html source to scan (the actual source, no URI) @return a list containing the detected feeds */ - static FeedDetectorEntryList extractFromLinkTags(const QString& s); + static FeedDetectorEntryList extractFromLinkTags(const TQString& s); /** \brief searches an HTML page for slightly feed-like looking links and catches everything not running away quickly enough. Extracts links from @c tags which end with @c xml, @c rss or @c rdf @param s the html source to scan (the actual source, no URI) @return a list containing the detected feeds */ - static QStringList extractBruteForce(const QString& s); + static TQStringList extractBruteForce(const TQString& s); private: FeedDetector() {} diff --git a/konq-plugins/akregator/konqfeedicon.cpp b/konq-plugins/akregator/konqfeedicon.cpp index 436a4be..ce6f89e 100644 --- a/konq-plugins/akregator/konqfeedicon.cpp +++ b/konq-plugins/akregator/konqfeedicon.cpp @@ -41,13 +41,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include using namespace Akregator; @@ -55,7 +55,7 @@ typedef KGenericFactory KonqFeedIconFactory; K_EXPORT_COMPONENT_FACTORY(libakregatorkonqfeedicon, KonqFeedIconFactory("akregatorkonqfeedicon")) -KonqFeedIcon::KonqFeedIcon(QObject *parent, const char *name, const QStringList &) +KonqFeedIcon::KonqFeedIcon(TQObject *parent, const char *name, const TQStringList &) : KParts::Plugin(parent, name), PluginBase(), m_part(0), m_feedIcon(0), m_statusBarEx(0), m_menu(0) { KGlobal::locale()->insertCatalogue("akregator_konqplugin"); @@ -63,15 +63,15 @@ KonqFeedIcon::KonqFeedIcon(QObject *parent, const char *name, const QStringList m_part = dynamic_cast(parent); if(!m_part) { kdDebug() << "couldn't get part" << endl; return; } // FIXME: need to do this because of a bug in khtmlpart, it's fixed now for 3.4 (and prolly backported for 3.3.3?) - //connect(m_part->view(), SIGNAL(finishedLayout()), this, SLOT(addFeedIcon())); - QTimer::singleShot(0, this, SLOT(waitPartToLoad())); + //connect(m_part->view(), TQT_SIGNAL(finishedLayout()), this, TQT_SLOT(addFeedIcon())); + TQTimer::singleShot(0, this, TQT_SLOT(waitPartToLoad())); } void KonqFeedIcon::waitPartToLoad() { - connect(m_part, SIGNAL(completed()), this, SLOT(addFeedIcon())); - connect(m_part, SIGNAL(completed(bool)), this, SLOT(addFeedIcon())); // to make pages with metarefresh to work - connect(m_part, SIGNAL(started(KIO::Job *)), this, SLOT(removeFeedIcon())); + connect(m_part, TQT_SIGNAL(completed()), this, TQT_SLOT(addFeedIcon())); + connect(m_part, TQT_SIGNAL(completed(bool)), this, TQT_SLOT(addFeedIcon())); // to make pages with metarefresh to work + connect(m_part, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(removeFeedIcon())); addFeedIcon(); } @@ -101,7 +101,7 @@ bool KonqFeedIcon::feedFound() return false; unsigned int i; - QString doc = ""; + TQString doc = ""; for (i = 0; i < linkNodes.length(); i++) { @@ -110,7 +110,7 @@ bool KonqFeedIcon::feedFound() for (unsigned int j = 0; j < node.attributes().length(); j++) { doc += node.attributes().item(j).nodeName().string() + "=\""; - doc += QStyleSheet::escape(node.attributes().item(j).nodeValue().string()).replace("\"", """); + doc += TQStyleSheet::escape(node.attributes().item(j).nodeValue().string()).replace("\"", """); doc += "\" "; } doc += "/>"; @@ -126,21 +126,21 @@ void KonqFeedIcon::contextMenu() m_menu = new KPopupMenu(m_part->widget()); if(m_feedList.count() == 1) { m_menu->insertTitle(m_feedList.first().title()); - m_menu->insertItem(SmallIcon("bookmark_add"), i18n("Add Feed to Akregator"), this, SLOT(addFeeds()) ); + m_menu->insertItem(SmallIcon("bookmark_add"), i18n("Add Feed to Akregator"), this, TQT_SLOT(addFeeds()) ); } else { m_menu->insertTitle(i18n("Add Feeds to Akregator")); - connect(m_menu, SIGNAL(activated(int)), this, SLOT(addFeed(int))); + connect(m_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addFeed(int))); int id = 0; for(FeedDetectorEntryList::Iterator it = m_feedList.begin(); it != m_feedList.end(); ++it) { m_menu->insertItem(SmallIcon("bookmark_add"), (*it).title(), id); id++; } - //disconnect(m_menu, SIGNAL(activated(int)), this, SLOT(addFeed(int))); + //disconnect(m_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addFeed(int))); m_menu->insertSeparator(); - m_menu->insertItem(SmallIcon("bookmark_add"), i18n("Add All Found Feeds to Akregator"), this, SLOT(addFeeds()), 0, 50000 ); + m_menu->insertItem(SmallIcon("bookmark_add"), i18n("Add All Found Feeds to Akregator"), this, TQT_SLOT(addFeeds()), 0, 50000 ); } - m_menu->popup(QCursor::pos()); + m_menu->popup(TQCursor::pos()); } void KonqFeedIcon::addFeedIcon() @@ -156,17 +156,17 @@ void KonqFeedIcon::addFeedIcon() // from khtmlpart's ualabel m_feedIcon->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small)); - m_feedIcon->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); + m_feedIcon->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_feedIcon->setUseCursor(false); //FIXME hackish - m_feedIcon->setPixmap(QPixmap(locate("data", "akregator/pics/rss.png"))); + m_feedIcon->setPixmap(TQPixmap(locate("data", "akregator/pics/rss.png"))); - QToolTip::remove(m_feedIcon); - QToolTip::add(m_feedIcon, i18n("Monitor this site for updates (using news feed)")); + TQToolTip::remove(m_feedIcon); + TQToolTip::add(m_feedIcon, i18n("Monitor this site for updates (using news feed)")); m_statusBarEx->addStatusBarItem(m_feedIcon, 0, true); - connect(m_feedIcon, SIGNAL(leftClickedURL()), this, SLOT(contextMenu())); + connect(m_feedIcon, TQT_SIGNAL(leftClickedURL()), this, TQT_SLOT(contextMenu())); } void KonqFeedIcon::removeFeedIcon() @@ -188,7 +188,7 @@ void KonqFeedIcon::addFeed(int id) { if(id == 50000) return; if(akregatorRunning()) - addFeedsViaDCOP(QStringList(fixRelativeURL(m_feedList[id].url(), m_part->baseURL()))); + addFeedsViaDCOP(TQStringList(fixRelativeURL(m_feedList[id].url(), m_part->baseURL()))); else addFeedViaCmdLine(fixRelativeURL(m_feedList[id].url(), m_part->baseURL())); } @@ -198,7 +198,7 @@ void KonqFeedIcon::addFeeds() { if(akregatorRunning()) { - QStringList list; + TQStringList list; for ( FeedDetectorEntryList::Iterator it = m_feedList.begin(); it != m_feedList.end(); ++it ) list.append(fixRelativeURL((*it).url(), m_part->baseURL())); addFeedsViaDCOP(list); diff --git a/konq-plugins/akregator/konqfeedicon.h b/konq-plugins/akregator/konqfeedicon.h index ba3bb8c..2fccffb 100644 --- a/konq-plugins/akregator/konqfeedicon.h +++ b/konq-plugins/akregator/konqfeedicon.h @@ -25,7 +25,7 @@ #ifndef KONQFEEDICON_H #define KONQFEEDICON_H -#include +#include #include #include #include "feeddetector.h" @@ -47,7 +47,7 @@ class KonqFeedIcon : public KParts::Plugin, PluginBase { Q_OBJECT public: - KonqFeedIcon(QObject *parent, const char *name, const QStringList &); + KonqFeedIcon(TQObject *parent, const char *name, const TQStringList &); ~KonqFeedIcon(); @@ -58,11 +58,11 @@ private: */ bool feedFound(); - QGuardedPtr m_part; + TQGuardedPtr m_part; KURLLabel *m_feedIcon; KParts::StatusBarExtension *m_statusBarEx; FeedDetectorEntryList m_feedList; - QGuardedPtr m_menu; + TQGuardedPtr m_menu; private slots: void waitPartToLoad(); diff --git a/konq-plugins/akregator/pluginbase.cpp b/konq-plugins/akregator/pluginbase.cpp index 4c6b5b1..f837426 100644 --- a/konq-plugins/akregator/pluginbase.cpp +++ b/konq-plugins/akregator/pluginbase.cpp @@ -30,7 +30,7 @@ #include "feeddetector.h" #include "pluginbase.h" -#include +#include #include @@ -49,7 +49,7 @@ bool PluginBase::akregatorRunning() return reply.isValid(); } -void PluginBase::addFeedsViaDCOP(const QStringList& urls) +void PluginBase::addFeedsViaDCOP(const TQStringList& urls) { kdDebug() << "PluginBase::addFeedsViaDCOP" << endl; DCOPRef akr("akregator", "AkregatorIface"); @@ -60,7 +60,7 @@ void PluginBase::addFeedsViaDCOP(const QStringList& urls) }*/ } -void PluginBase::addFeedViaCmdLine(QString url) +void PluginBase::addFeedViaCmdLine(TQString url) { KProcess *proc = new KProcess; *proc << "akregator" << "-g" << i18n("Imported Feeds"); @@ -70,9 +70,9 @@ void PluginBase::addFeedViaCmdLine(QString url) } // handle all the wild stuff that KURL doesn't handle -QString PluginBase::fixRelativeURL(const QString &s, const KURL &baseurl) +TQString PluginBase::fixRelativeURL(const TQString &s, const KURL &baseurl) { - QString s2=s; + TQString s2=s; KURL u; if (KURL::isRelativeURL(s2)) { @@ -84,8 +84,8 @@ QString PluginBase::fixRelativeURL(const QString &s, const KURL &baseurl) else if (s2.startsWith("/")) { KURL b2(baseurl); - b2.setPath(QString()); // delete path and query, so that only protocol://host remains - b2.setQuery(QString()); + b2.setPath(TQString()); // delete path and query, so that only protocol://host remains + b2.setQuery(TQString()); u = KURL(b2, s2.remove(0,1)); // remove leading "/" } else diff --git a/konq-plugins/akregator/pluginbase.h b/konq-plugins/akregator/pluginbase.h index 8dcecf5..0bb24b9 100644 --- a/konq-plugins/akregator/pluginbase.h +++ b/konq-plugins/akregator/pluginbase.h @@ -48,12 +48,12 @@ class PluginBase /** * Adds feed to aKregator via DCOP. */ - void addFeedsViaDCOP(const QStringList& urls); + void addFeedsViaDCOP(const TQStringList& urls); /** * Adds feed to aKregator via command line. */ - void addFeedViaCmdLine(QString url); - QString fixRelativeURL(const QString &s, const KURL &baseurl); + void addFeedViaCmdLine(TQString url); + TQString fixRelativeURL(const TQString &s, const KURL &baseurl); }; } diff --git a/konq-plugins/arkplugin/arkplugin.cpp b/konq-plugins/arkplugin/arkplugin.cpp index 35e610e..9d5e0f8 100644 --- a/konq-plugins/arkplugin/arkplugin.cpp +++ b/konq-plugins/arkplugin/arkplugin.cpp @@ -33,19 +33,19 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include typedef KGenericFactory ArkMenuFactory; K_EXPORT_COMPONENT_FACTORY( libarkplugin, ArkMenuFactory("arkplugin") ) -ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList& /* list */ ) +ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const TQStringList& /* list */ ) : KonqPopupMenuPlugin( popupmenu, name), m_compAsMapper( 0 ), m_addToMapper( 0 ), m_conf( 0 ) { - if ( ( QCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) ) + if ( ( TQCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) ) || ( KStandardDirs::findExe( "ark" ).isNull() ) ) return; @@ -86,7 +86,7 @@ ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList break; } - QString ext; + TQString ext; KActionMenu * actionMenu; KAction * action; if ( hasOther && itemList.first()->name()!="." && popupmenu->protocolInfo().supportsWriting() ) // don't try to compress if we right click on a folder without files selected @@ -99,13 +99,13 @@ ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList item = itemList.first(); m_name = itemList.first()->name(); action = new KAction( i18n( "Compress as %1" ).arg( m_name + m_ext ), 0, this, - SLOT( slotCompressAsDefault() ), actionCollection() ); + TQT_SLOT( slotCompressAsDefault() ), actionCollection() ); } else { action = new KAction( KMimeType::mimeType( m_conf->readEntry( "LastMimeType", "application/x-tgz" ) )->comment(), - 0, this, SLOT( slotCompressAsDefault() ), actionCollection() ); + 0, this, TQT_SLOT( slotCompressAsDefault() ), actionCollection() ); } actionMenu->insert( action ); @@ -117,14 +117,14 @@ ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList if ( itemList.first()->url().isLocalFile() ) actionMenu->insert( m_addToMenu ); - connect( m_compAsMenu->popupMenu(), SIGNAL( aboutToShow() ), - this, SLOT( slotPrepareCompAsMenu() ) ); - connect( m_addToMenu->popupMenu(), SIGNAL( aboutToShow() ), - this, SLOT( slotPrepareAddToMenu() ) ); + connect( m_compAsMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( slotPrepareCompAsMenu() ) ); + connect( m_addToMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( slotPrepareAddToMenu() ) ); action = new KAction( i18n( "Add to Archive..." ), 0, this, - SLOT( slotAdd() ), actionCollection() ); + TQT_SLOT( slotAdd() ), actionCollection() ); actionMenu->insert( action ); addAction( actionMenu ); } @@ -136,30 +136,30 @@ ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList actionMenu = new KActionMenu( i18n( "Extract" ), "ark", actionCollection(), "ark_extract_menu" ); action = new KAction( i18n( "Extract Here" ), 0, this, - SLOT( slotExtractHere() ), actionCollection() ); + TQT_SLOT( slotExtractHere() ), actionCollection() ); actionMenu->insert( action ); // stolen from arkwidget.cpp if ( itemCount == 1 ) { - QString targetName = itemList.first()->name(); + TQString targetName = itemList.first()->name(); stripExtension( targetName ); action = new KAction( i18n( "Extract to %1" ).arg( targetName ), 0, this, - SLOT( slotExtractToSubfolders() ), actionCollection() ); + TQT_SLOT( slotExtractToSubfolders() ), actionCollection() ); } else { action = new KAction( i18n( "Extract to Subfolders" ), 0, this, - SLOT( slotExtractToSubfolders() ), actionCollection() ); + TQT_SLOT( slotExtractToSubfolders() ), actionCollection() ); } actionMenu->insert( action ); action = new KAction( i18n( "Extract To..." ), 0 , this, - SLOT( slotExtractTo() ), actionCollection() ); + TQT_SLOT( slotExtractTo() ), actionCollection() ); actionMenu->insert( action ); addAction( actionMenu ); } else { - action = new KAction( i18n( "Extract To..." ), "ark", 0, this, SLOT( slotExtractTo() ), actionCollection(), "ark_extract_menu" ); + action = new KAction( i18n( "Extract To..." ), "ark", 0, this, TQT_SLOT( slotExtractTo() ), actionCollection(), "ark_extract_menu" ); addAction( action ); } } @@ -173,17 +173,17 @@ ArkMenu::~ArkMenu() void ArkMenu::slotPrepareCompAsMenu() { - disconnect( m_compAsMenu->popupMenu(), SIGNAL( aboutToShow() ), - this, SLOT( slotPrepareCompAsMenu() ) ); + disconnect( m_compAsMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( slotPrepareCompAsMenu() ) ); KAction * action; - m_compAsMapper = new QSignalMapper( this, "compAsMapper" ); - QString ext; - QStringList newExt; + m_compAsMapper = new TQSignalMapper( this, "compAsMapper" ); + TQString ext; + TQStringList newExt; unsigned int counter = 0; - QCString actionName; - QStringList::Iterator eit; - QStringList::Iterator mit; + TQCString actionName; + TQStringList::Iterator eit; + TQStringList::Iterator mit; mit = m_archiveMimeTypes.begin(); for ( ; mit != m_archiveMimeTypes.end(); ++mit ) { @@ -195,13 +195,13 @@ void ArkMenu::slotPrepareCompAsMenu() if ( m_urlList.count() == 1 ) { action = new KAction( m_name + (*eit), 0, m_compAsMapper, - SLOT( map() ), actionCollection() ); + TQT_SLOT( map() ), actionCollection() ); } else { ext = KMimeType::mimeType(*mit)->comment(); action = new KAction( ext, 0, m_compAsMapper, - SLOT( map() ), actionCollection() ); + TQT_SLOT( map() ), actionCollection() ); } m_compAsMenu->insert( action ); @@ -218,13 +218,13 @@ void ArkMenu::slotPrepareCompAsMenu() m_extensionList += newExt; } - connect( m_compAsMapper, SIGNAL( mapped( int ) ), SLOT( slotCompressAs( int ) ) ); + connect( m_compAsMapper, TQT_SIGNAL( mapped( int ) ), TQT_SLOT( slotCompressAs( int ) ) ); } void ArkMenu::slotPrepareAddToMenu() { - disconnect( m_addToMenu->popupMenu(), SIGNAL( aboutToShow() ), - this, SLOT( slotPrepareAddToMenu() ) ); + disconnect( m_addToMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( slotPrepareAddToMenu() ) ); if ( m_extensionList.isEmpty() ) // is filled in slotPrepareCompAsMenu @@ -232,20 +232,20 @@ void ArkMenu::slotPrepareAddToMenu() unsigned int counter = 0; KAction * action; - m_addToMapper = new QSignalMapper( this, "addToMapper" ); - QCString actionName; - QStringList::Iterator mit; + m_addToMapper = new TQSignalMapper( this, "addToMapper" ); + TQCString actionName; + TQStringList::Iterator mit; KURL archive; - QDir dir( m_urlList.first().directory() ); - QStringList entries = dir.entryList(); - QStringList::Iterator uit = entries.begin(); + TQDir dir( m_urlList.first().directory() ); + TQStringList entries = dir.entryList(); + TQStringList::Iterator uit = entries.begin(); for ( ; uit != entries.end(); ++uit ) { for ( mit = m_extensionList.begin(); mit != m_extensionList.end(); ++mit ) if ( (*uit).endsWith(*mit) ) { action = new KAction( *uit, 0, m_addToMapper, - SLOT( map() ), actionCollection() ); + TQT_SLOT( map() ), actionCollection() ); m_addToMenu->insert( action ); m_addToMapper->setMapping( action, counter ); archive.setPath( *uit ); @@ -254,7 +254,7 @@ void ArkMenu::slotPrepareAddToMenu() break; } } - connect( m_addToMapper, SIGNAL( mapped( int ) ), SLOT( slotAddTo( int ) ) ); + connect( m_addToMapper, TQT_SIGNAL( mapped( int ) ), TQT_SLOT( slotAddTo( int ) ) ); } void ArkMenu::compMimeTypes() @@ -395,11 +395,11 @@ void ArkMenu::extMimeTypes() m_extractMimeTypes << "application/x-archive"; } -void ArkMenu::stripExtension( QString & name ) +void ArkMenu::stripExtension( TQString & name ) { - QStringList patternList = KMimeType::findByPath( name )->patterns(); - QStringList::Iterator it = patternList.begin(); - QString ext; + TQStringList patternList = KMimeType::findByPath( name )->patterns(); + TQStringList::Iterator it = patternList.begin(); + TQString ext; for ( ; it != patternList.end(); ++it ) { ext = (*it).remove( '*' ); @@ -413,10 +413,10 @@ void ArkMenu::stripExtension( QString & name ) void ArkMenu::slotCompressAs( int pos ) { - QCString name; - QString extension, mimeType; + TQCString name; + TQString extension, mimeType; KURL target; - QStringList filelist( m_urlStringList ); + TQStringList filelist( m_urlStringList ); //if KMimeType returns .ZIP, .7Z or .RAR. convert them to lowercase if ( m_extensionList[ pos ].contains ( ".ZIP" ) ) @@ -446,9 +446,9 @@ void ArkMenu::slotCompressAs( int pos ) m_conf->setGroup( "ArkPlugin" ); m_conf->writeEntry( "LastExtension", extension ); - QStringList extensions; - QStringList::Iterator eit; - QStringList::Iterator mit = m_archiveMimeTypes.begin(); + TQStringList extensions; + TQStringList::Iterator eit; + TQStringList::Iterator mit = m_archiveMimeTypes.begin(); bool done = false; for ( ; mit != m_archiveMimeTypes.end() && !done; ++mit ) { @@ -488,9 +488,9 @@ void ArkMenu::slotCompressAsDefault() } // make work for URLs -void ArkMenu::compressAs( const QStringList &name, const KURL & compressed ) +void ArkMenu::compressAs( const TQStringList &name, const KURL & compressed ) { - QStringList args; + TQStringList args; args << "--add-to"; args += name; args << compressed.url(); @@ -499,7 +499,7 @@ void ArkMenu::compressAs( const QStringList &name, const KURL & compressed ) void ArkMenu::slotAddTo( int pos ) { - QStringList args( m_urlStringList ); + TQStringList args( m_urlStringList ); args.prepend( "--add-to" ); KURL archive( m_urlStringList.first() ); @@ -512,7 +512,7 @@ void ArkMenu::slotAddTo( int pos ) void ArkMenu::slotAdd() { - QStringList args( m_urlStringList ); + TQStringList args( m_urlStringList ); args.prepend( "--add" ); kapp->kdeinitExec( "ark", args ); @@ -520,11 +520,11 @@ void ArkMenu::slotAdd() void ArkMenu::slotExtractHere() { - for ( QValueList::ConstIterator it = m_urlList.constBegin(); + for ( TQValueList::ConstIterator it = m_urlList.constBegin(); it != m_urlList.constEnd(); ++it ) { - QStringList args; + TQStringList args; KURL targetDirectory = ( *it ).url(); targetDirectory.setPath( targetDirectory.directory() ); args << "--extract-to" << targetDirectory.url() << ( *it ).url(); @@ -534,13 +534,13 @@ void ArkMenu::slotExtractHere() void ArkMenu::slotExtractToSubfolders() { - for ( QStringList::ConstIterator it = m_urlStringList.constBegin(); + for ( TQStringList::ConstIterator it = m_urlStringList.constBegin(); it != m_urlStringList.constEnd(); ++it ) { KURL targetDir; - QString dirName; - QStringList args; + TQString dirName; + TQStringList args; targetDir = *it; dirName = targetDir.path(); @@ -553,11 +553,11 @@ void ArkMenu::slotExtractToSubfolders() void ArkMenu::slotExtractTo() { - for ( QStringList::ConstIterator it = m_urlStringList.constBegin(); + for ( TQStringList::ConstIterator it = m_urlStringList.constBegin(); it != m_urlStringList.constEnd(); ++it ) { - QStringList args; + TQStringList args; args << "--extract" << *it; kapp->kdeinitExec( "ark", args ); } diff --git a/konq-plugins/arkplugin/arkplugin.h b/konq-plugins/arkplugin/arkplugin.h index 8732294..6b9a6fe 100644 --- a/konq-plugins/arkplugin/arkplugin.h +++ b/konq-plugins/arkplugin/arkplugin.h @@ -31,7 +31,7 @@ class QSignalMapper; class ArkMenu : public KonqPopupMenuPlugin { Q_OBJECT public: - ArkMenu( KonqPopupMenu *, const char *name, const QStringList & list ); + ArkMenu( KonqPopupMenu *, const char *name, const TQStringList & list ); virtual ~ArkMenu(); public slots: @@ -48,24 +48,24 @@ public slots: protected: void extMimeTypes(); void compMimeTypes(); - void compressAs( const QStringList &name, const KURL & compressed ); + void compressAs( const TQStringList &name, const KURL & compressed ); - void stripExtension( QString & name ); + void stripExtension( TQString & name ); private: - QString m_name, m_ext; - QValueList m_urlList; - QStringList m_urlStringList; + TQString m_name, m_ext; + TQValueList m_urlList; + TQStringList m_urlStringList; KURL::List m_archiveList; - QStringList m_archiveMimeTypes; - QStringList m_extractMimeTypes; - QStringList m_extensionList; + TQStringList m_archiveMimeTypes; + TQStringList m_extractMimeTypes; + TQStringList m_extensionList; KActionMenu * m_compAsMenu; KActionMenu * m_addToMenu; - QSignalMapper * m_compAsMapper; - QSignalMapper * m_addToMapper; + TQSignalMapper * m_compAsMapper; + TQSignalMapper * m_addToMapper; KConfig * m_conf; - QString m_dir; //contains the currect directory + TQString m_dir; //contains the currect directory }; #endif diff --git a/konq-plugins/autorefresh/autorefresh.cpp b/konq-plugins/autorefresh/autorefresh.cpp index 6d06ea0..64be883 100644 --- a/konq-plugins/autorefresh/autorefresh.cpp +++ b/konq-plugins/autorefresh/autorefresh.cpp @@ -11,22 +11,22 @@ #include #include #include -#include +#include #include -#include +#include #include -AutoRefresh::AutoRefresh( QObject* parent, const char* name, const QStringList & /*args*/ ) +AutoRefresh::AutoRefresh( TQObject* parent, const char* name, const TQStringList & /*args*/ ) : Plugin( parent, name ) { - timer = new QTimer( this ); - connect( timer, SIGNAL( timeout() ), this, SLOT( slotRefresh() ) ); + timer = new TQTimer( this ); + connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRefresh() ) ); refresher = new KSelectAction( i18n("&Auto Refresh"), "reload", 0, - this, SLOT(slotIntervalChanged()), + this, TQT_SLOT(slotIntervalChanged()), actionCollection(), "autorefresh" ); - QStringList sl; + TQStringList sl; sl << i18n("None"); sl << i18n("Every 15 Seconds"); sl << i18n("Every 30 Seconds"); @@ -86,10 +86,10 @@ void AutoRefresh::slotIntervalChanged() void AutoRefresh::slotRefresh() { if ( !parent()->inherits("KParts::ReadOnlyPart") ) { - QString title = i18n( "Cannot Refresh Source" ); - QString text = i18n( "This plugin cannot auto-refresh the current part." ); + TQString title = i18n( "Cannot Refresh Source" ); + TQString text = i18n( "This plugin cannot auto-refresh the current part." ); - QMessageBox::warning( 0, title, text ); + TQMessageBox::warning( 0, title, text ); } else { diff --git a/konq-plugins/autorefresh/autorefresh.h b/konq-plugins/autorefresh/autorefresh.h index 370e42b..7616382 100644 --- a/konq-plugins/autorefresh/autorefresh.h +++ b/konq-plugins/autorefresh/autorefresh.h @@ -36,7 +36,7 @@ public: /** * Construct a new KParts plugin. */ - AutoRefresh( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList() ); + AutoRefresh( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList() ); /** * Destructor. @@ -49,7 +49,7 @@ public slots: private: KSelectAction *refresher; - QTimer *timer; + TQTimer *timer; }; #endif diff --git a/konq-plugins/babelfish/plugin_babelfish.cpp b/konq-plugins/babelfish/plugin_babelfish.cpp index 302b71a..fc7a80e 100644 --- a/konq-plugins/babelfish/plugin_babelfish.cpp +++ b/konq-plugins/babelfish/plugin_babelfish.cpp @@ -34,8 +34,8 @@ typedef KGenericFactory BabelFishFactory; static const KAboutData aboutdata("babelfish", I18N_NOOP("Translate Web Page") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( libbabelfishplugin, BabelFishFactory( &aboutdata ) ) -PluginBabelFish::PluginBabelFish( QObject* parent, const char* name, - const QStringList & ) +PluginBabelFish::PluginBabelFish( TQObject* parent, const char* name, + const TQStringList & ) : Plugin( parent, name ) { setInstance(BabelFishFactory::instance()); @@ -60,104 +60,104 @@ PluginBabelFish::PluginBabelFish( QObject* parent, const char* name, actionCollection(), "translatewebpage_nl" ); m_en->insert( new KAction( i18n("&Chinese (Simplified)"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_zh") ); m_en->insert( new KAction( i18n("Chinese (&Traditional)"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_zhTW") ); m_en->insert( new KAction( i18n("&Dutch"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_nl") ); m_en->insert( new KAction( i18n("&French"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_fr") ); m_en->insert( new KAction( i18n("&German"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_de") ); m_en->insert( new KAction( i18n("&Italian"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_it") ); m_en->insert( new KAction( i18n("&Japanese"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_ja") ); m_en->insert( new KAction( i18n("&Korean"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_ko") ); m_en->insert( new KAction( i18n("&Norwegian"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_no") ); m_en->insert( new KAction( i18n("&Portuguese"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_pt") ); m_en->insert( new KAction( i18n("&Russian"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_ru") ); m_en->insert( new KAction( i18n("&Spanish"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_es") ); m_en->insert( new KAction( i18n("T&hai"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "en_th") ); m_fr->insert( new KAction( i18n("&Dutch"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "fr_nl") ); m_fr->insert( new KAction( i18n("&English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "fr_en") ); m_fr->insert( new KAction( i18n("&German"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "fr_de") ); m_fr->insert( new KAction( i18n("&Italian"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "fr_it") ); m_fr->insert( new KAction( i18n("&Portuguese"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "fr_pt") ); m_fr->insert( new KAction( i18n("&Spanish"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "fr_es") ); m_de->insert( new KAction( i18n("&English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "de_en") ); m_de->insert( new KAction( i18n("&French"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "de_fr") ); m_es->insert( new KAction( i18n("&English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "es_en") ); m_es->insert( new KAction( i18n("&French"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "es_fr") ); m_pt->insert( new KAction( i18n("&English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "pt_en") ); m_pt->insert( new KAction( i18n("&French"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "pt_fr") ); m_it->insert( new KAction( i18n("&English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "it_en") ); m_it->insert( new KAction( i18n("&French"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "it_fr") ); m_nl->insert( new KAction( i18n("&English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "nl_en") ); m_nl->insert( new KAction( i18n("&French"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "nl_fr") ); m_menu->insert( new KAction( i18n("&Chinese (Simplified) to English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "zh_en") ); m_menu->insert( new KAction( i18n("Chinese (&Traditional) to English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "zhTW_en") ); m_menu->insert( m_nl ); m_menu->insert( m_en ); @@ -165,14 +165,14 @@ PluginBabelFish::PluginBabelFish( QObject* parent, const char* name, m_menu->insert( m_de ); m_menu->insert( m_it ); m_menu->insert( new KAction( i18n("&Japanese to English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "ja_en") ); m_menu->insert( new KAction( i18n("&Korean to English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "ko_en") ); m_menu->insert( m_pt ); m_menu->insert( new KAction( i18n("&Russian to English"), 0, - this, SLOT(translateURL()), + this, TQT_SLOT(translateURL()), actionCollection(), "ru_en") ); m_menu->insert( m_es ); m_menu->setEnabled( true ); @@ -181,8 +181,8 @@ PluginBabelFish::PluginBabelFish( QObject* parent, const char* name, if ( parent && parent->inherits( "KHTMLPart" ) ) { KParts::ReadOnlyPart* part = static_cast(parent); - connect( part, SIGNAL(started(KIO::Job*)), this, - SLOT(slotStarted(KIO::Job*)) ); + connect( part, TQT_SIGNAL(started(KIO::Job*)), this, + TQT_SLOT(slotStarted(KIO::Job*)) ); } } @@ -214,8 +214,8 @@ void PluginBabelFish::translateURL() // The parent is assumed to be a KHTMLPart if ( !parent()->inherits("KHTMLPart") ) { - QString title = i18n( "Cannot Translate Source" ); - QString text = i18n( "Only web pages can be translated using " + TQString title = i18n( "Cannot Translate Source" ); + TQString text = i18n( "Only web pages can be translated using " "this plugin." ); KMessageBox::sorry( 0L, text, title ); @@ -224,7 +224,7 @@ void PluginBabelFish::translateURL() // Select engine KConfig cfg( "translaterc", true ); - QString engine = cfg.readEntry( sender()->name(), "babelfish" ); + TQString engine = cfg.readEntry( sender()->name(), "babelfish" ); // Get URL KHTMLPart *part = dynamic_cast(parent()); @@ -233,7 +233,7 @@ void PluginBabelFish::translateURL() // we check if we have text selected. if so, we translate that. If // not, we translate the url - QString totrans; + TQString totrans; if ( part->hasSelection() ) { if( engine == "reverso" || engine == "tsail" ) @@ -248,8 +248,8 @@ void PluginBabelFish::translateURL() // Check syntax if ( !url.isValid() ) { - QString title = i18n( "Malformed URL" ); - QString text = i18n( "The URL you entered is not valid, please " + TQString title = i18n( "Malformed URL" ); + TQString text = i18n( "The URL you entered is not valid, please " "correct it and try again." ); KMessageBox::sorry( 0L, text, title ); return; @@ -259,36 +259,36 @@ void PluginBabelFish::translateURL() // Create URL KURL result; - QString query; + TQString query; if( engine == "freetranslation" ) { query = "sequence=core&Submit=FREE Translation&language="; - if( sender()->name() == QString( "en_es" ) ) + if( sender()->name() == TQString( "en_es" ) ) query += "English/Spanish"; - else if( sender()->name() == QString( "en_de" ) ) + else if( sender()->name() == TQString( "en_de" ) ) query += "English/German"; - else if( sender()->name() == QString( "en_it" ) ) + else if( sender()->name() == TQString( "en_it" ) ) query += "English/Italian"; - else if( sender()->name() == QString( "en_nl" ) ) + else if( sender()->name() == TQString( "en_nl" ) ) query += "English/Dutch"; - else if( sender()->name() == QString( "en_pt" ) ) + else if( sender()->name() == TQString( "en_pt" ) ) query += "English/Portuguese"; - else if( sender()->name() == QString( "en_no" ) ) + else if( sender()->name() == TQString( "en_no" ) ) query += "English/Norwegian"; - else if( sender()->name() == QString( "en_zh" ) ) + else if( sender()->name() == TQString( "en_zh" ) ) query += "English/SimplifiedChinese"; - else if( sender()->name() == QString( "en_zhTW" ) ) + else if( sender()->name() == TQString( "en_zhTW" ) ) query += "English/TraditionalChinese"; - else if( sender()->name() == QString( "es_en" ) ) + else if( sender()->name() == TQString( "es_en" ) ) query += "Spanish/English"; - else if( sender()->name() == QString( "fr_en" ) ) + else if( sender()->name() == TQString( "fr_en" ) ) query += "French/English"; - else if( sender()->name() == QString( "de_en" ) ) + else if( sender()->name() == TQString( "de_en" ) ) query += "German/English"; - else if( sender()->name() == QString( "it_en" ) ) + else if( sender()->name() == TQString( "it_en" ) ) query += "Italian/English"; - else if( sender()->name() == QString( "nl_en" ) ) + else if( sender()->name() == TQString( "nl_en" ) ) query += "Dutch/English"; - else if( sender()->name() == QString( "pt_en" ) ) + else if( sender()->name() == TQString( "pt_en" ) ) query += "Portuguese/English"; else // Should be en_fr query += "English/French"; @@ -313,21 +313,21 @@ void PluginBabelFish::translateURL() } else if( engine == "reverso" ) { result = KURL( "http://www.reverso.net/url/frame.asp" ); query = "autotranslate=on&templates=0&x=0&y=0&directions="; - if( sender()->name() == QString( "de_fr" ) ) + if( sender()->name() == TQString( "de_fr" ) ) query += "524292"; - else if( sender()->name() == QString( "fr_en" ) ) + else if( sender()->name() == TQString( "fr_en" ) ) query += "65544"; - else if( sender()->name() == QString( "fr_de" ) ) + else if( sender()->name() == TQString( "fr_de" ) ) query += "262152"; - else if( sender()->name() == QString( "de_en" ) ) + else if( sender()->name() == TQString( "de_en" ) ) query += "65540"; - else if( sender()->name() == QString( "en_de" ) ) + else if( sender()->name() == TQString( "en_de" ) ) query += "262145"; - else if( sender()->name() == QString( "en_es" ) ) + else if( sender()->name() == TQString( "en_es" ) ) query += "2097153"; - else if( sender()->name() == QString( "es_en" ) ) + else if( sender()->name() == TQString( "es_en" ) ) query += "65568"; - else if( sender()->name() == QString( "fr_es" ) ) + else if( sender()->name() == TQString( "fr_es" ) ) query += "2097160"; else // "en_fr" query += "524289"; @@ -336,9 +336,9 @@ void PluginBabelFish::translateURL() } else if( engine == "tsail" ) { result = KURL( "http://www.t-mail.com/cgi-bin/tsail" ); query = "sail=full&lp="; - if( sender()->name() == QString( "zhTW_en" ) ) + if( sender()->name() == TQString( "zhTW_en" ) ) query += "tw-en"; - else if( sender()->name() == QString( "en_zhTW" ) ) + else if( sender()->name() == TQString( "en_zhTW" ) ) query += "en-tw"; else { diff --git a/konq-plugins/babelfish/plugin_babelfish.h b/konq-plugins/babelfish/plugin_babelfish.h index d4e8b01..1844ce1 100644 --- a/konq-plugins/babelfish/plugin_babelfish.h +++ b/konq-plugins/babelfish/plugin_babelfish.h @@ -29,8 +29,8 @@ class PluginBabelFish : public KParts::Plugin { Q_OBJECT public: - PluginBabelFish( QObject* parent, const char* name, - const QStringList & ); + PluginBabelFish( TQObject* parent, const char* name, + const TQStringList & ); virtual ~PluginBabelFish(); public slots: diff --git a/konq-plugins/crashes/crashesplugin.cpp b/konq-plugins/crashes/crashesplugin.cpp index 8d01553..b1e1f6f 100644 --- a/konq-plugins/crashes/crashesplugin.cpp +++ b/konq-plugins/crashes/crashesplugin.cpp @@ -37,7 +37,7 @@ typedef KGenericFactory CrashesPluginFactory; K_EXPORT_COMPONENT_FACTORY( libcrashesplugin, CrashesPluginFactory( "crashesplugin" ) ) -CrashesPlugin::CrashesPlugin( QObject* parent, const char* name, const QStringList & ) +CrashesPlugin::CrashesPlugin( TQObject* parent, const char* name, const TQStringList & ) : KParts::Plugin( parent, name ) { m_part = (parent && parent->inherits( "KHTMLPart" )) ? static_cast(parent) : 0L; @@ -48,8 +48,8 @@ CrashesPlugin::CrashesPlugin( QObject* parent, const char* name, const QStringLi m_pCrashesMenu->setDelayed( false ); m_pCrashesMenu->setEnabled( true ); - connect( m_pCrashesMenu->popupMenu(), SIGNAL( aboutToShow() ), - this, SLOT( slotAboutToShow() ) ); + connect( m_pCrashesMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( slotAboutToShow() ) ); } CrashesPlugin::~CrashesPlugin() @@ -62,10 +62,10 @@ void CrashesPlugin::slotAboutToShow() KCrashBookmarkImporter importer(KCrashBookmarkImporter::crashBookmarksDir()); - connect( &importer, SIGNAL( newBookmark( const QString &, const QCString &, const QString &) ), - SLOT( newBookmarkCallback( const QString &, const QCString &, const QString & ) ) ); + connect( &importer, TQT_SIGNAL( newBookmark( const TQString &, const TQCString &, const TQString &) ), + TQT_SLOT( newBookmarkCallback( const TQString &, const TQCString &, const TQString & ) ) ); - connect( &importer, SIGNAL( endFolder() ), SLOT( endFolderCallback() ) ); + connect( &importer, TQT_SIGNAL( endFolder() ), TQT_SLOT( endFolderCallback() ) ); int count = m_pCrashesMenu->popupMenu()->count(); @@ -89,7 +89,7 @@ void CrashesPlugin::slotAboutToShow() m_crashRangesList.append( CrashRange(firstItem, count) ); m_pCrashesMenu->popupMenu()->insertItem( i18n("All Pages of This Crash"), this, - SLOT(slotGroupSelected(int)), + TQT_SLOT(slotGroupSelected(int)), 0, crashGroup--); } m_pCrashesMenu->popupMenu()->insertSeparator(); @@ -97,14 +97,14 @@ void CrashesPlugin::slotAboutToShow() gotSep = true; firstItem = ++count; } else { - QString str = (*e).first; + TQString str = (*e).first; if (str.length() > 48) { str.truncate(48); str.append("..."); } m_pCrashesMenu->popupMenu()->insertItem( str, this, - SLOT(slotItemSelected(int)), + TQT_SLOT(slotItemSelected(int)), 0, ++count ); gotSep = false; } @@ -113,13 +113,13 @@ void CrashesPlugin::slotAboutToShow() m_crashRangesList.append( CrashRange(firstItem, count) ); m_pCrashesMenu->popupMenu()->insertItem( i18n("All Pages of This Crash"), this, - SLOT(slotGroupSelected(int)), + TQT_SLOT(slotGroupSelected(int)), 0, crashGroup--); } } else { m_pCrashesMenu->popupMenu()->insertItem( i18n("No Recovered Crashes"), this, - SLOT(slotItemSelected(int)), + TQT_SLOT(slotItemSelected(int)), 0, ++count ); gotSep = false; enable = false; @@ -131,20 +131,20 @@ void CrashesPlugin::slotAboutToShow() } int id =m_pCrashesMenu->popupMenu()->insertItem( i18n("&Clear List of Crashes"), this, - SLOT(slotClearCrashes()), + TQT_SLOT(slotClearCrashes()), 0, ++count ); m_pCrashesMenu->popupMenu()->setItemEnabled( id, enable); } -void CrashesPlugin::newBookmarkCallback( const QString & text, const QCString & url, - const QString & ) +void CrashesPlugin::newBookmarkCallback( const TQString & text, const TQCString & url, + const TQString & ) { m_crashesList.prepend(qMakePair(text,url)); } void CrashesPlugin::endFolderCallback( ) { - m_crashesList.prepend(qMakePair(QString("-"),QCString("-"))); + m_crashesList.prepend(qMakePair(TQString("-"),TQCString("-"))); } void CrashesPlugin::slotClearCrashes() { diff --git a/konq-plugins/crashes/crashesplugin.h b/konq-plugins/crashes/crashesplugin.h index cff0831..3c6a402 100644 --- a/konq-plugins/crashes/crashesplugin.h +++ b/konq-plugins/crashes/crashesplugin.h @@ -21,9 +21,9 @@ #ifndef __CRASHES_PLUGIN_H #define __CRASHES_PLUGIN_H -#include -#include -#include +#include +#include +#include #include #include @@ -37,8 +37,8 @@ class CrashesPlugin : public KParts::Plugin Q_OBJECT public: - CrashesPlugin( QObject* parent, const char* name, - const QStringList & ); + CrashesPlugin( TQObject* parent, const char* name, + const TQStringList & ); ~CrashesPlugin(); protected slots: @@ -46,7 +46,7 @@ protected slots: void slotClearCrashes(); void slotItemSelected(int); void slotGroupSelected(int); - void newBookmarkCallback( const QString &, const QCString &, const QString & ); + void newBookmarkCallback( const TQString &, const TQCString &, const TQString & ); void endFolderCallback( ); private: @@ -55,13 +55,13 @@ private: KHTMLPart* m_part; KActionMenu* m_pCrashesMenu; - typedef QPair Crash; - typedef QValueList CrashesList; + typedef QPair Crash; + typedef TQValueList CrashesList; CrashesList m_crashesList; typedef QPair CrashRange; - typedef QValueList CrashRangesList; + typedef TQValueList CrashRangesList; CrashRangesList m_crashRangesList; diff --git a/konq-plugins/dirfilter/dirfilterplugin.cpp b/konq-plugins/dirfilter/dirfilterplugin.cpp index 8401238..ff2eecd 100644 --- a/konq-plugins/dirfilter/dirfilterplugin.cpp +++ b/konq-plugins/dirfilter/dirfilterplugin.cpp @@ -19,13 +19,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -71,9 +71,9 @@ SessionManager::~SessionManager() m_self = 0; } -QString SessionManager::generateKey (const KURL& url) const +TQString SessionManager::generateKey (const KURL& url) const { - QString key; + TQString key; key = url.protocol (); key += ':'; @@ -86,32 +86,32 @@ QString SessionManager::generateKey (const KURL& url) const key += url.path (); key += ':'; - key += QString::number (m_pid); + key += TQString::number (m_pid); return key; } -QStringList SessionManager::restoreMimeFilters (const KURL& url) const +TQStringList SessionManager::restoreMimeFilters (const KURL& url) const { - QString key(generateKey(url)); + TQString key(generateKey(url)); return m_filters[key]; } -QString SessionManager::restoreTypedFilter (const KURL& url) const +TQString SessionManager::restoreTypedFilter (const KURL& url) const { - QString key(generateKey(url)); + TQString key(generateKey(url)); return m_typedFilter[key]; } -void SessionManager::save (const KURL& url, const QStringList& filters) +void SessionManager::save (const KURL& url, const TQStringList& filters) { - QString key = generateKey(url); + TQString key = generateKey(url); m_filters[key] = filters; } -void SessionManager::save (const KURL& url, const QString& typedFilter) +void SessionManager::save (const KURL& url, const TQString& typedFilter) { - QString key = generateKey(url); + TQString key = generateKey(url); m_typedFilter[key] = typedFilter; } @@ -141,8 +141,8 @@ void SessionManager::loadSettings() -DirFilterPlugin::DirFilterPlugin (QObject* parent, const char* name, - const QStringList&) +DirFilterPlugin::DirFilterPlugin (TQObject* parent, const char* name, + const TQStringList&) :KParts::Plugin (parent, name), m_pFilterMenu(0), m_searchWidget(0), @@ -158,23 +158,23 @@ DirFilterPlugin::DirFilterPlugin (QObject* parent, const char* name, m_pFilterMenu->setDelayed (false); m_pFilterMenu->setWhatsThis(i18n("Allow to filter the currently displayed items by filetype.")); - connect (m_pFilterMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowPopup())); + connect (m_pFilterMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowPopup())); - connect (m_part, SIGNAL (itemRemoved(const KFileItem*)), - SLOT( slotItemRemoved (const KFileItem*))); - connect (m_part, SIGNAL (itemsAdded(const KFileItemList&)), - SLOT (slotItemsAdded(const KFileItemList&))); - connect (m_part, SIGNAL (itemsFilteredByMime(const KFileItemList&)), - SLOT (slotItemsAdded(const KFileItemList&))); - connect (m_part, SIGNAL(aboutToOpenURL()), SLOT(slotOpenURL())); + connect (m_part, TQT_SIGNAL (itemRemoved(const KFileItem*)), + TQT_SLOT( slotItemRemoved (const KFileItem*))); + connect (m_part, TQT_SIGNAL (itemsAdded(const KFileItemList&)), + TQT_SLOT (slotItemsAdded(const KFileItemList&))); + connect (m_part, TQT_SIGNAL (itemsFilteredByMime(const KFileItemList&)), + TQT_SLOT (slotItemsAdded(const KFileItemList&))); + connect (m_part, TQT_SIGNAL(aboutToOpenURL()), TQT_SLOT(slotOpenURL())); // add a searchline filter for konqis icons/list views - QHBox *hbox = new QHBox(m_part->widget()); + TQHBox *hbox = new TQHBox(m_part->widget()); hbox->hide(); KAction *clear = new KAction(i18n("Clear Filter Field"), - QApplication::reverseLayout() ? "clear_left" : "locationbar_erase", + TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, 0, 0, actionCollection(), "clear_filter"); clear->setWhatsThis(i18n("Clear filter field

Clears the content of the filter field.")); @@ -184,18 +184,18 @@ DirFilterPlugin::DirFilterPlugin (QObject* parent, const char* name, m_searchWidget = new KListViewSearchLine(hbox); static_cast(m_searchWidget)->setListView(static_cast(m_part->scrollWidget())); } - else if ( ::qt_cast(m_part->scrollWidget()) ) + else if ( ::qt_cast(m_part->scrollWidget()) ) { m_searchWidget = new KIconViewSearchLine(hbox); - static_cast(m_searchWidget)->setIconView(static_cast(m_part->scrollWidget())); + static_cast(m_searchWidget)->setIconView(static_cast(m_part->scrollWidget())); } if ( m_searchWidget ) { - QWhatsThis::add(m_searchWidget, i18n("Enter here a text which an item in the view must contain anywhere to be shown.")); - connect(clear, SIGNAL(activated()), m_searchWidget, SLOT(clear())); - connect(m_searchWidget, SIGNAL(textChanged(const QString&)), this, SLOT(searchTextChanged(const QString&))); + TQWhatsThis::add(m_searchWidget, i18n("Enter here a text which an item in the view must contain anywhere to be shown.")); + connect(clear, TQT_SIGNAL(activated()), m_searchWidget, TQT_SLOT(clear())); + connect(m_searchWidget, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(searchTextChanged(const TQString&))); } KWidgetAction *filterAction = new KWidgetAction(hbox, i18n("Filter Field"), @@ -205,11 +205,11 @@ DirFilterPlugin::DirFilterPlugin (QObject* parent, const char* name, // FIXME: This causes crashes for an unknown reason on certain systems // Probably the iconview onchange event handler should tempoarily stop this timer before doing anything else // Really the broken Qt3 iconview should just be modified to include a hidden list; it would make things *so* much easier! - m_refreshTimer = new QTimer( this ); - m_reactivateRefreshTimer = new QTimer( this ); - connect( m_refreshTimer, SIGNAL(timeout()), this, SLOT(activateSearch()) ); + m_refreshTimer = new TQTimer( this ); + m_reactivateRefreshTimer = new TQTimer( this ); + connect( m_refreshTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(activateSearch()) ); m_refreshTimer->start( 200, FALSE ); // 200 millisecond continuous timer - connect( m_reactivateRefreshTimer, SIGNAL(timeout()), this, SLOT(reactivateRefreshTimer()) ); + connect( m_reactivateRefreshTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(reactivateRefreshTimer()) ); } @@ -222,7 +222,7 @@ DirFilterPlugin::~DirFilterPlugin() delete m_reactivateRefreshTimer; } -void DirFilterPlugin::searchTextChanged(const QString& newtext) +void DirFilterPlugin::searchTextChanged(const TQString& newtext) { m_refreshTimer->stop(); m_reactivateRefreshTimer->stop(); @@ -249,7 +249,7 @@ void DirFilterPlugin::slotOpenURL () SessionManager::self()->save(m_pURL, m_searchWidget->text()); m_searchWidget->clear(); - QString typedFilter(SessionManager::self()->restoreTypedFilter(url)); + TQString typedFilter(SessionManager::self()->restoreTypedFilter(url)); m_searchWidget->completionObject()->addItem(typedFilter); m_searchWidget->setText(typedFilter); } @@ -271,8 +271,8 @@ void DirFilterPlugin::slotShowPopup() int id = 0; uint enableReset = 0; - QString label; - QStringList inodes; + TQString label; + TQStringList inodes; m_pFilterMenu->popupMenu()->clear(); m_pFilterMenu->popupMenu()->insertTitle (i18n("Only Show Items of Type")); @@ -293,13 +293,13 @@ void DirFilterPlugin::slotShowPopup() { label = it.data().mimeComment; label += " ("; - label += QString::number (it.data().filenames.size ()); + label += TQString::number (it.data().filenames.size ()); label += ")"; } m_pMimeInfo[it.key()].id = m_pFilterMenu->popupMenu()->insertItem ( SmallIconSet(it.data().iconName), label, - this, SLOT(slotItemSelected(int)), 0, ++id); + this, TQT_SLOT(slotItemSelected(int)), 0, ++id); if (it.data().useAsFilter) { @@ -313,8 +313,8 @@ void DirFilterPlugin::slotShowPopup() { m_pFilterMenu->popupMenu()->insertSeparator (); - QStringList::Iterator it = inodes.begin(); - QStringList::Iterator end = inodes.end(); + TQStringList::Iterator it = inodes.begin(); + TQStringList::Iterator end = inodes.end(); for (; it != end; ++it) { @@ -324,13 +324,13 @@ void DirFilterPlugin::slotShowPopup() { label = m_pMimeInfo[(*it)].mimeComment; label += " ("; - label += QString::number (m_pMimeInfo[(*it)].filenames.size ()); + label += TQString::number (m_pMimeInfo[(*it)].filenames.size ()); label += ")"; } m_pMimeInfo[(*it)].id = m_pFilterMenu->popupMenu()->insertItem ( SmallIconSet(m_pMimeInfo[(*it)].iconName), label, - this, SLOT(slotItemSelected(int)), 0, ++id); + this, TQT_SLOT(slotItemSelected(int)), 0, ++id); if (m_pMimeInfo[(*it)].useAsFilter) { @@ -342,16 +342,16 @@ void DirFilterPlugin::slotShowPopup() m_pFilterMenu->popupMenu()->insertSeparator (); id = m_pFilterMenu->popupMenu()->insertItem (i18n("Use Multiple Filters"), - this, SLOT(slotMultipleFilters())); + this, TQT_SLOT(slotMultipleFilters())); m_pFilterMenu->popupMenu()->setItemEnabled (id, enableReset <= 1); m_pFilterMenu->popupMenu()->setItemChecked (id, SessionManager::self()->useMultipleFilters); id = m_pFilterMenu->popupMenu()->insertItem (i18n("Show Count"), this, - SLOT(slotShowCount())); + TQT_SLOT(slotShowCount())); m_pFilterMenu->popupMenu()->setItemChecked (id, SessionManager::self()->showCount); id = m_pFilterMenu->popupMenu()->insertItem (i18n("Reset"), this, - SLOT(slotReset())); + TQT_SLOT(slotReset())); m_pFilterMenu->popupMenu()->setItemEnabled (id, enableReset); } @@ -367,7 +367,7 @@ void DirFilterPlugin::slotItemSelected (int id) if (it != m_pMimeInfo.end()) { - QStringList filters; + TQStringList filters; if (it.data().useAsFilter) { @@ -420,7 +420,7 @@ void DirFilterPlugin::slotItemsAdded (const KFileItemList& list) { static_cast(m_searchWidget)->updateSearch(); } - else if ( ::qt_cast(m_part->scrollWidget()) ) + else if ( ::qt_cast(m_part->scrollWidget()) ) { static_cast(m_searchWidget)->updateSearch(); } @@ -432,16 +432,16 @@ void DirFilterPlugin::slotItemsAdded (const KFileItemList& list) for (KFileItemListIterator it (list); it.current (); ++it) { - QString name = it.current()->name(); + TQString name = it.current()->name(); KMimeType::Ptr mime = it.current()->mimeTypePtr(); // don't resolve mimetype if unknown if (!mime) continue; - QString mimeType = mime->name(); + TQString mimeType = mime->name(); if (!m_pMimeInfo.contains (mimeType)) { MimeInfo& mimeInfo = m_pMimeInfo[mimeType]; - QStringList filters = m_part->mimeFilter (); + TQStringList filters = m_part->mimeFilter (); mimeInfo.useAsFilter = (!filters.isEmpty () && filters.contains (mimeType)); mimeInfo.mimeComment = mime->comment(); mimeInfo.iconName = mime->icon(KURL(), false); @@ -468,11 +468,11 @@ void DirFilterPlugin::slotItemRemoved (const KFileItem* item) // NOTE: This bug is NOT present in qlistviewitem // HACK around it here... - if ( ::qt_cast(m_part->scrollWidget()) ) { + if ( ::qt_cast(m_part->scrollWidget()) ) { static_cast(m_searchWidget)->iconDeleted(item->name()); } - QString mimeType = item->mimetype().stripWhiteSpace(); + TQString mimeType = item->mimetype().stripWhiteSpace(); if (m_pMimeInfo.contains (mimeType)) { MimeInfo info = m_pMimeInfo [mimeType]; @@ -481,11 +481,11 @@ void DirFilterPlugin::slotItemRemoved (const KFileItem* item) m_pMimeInfo [mimeType].filenames.remove (item->name ()); else { if (info.useAsFilter) { - QStringList filters = m_part->mimeFilter (); + TQStringList filters = m_part->mimeFilter (); filters.remove (mimeType); m_part->setMimeFilter (filters); SessionManager::self()->save (m_part->url(), filters); - QTimer::singleShot( 0, this, SLOT(slotTimeout()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotTimeout()) ); } m_pMimeInfo.remove (mimeType); } @@ -509,7 +509,7 @@ void DirFilterPlugin::activateSearch() if ( ::qt_cast(m_part->scrollWidget()) ) { static_cast(m_searchWidget)->updateSearch(); } - else if ( ::qt_cast(m_part->scrollWidget()) ) { + else if ( ::qt_cast(m_part->scrollWidget()) ) { static_cast(m_searchWidget)->updateSearch(); } } @@ -523,7 +523,7 @@ void DirFilterPlugin::slotReset() for (; it != m_pMimeInfo.end(); ++it) it.data().useAsFilter = false; - QStringList filters; + TQStringList filters; KURL url = m_part->url(); m_part->setMimeFilter (filters); diff --git a/konq-plugins/dirfilter/dirfilterplugin.h b/konq-plugins/dirfilter/dirfilterplugin.h index c1313be..ff3497e 100644 --- a/konq-plugins/dirfilter/dirfilterplugin.h +++ b/konq-plugins/dirfilter/dirfilterplugin.h @@ -19,9 +19,9 @@ #ifndef __DIR_FILTER_PLUGIN_H #define __DIR_FILTER_PLUGIN_H -#include -#include -#include +#include +#include +#include #include @@ -50,17 +50,17 @@ public: ~SessionManager (); static SessionManager* self (); - QStringList restoreMimeFilters (const KURL& url) const; - QString restoreTypedFilter(const KURL& url) const; - void save (const KURL& url, const QStringList& filters); - void save (const KURL& url, const QString& typedFilter); + TQStringList restoreMimeFilters (const KURL& url) const; + TQString restoreTypedFilter(const KURL& url) const; + void save (const KURL& url, const TQStringList& filters); + void save (const KURL& url, const TQString& typedFilter); bool showCount; bool useMultipleFilters; protected: - QString generateKey (const KURL& url) const; + TQString generateKey (const KURL& url) const; void loadSettings (); void saveSettings (); @@ -73,8 +73,8 @@ private: int m_pid; bool m_bSettingsLoaded; static SessionManager* m_self; - QMap m_filters; - QMap m_typedFilter; + TQMap m_filters; + TQMap m_typedFilter; }; @@ -84,7 +84,7 @@ class DirFilterPlugin : public KParts::Plugin public: - DirFilterPlugin (QObject* parent, const char* name, const QStringList &); + DirFilterPlugin (TQObject* parent, const char* name, const TQStringList &); ~DirFilterPlugin (); protected: @@ -100,11 +100,11 @@ protected: int id; bool useAsFilter; - QString mimeType; - QString iconName; - QString mimeComment; + TQString mimeType; + TQString iconName; + TQString mimeComment; - QMap filenames; + TQMap filenames; }; void loadSettings(); @@ -121,19 +121,19 @@ private slots: void slotItemRemoved(const KFileItem *); void slotItemsAdded(const KFileItemList &); void activateSearch(); - void searchTextChanged(const QString& newtext); + void searchTextChanged(const TQString& newtext); void reactivateRefreshTimer(); private: KURL m_pURL; KonqDirPart* m_part; - QTimer *m_refreshTimer; - QTimer *m_reactivateRefreshTimer; + TQTimer *m_refreshTimer; + TQTimer *m_reactivateRefreshTimer; KActionMenu* m_pFilterMenu; - QString m_oldFilterString; + TQString m_oldFilterString; KLineEdit *m_searchWidget; - QMap m_pMimeInfo; - typedef QMap::Iterator MimeInfoIterator; + TQMap m_pMimeInfo; + typedef TQMap::Iterator MimeInfoIterator; }; #endif diff --git a/konq-plugins/domtreeviewer/domlistviewitem.cpp b/konq-plugins/domtreeviewer/domlistviewitem.cpp index c24df96..7ab20b4 100644 --- a/konq-plugins/domtreeviewer/domlistviewitem.cpp +++ b/konq-plugins/domtreeviewer/domlistviewitem.cpp @@ -17,32 +17,32 @@ #include "domlistviewitem.h" -#include -#include -#include +#include +#include +#include #include -DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListView *parent ) - : QListViewItem( parent ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *parent ) + : TQListViewItem( parent ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListView *parent, QListViewItem *after) - : QListViewItem( parent, after ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *parent, TQListViewItem *after) + : TQListViewItem( parent, after ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListViewItem *parent ) - : QListViewItem( parent ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *parent ) + : TQListViewItem( parent ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListViewItem *parent, QListViewItem *after) - : QListViewItem( parent, after ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *parent, TQListViewItem *after) + : TQListViewItem( parent, after ), m_node(node) { init(); } @@ -54,20 +54,20 @@ DOMListViewItem::~DOMListViewItem() void DOMListViewItem::init() { - m_color = QApplication::palette().color( QPalette::Active, QColorGroup::Text ); + m_color = TQApplication::palette().color( TQPalette::Active, TQColorGroup::Text ); m_font = KGlobalSettings::generalFont(); clos = false; } -void DOMListViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ) +void DOMListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) { - QColorGroup _cg( cg ); - QColor c = _cg.text(); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); p->setFont(m_font); - _cg.setColor( QColorGroup::Text, m_color ); - QListViewItem::paintCell( p, _cg, column, width, alignment ); - _cg.setColor( QColorGroup::Text, c ); + _cg.setColor( TQColorGroup::Text, m_color ); + TQListViewItem::paintCell( p, _cg, column, width, alignment ); + _cg.setColor( TQColorGroup::Text, c ); } diff --git a/konq-plugins/domtreeviewer/domlistviewitem.h b/konq-plugins/domtreeviewer/domlistviewitem.h index 22f34b2..9a85fbf 100644 --- a/konq-plugins/domtreeviewer/domlistviewitem.h +++ b/konq-plugins/domtreeviewer/domlistviewitem.h @@ -18,26 +18,26 @@ #include -#include -#include -#include +#include +#include +#include class DOMListViewItem : public QListViewItem { public: - DOMListViewItem( const DOM::Node &, QListView *parent ); - DOMListViewItem( const DOM::Node &, QListView *parent, QListViewItem *after ); - DOMListViewItem( const DOM::Node &, QListViewItem *parent ); - DOMListViewItem( const DOM::Node &, QListViewItem *parent, QListViewItem *after ); + DOMListViewItem( const DOM::Node &, TQListView *parent ); + DOMListViewItem( const DOM::Node &, TQListView *parent, TQListViewItem *after ); + DOMListViewItem( const DOM::Node &, TQListViewItem *parent ); + DOMListViewItem( const DOM::Node &, TQListViewItem *parent, TQListViewItem *after ); virtual ~DOMListViewItem(); - virtual void paintCell( QPainter *p, const QColorGroup &cg, + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ); - void setColor( const QColor &color) { m_color = color; } + void setColor( const TQColor &color) { m_color = color; } - void setFont( const QFont &font) { m_font = font;} + void setFont( const TQFont &font) { m_font = font;} void setItalic( bool b) {m_font.setItalic(b);} void setBold( bool b) {m_font.setBold(b);} void setUnderline(bool b) {m_font.setUnderline(b);} @@ -49,8 +49,8 @@ class DOMListViewItem : public QListViewItem private: void init(); - QColor m_color; - QFont m_font; + TQColor m_color; + TQFont m_font; DOM::Node m_node; bool clos; }; diff --git a/konq-plugins/domtreeviewer/domtreecommands.cpp b/konq-plugins/domtreeviewer/domtreecommands.cpp index 1f91cf1..0bbb918 100644 --- a/konq-plugins/domtreeviewer/domtreecommands.cpp +++ b/konq-plugins/domtreeviewer/domtreecommands.cpp @@ -25,7 +25,7 @@ #include -#include +#include using namespace domtreeviewer; @@ -50,7 +50,7 @@ static const char * const dom_error_msgs[] = { // == global functions ============================================== -QString domtreeviewer::domErrorMessage(int dom_err) +TQString domtreeviewer::domErrorMessage(int dom_err) { if ((unsigned)dom_err > sizeof dom_error_msgs/sizeof dom_error_msgs[0]) return i18n("Unknown Exception %1").arg(dom_err); @@ -87,7 +87,7 @@ inline static bool operator <(const DOM::Node &n1, const DOM::Node &n2) return (long)n1.handle() - (long)n2.handle() < 0; } -class ChangedNodeSet : public QMap +class ChangedNodeSet : public TQMap { }; @@ -104,15 +104,15 @@ ManipulationCommand::~ManipulationCommand() { } -void ManipulationCommand::connect(const char *signal, QObject *recv, const char *slot) +void ManipulationCommand::connect(const char *signal, TQObject *recv, const char *slot) { - QObject::connect(mcse(), signal, recv, slot); + TQObject::connect(mcse(), signal, recv, slot); } void ManipulationCommand::handleException(DOM::DOMException &ex) { _exception = ex; - QString msg = name() + ": " + domErrorMessage(ex.code); + TQString msg = name() + ": " + domErrorMessage(ex.code); emit mcse()->error(ex.code, msg); } @@ -178,7 +178,7 @@ void ManipulationCommand::reapply() // == MultiCommand =========================================== -MultiCommand::MultiCommand(const QString &desc) +MultiCommand::MultiCommand(const TQString &desc) : _name(desc) { cmds.setAutoDelete(true); @@ -197,7 +197,7 @@ void MultiCommand::addCommand(ManipulationCommand *cmd) void MultiCommand::apply() { // apply in forward order - for (QPtrListIterator it = cmds; *it; ++it) { + for (TQPtrListIterator it = cmds; *it; ++it) { try { if (shouldReapply()) (*it)->reapply(); else (*it)->apply(); @@ -223,7 +223,7 @@ void MultiCommand::apply() void MultiCommand::unapply() { // unapply in reverse order - QPtrListIterator it = cmds; + TQPtrListIterator it = cmds; for (it.toLast(); *it; --it) { try { (*it)->unapply(); @@ -258,14 +258,14 @@ void MultiCommand::mergeChangedNodesFrom(ManipulationCommand *cmd) cmd->changedNodes->clear(); } -QString MultiCommand::name() const +TQString MultiCommand::name() const { return _name; } // == AddAttributeCommand =========================================== -AddAttributeCommand::AddAttributeCommand(const DOM::Element &element, const QString &attrName, const QString &attrValue) +AddAttributeCommand::AddAttributeCommand(const DOM::Element &element, const TQString &attrName, const TQString &attrValue) : _element(element), attrName(attrName), attrValue(attrValue) { if (attrValue.isEmpty()) this->attrValue = ""; @@ -287,7 +287,7 @@ void AddAttributeCommand::unapply() addChangedNode(_element); } -QString AddAttributeCommand::name() const +TQString AddAttributeCommand::name() const { return i18n("Add attribute"); } @@ -295,7 +295,7 @@ QString AddAttributeCommand::name() const // == ChangeAttributeValueCommand ==================================== ChangeAttributeValueCommand::ChangeAttributeValueCommand( -const DOM::Element &element, const QString &attr, const QString &value) +const DOM::Element &element, const TQString &attr, const TQString &value) : _element(element), _attr(attr), new_value(value) { } @@ -317,14 +317,14 @@ void ChangeAttributeValueCommand::unapply() addChangedNode(_element); } -QString ChangeAttributeValueCommand::name() const +TQString ChangeAttributeValueCommand::name() const { return i18n("Change attribute value"); } // == RemoveAttributeCommand ======================================== -RemoveAttributeCommand::RemoveAttributeCommand(const DOM::Element &element, const QString &attrName) +RemoveAttributeCommand::RemoveAttributeCommand(const DOM::Element &element, const TQString &attrName) : _element(element), attrName(attrName) { } @@ -348,14 +348,14 @@ void RemoveAttributeCommand::unapply() addChangedNode(_element); } -QString RemoveAttributeCommand::name() const +TQString RemoveAttributeCommand::name() const { return i18n("Remove attribute"); } // == RenameAttributeCommand ======================================== -RenameAttributeCommand::RenameAttributeCommand(const DOM::Element &element, const QString &attrOldName, const QString &attrNewName) +RenameAttributeCommand::RenameAttributeCommand(const DOM::Element &element, const TQString &attrOldName, const TQString &attrNewName) : _element(element), attrOldName(attrOldName), attrNewName(attrNewName) { } @@ -380,14 +380,14 @@ void RenameAttributeCommand::unapply() addChangedNode(_element); } -QString RenameAttributeCommand::name() const +TQString RenameAttributeCommand::name() const { return i18n("Rename attribute"); } // == ChangeCDataCommand ======================================== -ChangeCDataCommand::ChangeCDataCommand(const DOM::CharacterData &cdata, const QString &value) +ChangeCDataCommand::ChangeCDataCommand(const DOM::CharacterData &cdata, const TQString &value) : cdata(cdata), value(value), has_newlines(false) { } @@ -401,8 +401,8 @@ void ChangeCDataCommand::apply() if (!shouldReapply()) { oldValue = cdata.data(); has_newlines = - QConstString(value.unicode(), value.length()).string().contains('\n') - || QConstString(oldValue.unicode(), oldValue.length()).string().contains('\n'); + TQConstString(value.unicode(), value.length()).string().contains('\n') + || TQConstString(oldValue.unicode(), oldValue.length()).string().contains('\n'); } cdata.setData(value); addChangedNode(cdata); @@ -416,7 +416,7 @@ void ChangeCDataCommand::unapply() struc_changed = has_newlines; } -QString ChangeCDataCommand::name() const +TQString ChangeCDataCommand::name() const { return i18n("Change textual content"); } @@ -478,7 +478,7 @@ void InsertNodeCommand::unapply() struc_changed = true; } -QString InsertNodeCommand::name() const +TQString InsertNodeCommand::name() const { return i18n("Insert node"); } @@ -506,7 +506,7 @@ void RemoveNodeCommand::unapply() struc_changed = true; } -QString RemoveNodeCommand::name() const +TQString RemoveNodeCommand::name() const { return i18n("Remove node"); } @@ -552,7 +552,7 @@ void MoveNodeCommand::unapply() struc_changed = true; } -QString MoveNodeCommand::name() const +TQString MoveNodeCommand::name() const { return i18n("Move node"); } diff --git a/konq-plugins/domtreeviewer/domtreecommands.h b/konq-plugins/domtreeviewer/domtreecommands.h index bf893dc..f068426 100644 --- a/konq-plugins/domtreeviewer/domtreecommands.h +++ b/konq-plugins/domtreeviewer/domtreecommands.h @@ -32,8 +32,8 @@ #include -#include -#include +#include +#include class DOMTreeView; class KPrinter; @@ -45,7 +45,7 @@ class ManipulationCommandSignalEmitter; class ChangedNodeSet; /** returns a localized string for the given dom exception code */ -QString domErrorMessage(int exception_code); +TQString domErrorMessage(int exception_code); /** * Internal class for emitting signals. @@ -71,7 +71,7 @@ signals: * @param err_id DOM error id * @param msg error message */ - void error(int err_id, const QString &msg); + void error(int err_id, const TQString &msg); private: // make moc not complain friend class ManipulationCommand; @@ -97,7 +97,7 @@ public: bool allowSignals() const { return allow_signals; } /** connects the given signal to a slot */ - static void connect(const char *signal, QObject *recv, const char *slot); + static void connect(const char *signal, TQObject *recv, const char *slot); /** does grunt work and calls apply()/reapply() */ virtual void execute(); @@ -136,13 +136,13 @@ private: class MultiCommand : public ManipulationCommand { public: - MultiCommand(const QString &name); + MultiCommand(const TQString &name); virtual ~MultiCommand(); /** Adds a new command. Will take ownership of \c cmd */ void addCommand(ManipulationCommand *cmd); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -151,8 +151,8 @@ protected: void mergeChangedNodesFrom(ManipulationCommand *cmd); protected: - QPtrList cmds; - QString _name; + TQPtrList cmds; + TQString _name; }; /** @@ -162,10 +162,10 @@ protected: class AddAttributeCommand : public ManipulationCommand { public: - AddAttributeCommand(const DOM::Element &element, const QString &attrName, const QString &attrValue); + AddAttributeCommand(const DOM::Element &element, const TQString &attrName, const TQString &attrValue); virtual ~AddAttributeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -184,10 +184,10 @@ protected: class ChangeAttributeValueCommand : public ManipulationCommand { public: - ChangeAttributeValueCommand(const DOM::Element &element, const QString &attr, const QString &value); + ChangeAttributeValueCommand(const DOM::Element &element, const TQString &attr, const TQString &value); virtual ~ChangeAttributeValueCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -207,10 +207,10 @@ protected: class RemoveAttributeCommand : public ManipulationCommand { public: - RemoveAttributeCommand(const DOM::Element &element, const QString &attrName); + RemoveAttributeCommand(const DOM::Element &element, const TQString &attrName); virtual ~RemoveAttributeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -229,10 +229,10 @@ protected: class RenameAttributeCommand : public ManipulationCommand { public: - RenameAttributeCommand(const DOM::Element &element, const QString &attrOldName, const QString &attrNewName); + RenameAttributeCommand(const DOM::Element &element, const TQString &attrOldName, const TQString &attrNewName); virtual ~RenameAttributeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -252,10 +252,10 @@ protected: class ChangeCDataCommand : public ManipulationCommand { public: - ChangeCDataCommand(const DOM::CharacterData &, const QString &value); + ChangeCDataCommand(const DOM::CharacterData &, const TQString &value); virtual ~ChangeCDataCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -309,7 +309,7 @@ public: InsertNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); virtual ~InsertNodeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -335,7 +335,7 @@ public: RemoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); virtual ~RemoveNodeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -358,7 +358,7 @@ public: MoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); virtual ~MoveNodeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); diff --git a/konq-plugins/domtreeviewer/domtreeview.cpp b/konq-plugins/domtreeviewer/domtreeview.cpp index 167d85a..d26dbfc 100644 --- a/konq-plugins/domtreeviewer/domtreeview.cpp +++ b/konq-plugins/domtreeviewer/domtreeview.cpp @@ -30,17 +30,17 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -64,45 +64,45 @@ using namespace domtreeviewer; -DOMTreeView::DOMTreeView(QWidget *parent, const char* name, bool /*allowSaving*/) +DOMTreeView::DOMTreeView(TQWidget *parent, const char* name, bool /*allowSaving*/) : DOMTreeViewBase(parent, name), m_expansionDepth(5), m_maxDepth(0), m_bPure(true), m_bShowAttributes(true), m_bHighlightHTML(true), m_findDialog(0), focused_child(0) { part = 0; - const QFont font(KGlobalSettings::generalFont()); + const TQFont font(KGlobalSettings::generalFont()); m_listView->setFont( font ); m_listView->setSorting(-1); m_rootListView = m_listView; m_pureCheckBox->setChecked(m_bPure); - connect(m_pureCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotPureToggled(bool))); + connect(m_pureCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPureToggled(bool))); m_showAttributesCheckBox->setChecked(m_bShowAttributes); - connect(m_showAttributesCheckBox, SIGNAL(toggled(bool)), this, - SLOT(slotShowAttributesToggled(bool))); + connect(m_showAttributesCheckBox, TQT_SIGNAL(toggled(bool)), this, + TQT_SLOT(slotShowAttributesToggled(bool))); m_highlightHTMLCheckBox->setChecked(m_bHighlightHTML); - connect(m_highlightHTMLCheckBox, SIGNAL(toggled(bool)), this, - SLOT(slotHighlightHTMLToggled(bool))); + connect(m_highlightHTMLCheckBox, TQT_SIGNAL(toggled(bool)), this, + TQT_SLOT(slotHighlightHTMLToggled(bool))); - connect(m_listView, SIGNAL(clicked(QListViewItem *)), this, - SLOT(slotItemClicked(QListViewItem *))); - connect(m_listView, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)), - SLOT(showDOMTreeContextMenu(QListViewItem *, const QPoint &, int))); - connect(m_listView, SIGNAL(moved(QPtrList &, QPtrList &, QPtrList &)), - SLOT(slotMovedItems(QPtrList &, QPtrList &, QPtrList &))); + connect(m_listView, TQT_SIGNAL(clicked(TQListViewItem *)), this, + TQT_SLOT(slotItemClicked(TQListViewItem *))); + connect(m_listView, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(showDOMTreeContextMenu(TQListViewItem *, const TQPoint &, int))); + connect(m_listView, TQT_SIGNAL(moved(TQPtrList &, TQPtrList &, TQPtrList &)), + TQT_SLOT(slotMovedItems(TQPtrList &, TQPtrList &, TQPtrList &))); // set up message line messageLinePane->hide(); - connect(messageHideBtn, SIGNAL(clicked()), SLOT(hideMessageLine())); - connect(messageListBtn, SIGNAL(clicked()), mainWindow(), SLOT(showMessageLog())); + connect(messageHideBtn, TQT_SIGNAL(clicked()), TQT_SLOT(hideMessageLine())); + connect(messageListBtn, TQT_SIGNAL(clicked()), mainWindow(), TQT_SLOT(showMessageLog())); installEventFilter(m_listView); - ManipulationCommand::connect(SIGNAL(nodeChanged(const DOM::Node &)), this, SLOT(slotRefreshNode(const DOM::Node &))); - ManipulationCommand::connect(SIGNAL(structureChanged()), this, SLOT(refresh())); + ManipulationCommand::connect(TQT_SIGNAL(nodeChanged(const DOM::Node &)), this, TQT_SLOT(slotRefreshNode(const DOM::Node &))); + ManipulationCommand::connect(TQT_SIGNAL(structureChanged()), this, TQT_SLOT(refresh())); initDOMNodeInfo(); @@ -126,7 +126,7 @@ void DOMTreeView::setHtmlPart(KHTMLPart *_part) parentWidget()->setCaption( part ? i18n( "DOM Tree for %1" ).arg(part->url().prettyURL()) : i18n("DOM Tree") ); - QTimer::singleShot(0, this, SLOT(slotSetHtmlPartDelayed())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSetHtmlPartDelayed())); } DOMTreeWindow *DOMTreeView::mainWindow() const @@ -134,10 +134,10 @@ DOMTreeWindow *DOMTreeView::mainWindow() const return static_cast(parentWidget()); } -bool DOMTreeView::eventFilter(QObject *o, QEvent *e) +bool DOMTreeView::eventFilter(TQObject *o, TQEvent *e) { - if (e->type() == QEvent::AccelOverride) { - QKeyEvent *ke = static_cast(e); + if (e->type() == TQEvent::AccelOverride) { + TQKeyEvent *ke = static_cast(e); kdDebug(90180) << " acceloverride " << ke->key() << " o " << o->name() << endl; if (o == m_listView) { // DOM tree @@ -152,14 +152,14 @@ bool DOMTreeView::eventFilter(QObject *o, QEvent *e) } - } else if (e->type() == QEvent::FocusIn) { + } else if (e->type() == TQEvent::FocusIn) { kdDebug(90180) << " focusin o " << o->name() << endl; if (o != this) { focused_child = o; } - } else if (e->type() == QEvent::FocusOut) { + } else if (e->type() == TQEvent::FocusOut) { kdDebug(90180) << " focusout o " << o->name() << endl; if (o != this) { @@ -180,7 +180,7 @@ void DOMTreeView::activateNode(const DOM::Node &node) void DOMTreeView::slotShowNode(const DOM::Node &pNode) { - if (QListViewItem *item = m_itemdict[pNode.handle()]) { + if (TQListViewItem *item = m_itemdict[pNode.handle()]) { m_listView->setCurrentItem(item); m_listView->ensureItemVisible(item); } @@ -265,8 +265,8 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item { cur_item->setClosing(isLast); - const QString nodeName(node.nodeName().string()); - QString text; + const TQString nodeName(node.nodeName().string()); + TQString text; const DOM::Element element = node; if (!element.isNull()) { if (!m_bPure) { @@ -281,7 +281,7 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item } if (m_bShowAttributes && !isLast) { - QString attributes; + TQString attributes; DOM::Attr attr; DOM::NamedNodeMap attrs = element.attributes(); unsigned long lmap = attrs.length(); @@ -307,10 +307,10 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item text = "`" + node.nodeValue().string() + "'"; // Hacks to deal with PRE - QTextStream ts( text, IO_ReadOnly ); + TQTextStream ts( text, IO_ReadOnly ); while (!ts.eof()) { - const QString txt(ts.readLine()); - const QFont font(KGlobalSettings::fixedFont()); + const TQString txt(ts.readLine()); + const TQFont font(KGlobalSettings::fixedFont()); cur_item->setFont( font ); cur_item->setText(0, txt); @@ -337,14 +337,14 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item } } -void DOMTreeView::highlightHTML(DOMListViewItem *cur_item, const QString &nodeName) +void DOMTreeView::highlightHTML(DOMListViewItem *cur_item, const TQString &nodeName) { /* This is slow. I could make it O(1) be using the tokenizer of khtml but I don't * think it's worth it. */ - QColor namedColor(palette().active().text()); - QString tagName = nodeName.upper(); + TQColor namedColor(palette().active().text()); + TQString tagName = nodeName.upper(); if ( tagName == "HTML" ) { namedColor = "#0000ff"; cur_item->setBold(true); @@ -421,7 +421,7 @@ void DOMTreeView::highlightHTML(DOMListViewItem *cur_item, const QString &nodeNa cur_item->setColor(namedColor); } -void DOMTreeView::slotItemClicked(QListViewItem *cur_item) +void DOMTreeView::slotItemClicked(TQListViewItem *cur_item) { DOMListViewItem *cur = static_cast(cur_item); if (!cur) return; @@ -436,7 +436,7 @@ void DOMTreeView::slotFindClicked() { if (m_findDialog == 0) { m_findDialog = new KEdFind(this); - connect(m_findDialog, SIGNAL(search()), this, SLOT(slotSearch())); + connect(m_findDialog, TQT_SIGNAL(search()), this, TQT_SLOT(slotSearch())); } m_findDialog->show(); } @@ -459,20 +459,20 @@ void DOMTreeView::slotPrepareMove() current_node = item->node(); } -void DOMTreeView::slotMovedItems(QPtrList &items, QPtrList &/*afterFirst*/, QPtrList &afterNow) +void DOMTreeView::slotMovedItems(TQPtrList &items, TQPtrList &/*afterFirst*/, TQPtrList &afterNow) { MultiCommand *cmd = new MultiCommand(i18n("Move Nodes")); _refreshed = false; - QPtrList::Iterator it = items.begin(); - QPtrList::Iterator anit = afterNow.begin(); + TQPtrList::Iterator it = items.begin(); + TQPtrList::Iterator anit = afterNow.begin(); for (; it != items.end(); ++it, ++anit) { DOMListViewItem *item = static_cast(*it); DOMListViewItem *anitem = static_cast(*anit); DOM::Node parent = static_cast(item->parent())->node(); Q_ASSERT(!parent.isNull()); -// kdDebug(90180) << " afternow " << anitem << " node " << (anitem ? anitem->node().nodeName().string() : QString()) << "=" << (anitem ? anitem->node().nodeValue().string() : QString()) << endl; +// kdDebug(90180) << " afternow " << anitem << " node " << (anitem ? anitem->node().nodeName().string() : TQString()) << "=" << (anitem ? anitem->node().nodeValue().string() : TQString()) << endl; cmd->addCommand(new MoveNodeCommand(item->node(), parent, anitem ? anitem->node().nextSibling() : parent.firstChild()) @@ -490,7 +490,7 @@ void DOMTreeView::slotMovedItems(QPtrList &items, QPtrListgetText(); + const TQString& searchText = m_findDialog->getText(); bool caseSensitive = m_findDialog->case_sensitive(); searchRecursive(static_cast(m_rootListView->firstChild()), @@ -499,10 +499,10 @@ void DOMTreeView::slotSearch() m_findDialog->hide(); } -void DOMTreeView::searchRecursive(DOMListViewItem* cur_item, const QString& searchText, +void DOMTreeView::searchRecursive(DOMListViewItem* cur_item, const TQString& searchText, bool caseSensitive) { - const QString text(cur_item->text(0)); + const TQString text(cur_item->text(0)); if (text.contains(searchText, caseSensitive) > 0) { cur_item->setUnderline(true); cur_item->setItalic(true); @@ -526,11 +526,11 @@ void DOMTreeView::slotSaveClicked() KURL url = KFileDialog::getSaveFileName( part->url().url(), "*.html", this, i18n("Save DOM Tree as HTML") ); if (!(url.isEmpty()) && url.isValid()) { - QFile file(url.path()); + TQFile file(url.path()); if (file.exists()) { - const QString title = i18n( "File Exists" ); - const QString text = i18n( "Do you really want to overwrite: \n%1?" ).arg(url.url()); + const TQString title = i18n( "File Exists" ); + const TQString text = i18n( "Do you really want to overwrite: \n%1?" ).arg(url.url()); if (KMessageBox::Continue != KMessageBox::warningContinueCancel(this, text, title, i18n("Overwrite") ) ) { return; } @@ -538,19 +538,19 @@ void DOMTreeView::slotSaveClicked() if (file.open(IO_WriteOnly) ) { kdDebug(90180) << "Opened File: " << url.url() << endl; - m_textStream = new QTextStream(&file); //(stdOut) + m_textStream = new TQTextStream(&file); //(stdOut) saveTreeAsHTML(part->document()); file.close(); kdDebug(90180) << "File closed " << endl; delete m_textStream; } else { - const QString title = i18n( "Unable to Open File" ); - const QString text = i18n( "Unable to open \n %1 \n for writing" ).arg(url.path()); + const TQString title = i18n( "Unable to Open File" ); + const TQString text = i18n( "Unable to open \n %1 \n for writing" ).arg(url.path()); KMessageBox::sorry( this, text, title ); } } else { - const QString title = i18n( "Invalid URL" ); - const QString text = i18n( "This URL \n %1 \n is not valid." ).arg(url.url()); + const TQString title = i18n( "Invalid URL" ); + const TQString text = i18n( "This URL \n %1 \n is not valid." ).arg(url.url()); KMessageBox::sorry( this, text, title ); } } @@ -571,9 +571,9 @@ void DOMTreeView::saveTreeAsHTML(const DOM::Node &pNode) void DOMTreeView::saveRecursive(const DOM::Node &pNode, int indent) { - const QString nodeName(pNode.nodeName().string()); - QString text; - QString strIndent; + const TQString nodeName(pNode.nodeName().string()); + TQString text; + TQString strIndent; strIndent.fill(' ', indent); const DOM::Element element = static_cast(pNode); @@ -588,7 +588,7 @@ void DOMTreeView::saveRecursive(const DOM::Node &pNode, int indent) } else { text += "<" + nodeName; - QString attributes; + TQString attributes; DOM::Attr attr; const DOM::NamedNodeMap attrs = element.attributes(); unsigned long lmap = attrs.length(); @@ -652,7 +652,7 @@ void DOMTreeView::refresh() m_listView->setUpdatesEnabled(false); slotShowTree(part->document()); - QTimer::singleShot(0, this, SLOT(slotRestoreScrollOffset())); + TQTimer::singleShot(0, this, TQT_SLOT(slotRestoreScrollOffset())); _refreshed = true; } @@ -664,7 +664,7 @@ void DOMTreeView::increaseExpansionDepth() adjustDepth(); updateIncrDecreaseButton(); } else { - QApplication::beep(); + TQApplication::beep(); } } @@ -676,7 +676,7 @@ void DOMTreeView::decreaseExpansionDepth() adjustDepth(); updateIncrDecreaseButton(); } else { - QApplication::beep(); + TQApplication::beep(); } } @@ -695,7 +695,7 @@ void DOMTreeView::adjustDepth() } -void DOMTreeView::adjustDepthRecursively(QListViewItem *cur_item, uint currDepth) +void DOMTreeView::adjustDepthRecursively(TQListViewItem *cur_item, uint currDepth) { if (!(cur_item == 0)) { while( cur_item ) { @@ -706,7 +706,7 @@ void DOMTreeView::adjustDepthRecursively(QListViewItem *cur_item, uint currDept } } -void DOMTreeView::setMessage(const QString &msg) +void DOMTreeView::setMessage(const TQString &msg) { messageLine->setText(msg); messageLinePane->show(); @@ -733,9 +733,9 @@ void DOMTreeView::moveToParent() activateNode(cur); } -void DOMTreeView::showDOMTreeContextMenu(QListViewItem */*lvi*/, const QPoint &pos, int /*col*/) +void DOMTreeView::showDOMTreeContextMenu(TQListViewItem */*lvi*/, const TQPoint &pos, int /*col*/) { - QPopupMenu *ctx = mainWindow()->domTreeViewContextMenu(); + TQPopupMenu *ctx = mainWindow()->domTreeViewContextMenu(); Q_ASSERT(ctx); ctx->popup(pos); } @@ -764,7 +764,7 @@ void DOMTreeView::deleteNodes() DOM::Node last; MultiCommand *cmd = new MultiCommand(i18n("Delete Nodes")); - QListViewItemIterator it(m_listView, QListViewItemIterator::Selected); + TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selected); for (; *it; ++it) { DOMListViewItem *item = static_cast(*it); // kdDebug(90180) << " item->node " << item->node().nodeName().string() << " clos " << item->isClosing() << endl; @@ -775,7 +775,7 @@ void DOMTreeView::deleteNodes() // check for selected parent bool has_selected_parent = false; - for (QListViewItem *p = item->parent(); p; p = p->parent()) { + for (TQListViewItem *p = item->parent(); p; p = p->parent()) { if (p->isSelected()) { has_selected_parent = true; break; } } if (has_selected_parent) continue; @@ -805,9 +805,9 @@ void DOMTreeView::disconnectFromTornDownPart() void DOMTreeView::connectToPart() { if (part) { - connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this, - SLOT(activateNode(const DOM::Node &))); - connect(part, SIGNAL(completed()), this, SLOT(refresh())); + connect(part, TQT_SIGNAL(nodeActivated(const DOM::Node &)), this, + TQT_SLOT(activateNode(const DOM::Node &))); + connect(part, TQT_SIGNAL(completed()), this, TQT_SLOT(refresh())); // insert a style rule to indicate activated nodes try { @@ -865,18 +865,18 @@ void DOMTreeView::slotAddElementDlg() DOMListViewItem *item = static_cast(m_listView->currentItem()); if (!item) return; - QString qname; - QString namespc; + TQString qname; + TQString namespc; SignalReceiver addBefore; { ElementEditDialog dlg(this, "ElementEditDialog", true); - connect(dlg.insBeforeBtn, SIGNAL(clicked()), &addBefore, SLOT(slot())); + connect(dlg.insBeforeBtn, TQT_SIGNAL(clicked()), &addBefore, TQT_SLOT(slot())); // ### activate when namespaces are supported dlg.elemNamespace->setEnabled(false); - if (dlg.exec() != QDialog::Accepted) return; + if (dlg.exec() != TQDialog::Accepted) return; qname = dlg.elemName->text(); namespc = dlg.elemNamespace->currentText(); @@ -906,14 +906,14 @@ void DOMTreeView::slotAddTextDlg() DOMListViewItem *item = static_cast(m_listView->currentItem()); if (!item) return; - QString text; + TQString text; SignalReceiver addBefore; { TextEditDialog dlg(this, "TextEditDialog", true); - connect(dlg.insBeforeBtn, SIGNAL(clicked()), &addBefore, SLOT(slot())); + connect(dlg.insBeforeBtn, TQT_SIGNAL(clicked()), &addBefore, TQT_SLOT(slot())); - if (dlg.exec() != QDialog::Accepted) return; + if (dlg.exec() != TQDialog::Accepted) return; text = dlg.textPane->text(); } @@ -938,25 +938,25 @@ void DOMTreeView::slotAddTextDlg() // == DOM Node info panel ============================================= -static QString *clickToAdd; +static TQString *clickToAdd; /** * List view item for attribute list. */ class AttributeListItem : public QListViewItem { - typedef QListViewItem super; + typedef TQListViewItem super; bool _new; public: - AttributeListItem(QListView *parent, QListViewItem *prev) + AttributeListItem(TQListView *parent, TQListViewItem *prev) : super(parent, prev), _new(true) { } - AttributeListItem(const QString &attrName, const QString &attrValue, - QListView *parent, QListViewItem *prev) + AttributeListItem(const TQString &attrName, const TQString &attrValue, + TQListView *parent, TQListViewItem *prev) : super(parent, prev), _new(false) { setText(0, attrName); @@ -966,33 +966,33 @@ public: bool isNew() const { return _new; } void setNew(bool s) { _new = s; } - virtual int compare(QListViewItem *item, int column, bool ascend) const + virtual int compare(TQListViewItem *item, int column, bool ascend) const { return _new ? 1 : super::compare(item, column, ascend); } protected: - virtual void paintCell( QPainter *p, const QColorGroup &cg, + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) { bool updates_enabled = listView()->isUpdatesEnabled(); listView()->setUpdatesEnabled(false); - QColor c = cg.text(); + TQColor c = cg.text(); bool text_changed = false; - QString oldText; + TQString oldText; if (_new) { - c = QApplication::palette().color( QPalette::Disabled, QColorGroup::Text ); + c = TQApplication::palette().color( TQPalette::Disabled, TQColorGroup::Text ); - if (!clickToAdd) clickToAdd = new QString(i18n("")); + if (!clickToAdd) clickToAdd = new TQString(i18n("")); oldText = text(column); text_changed = true; - if (column == 0) setText(0, *clickToAdd); else setText(1, QString()); + if (column == 0) setText(0, *clickToAdd); else setText(1, TQString()); } - QColorGroup _cg( cg ); - _cg.setColor( QColorGroup::Text, c ); + TQColorGroup _cg( cg ); + _cg.setColor( TQColorGroup::Text, c ); super::paintCell( p, _cg, column, width, alignment ); if (text_changed) setText(column, oldText); @@ -1003,19 +1003,19 @@ protected: void DOMTreeView::initDOMNodeInfo() { - connect(m_listView, SIGNAL(clicked(QListViewItem *)), - SLOT(initializeOptionsFromListItem(QListViewItem *))); + connect(m_listView, TQT_SIGNAL(clicked(TQListViewItem *)), + TQT_SLOT(initializeOptionsFromListItem(TQListViewItem *))); - connect(nodeAttributes, SIGNAL(itemRenamed(QListViewItem *, const QString &, int)), - SLOT(slotItemRenamed(QListViewItem *, const QString &, int))); - connect(nodeAttributes, SIGNAL(executed(QListViewItem *, const QPoint &, int)), - SLOT(slotEditAttribute(QListViewItem *, const QPoint &, int))); - connect(nodeAttributes, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)), - SLOT(showInfoPanelContextMenu(QListViewItem *, const QPoint &, int))); + connect(nodeAttributes, TQT_SIGNAL(itemRenamed(TQListViewItem *, const TQString &, int)), + TQT_SLOT(slotItemRenamed(TQListViewItem *, const TQString &, int))); + connect(nodeAttributes, TQT_SIGNAL(executed(TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(slotEditAttribute(TQListViewItem *, const TQPoint &, int))); + connect(nodeAttributes, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(showInfoPanelContextMenu(TQListViewItem *, const TQPoint &, int))); - connect(applyContent, SIGNAL(clicked()), SLOT(slotApplyContent())); + connect(applyContent, TQT_SIGNAL(clicked()), TQT_SLOT(slotApplyContent())); - ManipulationCommand::connect(SIGNAL(nodeChanged(const DOM::Node &)), this, SLOT(initializeOptionsFromNode(const DOM::Node &))); + ManipulationCommand::connect(TQT_SIGNAL(nodeChanged(const DOM::Node &)), this, TQT_SLOT(initializeOptionsFromNode(const DOM::Node &))); nodeAttributes->setRenameable(0, true); nodeAttributes->setRenameable(1, true); @@ -1040,7 +1040,7 @@ void DOMTreeView::initializeOptionsFromNode(const DOM::Node &node) } nodeName->setText(node.nodeName().string()); - nodeType->setText(QString::number(node.nodeType())); + nodeType->setText(TQString::number(node.nodeType())); nodeNamespace->setText(node.namespaceURI().string()); // nodeValue->setText(node.value().string()); @@ -1060,7 +1060,7 @@ void DOMTreeView::initializeOptionsFromNode(const DOM::Node &node) nodeInfoStack->raiseWidget(EmptyPanel); } -void DOMTreeView::initializeOptionsFromListItem(QListViewItem *item) +void DOMTreeView::initializeOptionsFromListItem(TQListViewItem *item) { const DOMListViewItem *cur_item = static_cast(item); @@ -1070,7 +1070,7 @@ void DOMTreeView::initializeOptionsFromListItem(QListViewItem *item) void DOMTreeView::initializeOptionsFromElement(const DOM::Element &element) { - QListViewItem *last = 0; + TQListViewItem *last = 0; nodeAttributes->clear(); DOM::NamedNodeMap attrs = element.attributes(); @@ -1078,7 +1078,7 @@ void DOMTreeView::initializeOptionsFromElement(const DOM::Element &element) for (unsigned int j = 0; j < lmap; j++) { DOM::Attr attr = attrs.item(j); // kdDebug(90180) << attr.name().string() << "=" << attr.value().string() << endl; - QListViewItem *item = new AttributeListItem(attr.name().string(), + TQListViewItem *item = new AttributeListItem(attr.name().string(), attr.value().string(), nodeAttributes, last); last = item; } @@ -1099,7 +1099,7 @@ void DOMTreeView::initializeOptionsFromCData(const DOM::CharacterData &cdata) nodeInfoStack->raiseWidget(CDataPanel); } -void DOMTreeView::slotItemRenamed(QListViewItem *lvi, const QString &str, int col) +void DOMTreeView::slotItemRenamed(TQListViewItem *lvi, const TQString &str, int col) { AttributeListItem *item = static_cast(lvi); @@ -1120,7 +1120,7 @@ void DOMTreeView::slotItemRenamed(QListViewItem *lvi, const QString &str, int co break; } case 1: { - if (item->isNew()) { lvi->setText(1, QString()); break; } + if (item->isNew()) { lvi->setText(1, TQString()); break; } ChangeAttributeValueCommand *cmd = new ChangeAttributeValueCommand( element, item->text(0), str); @@ -1130,12 +1130,12 @@ void DOMTreeView::slotItemRenamed(QListViewItem *lvi, const QString &str, int co } } -void DOMTreeView::slotEditAttribute(QListViewItem *lvi, const QPoint &, int col) +void DOMTreeView::slotEditAttribute(TQListViewItem *lvi, const TQPoint &, int col) { if (!lvi) return; - QString attrName = lvi->text(0); - QString attrValue = lvi->text(1); + TQString attrName = lvi->text(0); + TQString attrValue = lvi->text(1); int res = 0; { @@ -1159,7 +1159,7 @@ void DOMTreeView::slotEditAttribute(QListViewItem *lvi, const QPoint &, int col) // kdDebug(90180) << "name=" << attrName << " value=" << attrValue << endl; - if (res == QDialog::Accepted) do { + if (res == TQDialog::Accepted) do { if (attrName.isEmpty()) break; if (lvi->text(0) != attrName) { @@ -1188,9 +1188,9 @@ void DOMTreeView::slotApplyContent() mainWindow()->executeAndAddCommand(cmd); } -void DOMTreeView::showInfoPanelContextMenu(QListViewItem */*lvi*/, const QPoint &pos, int /*col*/) +void DOMTreeView::showInfoPanelContextMenu(TQListViewItem */*lvi*/, const TQPoint &pos, int /*col*/) { - QPopupMenu *ctx = mainWindow()->infoPanelAttrContextMenu(); + TQPopupMenu *ctx = mainWindow()->infoPanelAttrContextMenu(); Q_ASSERT(ctx); ctx->popup(pos); } @@ -1213,7 +1213,7 @@ void DOMTreeView::pasteAttributes() void DOMTreeView::deleteAttributes() { MultiCommand *cmd = new MultiCommand(i18n("Delete Attributes")); - QListViewItemIterator it(nodeAttributes, QListViewItemIterator::Selected); + TQListViewItemIterator it(nodeAttributes, TQListViewItemIterator::Selected); for (; *it; ++it) { AttributeListItem *item = static_cast(*it); if (item->isNew()) continue; diff --git a/konq-plugins/domtreeviewer/domtreeview.h b/konq-plugins/domtreeviewer/domtreeview.h index 0e9977d..80c4c10 100644 --- a/konq-plugins/domtreeviewer/domtreeview.h +++ b/konq-plugins/domtreeviewer/domtreeview.h @@ -22,8 +22,8 @@ #ifndef DOMTREEVIEW_H #define DOMTREEVIEW_H -#include -#include +#include +#include #include #include #include @@ -49,7 +49,7 @@ class DOMTreeView : public DOMTreeViewBase Q_OBJECT public: - DOMTreeView(QWidget *parent, const char* name, bool allowSaving = true); + DOMTreeView(TQWidget *parent, const char* name, bool allowSaving = true); ~DOMTreeView(); KHTMLPart *htmlPart() const { return part; } @@ -62,7 +62,7 @@ class DOMTreeView : public DOMTreeViewBase /* void saveTreeAsHTML(const DOM::Node &pNode); */ - virtual bool eventFilter(QObject *o, QEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); signals: /** emitted when the part has been changed. */ @@ -72,7 +72,7 @@ class DOMTreeView : public DOMTreeViewBase void refresh(); void increaseExpansionDepth(); void decreaseExpansionDepth(); - void setMessage(const QString &msg); + void setMessage(const TQString &msg); void hideMessageLine(); void moveToParent(); @@ -104,9 +104,9 @@ class DOMTreeView : public DOMTreeViewBase protected slots: void slotShowNode(const DOM::Node &pNode); void slotShowTree(const DOM::Node &pNode); - void slotItemClicked(QListViewItem *); + void slotItemClicked(TQListViewItem *); void slotRefreshNode(const DOM::Node &pNode); - void slotMovedItems(QPtrList &items, QPtrList &afterFirst, QPtrList &afterNow); + void slotMovedItems(TQPtrList &items, TQPtrList &afterFirst, TQPtrList &afterNow); void slotPrepareMove(); void slotSearch(); @@ -116,13 +116,13 @@ class DOMTreeView : public DOMTreeViewBase void slotShowAttributesToggled(bool); void slotHighlightHTMLToggled(bool); - void showDOMTreeContextMenu(QListViewItem *, const QPoint &, int); + void showDOMTreeContextMenu(TQListViewItem *, const TQPoint &, int); void slotSetHtmlPartDelayed(); void slotRestoreScrollOffset(); private: - QPtrDict m_itemdict; + TQPtrDict m_itemdict; DOM::Node m_document; uint m_expansionDepth, m_maxDepth; @@ -135,13 +135,13 @@ class DOMTreeView : public DOMTreeViewBase // void saveRecursive(const DOM::Node &node, int ident); void searchRecursive(DOMListViewItem *cur_item, - const QString &searchText, + const TQString &searchText, bool caseSensitive); void adjustDepth(); - void adjustDepthRecursively(QListViewItem *cur_item, uint currDepth); + void adjustDepthRecursively(TQListViewItem *cur_item, uint currDepth); void highlightHTML(DOMListViewItem *cur_item, - const QString &nodeName); + const TQString &nodeName); void addElement(const DOM::Node &node, DOMListViewItem *cur_item, bool isLast); @@ -151,12 +151,12 @@ class DOMTreeView : public DOMTreeViewBase KEdFind* m_findDialog; KHTMLPart *part; - QTextStream* m_textStream; + TQTextStream* m_textStream; const KListView* m_rootListView; KPushButton* m_saveButton; - QObject *focused_child; + TQObject *focused_child; DOM::Node current_node; DOM::CSSStyleSheet stylesheet; DOM::CSSRule active_node_rule; @@ -173,7 +173,7 @@ class DOMTreeView : public DOMTreeViewBase public slots: void initializeOptionsFromNode(const DOM::Node &); - void initializeOptionsFromListItem(QListViewItem *); + void initializeOptionsFromListItem(TQListViewItem *); void copyAttributes(); void cutAttributes(); @@ -187,11 +187,11 @@ class DOMTreeView : public DOMTreeViewBase void initializeOptionsFromCData(const DOM::CharacterData &); private slots: - void slotItemRenamed(QListViewItem *, const QString &str, int col); - void slotEditAttribute(QListViewItem *, const QPoint &, int col); + void slotItemRenamed(TQListViewItem *, const TQString &str, int col); + void slotEditAttribute(TQListViewItem *, const TQPoint &, int col); void slotApplyContent(); - void showInfoPanelContextMenu(QListViewItem *, const QPoint &, int); + void showInfoPanelContextMenu(TQListViewItem *, const TQPoint &, int); private: DOM::Node infoNode; // node these infos apply to diff --git a/konq-plugins/domtreeviewer/domtreewindow.cpp b/konq-plugins/domtreeviewer/domtreewindow.cpp index f8b9ed5..0dd6d7f 100644 --- a/konq-plugins/domtreeviewer/domtreewindow.cpp +++ b/konq-plugins/domtreeviewer/domtreewindow.cpp @@ -50,8 +50,8 @@ #include #include -#include -#include +#include +#include using domtreeviewer::ManipulationCommand; @@ -84,16 +84,16 @@ DOMTreeWindow::DOMTreeWindow(PluginDomtreeviewer *plugin) // allow the view to change the statusbar and caption #if 0 - connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), - this, SLOT(changeStatusbar(const QString&))); - connect(m_view, SIGNAL(signalChangeCaption(const QString&)), - this, SLOT(changeCaption(const QString&))); + connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)), + this, TQT_SLOT(changeStatusbar(const TQString&))); + connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)), + this, TQT_SLOT(changeCaption(const TQString&))); #endif - connect(view(), SIGNAL(htmlPartChanged(KHTMLPart *)), - SLOT(slotHtmlPartChanged(KHTMLPart *))); + connect(view(), TQT_SIGNAL(htmlPartChanged(KHTMLPart *)), + TQT_SLOT(slotHtmlPartChanged(KHTMLPart *))); - ManipulationCommand::connect(SIGNAL(error(int, const QString &)), - this, SLOT(addMessage(int, const QString &))); + ManipulationCommand::connect(TQT_SIGNAL(error(int, const TQString &)), + this, TQT_SLOT(addMessage(int, const TQString &))); infopanel_ctx = createInfoPanelAttrContextMenu(); domtree_ctx = createDOMTreeViewContextMenu(); @@ -119,74 +119,74 @@ void DOMTreeWindow::executeAndAddCommand(ManipulationCommand *cmd) void DOMTreeWindow::setupActions() { - KStdAction::close(this, SLOT(close()), actionCollection()); + KStdAction::close(this, TQT_SLOT(close()), actionCollection()); - KStdAction::cut(this, SLOT(slotCut()), actionCollection())->setEnabled(false); - KStdAction::copy(this, SLOT(slotCopy()), actionCollection())->setEnabled(false); - KStdAction::paste(this, SLOT(slotPaste()), actionCollection())->setEnabled(false); + KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection())->setEnabled(false); + KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection())->setEnabled(false); + KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection())->setEnabled(false); m_commandHistory = new KCommandHistory(actionCollection()); - KStdAction::find(this, SLOT(slotFind()), actionCollection()); + KStdAction::find(this, TQT_SLOT(slotFind()), actionCollection()); - KStdAction::redisplay(m_view, SLOT(refresh()), actionCollection()); + KStdAction::redisplay(m_view, TQT_SLOT(refresh()), actionCollection()); // toggle manipulation dialog KAction *showMsgDlg = new KAction(i18n("Show Message Log"), CTRL+Key_E, actionCollection(), "show_msg_dlg"); - connect(showMsgDlg, SIGNAL(activated()), SLOT(showMessageLog())); + connect(showMsgDlg, TQT_SIGNAL(activated()), TQT_SLOT(showMessageLog())); // KAction *custom = new KAction(i18n("Cus&tom Menuitem"), 0, -// this, SLOT(optionsPreferences()), +// this, TQT_SLOT(optionsPreferences()), // actionCollection(), "custom_action"); // actions for the dom tree list view toolbar - KStdAction::up(view(), SLOT(moveToParent()), actionCollection(), "tree_up"); + KStdAction::up(view(), TQT_SLOT(moveToParent()), actionCollection(), "tree_up"); KAction *tree_inc_level = new KAction(i18n("Expand"), "1rightarrow", CTRL+Key_Greater, view(), - SLOT(increaseExpansionDepth()), actionCollection(), + TQT_SLOT(increaseExpansionDepth()), actionCollection(), "tree_inc_level"); tree_inc_level->setToolTip(i18n("Increase expansion level")); KAction *tree_dec_level = new KAction(i18n("Collapse"), "1leftarrow", CTRL+Key_Less, view(), - SLOT(decreaseExpansionDepth()), actionCollection(), + TQT_SLOT(decreaseExpansionDepth()), actionCollection(), "tree_dec_level"); tree_dec_level->setToolTip(i18n("Decrease expansion level")); // actions for the dom tree list view context menu del_tree = new KAction(i18n("&Delete"), "editdelete", - Key_Delete, view(), SLOT(deleteNodes()), + Key_Delete, view(), TQT_SLOT(deleteNodes()), actionCollection(), "tree_delete"); del_tree->setToolTip(i18n("Delete nodes")); /*KAction *new_elem = */new KAction(i18n("New &Element ..."), "bookmark", KShortcut(), view(), - SLOT(slotAddElementDlg()), actionCollection(), + TQT_SLOT(slotAddElementDlg()), actionCollection(), "tree_add_element"); /*KAction *new_text = */new KAction(i18n("New &Text Node ..."), - "text", KShortcut(), view(), SLOT(slotAddTextDlg()), + "text", KShortcut(), view(), TQT_SLOT(slotAddTextDlg()), actionCollection(), "tree_add_text"); // actions for the info panel attribute list context menu del_attr = new KAction(i18n("&Delete"), "editdelete", - Key_Delete, view(), SLOT(deleteAttributes()), + Key_Delete, view(), TQT_SLOT(deleteAttributes()), actionCollection(), "attr_delete"); del_attr->setToolTip(i18n("Delete attributes")); } -QPopupMenu *DOMTreeWindow::createInfoPanelAttrContextMenu() +TQPopupMenu *DOMTreeWindow::createInfoPanelAttrContextMenu() { - QWidget *w = factory()->container("infopanelattr_context", this); + TQWidget *w = factory()->container("infopanelattr_context", this); Q_ASSERT(w); - return static_cast(w); + return static_cast(w); } -QPopupMenu *DOMTreeWindow::createDOMTreeViewContextMenu() +TQPopupMenu *DOMTreeWindow::createDOMTreeViewContextMenu() { - QWidget *w = factory()->container("domtree_context", this); + TQWidget *w = factory()->container("domtree_context", this); Q_ASSERT(w); - return static_cast(w); + return static_cast(w); } void DOMTreeWindow::saveProperties(KConfig *config) @@ -214,20 +214,20 @@ void DOMTreeWindow::readProperties(KConfig *config) // in 'saveProperties' #if 0 - QString url = config->readPathEntry("lastURL"); + TQString url = config->readPathEntry("lastURL"); if (!url.isEmpty()) m_view->openURL(KURL::fromPathOrURL(url)); #endif } -void DOMTreeWindow::dragEnterEvent(QDragEnterEvent *event) +void DOMTreeWindow::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void DOMTreeWindow::dropEvent(QDropEvent *event) +void DOMTreeWindow::dropEvent(TQDropEvent *event) { // this is a very simplistic implementation of a drop event. we // will only accept a dropped URL. the Qt dnd code can do *much* @@ -246,14 +246,14 @@ void DOMTreeWindow::dropEvent(QDropEvent *event) } } -void DOMTreeWindow::addMessage(int msg_id, const QString &msg) +void DOMTreeWindow::addMessage(int msg_id, const TQString &msg) { - QDateTime t(QDateTime::currentDateTime()); - QString fullmsg = t.toString(); + TQDateTime t(TQDateTime::currentDateTime()); + TQString fullmsg = t.toString(); fullmsg += ":"; if (msg_id != 0) - fullmsg += " (" + QString::number(msg_id) + ") "; + fullmsg += " (" + TQString::number(msg_id) + ") "; fullmsg += msg; if (msgdlg) msgdlg->addMessage(fullmsg); @@ -292,7 +292,7 @@ void DOMTreeWindow::optionsConfigureToolbars() // use the standard toolbar editor saveMainWindowSettings( config(), autoSaveGroup() ); KEditToolbar dlg(actionCollection()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig())); dlg.exec(); } @@ -316,13 +316,13 @@ void DOMTreeWindow::optionsPreferences() #endif } -void DOMTreeWindow::changeStatusbar(const QString& text) +void DOMTreeWindow::changeStatusbar(const TQString& text) { // display the text on the statusbar statusBar()->message(text); } -void DOMTreeWindow::changeCaption(const QString& text) +void DOMTreeWindow::changeCaption(const TQString& text) { // display the text on the caption setCaption(text); @@ -339,13 +339,13 @@ void DOMTreeWindow::slotHtmlPartChanged(KHTMLPart *p) part_manager = p->manager(); - connect(part_manager, SIGNAL(activePartChanged(KParts::Part *)), - SLOT(slotActivePartChanged(KParts::Part *))); - connect(part_manager, SIGNAL(partRemoved(KParts::Part *)), - SLOT(slotPartRemoved(KParts::Part *))); + connect(part_manager, TQT_SIGNAL(activePartChanged(KParts::Part *)), + TQT_SLOT(slotActivePartChanged(KParts::Part *))); + connect(part_manager, TQT_SIGNAL(partRemoved(KParts::Part *)), + TQT_SLOT(slotPartRemoved(KParts::Part *))); // set up browser extension connections - connect(p, SIGNAL(docCreated()), SLOT(slotClosePart())); + connect(p, TQT_SIGNAL(docCreated()), TQT_SLOT(slotClosePart())); } } diff --git a/konq-plugins/domtreeviewer/domtreewindow.h b/konq-plugins/domtreeviewer/domtreewindow.h index f942798..e71a3c7 100644 --- a/konq-plugins/domtreeviewer/domtreewindow.h +++ b/konq-plugins/domtreeviewer/domtreewindow.h @@ -27,7 +27,7 @@ #include -#include +#include namespace domtreeviewer { class ManipulationCommand; @@ -85,22 +85,22 @@ public: /** * creates and returns the context menu for the list info panel */ - QPopupMenu *createInfoPanelAttrContextMenu(); + TQPopupMenu *createInfoPanelAttrContextMenu(); /** * returns the context menu for the list info panel */ - QPopupMenu *infoPanelAttrContextMenu() { return infopanel_ctx; } + TQPopupMenu *infoPanelAttrContextMenu() { return infopanel_ctx; } /** * creates and returns the context menu for the DOM tree view */ - QPopupMenu *createDOMTreeViewContextMenu(); + TQPopupMenu *createDOMTreeViewContextMenu(); /** * returns the context menu for the DOM tree view */ - QPopupMenu *domTreeViewContextMenu() { return domtree_ctx; } + TQPopupMenu *domTreeViewContextMenu() { return domtree_ctx; } /** * Executes the given command and adds it to the history. @@ -125,7 +125,7 @@ public slots: * @param id message id * @param msg message text */ - void addMessage(int id, const QString &msg); + void addMessage(int id, const TQString &msg); /** * Displays the message log window. @@ -136,8 +136,8 @@ protected: /** * Overridden virtuals for Qt drag 'n drop (XDND) */ - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); protected: /** * This function is called when it is time for the app to save its @@ -164,8 +164,8 @@ private slots: void optionsPreferences(); void newToolbarConfig(); - void changeStatusbar(const QString& text); - void changeCaption(const QString& text); + void changeStatusbar(const TQString& text); + void changeCaption(const TQString& text); void slotHtmlPartChanged(KHTMLPart *); void slotActivePartChanged(KParts::Part *); @@ -182,13 +182,13 @@ private: MessageDialog *msgdlg; KCommandHistory *m_commandHistory; - QPopupMenu *infopanel_ctx; - QPopupMenu *domtree_ctx; + TQPopupMenu *infopanel_ctx; + TQPopupMenu *domtree_ctx; KConfig *_config; KAction *del_tree, *del_attr; - QGuardedPtr part_manager; + TQGuardedPtr part_manager; }; #endif // domtreewindow_H diff --git a/konq-plugins/domtreeviewer/messagedialog.ui.h b/konq-plugins/domtreeviewer/messagedialog.ui.h index dcb6609..33a2951 100644 --- a/konq-plugins/domtreeviewer/messagedialog.ui.h +++ b/konq-plugins/domtreeviewer/messagedialog.ui.h @@ -12,9 +12,9 @@ #include -#include +#include -void MessageDialog::addMessage( const QString &msg ) +void MessageDialog::addMessage( const TQString &msg ) { messagePane->append(msg); } diff --git a/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp b/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp index 3555a84..c33f132 100644 --- a/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp +++ b/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp @@ -15,13 +15,13 @@ typedef KGenericFactory DomtreeviewerFactory; K_EXPORT_COMPONENT_FACTORY( libdomtreeviewerplugin, DomtreeviewerFactory( "domtreeviewer" ) ) -PluginDomtreeviewer::PluginDomtreeviewer( QObject* parent, const char* name, - const QStringList & ) +PluginDomtreeviewer::PluginDomtreeviewer( TQObject* parent, const char* name, + const TQStringList & ) : Plugin( parent, name ), m_dialog( 0 ) { (void) new KAction( i18n("Show &DOM Tree"), "domtreeviewer", 0, - this, SLOT(slotShowDOMTree()), + this, TQT_SLOT(slotShowDOMTree()), actionCollection(), "viewdomtree" ); } @@ -41,7 +41,7 @@ void PluginDomtreeviewer::slotShowDOMTree() if (KHTMLPart *part = ::qt_cast(parent())) { m_dialog = new DOMTreeWindow(this); - connect( m_dialog, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( m_dialog, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); m_dialog->view()->setHtmlPart(part); m_dialog->show(); } diff --git a/konq-plugins/domtreeviewer/plugin_domtreeviewer.h b/konq-plugins/domtreeviewer/plugin_domtreeviewer.h index ba380a9..c6d7320 100644 --- a/konq-plugins/domtreeviewer/plugin_domtreeviewer.h +++ b/konq-plugins/domtreeviewer/plugin_domtreeviewer.h @@ -13,8 +13,8 @@ class PluginDomtreeviewer : public KParts::Plugin { Q_OBJECT public: - PluginDomtreeviewer( QObject* parent, const char* name, - const QStringList & ); + PluginDomtreeviewer( TQObject* parent, const char* name, + const TQStringList & ); virtual ~PluginDomtreeviewer(); public slots: diff --git a/konq-plugins/domtreeviewer/signalreceiver.cpp b/konq-plugins/domtreeviewer/signalreceiver.cpp index f928036..a0c0b1b 100644 --- a/konq-plugins/domtreeviewer/signalreceiver.cpp +++ b/konq-plugins/domtreeviewer/signalreceiver.cpp @@ -20,8 +20,8 @@ #include "signalreceiver.h" -SignalReceiver::SignalReceiver(QObject *parent, const char *name) -: QObject(parent, name), rcvd(false) +SignalReceiver::SignalReceiver(TQObject *parent, const char *name) +: TQObject(parent, name), rcvd(false) { } diff --git a/konq-plugins/domtreeviewer/signalreceiver.h b/konq-plugins/domtreeviewer/signalreceiver.h index 8c0f5d9..cf67495 100644 --- a/konq-plugins/domtreeviewer/signalreceiver.h +++ b/konq-plugins/domtreeviewer/signalreceiver.h @@ -21,7 +21,7 @@ #ifndef SIGNALCATCHER_H #define SIGNALCATCHER_H -#include +#include /** * \brief Class for receiving signals. @@ -32,7 +32,7 @@ * Use as follows: * \code * SignalReceiver sr; - * sr.connect(some_obj, SIGNAL(someSignal()), SLOT(slot())); + * sr.connect(some_obj, TQT_SIGNAL(someSignal()), TQT_SLOT(slot())); * ... * if (sr.receivedSignal()) { // yes, signal was received * } @@ -47,7 +47,7 @@ class SignalReceiver : public QObject Q_OBJECT public: - SignalReceiver(QObject *parent = 0, const char *name = 0); + SignalReceiver(TQObject *parent = 0, const char *name = 0); virtual ~SignalReceiver(); /** returns true if any signal has been received */ diff --git a/konq-plugins/fsview/fsview.cpp b/konq-plugins/fsview/fsview.cpp index b0c82d8..931c43f 100644 --- a/konq-plugins/fsview/fsview.cpp +++ b/konq-plugins/fsview/fsview.cpp @@ -21,9 +21,9 @@ */ -#include -#include -#include +#include +#include +#include #include #include @@ -41,9 +41,9 @@ // FSView -QMap FSView::_dirMetric; +TQMap FSView::_dirMetric; -FSView::FSView(Inode* base, QWidget* parent, const char* name) +FSView::FSView(Inode* base, TQWidget* parent, const char* name) : TreeMapWidget(base, parent, name) { setFieldType(0, i18n("Name")); @@ -81,25 +81,25 @@ FSView::FSView(Inode* base, QWidget* parent, const char* name) _config = new KConfig("fsviewrc"); // restore TreeMap visualization options of last execution - KConfigGroup tmconfig(_config, QCString("TreeMap")); + KConfigGroup tmconfig(_config, TQCString("TreeMap")); restoreOptions(&tmconfig); - QString str = tmconfig.readEntry("ColorMode"); + TQString str = tmconfig.readEntry("ColorMode"); if (!str.isEmpty()) setColorMode(str); if (_dirMetric.count() == 0) { // restore metric cache - KConfigGroup cconfig(_config, QCString("MetricCache")); + KConfigGroup cconfig(_config, TQCString("MetricCache")); int ccount = cconfig.readNumEntry("Count", 0); int i, f, d; double s; - QString str; + TQString str; for (i=1;i<=ccount;i++) { - str = QString("Dir%1").arg(i); + str = TQString("Dir%1").arg(i); if (!cconfig.hasKey(str)) continue; str = cconfig.readPathEntry(str); - s = cconfig.readDoubleNumEntry(QString("Size%1").arg(i), 0.0); - f = cconfig.readNumEntry(QString("Files%1").arg(i), 0); - d = cconfig.readNumEntry(QString("Dirs%1").arg(i), 0); + s = cconfig.readDoubleNumEntry(TQString("Size%1").arg(i), 0.0); + f = cconfig.readNumEntry(TQString("Files%1").arg(i), 0); + d = cconfig.readNumEntry(TQString("Dirs%1").arg(i), 0); if (s==0.0 || f==0 || d==0) continue; setDirMetric(str, s, f, d); } @@ -118,7 +118,7 @@ void FSView::stop() _sm.stopScan(); } -void FSView::setPath(QString p) +void FSView::setPath(TQString p) { Inode* b = (Inode*)base(); if (!b) return; @@ -128,7 +128,7 @@ void FSView::setPath(QString p) // stop any previous updating stop(); - QFileInfo fi(p); + TQFileInfo fi(p); _path = fi.absFilePath(); if (!fi.isDir()) { _path = fi.dirPath(true); @@ -139,7 +139,7 @@ void FSView::setPath(QString p) u.setPath(_path); if (!kapp->authorizeURLAction("list", KURL(), u)) { - QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, u.prettyURL()); + TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, u.prettyURL()); KMessageBox::queuedMessageBox(this, KMessageBox::Sorry, msg); } @@ -147,7 +147,7 @@ void FSView::setPath(QString p) b->setPeer(d); - setCaption(QString("%1 - FSView").arg(_path)); + setCaption(TQString("%1 - FSView").arg(_path)); requestUpdate(b); } @@ -165,10 +165,10 @@ KURL::List FSView::selectedUrls() return urls; } -bool FSView::getDirMetric(const QString& k, +bool FSView::getDirMetric(const TQString& k, double& s, unsigned int& f, unsigned int& d) { - QMap::iterator it; + TQMap::iterator it; it = _dirMetric.find(k); if (it == _dirMetric.end()) return false; @@ -183,7 +183,7 @@ bool FSView::getDirMetric(const QString& k, return true; } -void FSView::setDirMetric(const QString& k, +void FSView::setDirMetric(const TQString& k, double s, unsigned int f, unsigned int d) { if (0) kdDebug(90100) << "setDirMetric '" << k << "': size " @@ -203,8 +203,8 @@ void FSView::requestUpdate(Inode* i) i->clear(); if (!_sm.scanRunning()) { - QTimer::singleShot(0, this, SLOT(doUpdate())); - QTimer::singleShot(100, this, SLOT(doRedraw())); + TQTimer::singleShot(0, this, TQT_SLOT(doUpdate())); + TQTimer::singleShot(100, this, TQT_SLOT(doRedraw())); /* start new progress chunk */ _progressPhase = 1; @@ -266,14 +266,14 @@ void FSView::selected(TreeMapItem* i) setPath(((Inode*)i)->path()); } -void FSView::contextMenu(TreeMapItem* i, const QPoint& p) +void FSView::contextMenu(TreeMapItem* i, const TQPoint& p) { - QPopupMenu popup; + TQPopupMenu popup; - QPopupMenu* spopup = new QPopupMenu(); - QPopupMenu* dpopup = new QPopupMenu(); - QPopupMenu* apopup = new QPopupMenu(); - QPopupMenu* fpopup = new QPopupMenu(); + TQPopupMenu* spopup = new TQPopupMenu(); + TQPopupMenu* dpopup = new TQPopupMenu(); + TQPopupMenu* apopup = new TQPopupMenu(); + TQPopupMenu* fpopup = new TQPopupMenu(); // choosing from the selection menu will give a selectionChanged() signal addSelectionItems(spopup, 901, i); @@ -297,10 +297,10 @@ void FSView::contextMenu(TreeMapItem* i, const QPoint& p) popup.insertSeparator(); - QPopupMenu* cpopup = new QPopupMenu(); + TQPopupMenu* cpopup = new TQPopupMenu(); addColorItems(cpopup, 1401); popup.insertItem(i18n("Color Mode"), cpopup, 1400); - QPopupMenu* vpopup = new QPopupMenu(); + TQPopupMenu* vpopup = new TQPopupMenu(); addVisualizationItems(vpopup, 1301); popup.insertItem(i18n("Visualization"), vpopup, 1300); @@ -328,13 +328,13 @@ void FSView::contextMenu(TreeMapItem* i, const QPoint& p) void FSView::saveMetric(KConfigGroup* g) { - QMap::iterator it; + TQMap::iterator it; int c = 1; for (it=_dirMetric.begin();it!=_dirMetric.end();++it) { - g->writePathEntry(QString("Dir%1").arg(c), it.key()); - g->writeEntry(QString("Size%1").arg(c), (*it).size); - g->writeEntry(QString("Files%1").arg(c), (*it).fileCount); - g->writeEntry(QString("Dirs%1").arg(c), (*it).dirCount); + g->writePathEntry(TQString("Dir%1").arg(c), it.key()); + g->writeEntry(TQString("Size%1").arg(c), (*it).size); + g->writeEntry(TQString("Files%1").arg(c), (*it).fileCount); + g->writeEntry(TQString("Dirs%1").arg(c), (*it).dirCount); c++; } g->writeEntry("Count", c-1); @@ -348,7 +348,7 @@ void FSView::setColorMode(FSView::ColorMode cm) redraw(); } -bool FSView::setColorMode(QString mode) +bool FSView::setColorMode(TQString mode) { if (mode == "None") setColorMode(None); else if (mode == "Depth") setColorMode(Depth); @@ -361,9 +361,9 @@ bool FSView::setColorMode(QString mode) return true; } -QString FSView::colorModeString() const +TQString FSView::colorModeString() const { - QString mode; + TQString mode; switch(_colorMode) { case None: mode = "None"; break; case Depth: mode = "Depth"; break; @@ -376,13 +376,13 @@ QString FSView::colorModeString() const return mode; } -void FSView::addColorItems(QPopupMenu* popup, int id) +void FSView::addColorItems(TQPopupMenu* popup, int id) { _colorID = id; popup->setCheckable(true); - connect(popup, SIGNAL(activated(int)), - this, SLOT(colorActivated(int))); + connect(popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(colorActivated(int))); popup->insertItem(i18n("None"), id); popup->insertItem(i18n("Depth"), id+1); @@ -414,14 +414,14 @@ void FSView::colorActivated(int id) void FSView::saveFSOptions() { - KConfigGroup tmconfig(_config, QCString("TreeMap")); + KConfigGroup tmconfig(_config, TQCString("TreeMap")); saveOptions(&tmconfig); tmconfig.writeEntry("ColorMode", colorModeString()); - KConfigGroup gconfig(_config, QCString("General")); + KConfigGroup gconfig(_config, TQCString("General")); gconfig.writeEntry("Path", _path); - KConfigGroup cconfig(_config, QCString("MetricCache")); + KConfigGroup cconfig(_config, TQCString("MetricCache")); saveMetric(&cconfig); } @@ -458,7 +458,7 @@ void FSView::doRedraw() redo = true; if (redo) { - QTimer::singleShot(500, this, SLOT(doRedraw())); + TQTimer::singleShot(500, this, TQT_SLOT(doRedraw())); redrawCounter++; } } @@ -532,7 +532,7 @@ void FSView::doUpdate() } if (_sm.scanRunning()) - QTimer::singleShot(0, this, SLOT(doUpdate())); + TQTimer::singleShot(0, this, TQT_SLOT(doUpdate())); else emit completed(_dirsFinished); } diff --git a/konq-plugins/fsview/fsview.h b/konq-plugins/fsview/fsview.h index 17d926f..2e12986 100644 --- a/konq-plugins/fsview/fsview.h +++ b/konq-plugins/fsview/fsview.h @@ -23,10 +23,10 @@ #ifndef FSVIEW_H #define FSVIEW_H -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -62,20 +62,20 @@ class FSView : public TreeMapWidget, public ScanListener public: enum ColorMode { None = 0, Depth, Name, Owner, Group, Mime }; - FSView(Inode*, QWidget* parent=0, const char* name=0); + FSView(Inode*, TQWidget* parent=0, const char* name=0); ~FSView(); KConfig* config() { return _config; } - void setPath(QString); - QString path() { return _path; } + void setPath(TQString); + TQString path() { return _path; } int pathDepth() { return _pathDepth; } void setColorMode(FSView::ColorMode cm); FSView::ColorMode colorMode() const { return _colorMode; } // returns true if string was recognized - bool setColorMode(QString); - QString colorModeString() const; + bool setColorMode(TQString); + TQString colorModeString() const; void requestUpdate(Inode*); @@ -85,19 +85,19 @@ public: void stop(); - static bool getDirMetric(const QString&, double&, unsigned int&, unsigned int&); - static void setDirMetric(const QString&, double, unsigned int, unsigned int); + static bool getDirMetric(const TQString&, double&, unsigned int&, unsigned int&); + static void setDirMetric(const TQString&, double, unsigned int, unsigned int); void saveMetric(KConfigGroup*); void saveFSOptions(); // for color mode - void addColorItems(QPopupMenu*, int); + void addColorItems(TQPopupMenu*, int); KURL::List selectedUrls(); public slots: void selected(TreeMapItem*); - void contextMenu(TreeMapItem*, const QPoint &); + void contextMenu(TreeMapItem*, const TQPoint &); void quit(); void doUpdate(); void doRedraw(); @@ -105,7 +105,7 @@ public slots: signals: void started(); - void progress(int percent, int dirs, const QString& lastDir); + void progress(int percent, int dirs, const TQString& lastDir); void completed(int dirs); private: @@ -115,11 +115,11 @@ public slots: // when a contextMenu is shown, we don't allow async. refreshs bool _allowRefresh; // a cache for directory sizes with long lasting updates - static QMap _dirMetric; + static TQMap _dirMetric; // current root path int _pathDepth; - QString _path; + TQString _path; // for progress info int _progressPhase; diff --git a/konq-plugins/fsview/fsview_part.cpp b/konq-plugins/fsview/fsview_part.cpp index 745cb63..02df4c6 100644 --- a/konq-plugins/fsview/fsview_part.cpp +++ b/konq-plugins/fsview/fsview_part.cpp @@ -20,9 +20,9 @@ * The KPart embedding the FSView widget */ -#include -#include -#include +#include +#include +#include #include #include @@ -57,8 +57,8 @@ FSJob::FSJob(FSView* v) : KIO::Job(false) { _view = v; - QObject::connect(v, SIGNAL(progress(int,int,const QString&)), - this, SLOT(progressSlot(int,int,const QString&))); + TQObject::connect(v, TQT_SIGNAL(progress(int,int,const TQString&)), + this, TQT_SLOT(progressSlot(int,int,const TQString&))); } void FSJob::kill(bool quietly) @@ -68,7 +68,7 @@ void FSJob::kill(bool quietly) Job::kill(quietly); } -void FSJob::progressSlot(int percent, int dirs, const QString& cDir) +void FSJob::progressSlot(int percent, int dirs, const TQString& cDir) { if (percent<100) { emitPercent(percent, 100); @@ -93,16 +93,16 @@ KAboutData* FSViewPart::createAboutData() return aboutData; } -FSViewPart::FSViewPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QStringList& /* args */) +FSViewPart::FSViewPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQStringList& /* args */) : KParts::ReadOnlyPart(parent, name) { // we need an instance setInstance( FSViewPartFactory::instance() ); _view = new FSView(new Inode(), parentWidget, widgetName); - QWhatsThis::add(_view, i18n("

This is the FSView plugin, a graphical " + TQWhatsThis::add(_view, i18n("

This is the FSView plugin, a graphical " "browsing mode showing filesystem utilization " "by using a tree map visualization.

" "

Note that in this mode, automatic updating " @@ -129,40 +129,40 @@ FSViewPart::FSViewPart(QWidget *parentWidget, const char *widgetName, KAction* action; action = new KAction( i18n( "&FSView Manual" ), "fsview", - KShortcut(), this, SLOT(showHelp()), + KShortcut(), this, TQT_SLOT(showHelp()), actionCollection(), "help_fsview" ); action->setToolTip(i18n("Show FSView manual")); action->setWhatsThis(i18n("Opens the help browser with the " "FSView documentation")); - QObject::connect (_visMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowVisMenu())); - QObject::connect (_areaMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowAreaMenu())); - QObject::connect (_depthMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowDepthMenu())); - QObject::connect (_colorMenu->popupMenu(), SIGNAL (aboutToShow()), - SLOT (slotShowColorMenu())); + TQObject::connect (_visMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowVisMenu())); + TQObject::connect (_areaMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowAreaMenu())); + TQObject::connect (_depthMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowDepthMenu())); + TQObject::connect (_colorMenu->popupMenu(), TQT_SIGNAL (aboutToShow()), + TQT_SLOT (slotShowColorMenu())); slotSettingsChanged(KApplication::SETTINGS_MOUSE); if (kapp) - connect( kapp, SIGNAL( settingsChanged(int) ), - SLOT( slotSettingsChanged(int) ) ); - - QObject::connect(_view,SIGNAL(returnPressed(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); - QObject::connect(_view,SIGNAL(selectionChanged()), - _ext,SLOT(updateActions())); - QObject::connect(_view, - SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint&)), + connect( kapp, TQT_SIGNAL( settingsChanged(int) ), + TQT_SLOT( slotSettingsChanged(int) ) ); + + TQObject::connect(_view,TQT_SIGNAL(returnPressed(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); + TQObject::connect(_view,TQT_SIGNAL(selectionChanged()), + _ext,TQT_SLOT(updateActions())); + TQObject::connect(_view, + TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint&)), _ext, - SLOT(contextMenu(TreeMapItem*, const QPoint&))); + TQT_SLOT(contextMenu(TreeMapItem*, const TQPoint&))); - QObject::connect(_view, SIGNAL(started()), this, SLOT(startedSlot())); - QObject::connect(_view, SIGNAL(completed(int)), - this, SLOT(completedSlot(int))); + TQObject::connect(_view, TQT_SIGNAL(started()), this, TQT_SLOT(startedSlot())); + TQObject::connect(_view, TQT_SIGNAL(completed(int)), + this, TQT_SLOT(completedSlot(int))); - QTimer::singleShot(1, this, SLOT(showInfo())); + TQTimer::singleShot(1, this, TQT_SLOT(showInfo())); setXMLFile( "fsview_part.rc" ); } @@ -180,34 +180,34 @@ void FSViewPart::slotSettingsChanged(int category) { if (category != KApplication::SETTINGS_MOUSE) return; - QObject::disconnect(_view,SIGNAL(clicked(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); - QObject::disconnect(_view,SIGNAL(doubleClicked(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); + TQObject::disconnect(_view,TQT_SIGNAL(clicked(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); + TQObject::disconnect(_view,TQT_SIGNAL(doubleClicked(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); if (KGlobalSettings::singleClick()) - QObject::connect(_view,SIGNAL(clicked(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); + TQObject::connect(_view,TQT_SIGNAL(clicked(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); else - QObject::connect(_view,SIGNAL(doubleClicked(TreeMapItem*)), - _ext,SLOT(selected(TreeMapItem*))); + TQObject::connect(_view,TQT_SIGNAL(doubleClicked(TreeMapItem*)), + _ext,TQT_SLOT(selected(TreeMapItem*))); } void FSViewPart::showInfo() { - QString info; + TQString info; info = i18n("FSView intentionally does not support automatic updates " "when changes are made to files or directories, " "currently visible in FSView, from the outside.\n" "For details, see the 'Help/FSView Manual'."); - KMessageBox::information( _view, info, QString::null, "ShowFSViewInfo"); + KMessageBox::information( _view, info, TQString::null, "ShowFSViewInfo"); } void FSViewPart::showHelp() { KApplication::startServiceByDesktopName("khelpcenter", - QString("help:/konq-plugins/fsview/index.html")); + TQString("help:/konq-plugins/fsview/index.html")); } void FSViewPart::startedSlot() @@ -219,12 +219,12 @@ void FSViewPart::startedSlot() void FSViewPart::completedSlot(int dirs) { if (_job) { - _job->progressSlot(100, dirs, QString::null); + _job->progressSlot(100, dirs, TQString::null); delete _job; _job = 0; } - KConfigGroup cconfig(_view->config(), QCString("MetricCache")); + KConfigGroup cconfig(_view->config(), TQCString("MetricCache")); _view->saveMetric(&cconfig); emit completed(); @@ -331,20 +331,20 @@ void FSViewBrowserExtension::del() // - search for the KonqOperations child of _view (name "KonqOperations") // - connect to destroyed signal KonqOperations* o = (KonqOperations*) _view->child("KonqOperations"); - if (o) connect(o, SIGNAL(destroyed()), SLOT(refresh())); + if (o) connect(o, TQT_SIGNAL(destroyed()), TQT_SLOT(refresh())); } void FSViewBrowserExtension::trash() { KonqOperations::del(_view, KonqOperations::TRASH, _view->selectedUrls()); KonqOperations* o = (KonqOperations*) _view->child("KonqOperations"); - if (o) connect(o, SIGNAL(destroyed()), SLOT(refresh())); + if (o) connect(o, TQT_SIGNAL(destroyed()), TQT_SLOT(refresh())); } void FSViewBrowserExtension::copySelection( bool move ) { KonqDrag *urlData = KonqDrag::newDrag( _view->selectedUrls(), move ); - QApplication::clipboard()->setData( urlData ); + TQApplication::clipboard()->setData( urlData ); } void FSViewBrowserExtension::editMimeType() @@ -386,7 +386,7 @@ void FSViewBrowserExtension::selected(TreeMapItem* i) emit openURLRequest(url); } -void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const QPoint& p) +void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const TQPoint& p) { TreeMapItemList s = _view->selection(); TreeMapItem* i; @@ -396,8 +396,8 @@ void FSViewBrowserExtension::contextMenu(TreeMapItem* /*item*/,const QPoint& p) for(i=s.first();i;i=s.next()) { KURL u; u.setPath( ((Inode*)i)->path() ); - QString mimetype = ((Inode*)i)->mimeType()->name(); - const QFileInfo& info = ((Inode*)i)->fileInfo(); + TQString mimetype = ((Inode*)i)->mimeType()->name(); + const TQFileInfo& info = ((Inode*)i)->fileInfo(); mode_t mode = info.isFile() ? S_IFREG : info.isDir() ? S_IFDIR : diff --git a/konq-plugins/fsview/fsview_part.h b/konq-plugins/fsview/fsview_part.h index 4f2c734..ff0a17e 100644 --- a/konq-plugins/fsview/fsview_part.h +++ b/konq-plugins/fsview/fsview_part.h @@ -44,7 +44,7 @@ public: protected slots: void selected(TreeMapItem*); - void contextMenu(TreeMapItem*,const QPoint&); + void contextMenu(TreeMapItem*,const TQPoint&); void updateActions(); void refresh(); @@ -71,7 +71,7 @@ public: virtual void kill( bool quietly = true ); public slots: - void progressSlot(int percent, int dirs, const QString& lastDir); + void progressSlot(int percent, int dirs, const TQString& lastDir); private: FSView* _view; @@ -83,8 +83,8 @@ class FSViewPart : public KParts::ReadOnlyPart Q_OBJECT Q_PROPERTY( bool supportsUndo READ supportsUndo ) public: - FSViewPart(QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList &args); + FSViewPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList &args); virtual ~FSViewPart(); diff --git a/konq-plugins/fsview/inode.cpp b/konq-plugins/fsview/inode.cpp index 0411d3a..6f5073c 100644 --- a/konq-plugins/fsview/inode.cpp +++ b/konq-plugins/fsview/inode.cpp @@ -43,7 +43,7 @@ Inode::Inode() Inode::Inode(ScanDir* d, Inode* parent) : TreeMapItem(parent) { - QString absPath; + TQString absPath; if (parent) { absPath = parent->path(); if (!absPath.endsWith("/")) absPath += "/"; @@ -59,7 +59,7 @@ Inode::Inode(ScanDir* d, Inode* parent) Inode::Inode(ScanFile* f, Inode* parent) : TreeMapItem(parent) { - QString absPath; + TQString absPath; if (parent) absPath = parent->path() + "/"; absPath += f->name(); @@ -95,17 +95,17 @@ void Inode::setPeer(ScanDir* d) init(d->name()); } -QString Inode::path() const +TQString Inode::path() const { return _info.absFilePath(); } -void Inode::init(const QString& path) +void Inode::init(const TQString& path) { if (0) kdDebug(90100) << "Inode::init [" << path << "]" << endl; - _info = QFileInfo(path); + _info = TQFileInfo(path); if (!FSView::getDirMetric(path, _sizeEstimation, _fileCountEstimation, @@ -260,16 +260,16 @@ unsigned int Inode::dirCount() const } -QColor Inode::backColor() const +TQColor Inode::backColor() const { - QString n; + TQString n; int id = 0; switch( ((FSView*)widget())->colorMode() ) { case FSView::Depth: { int d = ((FSView*)widget())->pathDepth() + depth(); - return QColor((100*d)%360, 192,128, QColor::Hsv); + return TQColor((100*d)%360, 192,128, TQColor::Hsv); } case FSView::Name: n = text(0); break; @@ -281,7 +281,7 @@ QColor Inode::backColor() const break; } - if (id>0) n = QString::number(id); + if (id>0) n = TQString::number(id); if (n.isEmpty()) return widget()->colorGroup().button(); @@ -293,7 +293,7 @@ QColor Inode::backColor() const s = (s * 17 + h* (unsigned)*str) % 192; str++; } - return QColor(h, 64+s, 192, QColor::Hsv); + return TQColor(h, 64+s, 192, TQColor::Hsv); } KMimeType::Ptr Inode::mimeType() const @@ -308,10 +308,10 @@ KMimeType::Ptr Inode::mimeType() const return _mimeType; } -QString Inode::text(int i) const +TQString Inode::text(int i) const { if (i==0) { - QString name; + TQString name; if (_dirPeer) { name = _dirPeer->name(); if (!name.endsWith("/")) name += "/"; @@ -321,25 +321,25 @@ QString Inode::text(int i) const return name; } if (i==1) { - QString text; + TQString text; double s = size(); if (s < 1000) - text = QString("%1 B").arg((int)(s+.5)); + text = TQString("%1 B").arg((int)(s+.5)); else if (s < 10 * 1024) - text = QString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.005,2)); + text = TQString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.005,2)); else if (s < 100 * 1024) - text = QString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.05,1)); + text = TQString("%1 kB").arg(KGlobal::locale()->formatNumber(s/1024+.05,1)); else if (s < 1000 * 1024) - text = QString("%1 kB").arg((int)(s/1024+.5)); + text = TQString("%1 kB").arg((int)(s/1024+.5)); else if (s < 10 * 1024 * 1024) - text = QString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.005,2)); + text = TQString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.005,2)); else if (s < 100 * 1024 * 1024) - text = QString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.05,1)); + text = TQString("%1 MB").arg(KGlobal::locale()->formatNumber(s/1024/1024+.05,1)); else if (s < 1000 * 1024 * 1024) - text = QString("%1 MB").arg((int)(s/1024/1024+.5)); + text = TQString("%1 MB").arg((int)(s/1024/1024+.5)); else - text = QString("%1 GB").arg(KGlobal::locale()->formatNumber(s/1024/1024/1024+.005,2)); + text = TQString("%1 GB").arg(KGlobal::locale()->formatNumber(s/1024/1024/1024+.005,2)); if (_sizeEstimation>0) text += "+"; return text; @@ -347,17 +347,17 @@ QString Inode::text(int i) const if ((i==2) || (i==3)) { /* file/dir count makes no sense for files */ - if (_filePeer) return QString(); + if (_filePeer) return TQString(); - QString text; + TQString text; unsigned int f = (i==2) ? fileCount() : dirCount(); if (f>0) { while (f>1000) { - text = QString("%1 %2").arg(QString::number(f).right(3)).arg(text); + text = TQString("%1 %2").arg(TQString::number(f).right(3)).arg(text); f /= 1000; } - text = QString("%1 %2").arg(QString::number(f)).arg(text); + text = TQString("%1 %2").arg(TQString::number(f)).arg(text); if (_fileCountEstimation>0) text += "+"; } return text; @@ -367,12 +367,12 @@ QString Inode::text(int i) const if (i==5) return _info.owner(); if (i==6) return _info.group(); if (i==7) return mimeType()->comment(); - return QString(); + return TQString(); } -QPixmap Inode::pixmap(int i) const +TQPixmap Inode::pixmap(int i) const { - if (i!=0) return QPixmap(); + if (i!=0) return TQPixmap(); if (!_mimePixmapSet) { KURL u; diff --git a/konq-plugins/fsview/inode.h b/konq-plugins/fsview/inode.h index 8289f6b..eb1e3dd 100644 --- a/konq-plugins/fsview/inode.h +++ b/konq-plugins/fsview/inode.h @@ -23,10 +23,10 @@ #ifndef INODE_H #define INODE_H -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -49,7 +49,7 @@ public: Inode(ScanDir*, Inode*); Inode(ScanFile*, Inode*); ~Inode(); - void init(const QString&); + void init(const TQString&); void setPeer(ScanDir*); @@ -59,13 +59,13 @@ public: double size() const; unsigned int fileCount() const; unsigned int dirCount() const; - QString path() const; - QString text(int i) const; - QPixmap pixmap(int i) const; - QColor backColor() const; + TQString path() const; + TQString text(int i) const; + TQPixmap pixmap(int i) const; + TQColor backColor() const; KMimeType::Ptr mimeType() const; - const QFileInfo& fileInfo() const { return _info; } + const TQFileInfo& fileInfo() const { return _info; } ScanDir* dirPeer() { return _dirPeer; } ScanFile* filePeer() { return _filePeer; } bool isDir() { return (_dirPeer != 0); } @@ -78,7 +78,7 @@ public: private: void setMetrics(double, unsigned int); - QFileInfo _info; + TQFileInfo _info; ScanDir* _dirPeer; ScanFile* _filePeer; @@ -91,7 +91,7 @@ private: // This means a change even in const methods, thus has to be "mutable" mutable bool _mimeSet, _mimePixmapSet; mutable KMimeType::Ptr _mimeType; - mutable QPixmap _mimePixmap; + mutable TQPixmap _mimePixmap; }; #endif diff --git a/konq-plugins/fsview/main.cpp b/konq-plugins/fsview/main.cpp index da18dcf..5a93886 100644 --- a/konq-plugins/fsview/main.cpp +++ b/konq-plugins/fsview/main.cpp @@ -31,8 +31,8 @@ int main(int argc, char* argv[]) KCmdLineArgs::addCmdLineOptions(options); KApplication a; - KConfigGroup gconfig(KGlobal::config(), QCString("General")); - QString path = gconfig.readPathEntry("Path", "."); + KConfigGroup gconfig(KGlobal::config(), TQCString("General")); + TQString path = gconfig.readPathEntry("Path", "."); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->count()>0) path = args->arg(0); @@ -40,17 +40,17 @@ int main(int argc, char* argv[]) // TreeMap Widget as toplevel window FSView w(new Inode()); - QObject::connect(&w,SIGNAL(clicked(TreeMapItem*)), - &w,SLOT(selected(TreeMapItem*))); - QObject::connect(&w,SIGNAL(returnPressed(TreeMapItem*)), - &w,SLOT(selected(TreeMapItem*))); - QObject::connect(&w, - SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint&)), - &w,SLOT(contextMenu(TreeMapItem*, const QPoint&))); + TQObject::connect(&w,TQT_SIGNAL(clicked(TreeMapItem*)), + &w,TQT_SLOT(selected(TreeMapItem*))); + TQObject::connect(&w,TQT_SIGNAL(returnPressed(TreeMapItem*)), + &w,TQT_SLOT(selected(TreeMapItem*))); + TQObject::connect(&w, + TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint&)), + &w,TQT_SLOT(contextMenu(TreeMapItem*, const TQPoint&))); w.setPath(path); w.show(); - a.connect( &a, SIGNAL( lastWindowClosed() ), &w, SLOT( quit() ) ); + a.connect( &a, TQT_SIGNAL( lastWindowClosed() ), &w, TQT_SLOT( quit() ) ); return a.exec(); } diff --git a/konq-plugins/fsview/scan.cpp b/konq-plugins/fsview/scan.cpp index ed691e3..1d3d06a 100644 --- a/konq-plugins/fsview/scan.cpp +++ b/konq-plugins/fsview/scan.cpp @@ -16,8 +16,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -34,7 +34,7 @@ ScanManager::ScanManager() _listener = 0; } -ScanManager::ScanManager(const QString& path) +ScanManager::ScanManager(const TQString& path) { _topDir = 0; _listener = 0; @@ -52,7 +52,7 @@ void ScanManager::setListener(ScanListener* l) _listener = l; } -ScanDir* ScanManager::setTop(const QString& path, int data) +ScanDir* ScanManager::setTop(const TQString& path, int data) { stopScan(); if (_topDir) { @@ -120,7 +120,7 @@ ScanFile::ScanFile() _listener = 0; } -ScanFile::ScanFile(const QString& n, KIO::fileoffset_t s) +ScanFile::ScanFile(const TQString& n, KIO::fileoffset_t s) { _name = n; _size = s; @@ -145,7 +145,7 @@ ScanDir::ScanDir() _data = 0; } -ScanDir::ScanDir(const QString& n, ScanManager* m, +ScanDir::ScanDir(const TQString& n, ScanManager* m, ScanDir* p, int data) : _name(n) { @@ -168,10 +168,10 @@ void ScanDir::setListener(ScanListener* l) _listener = l; } -QString ScanDir::path() +TQString ScanDir::path() { if (_parent) { - QString p = _parent->path(); + TQString p = _parent->path(); if (!p.endsWith("/")) p += "/"; return p + _name; } @@ -231,30 +231,30 @@ int ScanDir::scan(ScanItem* si, ScanItemList& list, int data) return 0; } - QDir d(si->absPath); - QStringList fileList = d.entryList( QDir::Files | - QDir::Hidden | QDir::NoSymLinks ); + TQDir d(si->absPath); + TQStringList fileList = d.entryList( TQDir::Files | + TQDir::Hidden | TQDir::NoSymLinks ); if (fileList.count()>0) { KDE_struct_stat buff; _files.reserve(fileList.count()); - QStringList::Iterator it; + TQStringList::Iterator it; for (it = fileList.begin(); it != fileList.end(); ++it ) { - KDE_lstat( QFile::encodeName(si->absPath + "/" + (*it)), &buff ); + KDE_lstat( TQFile::encodeName(si->absPath + "/" + (*it)), &buff ); _files.append( ScanFile(*it, buff.st_size) ); _fileSize += buff.st_size; } } - QStringList dirList = d.entryList( QDir::Dirs | - QDir::Hidden | QDir::NoSymLinks ); + TQStringList dirList = d.entryList( TQDir::Dirs | + TQDir::Hidden | TQDir::NoSymLinks ); if (dirList.count()>2) { _dirs.reserve(dirList.count()-2); - QStringList::Iterator it; + TQStringList::Iterator it; for (it = dirList.begin(); it != dirList.end(); ++it ) { if ( ((*it) == "..") || ((*it) == ".") ) continue; _dirs.append( ScanDir(*it, _manager, this, data) ); diff --git a/konq-plugins/fsview/scan.h b/konq-plugins/fsview/scan.h index 38b015c..ca4ce4f 100644 --- a/konq-plugins/fsview/scan.h +++ b/konq-plugins/fsview/scan.h @@ -23,9 +23,9 @@ #ifndef FSDIR_H #define FSDIR_H -#include -#include -#include +#include +#include +#include /* Use KDE_lstat and KIO::fileoffset_t for 64-bit sizes */ #include @@ -37,14 +37,14 @@ class ScanFile; class ScanItem { public: - ScanItem(const QString& p, ScanDir* d) + ScanItem(const TQString& p, ScanDir* d) { absPath = p; dir = d; } - QString absPath; + TQString absPath; ScanDir* dir; }; -typedef QPtrList ScanItemList; +typedef TQPtrList ScanItemList; /** @@ -83,13 +83,13 @@ class ScanManager { public: ScanManager(); - ScanManager(const QString& path); + ScanManager(const TQString& path); ~ScanManager(); /** Set the top path for scanning * The ScanDir object created gets attribute data. */ - ScanDir* setTop(const QString& path, int data = 0); + ScanDir* setTop(const TQString& path, int data = 0); ScanDir* top() { return _topDir; } bool scanRunning(); @@ -131,10 +131,10 @@ class ScanFile { public: ScanFile(); - ScanFile(const QString& n, KIO::fileoffset_t s); + ScanFile(const TQString& n, KIO::fileoffset_t s); ~ScanFile(); - const QString& name() { return _name; } + const TQString& name() { return _name; } KIO::fileoffset_t size() { return _size; } /* set listener to get callbacks from this ScanDir */ @@ -142,13 +142,13 @@ class ScanFile ScanListener* listener() { return _listener; } private: - QString _name; + TQString _name; KIO::fileoffset_t _size; ScanListener* _listener; }; -typedef QValueVector ScanFileVector; -typedef QValueVector ScanDirVector; +typedef TQValueVector ScanFileVector; +typedef TQValueVector ScanDirVector; /** * A directory to scan. @@ -159,7 +159,7 @@ class ScanDir { public: ScanDir(); - ScanDir(const QString& n, ScanManager* m, + ScanDir(const TQString& n, ScanManager* m, ScanDir* p = 0, int data = 0); ~ScanDir(); @@ -180,7 +180,7 @@ class ScanDir void setupChildRescan(); /* Absolute path. Warning: Slow, loops to top parent. */ - QString path(); + TQString path(); /* get integer data attribute */ int data() { return _data; } @@ -188,7 +188,7 @@ class ScanDir ScanFileVector& files() { return _files; } ScanDirVector& dirs() { return _dirs; } - const QString& name() { return _name; } + const TQString& name() { return _name; } KIO::fileoffset_t size() { update(); return _size; } unsigned int fileCount() { update(); return _fileCount; } unsigned int dirCount() { update(); return _dirCount; } @@ -217,7 +217,7 @@ class ScanDir ScanFileVector _files; ScanDirVector _dirs; - QString _name; + TQString _name; bool _dirty; /* needs a call to update() */ KIO::fileoffset_t _size, _fileSize; unsigned int _fileCount, _dirCount; diff --git a/konq-plugins/fsview/treemap.cpp b/konq-plugins/fsview/treemap.cpp index 8de5c01..5a42c75 100644 --- a/konq-plugins/fsview/treemap.cpp +++ b/konq-plugins/fsview/treemap.cpp @@ -18,16 +18,16 @@ /* * A Widget for visualizing hierarchical metrics as areas. - * The API is similar to QListView. + * The API is similar to TQListView. */ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -56,7 +56,7 @@ StoredDrawParams::StoredDrawParams() // field array has size 0 } -StoredDrawParams::StoredDrawParams(QColor c, +StoredDrawParams::StoredDrawParams(TQColor c, bool selected, bool current) { _backColor = c; @@ -69,18 +69,18 @@ StoredDrawParams::StoredDrawParams(QColor c, // field array has size 0 } -QString StoredDrawParams::text(int f) const +TQString StoredDrawParams::text(int f) const { if ((f<0) || (f >= (int)_field.size())) - return QString::null; + return TQString::null; return _field[f].text; } -QPixmap StoredDrawParams::pixmap(int f) const +TQPixmap StoredDrawParams::pixmap(int f) const { if ((f<0) || (f >= (int)_field.size())) - return QPixmap(); + return TQPixmap(); return _field[f].pix; } @@ -101,10 +101,10 @@ int StoredDrawParams::maxLines(int f) const return _field[f].maxLines; } -const QFont& StoredDrawParams::font() const +const TQFont& StoredDrawParams::font() const { - static QFont* f = 0; - if (!f) f = new QFont(QApplication::font()); + static TQFont* f = 0; + if (!f) f = new TQFont(TQApplication::font()); return *f; } @@ -124,7 +124,7 @@ void StoredDrawParams::ensureField(int f) } -void StoredDrawParams::setField(int f, const QString& t, QPixmap pm, +void StoredDrawParams::setField(int f, const TQString& t, TQPixmap pm, Position p, int maxLines) { if (f<0 || f>=MAX_FIELD) return; @@ -136,7 +136,7 @@ void StoredDrawParams::setField(int f, const QString& t, QPixmap pm, _field[f].maxLines = maxLines; } -void StoredDrawParams::setText(int f, const QString& t) +void StoredDrawParams::setText(int f, const TQString& t) { if (f<0 || f>=MAX_FIELD) return; ensureField(f); @@ -144,7 +144,7 @@ void StoredDrawParams::setText(int f, const QString& t) _field[f].text = t; } -void StoredDrawParams::setPixmap(int f, const QPixmap& pm) +void StoredDrawParams::setPixmap(int f, const TQPixmap& pm) { if (f<0 || f>=MAX_FIELD) return; ensureField(f); @@ -174,7 +174,7 @@ void StoredDrawParams::setMaxLines(int f, int m) // RectDrawing // -RectDrawing::RectDrawing(QRect r) +RectDrawing::RectDrawing(TQRect r) { _fm = 0; _dp = 0; @@ -203,7 +203,7 @@ void RectDrawing::setDrawParams(DrawParams* dp) _dp = dp; } -void RectDrawing::setRect(QRect r) +void RectDrawing::setRect(TQRect r) { _rect = r; @@ -217,7 +217,7 @@ void RectDrawing::setRect(QRect r) _fontHeight = 0; } -QRect RectDrawing::remainingRect(DrawParams* dp) +TQRect RectDrawing::remainingRect(DrawParams* dp) { if (!dp) dp = drawParams(); @@ -242,19 +242,19 @@ QRect RectDrawing::remainingRect(DrawParams* dp) } -void RectDrawing::drawBack(QPainter* p, DrawParams* dp) +void RectDrawing::drawBack(TQPainter* p, DrawParams* dp) { if (!dp) dp = drawParams(); if (_rect.width()<=0 || _rect.height()<=0) return; - QRect r = _rect; - QColor normal = dp->backColor(); + TQRect r = _rect; + TQColor normal = dp->backColor(); if (dp->selected()) normal = normal.light(); bool isCurrent = dp->current(); // 3D raised/sunken frame effect... - QColor high = normal.light(); - QColor low = normal.dark(); + TQColor high = normal.light(); + TQColor low = normal.dark(); p->setPen( isCurrent ? low:high); p->drawLine(r.left(), r.top(), r.right(), r.top()); p->drawLine(r.left(), r.top(), r.left(), r.bottom()); @@ -269,7 +269,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp) bool goDark = qGray(normal.rgb())>128; int rBase, gBase, bBase; normal.rgb(&rBase, &gBase, &bBase); - p->setBrush(QBrush::NoBrush); + p->setBrush(TQBrush::NoBrush); // shade parameters: int d = 7; @@ -290,7 +290,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp) int gDiff = goDark ? -gBase/d : (255-gBase)/d; int bDiff = goDark ? -bBase/d : (255-bBase)/d; - QColor shadeColor; + TQColor shadeColor; while (factor<.95) { shadeColor.setRgb((int)(rBase+factor*rDiff+.5), (int)(gBase+factor*gDiff+.5), @@ -329,22 +329,22 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp) } // fill inside - p->setPen(QPen::NoPen); + p->setPen(TQPen::NoPen); p->setBrush(normal); p->drawRect(r); } -bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) +bool RectDrawing::drawField(TQPainter* p, int f, DrawParams* dp) { if (!dp) dp = drawParams(); if (!_fm) { - _fm = new QFontMetrics(dp->font()); + _fm = new TQFontMetrics(dp->font()); _fontHeight = _fm->height(); } - QRect r = _rect; + TQRect r = _rect; if (0) kdDebug(90100) << "DrawField: Rect " << r.x() << "/" << r.y() << " - " << r.width() << "x" << r.height() << endl; @@ -484,9 +484,9 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) // get text and pixmap now, only if we need to, because it is possible // that they are calculated on demand (and this can take some time) - QString name = dp->text(f); + TQString name = dp->text(f); if (name.isEmpty()) return 0; - QPixmap pix = dp->pixmap(f); + TQPixmap pix = dp->pixmap(f); // check if pixmap can be drawn int pixW = pix.width(); @@ -548,14 +548,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) * If the text is to be written at the bottom, we start with the * end of the string (so everything is reverted) */ - QString remaining; + TQString remaining; int origLines = lines; while (lines>0) { if (w>width && lines>1) { int lastBreakPos = name.length(), lastWidth = w; int len = name.length(); - QChar::Category caOld, ca; + TQChar::Category caOld, ca; if (!isBottom) { // start with comparing categories of last 2 chars @@ -565,8 +565,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) ca = name[len-1].category(); if (ca != caOld) { // "Aa" has no break between... - if (ca == QChar::Letter_Uppercase && - caOld == QChar::Letter_Lowercase) { + if (ca == TQChar::Letter_Uppercase && + caOld == TQChar::Letter_Lowercase) { caOld = ca; continue; } @@ -580,7 +580,7 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) w = lastWidth; remaining = name.mid(lastBreakPos); // remove space on break point - if (name[lastBreakPos-1].category() == QChar::Separator_Space) + if (name[lastBreakPos-1].category() == TQChar::Separator_Space) name = name.left(lastBreakPos-1); else name = name.left(lastBreakPos); @@ -594,8 +594,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) if (ca != caOld) { // "Aa" has no break between... - if (caOld == QChar::Letter_Uppercase && - ca == QChar::Letter_Lowercase) { + if (caOld == TQChar::Letter_Uppercase && + ca == TQChar::Letter_Lowercase) { caOld = ca; continue; } @@ -609,14 +609,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp) w = lastWidth; remaining = name.left(l-lastBreakPos); // remove space on break point - if (name[l-lastBreakPos].category() == QChar::Separator_Space) + if (name[l-lastBreakPos].category() == TQChar::Separator_Space) name = name.right(lastBreakPos-1); else name = name.right(lastBreakPos); } } else - remaining = QString::null; + remaining = TQString::null; /* truncate and add ... if needed */ if (w>width) { @@ -776,8 +776,8 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value) TreeMapItem::TreeMapItem(TreeMapItem* parent, double value, - QString text1, QString text2, - QString text3, QString text4) + TQString text1, TQString text2, + TQString text3, TQString text4) { _value = value; _parent = parent; @@ -861,13 +861,13 @@ void TreeMapItem::refresh() } -QStringList TreeMapItem::path(int textNo) const +TQStringList TreeMapItem::path(int textNo) const { - QStringList list(text(textNo)); + TQStringList list(text(textNo)); TreeMapItem* i = _parent; while (i) { - QString text = i->text(textNo); + TQString text = i->text(textNo); if (!text.isEmpty()) list.prepend(i->text(textNo)); i = i->_parent; @@ -934,7 +934,7 @@ DrawParams::Position TreeMapItem::position(int f) const } // use widget font -const QFont& TreeMapItem::font() const +const TQFont& TreeMapItem::font() const { return _widget->currentFont(); } @@ -1013,7 +1013,7 @@ TreeMapItemList* TreeMapItem::children() void TreeMapItem::clearItemRect() { - _rect = QRect(); + _rect = TQRect(); clearFreeRects(); } @@ -1022,13 +1022,13 @@ void TreeMapItem::clearFreeRects() if (_freeRects) _freeRects->clear(); } -void TreeMapItem::addFreeRect(const QRect& r) +void TreeMapItem::addFreeRect(const TQRect& r) { // don't add invalid rects if ((r.width() < 1) || (r.height() < 1)) return; if (!_freeRects) { - _freeRects = new QPtrList; + _freeRects = new TQPtrList; _freeRects->setAutoDelete(true); } @@ -1036,9 +1036,9 @@ void TreeMapItem::addFreeRect(const QRect& r) << r.x() << "/" << r.y() << "-" << r.width() << "x" << r.height() << ")" << endl; - QRect* last = _freeRects->last(); + TQRect* last = _freeRects->last(); if (!last) { - _freeRects->append(new QRect(r)); + _freeRects->append(new TQRect(r)); return; } @@ -1060,7 +1060,7 @@ void TreeMapItem::addFreeRect(const QRect& r) } if (!replaced) { - _freeRects->append(new QRect(r)); + _freeRects->append(new TQRect(r)); return; } @@ -1075,13 +1075,13 @@ void TreeMapItem::addFreeRect(const QRect& r) class TreeMapTip: public QToolTip { public: - TreeMapTip( QWidget* p ):QToolTip(p) {} + TreeMapTip( TQWidget* p ):TQToolTip(p) {} protected: - void maybeTip( const QPoint & ); + void maybeTip( const TQPoint & ); }; -void TreeMapTip::maybeTip( const QPoint& pos ) +void TreeMapTip::maybeTip( const TQPoint& pos ) { if ( !parentWidget()->inherits( "TreeMapWidget" ) ) return; @@ -1089,9 +1089,9 @@ void TreeMapTip::maybeTip( const QPoint& pos ) TreeMapWidget* p = (TreeMapWidget*)parentWidget(); TreeMapItem* i; i = p->item(pos.x(), pos.y()); - QPtrList* rList = i ? i->freeRects() : 0; + TQPtrList* rList = i ? i->freeRects() : 0; if (rList) { - QRect* r; + TQRect* r; for(r=rList->first();r;r=rList->next()) if (r->contains(pos)) tip(*r, p->tipString(i)); @@ -1103,8 +1103,8 @@ void TreeMapTip::maybeTip( const QPoint& pos ) // TreeMapWidget TreeMapWidget::TreeMapWidget(TreeMapItem* base, - QWidget* parent, const char* name) - : QWidget(parent, name) + TQWidget* parent, const char* name) + : TQWidget(parent, name) { _base = base; _base->setWidget(this); @@ -1140,7 +1140,7 @@ TreeMapWidget::TreeMapWidget(TreeMapItem* base, _needsRefresh = _base; setBackgroundMode(Qt::NoBackground); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); _tip = new TreeMapTip(this); } @@ -1148,7 +1148,7 @@ TreeMapWidget::~TreeMapWidget() { } -const QFont& TreeMapWidget::currentFont() const +const TQFont& TreeMapWidget::currentFont() const { return _font; } @@ -1166,7 +1166,7 @@ TreeMapItem::SplitMode TreeMapWidget::splitMode() const return _splitMode; } -bool TreeMapWidget::setSplitMode(QString mode) +bool TreeMapWidget::setSplitMode(TQString mode) { if (mode == "Bisection") setSplitMode(TreeMapItem::Bisection); else if (mode == "Columns") setSplitMode(TreeMapItem::Columns); @@ -1182,9 +1182,9 @@ bool TreeMapWidget::setSplitMode(QString mode) return true; } -QString TreeMapWidget::splitModeString() const +TQString TreeMapWidget::splitModeString() const { - QString mode; + TQString mode; switch(splitMode()) { case TreeMapItem::Bisection: mode = "Bisection"; break; case TreeMapItem::Columns: mode = "Columns"; break; @@ -1250,14 +1250,14 @@ void TreeMapWidget::setMaxDrawingDepth(int d) redraw(); } -QString TreeMapWidget::defaultFieldType(int f) const +TQString TreeMapWidget::defaultFieldType(int f) const { return i18n("Text %1").arg(f+1); } -QString TreeMapWidget::defaultFieldStop(int) const +TQString TreeMapWidget::defaultFieldStop(int) const { - return QString(); + return TQString(); } bool TreeMapWidget::defaultFieldVisible(int f) const @@ -1302,7 +1302,7 @@ bool TreeMapWidget::resizeAttr(int size) return true; } -void TreeMapWidget::setFieldType(int f, QString type) +void TreeMapWidget::setFieldType(int f, TQString type) { if (((int)_attr.size() < f+1) && (type == defaultFieldType(f))) return; @@ -1311,13 +1311,13 @@ void TreeMapWidget::setFieldType(int f, QString type) // no need to redraw: the type string is not visible in the TreeMap } -QString TreeMapWidget::fieldType(int f) const +TQString TreeMapWidget::fieldType(int f) const { if (f<0 || (int)_attr.size()text(0).isEmpty()) { @@ -1572,7 +1572,7 @@ void TreeMapWidget::setSelected(TreeMapItem* item, bool selected) redraw(changed); if (0) kdDebug(90100) << (selected ? "S":"Des") << "elected Item " - << (item ? item->path(0).join("") : QString("(null)")) + << (item ? item->path(0).join("") : TQString("(null)")) << " (depth " << (item ? item->depth() : -1) << ")" << endl; } @@ -1764,16 +1764,16 @@ TreeMapItem* TreeMapWidget::setTmpRangeSelection(TreeMapItem* i1, return changed; } -void TreeMapWidget::contextMenuEvent( QContextMenuEvent* e ) +void TreeMapWidget::contextMenuEvent( TQContextMenuEvent* e ) { //kdDebug(90100) << "TreeMapWidget::contextMenuEvent" << endl; - if ( receivers( SIGNAL(contextMenuRequested(TreeMapItem*, const QPoint &)) ) ) + if ( receivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) ) e->accept(); - if ( e->reason() == QContextMenuEvent::Keyboard ) { - QRect r = (_current) ? _current->itemRect() : _base->itemRect(); - QPoint p = QPoint(r.left() + r.width()/2, r.top() + r.height()/2); + if ( e->reason() == TQContextMenuEvent::Keyboard ) { + TQRect r = (_current) ? _current->itemRect() : _base->itemRect(); + TQPoint p = TQPoint(r.left() + r.width()/2, r.top() + r.height()/2); emit contextMenuRequested(_current, p); } else { @@ -1783,7 +1783,7 @@ void TreeMapWidget::contextMenuEvent( QContextMenuEvent* e ) } -void TreeMapWidget::mousePressEvent( QMouseEvent* e ) +void TreeMapWidget::mousePressEvent( TQMouseEvent* e ) { //kdDebug(90100) << "TreeMapWidget::mousePressEvent" << endl; @@ -1851,7 +1851,7 @@ void TreeMapWidget::mousePressEvent( QMouseEvent* e ) } } -void TreeMapWidget::mouseMoveEvent( QMouseEvent* e ) +void TreeMapWidget::mouseMoveEvent( TQMouseEvent* e ) { //kdDebug(90100) << "TreeMapWidget::mouseMoveEvent" << endl; @@ -1894,7 +1894,7 @@ void TreeMapWidget::mouseMoveEvent( QMouseEvent* e ) redraw(changed); } -void TreeMapWidget::mouseReleaseEvent( QMouseEvent* ) +void TreeMapWidget::mouseReleaseEvent( TQMouseEvent* ) { //kdDebug(90100) << "TreeMapWidget::mouseReleaseEvent" << endl; @@ -1924,7 +1924,7 @@ void TreeMapWidget::mouseReleaseEvent( QMouseEvent* ) } -void TreeMapWidget::mouseDoubleClickEvent( QMouseEvent* e ) +void TreeMapWidget::mouseDoubleClickEvent( TQMouseEvent* e ) { TreeMapItem* over = item(e->x(), e->y()); @@ -1943,7 +1943,7 @@ int nextVisible(TreeMapItem* i) while (idx < (int)p->children()->count()-1) { idx++; - QRect r = p->children()->at(idx)->itemRect(); + TQRect r = p->children()->at(idx)->itemRect(); if (r.width()>1 && r.height()>1) return idx; } @@ -1961,7 +1961,7 @@ int prevVisible(TreeMapItem* i) while (idx > 0) { idx--; - QRect r = p->children()->at(idx)->itemRect(); + TQRect r = p->children()->at(idx)->itemRect(); if (r.width()>1 && r.height()>1) return idx; } @@ -1971,7 +1971,7 @@ int prevVisible(TreeMapItem* i) -void TreeMapWidget::keyPressEvent( QKeyEvent* e ) +void TreeMapWidget::keyPressEvent( TQKeyEvent* e ) { if (e->key() == Key_Escape && _pressed) { @@ -2085,24 +2085,24 @@ void TreeMapWidget::keyPressEvent( QKeyEvent* e ) } } -void TreeMapWidget::fontChange( const QFont& ) +void TreeMapWidget::fontChange( const TQFont& ) { redraw(); } -void TreeMapWidget::resizeEvent( QResizeEvent * ) +void TreeMapWidget::resizeEvent( TQResizeEvent * ) { // this automatically redraws (as size is changed) drawTreeMap(); } -void TreeMapWidget::paintEvent( QPaintEvent * ) +void TreeMapWidget::paintEvent( TQPaintEvent * ) { drawTreeMap(); } -void TreeMapWidget::showEvent( QShowEvent * ) +void TreeMapWidget::showEvent( TQShowEvent * ) { // refresh only if needed drawTreeMap(); @@ -2125,14 +2125,14 @@ void TreeMapWidget::drawTreeMap() if (_needsRefresh == _base) { // redraw whole widget - _pixmap = QPixmap(size()); + _pixmap = TQPixmap(size()); _pixmap.fill(backgroundColor()); } - QPainter p(&_pixmap); + TQPainter p(&_pixmap); if (_needsRefresh == _base) { p.setPen(black); - p.drawRect(QRect(2, 2, QWidget::width()-4, QWidget::height()-4)); - _base->setItemRect(QRect(3, 3, QWidget::width()-6, QWidget::height()-6)); + p.drawRect(TQRect(2, 2, TQWidget::width()-4, TQWidget::height()-4)); + _base->setItemRect(TQRect(3, 3, TQWidget::width()-6, TQWidget::height()-6)); } else { // only subitem @@ -2148,12 +2148,12 @@ void TreeMapWidget::drawTreeMap() } bitBlt( this, 0, 0, &_pixmap, 0, 0, - QWidget::width(), QWidget::height(), CopyROP, true); + TQWidget::width(), TQWidget::height(), CopyROP, true); if (hasFocus()) { - QPainter p(this); - style().drawPrimitive( QStyle::PE_FocusRect, &p, - QRect(0, 0, QWidget::width(), QWidget::height()), + TQPainter p(this); + style().drawPrimitive( TQStyle::PE_FocusRect, &p, + TQRect(0, 0, TQWidget::width(), TQWidget::height()), colorGroup() ); } } @@ -2177,7 +2177,7 @@ void TreeMapWidget::redraw(TreeMapItem* i) } } -void TreeMapWidget::drawItem(QPainter* p, +void TreeMapWidget::drawItem(TQPainter* p, TreeMapItem* item) { bool isSelected = false; @@ -2206,7 +2206,7 @@ void TreeMapWidget::drawItem(QPainter* p, } -bool TreeMapWidget::horizontal(TreeMapItem* i, const QRect& r) +bool TreeMapWidget::horizontal(TreeMapItem* i, const TQRect& r) { switch(i->splitMode()) { case TreeMapItem::HAlternate: @@ -2227,7 +2227,7 @@ bool TreeMapWidget::horizontal(TreeMapItem* i, const QRect& r) /** * Draw TreeMapItems recursive, starting from item */ -void TreeMapWidget::drawItems(QPainter* p, +void TreeMapWidget::drawItems(TQPainter* p, TreeMapItem* item) { if (DEBUG_DRAWING) @@ -2240,9 +2240,9 @@ void TreeMapWidget::drawItems(QPainter* p, drawItem(p, item); item->clearFreeRects(); - QRect origRect = item->itemRect(); + TQRect origRect = item->itemRect(); int bw = item->borderWidth(); - QRect r = QRect(origRect.x()+bw, origRect.y()+bw, + TQRect r = TQRect(origRect.x()+bw, origRect.y()+bw, origRect.width()-2*bw, origRect.height()-2*bw); TreeMapItemList* list = item->children(); @@ -2266,7 +2266,7 @@ void TreeMapWidget::drawItems(QPainter* p, // stop drawing if stopAtText is reached if (!stopDrawing) for (int no=0;no<(int)_attr.size();no++) { - QString stopAt = fieldStop(no); + TQString stopAt = fieldStop(no); if (!stopAt.isEmpty() && (item->text(no) == stopAt)) { stopDrawing = true; break; @@ -2320,7 +2320,7 @@ void TreeMapWidget::drawItems(QPainter* p, << i->value() << endl; } - QRect orig = r; + TQRect orig = r; // if we have space for text... if ((r.height() >= _fontHeight) && (r.width() >= _fontHeight)) { @@ -2337,12 +2337,12 @@ void TreeMapWidget::drawItems(QPainter* p, if (orig.x() == r.x()) { // Strings on top - item->addFreeRect(QRect(orig.x(), orig.y(), + item->addFreeRect(TQRect(orig.x(), orig.y(), orig.width(), orig.height()-r.height())); } else { // Strings on the left - item->addFreeRect(QRect(orig.x(), orig.y(), + item->addFreeRect(TQRect(orig.x(), orig.y(), orig.width()-r.width(), orig.height())); } @@ -2389,7 +2389,7 @@ void TreeMapWidget::drawItems(QPainter* p, self / user_sum + .5); if (self_length > 0) { // take space for self cost - QRect sr = r; + TQRect sr = r; if (rotate) { sr.setWidth( self_length ); r.setRect(r.x()+sr.width(), r.y(), r.width()-sr.width(), r.height()); @@ -2450,7 +2450,7 @@ void TreeMapWidget::drawItems(QPainter* p, // we always split horizontally int nextPos = (int)((double)r.width() * valSum / user_sum); - QRect firstRect = QRect(r.x(), r.y(), nextPos, r.height()); + TQRect firstRect = TQRect(r.x(), r.y(), nextPos, r.height()); if (nextPos < _visibleWidth) { if (item->sorting(0) == -1) { @@ -2501,7 +2501,7 @@ void TreeMapWidget::drawItems(QPainter* p, // we always split horizontally int nextPos = (int)((double)r.height() * valSum / user_sum); - QRect firstRect = QRect(r.x(), r.y(), r.width(), nextPos); + TQRect firstRect = TQRect(r.x(), r.y(), r.width(), nextPos); if (nextPos < _visibleWidth) { if (item->sorting(0) == -1) { @@ -2538,7 +2538,7 @@ void TreeMapWidget::drawItems(QPainter* p, } // fills area with a pattern if to small to draw children -void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r) +void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r) { p->setBrush(Qt::Dense4Pattern); p->setPen(Qt::NoPen); @@ -2547,7 +2547,7 @@ void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r) } // fills area with a pattern if to small to draw children -void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r, +void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r, TreeMapItemListIterator it, int len, bool goBack) { if (DEBUG_DRAWING) @@ -2577,8 +2577,8 @@ void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r, } // returns false if rect gets to small -bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item, - QRect& r, double user_sum, +bool TreeMapWidget::drawItemArray(TQPainter* p, TreeMapItem* item, + TQRect& r, double user_sum, TreeMapItemListIterator it, int len, bool goBack) { @@ -2618,14 +2618,14 @@ bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item, if (r.width() > r.height()) { int halfPos = (int)((double)r.width() * valSum / user_sum); - QRect firstRect = QRect(r.x(), r.y(), halfPos, r.height()); + TQRect firstRect = TQRect(r.x(), r.y(), halfPos, r.height()); drawOn = drawItemArray(p, item, firstRect, valSum, first, len-lenLeft, goBack); r.setRect(r.x()+halfPos, r.y(), r.width()-halfPos, r.height()); } else { int halfPos = (int)((double)r.height() * valSum / user_sum); - QRect firstRect = QRect(r.x(), r.y(), r.width(), halfPos); + TQRect firstRect = TQRect(r.x(), r.y(), r.width(), halfPos); drawOn = drawItemArray(p, item, firstRect, valSum, first, len-lenLeft, goBack); r.setRect(r.x(), r.y()+halfPos, r.width(), r.height()-halfPos); @@ -2694,7 +2694,7 @@ bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item, return false; } - QRect currRect = r; + TQRect currRect = r; if (hor) currRect.setWidth(nextPos); @@ -2769,13 +2769,13 @@ void TreeMapWidget::splitActivated(int id) } -void TreeMapWidget::addSplitDirectionItems(QPopupMenu* popup, int id) +void TreeMapWidget::addSplitDirectionItems(TQPopupMenu* popup, int id) { _splitID = id; popup->setCheckable(true); - connect(popup, SIGNAL(activated(int)), - this, SLOT(splitActivated(int))); + connect(popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(splitActivated(int))); popup->insertItem(i18n("Recursive Bisection"), id); popup->insertItem(i18n("Columns"), id+1); @@ -2824,21 +2824,21 @@ void TreeMapWidget::visualizationActivated(int id) else if ((id%10) == 8) setFieldPosition(f, DrawParams::BottomRight); } -void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id) +void TreeMapWidget::addVisualizationItems(TQPopupMenu* popup, int id) { _visID = id; popup->setCheckable(true); - QPopupMenu* bpopup = new QPopupMenu(); + TQPopupMenu* bpopup = new TQPopupMenu(); bpopup->setCheckable(true); - connect(popup, SIGNAL(activated(int)), - this, SLOT(visualizationActivated(int))); - connect(bpopup, SIGNAL(activated(int)), - this, SLOT(visualizationActivated(int))); + connect(popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(visualizationActivated(int))); + connect(bpopup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(visualizationActivated(int))); - QPopupMenu* spopup = new QPopupMenu(); + TQPopupMenu* spopup = new TQPopupMenu(); addSplitDirectionItems(spopup, id+100); popup->insertItem(i18n("Nesting"), spopup, id); @@ -2864,10 +2864,10 @@ void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id) popup->insertSeparator(); int f; - QPopupMenu* tpopup; + TQPopupMenu* tpopup; id += 20; for (f=0;f<(int)_attr.size();f++, id+=10) { - tpopup = new QPopupMenu(); + tpopup = new TQPopupMenu(); tpopup->setCheckable(true); popup->insertItem(_attr[f].type, tpopup, id); tpopup->insertItem(i18n("Visible"), id+1); @@ -2896,8 +2896,8 @@ void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id) tpopup->setItemChecked(id+7,_attr[f].pos == DrawParams::BottomCenter); tpopup->setItemChecked(id+8,_attr[f].pos == DrawParams::BottomRight); - connect(tpopup, SIGNAL(activated(int)), - this, SLOT(visualizationActivated(int))); + connect(tpopup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(visualizationActivated(int))); } } @@ -2913,7 +2913,7 @@ void TreeMapWidget::selectionActivated(int id) setSelected(i, true); } -void TreeMapWidget::addSelectionItems(QPopupMenu* popup, +void TreeMapWidget::addSelectionItems(TQPopupMenu* popup, int id, TreeMapItem* i) { if (!i) return; @@ -2921,11 +2921,11 @@ void TreeMapWidget::addSelectionItems(QPopupMenu* popup, _selectionID = id; _menuItem = i; - connect(popup, SIGNAL(activated(int)), - this, SLOT(selectionActivated(int))); + connect(popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(selectionActivated(int))); while (i) { - QString name = i->text(0); + TQString name = i->text(0); if (name.isEmpty()) break; popup->insertItem(i->text(0), id++); i = i->parent(); @@ -2934,7 +2934,7 @@ void TreeMapWidget::addSelectionItems(QPopupMenu* popup, void TreeMapWidget::fieldStopActivated(int id) { - if (id == _fieldStopID) setFieldStop(0, QString::null); + if (id == _fieldStopID) setFieldStop(0, TQString::null); else { TreeMapItem* i = _menuItem; id -= _fieldStopID+1; @@ -2947,13 +2947,13 @@ void TreeMapWidget::fieldStopActivated(int id) } } -void TreeMapWidget::addFieldStopItems(QPopupMenu* popup, +void TreeMapWidget::addFieldStopItems(TQPopupMenu* popup, int id, TreeMapItem* i) { _fieldStopID = id; - connect(popup, SIGNAL(activated(int)), - this, SLOT(fieldStopActivated(int))); + connect(popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(fieldStopActivated(int))); popup->insertItem(i18n("No %1 Limit").arg(fieldType(0)), id); popup->setItemChecked(id, fieldStop(0).isEmpty()); @@ -2964,7 +2964,7 @@ void TreeMapWidget::addFieldStopItems(QPopupMenu* popup, while (i) { id++; - QString name = i->text(0); + TQString name = i->text(0); if (name.isEmpty()) break; popup->insertItem(i->text(0), id); if (fieldStop(0) == i->text(0)) { @@ -2996,14 +2996,14 @@ void TreeMapWidget::areaStopActivated(int id) else if (id == _areaStopID+6) setMinimalArea(minimalArea()/2); } -void TreeMapWidget::addAreaStopItems(QPopupMenu* popup, +void TreeMapWidget::addAreaStopItems(TQPopupMenu* popup, int id, TreeMapItem* i) { _areaStopID = id; _menuItem = i; - connect(popup, SIGNAL(activated(int)), - this, SLOT(areaStopActivated(int))); + connect(popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(areaStopActivated(int))); bool foundArea = false; @@ -3061,14 +3061,14 @@ void TreeMapWidget::depthStopActivated(int id) else if (id == _depthStopID+6) setMaxDrawingDepth(6); } -void TreeMapWidget::addDepthStopItems(QPopupMenu* popup, +void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup, int id, TreeMapItem* i) { _depthStopID = id; _menuItem = i; - connect(popup, SIGNAL(activated(int)), - this, SLOT(depthStopActivated(int))); + connect(popup, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(depthStopActivated(int))); bool foundDepth = false; @@ -3117,7 +3117,7 @@ void TreeMapWidget::addDepthStopItems(QPopupMenu* popup, * Option saving/restoring */ -void TreeMapWidget::saveOptions(KConfigGroup* config, QString prefix) +void TreeMapWidget::saveOptions(KConfigGroup* config, TQString prefix) { config->writeEntry(prefix+"Nesting", splitModeString()); config->writeEntry(prefix+"AllowRotation", allowRotation()); @@ -3130,23 +3130,23 @@ void TreeMapWidget::saveOptions(KConfigGroup* config, QString prefix) int f, fCount = _attr.size(); config->writeEntry(prefix+"FieldCount", fCount); for (f=0;fwriteEntry(QString(prefix+"FieldVisible%1").arg(f), + config->writeEntry(TQString(prefix+"FieldVisible%1").arg(f), _attr[f].visible); - config->writeEntry(QString(prefix+"FieldForced%1").arg(f), + config->writeEntry(TQString(prefix+"FieldForced%1").arg(f), _attr[f].forced); - config->writeEntry(QString(prefix+"FieldStop%1").arg(f), + config->writeEntry(TQString(prefix+"FieldStop%1").arg(f), _attr[f].stop); - config->writeEntry(QString(prefix+"FieldPosition%1").arg(f), + config->writeEntry(TQString(prefix+"FieldPosition%1").arg(f), fieldPositionString(f)); } } -void TreeMapWidget::restoreOptions(KConfigGroup* config, QString prefix) +void TreeMapWidget::restoreOptions(KConfigGroup* config, TQString prefix) { bool enabled; int num; - QString str; + TQString str; str = config->readEntry(prefix+"Nesting"); if (!str.isEmpty()) setSplitMode(str); @@ -3180,18 +3180,18 @@ void TreeMapWidget::restoreOptions(KConfigGroup* config, QString prefix) int f; for (f=0;fhasKey(str)) setFieldVisible(f, config->readBoolEntry(str)); - str = QString(prefix+"FieldForced%1").arg(f); + str = TQString(prefix+"FieldForced%1").arg(f); if (config->hasKey(str)) setFieldForced(f, config->readBoolEntry(str)); - str = config->readEntry(QString(prefix+"FieldStop%1").arg(f)); + str = config->readEntry(TQString(prefix+"FieldStop%1").arg(f)); setFieldStop(f, str); - str = config->readEntry(QString(prefix+"FieldPosition%1").arg(f)); + str = config->readEntry(TQString(prefix+"FieldPosition%1").arg(f)); if (!str.isEmpty()) setFieldPosition(f, str); } } diff --git a/konq-plugins/fsview/treemap.h b/konq-plugins/fsview/treemap.h index a834d23..1deee35 100644 --- a/konq-plugins/fsview/treemap.h +++ b/konq-plugins/fsview/treemap.h @@ -18,7 +18,7 @@ /** * A Widget for visualizing hierarchical metrics as areas. - * The API is similar to QListView. + * The API is similar to TQListView. * * This file defines the following classes: * DrawParams, RectDrawing, TreeMapItem, TreeMapWidget @@ -30,14 +30,14 @@ #ifndef TREEMAP_H #define TREEMAP_H -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include class QPopupMenu; class TreeMapTip; @@ -74,15 +74,15 @@ public: // no constructor as this is an abstract class virtual ~DrawParams() {} - virtual QString text(int) const = 0; - virtual QPixmap pixmap(int) const = 0; + virtual TQString text(int) const = 0; + virtual TQPixmap pixmap(int) const = 0; virtual Position position(int) const = 0; // 0: no limit, negative: leave at least -maxLines() free virtual int maxLines(int) const { return 0; } virtual int fieldCount() const { return 0; } - virtual QColor backColor() const { return Qt::white; } - virtual const QFont& font() const = 0; + virtual TQColor backColor() const { return Qt::white; } + virtual const TQFont& font() const = 0; virtual bool selected() const { return false; } virtual bool current() const { return false; } @@ -98,39 +98,39 @@ class StoredDrawParams: public DrawParams { public: StoredDrawParams(); - StoredDrawParams(QColor c, + StoredDrawParams(TQColor c, bool selected = false, bool current = false); // getters - QString text(int) const; - QPixmap pixmap(int) const; + TQString text(int) const; + TQPixmap pixmap(int) const; Position position(int) const; int maxLines(int) const; int fieldCount() const { return _field.size(); } - QColor backColor() const { return _backColor; } + TQColor backColor() const { return _backColor; } bool selected() const { return _selected; } bool current() const { return _current; } bool shaded() const { return _shaded; } bool rotated() const { return _rotated; } - const QFont& font() const; + const TQFont& font() const; // attribute setters - void setField(int f, const QString& t, QPixmap pm = QPixmap(), + void setField(int f, const TQString& t, TQPixmap pm = TQPixmap(), Position p = Default, int maxLines = 0); - void setText(int f, const QString&); - void setPixmap(int f, const QPixmap&); + void setText(int f, const TQString&); + void setPixmap(int f, const TQPixmap&); void setPosition(int f, Position); void setMaxLines(int f, int); - void setBackColor(const QColor& c) { _backColor = c; } + void setBackColor(const TQColor& c) { _backColor = c; } void setSelected(bool b) { _selected = b; } void setCurrent(bool b) { _current = b; } void setShaded(bool b) { _shaded = b; } void setRotated(bool b) { _rotated = b; } protected: - QColor _backColor; + TQColor _backColor; bool _selected, _current, _shaded, _rotated; private: @@ -138,13 +138,13 @@ private: void ensureField(int f); struct Field { - QString text; - QPixmap pix; + TQString text; + TQPixmap pix; Position pos; int maxLines; }; - QValueVector _field; + TQValueVector _field; }; @@ -160,7 +160,7 @@ private: class RectDrawing { public: - RectDrawing(QRect); + RectDrawing(TQRect); ~RectDrawing(); // The default DrawParams object used. @@ -168,33 +168,33 @@ public: // we take control over the given object (i.e. delete at destruction) void setDrawParams(DrawParams*); - // draw on a given QPainter, use this class as info provider per default - void drawBack(QPainter*, DrawParams* dp = 0); + // draw on a given TQPainter, use this class as info provider per default + void drawBack(TQPainter*, DrawParams* dp = 0); /* Draw field at position() from pixmap()/text() with maxLines(). * Returns true if something was drawn */ - bool drawField(QPainter*, int f, DrawParams* dp = 0); + bool drawField(TQPainter*, int f, DrawParams* dp = 0); // resets rectangle for free space - void setRect(QRect); + void setRect(TQRect); // Returns the rectangle area still free of text/pixmaps after // a number of drawText() calls. - QRect remainingRect(DrawParams* dp = 0); + TQRect remainingRect(DrawParams* dp = 0); private: int _usedTopLeft, _usedTopCenter, _usedTopRight; int _usedBottomLeft, _usedBottomCenter, _usedBottomRight; - QRect _rect; + TQRect _rect; // temporary int _fontHeight; - QFontMetrics* _fm; + TQFontMetrics* _fm; DrawParams* _dp; }; -class TreeMapItemList: public QPtrList +class TreeMapItemList: public TQPtrList { public: TreeMapItem* commonParent(); @@ -202,7 +202,7 @@ protected: int compareItems ( Item item1, Item item2 ); }; -typedef QPtrListIterator TreeMapItemListIterator; +typedef TQPtrListIterator TreeMapItemListIterator; /** @@ -239,8 +239,8 @@ public: TreeMapItem(TreeMapItem* parent = 0, double value = 1.0 ); TreeMapItem(TreeMapItem* parent, double value, - QString text1, QString text2 = QString::null, - QString text3 = QString::null, QString text4 = QString::null); + TQString text1, TQString text2 = TQString::null, + TQString text3 = TQString::null, TQString text4 = TQString::null); virtual ~TreeMapItem(); bool isChildOf(TreeMapItem*); @@ -272,7 +272,7 @@ public: * Returns a list of text strings of specified text number, * from root up to this item. */ - QStringList path(int) const; + TQStringList path(int) const; /** * Depth of this item. This is the distance to root. @@ -288,9 +288,9 @@ public: * Temporary rectangle used for drawing this item the last time. * This is internally used to map from a point to an item. */ - void setItemRect(const QRect& r) { _rect = r; } + void setItemRect(const TQRect& r) { _rect = r; } void clearItemRect(); - const QRect& itemRect() const { return _rect; } + const TQRect& itemRect() const { return _rect; } int width() const { return _rect.width(); } int height() const { return _rect.height(); } @@ -299,8 +299,8 @@ public: * Used internally to enable tooltip. */ void clearFreeRects(); - QPtrList* freeRects() const { return _freeRects; } - void addFreeRect(const QRect& r); + TQPtrList* freeRects() const { return _freeRects; } + void addFreeRect(const TQRect& r); /** * Temporary child item index of the child that was current() recently. @@ -323,7 +323,7 @@ public: virtual double value() const; // replace "Default" position with setting from TreeMapWidget virtual Position position(int) const; - virtual const QFont& font() const; + virtual const TQFont& font() const; virtual bool isMarked(int) const; virtual int borderWidth() const; @@ -373,8 +373,8 @@ private: bool _sortAscending; // temporary layout - QRect _rect; - QPtrList* _freeRects; + TQRect _rect; + TQPtrList* _freeRects; int _depth; // temporary self value (when using level skipping) @@ -400,7 +400,7 @@ public: */ enum SelectionMode { Single, Multi, Extended, NoSelection }; - TreeMapWidget(TreeMapItem* base, QWidget* parent=0, const char* name=0); + TreeMapWidget(TreeMapItem* base, TQWidget* parent=0, const char* name=0); ~TreeMapWidget(); /** @@ -411,7 +411,7 @@ public: /** * Returns a reference to the current widget font. */ - const QFont& currentFont() const; + const TQFont& currentFont() const; /** * Returns the area item at position x/y, independent from any @@ -493,8 +493,8 @@ public: void setSplitMode(TreeMapItem::SplitMode m); TreeMapItem::SplitMode splitMode() const; // returns true if string was recognized - bool setSplitMode(QString); - QString splitModeString() const; + bool setSplitMode(TQString); + TQString splitModeString() const; /* @@ -542,8 +542,8 @@ public: int minimalArea() const { return _minimalArea; } /* defaults for text attributes */ - QString defaultFieldType(int) const; - QString defaultFieldStop(int) const; + TQString defaultFieldType(int) const; + TQString defaultFieldStop(int) const; bool defaultFieldVisible(int) const; bool defaultFieldForced(int) const; DrawParams::Position defaultFieldPosition(int) const; @@ -553,14 +553,14 @@ public: * This is important for the visualization menu generated * with visualizationMenu() */ - void setFieldType(int, QString); - QString fieldType(int) const; + void setFieldType(int, TQString); + TQString fieldType(int) const; /** * Stop drawing at item with name */ - void setFieldStop(int, QString); - QString fieldStop(int) const; + void setFieldStop(int, TQString); + TQString fieldStop(int) const; /** * Should the text with number textNo be visible? @@ -583,8 +583,8 @@ public: */ void setFieldPosition(int, DrawParams::Position); DrawParams::Position fieldPosition(int) const; - void setFieldPosition(int, QString); - QString fieldPositionString(int) const; + void setFieldPosition(int, TQString); + TQString fieldPositionString(int) const; /** * Do we allow the texts to be rotated by 90 degrees for better fitting? @@ -598,8 +598,8 @@ public: /** * Save/restore options. */ - void saveOptions(KConfigGroup*, QString prefix = QString::null); - void restoreOptions(KConfigGroup*, QString prefix = QString::null); + void saveOptions(KConfigGroup*, TQString prefix = TQString::null); + void restoreOptions(KConfigGroup*, TQString prefix = TQString::null); /** * These functions populate given popup menus. @@ -607,12 +607,12 @@ public: * * The int is the menu id where to start for the items (100 IDs reserved). */ - void addSplitDirectionItems(QPopupMenu*, int); - void addSelectionItems(QPopupMenu*, int, TreeMapItem*); - void addFieldStopItems(QPopupMenu*, int, TreeMapItem*); - void addAreaStopItems(QPopupMenu*, int, TreeMapItem*); - void addDepthStopItems(QPopupMenu*, int, TreeMapItem*); - void addVisualizationItems(QPopupMenu*, int); + void addSplitDirectionItems(TQPopupMenu*, int); + void addSelectionItems(TQPopupMenu*, int, TreeMapItem*); + void addFieldStopItems(TQPopupMenu*, int, TreeMapItem*); + void addAreaStopItems(TQPopupMenu*, int, TreeMapItem*); + void addDepthStopItems(TQPopupMenu*, int, TreeMapItem*); + void addVisualizationItems(TQPopupMenu*, int); TreeMapWidget* widget() { return this; } TreeMapItem* current() const { return _current; } @@ -625,7 +625,7 @@ public: * Return tooltip string to show for a item (can be rich text) * Default implementation gives lines with "text0 (text1)" going to root. */ - virtual QString tipString(TreeMapItem* i) const; + virtual TQString tipString(TreeMapItem* i) const; /** * Redraws an item with all children. @@ -666,20 +666,20 @@ signals: void clicked(TreeMapItem*); void returnPressed(TreeMapItem*); void doubleClicked(TreeMapItem*); - void rightButtonPressed(TreeMapItem*, const QPoint &); - void contextMenuRequested(TreeMapItem*, const QPoint &); + void rightButtonPressed(TreeMapItem*, const TQPoint &); + void contextMenuRequested(TreeMapItem*, const TQPoint &); protected: - void mousePressEvent( QMouseEvent * ); - void contextMenuEvent( QContextMenuEvent * ); - void mouseReleaseEvent( QMouseEvent * ); - void mouseMoveEvent( QMouseEvent * ); - void mouseDoubleClickEvent( QMouseEvent * ); - void keyPressEvent( QKeyEvent* ); - void paintEvent( QPaintEvent * ); - void resizeEvent( QResizeEvent * ); - void showEvent( QShowEvent * ); - void fontChange( const QFont& ); + void mousePressEvent( TQMouseEvent * ); + void contextMenuEvent( TQContextMenuEvent * ); + void mouseReleaseEvent( TQMouseEvent * ); + void mouseMoveEvent( TQMouseEvent * ); + void mouseDoubleClickEvent( TQMouseEvent * ); + void keyPressEvent( TQKeyEvent* ); + void paintEvent( TQPaintEvent * ); + void resizeEvent( TQResizeEvent * ); + void showEvent( TQShowEvent * ); + void fontChange( const TQFont& ); private: TreeMapItemList diff(TreeMapItemList&, TreeMapItemList&); @@ -689,13 +689,13 @@ private: TreeMapItem* i2, bool selected); bool isTmpSelected(TreeMapItem* i); - void drawItem(QPainter* p, TreeMapItem*); - void drawItems(QPainter* p, TreeMapItem*); - bool horizontal(TreeMapItem* i, const QRect& r); - void drawFill(TreeMapItem*,QPainter* p, QRect& r); - void drawFill(TreeMapItem*,QPainter* p, QRect& r, + void drawItem(TQPainter* p, TreeMapItem*); + void drawItems(TQPainter* p, TreeMapItem*); + bool horizontal(TreeMapItem* i, const TQRect& r); + void drawFill(TreeMapItem*,TQPainter* p, TQRect& r); + void drawFill(TreeMapItem*,TQPainter* p, TQRect& r, TreeMapItemListIterator it, int len, bool goBack); - bool drawItemArray(QPainter* p, TreeMapItem*, QRect& r, double, + bool drawItemArray(TQPainter* p, TreeMapItem*, TQRect& r, double, TreeMapItemListIterator it, int len, bool); bool resizeAttr(int); @@ -706,11 +706,11 @@ private: // attributes for field, per textNo struct FieldAttr { - QString type, stop; + TQString type, stop; bool visible, forced; DrawParams::Position pos; }; - QValueVector _attr; + TQValueVector _attr; SelectionMode _selectionMode; TreeMapItem::SplitMode _splitMode; @@ -732,11 +732,11 @@ private: bool _inShiftDrag, _inControlDrag; // temporary widget font metrics while drawing - QFont _font; + TQFont _font; int _fontHeight; // back buffer pixmap - QPixmap _pixmap; + TQPixmap _pixmap; }; #endif diff --git a/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp b/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp index 74f2613..989ec43 100644 --- a/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp +++ b/konq-plugins/khtmlsettingsplugin/settingsplugin.cpp @@ -39,8 +39,8 @@ static const KAboutData aboutdata("khtmlsettingsplugin", I18N_NOOP("HTML Setting K_EXPORT_COMPONENT_FACTORY( libkhtmlsettingsplugin, SettingsPluginFactory( &aboutdata ) ) -SettingsPlugin::SettingsPlugin( QObject* parent, const char* name, - const QStringList & ) +SettingsPlugin::SettingsPlugin( TQObject* parent, const char* name, + const TQStringList & ) : KParts::Plugin( parent, name ), mConfig(0) { @@ -57,40 +57,40 @@ SettingsPlugin::SettingsPlugin( QObject* parent, const char* name, action = new KToggleAction( i18n("Java&Script"), 0, - this, SLOT(toggleJavascript()), + this, TQT_SLOT(toggleJavascript()), actionCollection(), "javascript" ); menu->insert( action ); action = new KToggleAction( i18n("&Java"), 0, - this, SLOT(toggleJava()), + this, TQT_SLOT(toggleJava()), actionCollection(), "java" ); menu->insert( action ); action = new KToggleAction( i18n("&Cookies"), 0, - this, SLOT(toggleCookies()), + this, TQT_SLOT(toggleCookies()), actionCollection(), "cookies" ); menu->insert( action ); action = new KToggleAction( i18n("&Plugins"), 0, - this, SLOT(togglePlugins()), + this, TQT_SLOT(togglePlugins()), actionCollection(), "plugins" ); menu->insert( action ); action = new KToggleAction( i18n("Autoload &Images"), 0, - this, SLOT(toggleImageLoading()), + this, TQT_SLOT(toggleImageLoading()), actionCollection(), "imageloading" ); menu->insert( action ); menu->insert( new KActionSeparator(actionCollection()) ); action = new KToggleAction( i18n("Enable Pro&xy"), 0, - this, SLOT(toggleProxy()), + this, TQT_SLOT(toggleProxy()), actionCollection(), "useproxy" ); action->setCheckedState(i18n("Disable Pro&xy")); menu->insert( action ); action = new KToggleAction( i18n("Enable Cac&he"), 0, - this, SLOT(toggleCache()), + this, TQT_SLOT(toggleCache()), actionCollection(), "usecache" ); action->setCheckedState(i18n("Disable Cac&he")); menu->insert( action ); @@ -99,16 +99,16 @@ SettingsPlugin::SettingsPlugin( QObject* parent, const char* name, KSelectAction *sAction = new KSelectAction( i18n("Cache Po&licy"), 0, 0, 0, actionCollection(), "cachepolicy" ); - QStringList policies; + TQStringList policies; policies += i18n( "&Keep Cache in Sync" ); policies += i18n( "&Use Cache if Possible" ); policies += i18n( "&Offline Browsing Mode" ); sAction->setItems( policies ); - connect( sAction, SIGNAL( activated( int ) ), SLOT( cachePolicyChanged(int) ) ); + connect( sAction, TQT_SIGNAL( activated( int ) ), TQT_SLOT( cachePolicyChanged(int) ) ); menu->insert( sAction ); - connect( menu->popupMenu(), SIGNAL( aboutToShow() ), SLOT( showPopup() )); + connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT( showPopup() )); } SettingsPlugin::~SettingsPlugin() @@ -182,16 +182,16 @@ void SettingsPlugin::toggleCookies() KHTMLPart *part = static_cast( parent() ); - QString advice; + TQString advice; bool enable = ((KToggleAction*)actionCollection()->action("cookies"))->isChecked(); advice = enable ? "Accept" : "Reject"; - QCString replyType; - QByteArray data, replyData; - QDataStream stream( data, IO_WriteOnly ); + TQCString replyType; + TQByteArray data, replyData; + TQDataStream stream( data, IO_WriteOnly ); stream << part->url().url() << advice; bool ok = kapp->dcopClient()->call( "kded", "kcookiejar", - "setDomainAdvice(QString,QString)", + "setDomainAdvice(TQString,TQString)", data, replyType, replyData, true ); if ( !ok ) @@ -219,20 +219,20 @@ void SettingsPlugin::toggleImageLoading() } } -bool SettingsPlugin::cookiesEnabled( const QString& url ) +bool SettingsPlugin::cookiesEnabled( const TQString& url ) { - QByteArray data, reply; - QCString replyType; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data, reply; + TQCString replyType; + TQDataStream stream( data, IO_WriteOnly ); stream << url; - kapp->dcopClient()->call( "kcookiejar", "kcookiejar", "getDomainAdvice(QString)", data, replyType, reply, true ); + kapp->dcopClient()->call( "kcookiejar", "kcookiejar", "getDomainAdvice(TQString)", data, replyType, reply, true ); bool enabled = false; - if ( replyType == "QString" ) + if ( replyType == "TQString" ) { - QString advice; - QDataStream s( reply, IO_ReadOnly ); + TQString advice; + TQDataStream s( reply, IO_ReadOnly ); s >> advice; enabled = ( advice == "Accept" ); if ( !enabled && advice == "Dunno" ) { @@ -288,7 +288,7 @@ void SettingsPlugin::toggleCache() void SettingsPlugin::cachePolicyChanged( int p ) { - QString policy; + TQString policy; switch ( p ) { case 0: @@ -312,17 +312,17 @@ void SettingsPlugin::cachePolicyChanged( int p ) void SettingsPlugin::updateIOSlaves() { - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); DCOPClient* client = kapp->dcopClient(); if ( !client->isAttached() ) client->attach(); - QString protocol; // null -> all of them + TQString protocol; // null -> all of them stream << protocol; client->send( "*", "KIO::Scheduler", - "reparseSlaveConfiguration(QString)", data ); + "reparseSlaveConfiguration(TQString)", data ); } #include "settingsplugin.moc" diff --git a/konq-plugins/khtmlsettingsplugin/settingsplugin.h b/konq-plugins/khtmlsettingsplugin/settingsplugin.h index 367846b..63be54d 100644 --- a/konq-plugins/khtmlsettingsplugin/settingsplugin.h +++ b/konq-plugins/khtmlsettingsplugin/settingsplugin.h @@ -29,12 +29,12 @@ class SettingsPlugin : public KParts::Plugin { Q_OBJECT public: - SettingsPlugin( QObject* parent, const char* name, - const QStringList & ); + SettingsPlugin( TQObject* parent, const char* name, + const TQStringList & ); virtual ~SettingsPlugin(); private: - bool cookiesEnabled( const QString& url ); + bool cookiesEnabled( const TQString& url ); void updateIOSlaves(); private slots: diff --git a/konq-plugins/kimgalleryplugin/imgallerydialog.cpp b/konq-plugins/kimgalleryplugin/imgallerydialog.cpp index 54db458..87e2e31 100644 --- a/konq-plugins/kimgalleryplugin/imgallerydialog.cpp +++ b/konq-plugins/kimgalleryplugin/imgallerydialog.cpp @@ -18,15 +18,15 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -44,7 +44,7 @@ Boston, MA 02110-1301, USA. #include "imgallerydialog.h" #include "imgallerydialog.moc" -KIGPDialog::KIGPDialog(QWidget *parent, const QString& path, const char *name ) +KIGPDialog::KIGPDialog(TQWidget *parent, const TQString& path, const char *name ) : KDialogBase( IconList, i18n("Configure"), Default|Ok|Cancel, Ok, parent, name, true, true ), m_dialogOk( false ) @@ -67,8 +67,8 @@ void KIGPDialog::slotDefault() m_imageProperty->setChecked(false); m_fontName->setCurrentText( KGlobalSettings::generalFont().family() ); m_fontSize->setValue(14); - m_foregroundColor->setColor( QColor( "#d0ffd0") ); - m_backgroundColor->setColor( QColor("#333333") ); + m_foregroundColor->setColor( TQColor( "#d0ffd0") ); + m_backgroundColor->setColor( TQColor("#333333") ); m_imageNameReq->setURL(m_path + "images.html"); m_recurseSubDir->setChecked( false ); @@ -84,19 +84,19 @@ void KIGPDialog::slotDefault() m_colorDepth->setCurrentText("8"); } -void KIGPDialog::setupLookPage(const QString& path) { - QFrame *page = addPage( i18n("Look"), i18n("Page Look"), +void KIGPDialog::setupLookPage(const TQString& path) { + TQFrame *page = addPage( i18n("Look"), i18n("Page Look"), BarIcon("colorize", KIcon::SizeMedium ) ); m_config->setGroup("Look"); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, spacingHint() ); - QLabel *label; + TQLabel *label; - label = new QLabel( i18n("&Page title:"), page); + label = new TQLabel( i18n("&Page title:"), page); vlay->addWidget(label); - m_title = new QLineEdit(i18n("Image Gallery for %1").arg(path), page); + m_title = new TQLineEdit(i18n("Image Gallery for %1").arg(path), page); vlay->addWidget( m_title ); label->setBuddy(m_title); @@ -105,67 +105,67 @@ void KIGPDialog::setupLookPage(const QString& path) { m_imagesPerRow->setLabel( i18n("I&mages per row:") ); vlay->addWidget( m_imagesPerRow ); - QGridLayout *grid = new QGridLayout( 2, 2 ); + TQGridLayout *grid = new TQGridLayout( 2, 2 ); vlay->addLayout( grid ); - m_imageName = new QCheckBox( i18n("Show image file &name"), page); + m_imageName = new TQCheckBox( i18n("Show image file &name"), page); m_imageName->setChecked( m_config->readBoolEntry("ImageName", true) ); grid->addWidget( m_imageName, 0, 0 ); - m_imageSize = new QCheckBox( i18n("Show image file &size"), page); + m_imageSize = new TQCheckBox( i18n("Show image file &size"), page); m_imageSize->setChecked( m_config->readBoolEntry("ImageSize", false) ); grid->addWidget( m_imageSize, 0, 1 ); - m_imageProperty = new QCheckBox( i18n("Show image &dimensions"), page); + m_imageProperty = new TQCheckBox( i18n("Show image &dimensions"), page); m_imageProperty->setChecked( m_config->readBoolEntry("ImageProperty", false) ); grid->addWidget( m_imageProperty, 1, 0 ); - QHBoxLayout *hlay11 = new QHBoxLayout( ); + TQHBoxLayout *hlay11 = new TQHBoxLayout( ); vlay->addLayout( hlay11 ); - m_fontName = new QComboBox( false,page ); - QStringList standardFonts; + m_fontName = new TQComboBox( false,page ); + TQStringList standardFonts; KFontChooser::getFontList(standardFonts, 0); m_fontName->insertStringList( standardFonts ); m_fontName->setCurrentText( m_config->readEntry("FontName", KGlobalSettings::generalFont().family() ) ); - label = new QLabel( i18n("Fon&t name:"), page ); + label = new TQLabel( i18n("Fon&t name:"), page ); label->setBuddy( m_fontName ); hlay11->addWidget( label ); hlay11->addStretch( 1 ); hlay11->addWidget( m_fontName ); - QHBoxLayout *hlay12 = new QHBoxLayout( ); + TQHBoxLayout *hlay12 = new TQHBoxLayout( ); vlay->addLayout( hlay12 ); - m_fontSize = new QSpinBox( 6, 15, 1, page ); + m_fontSize = new TQSpinBox( 6, 15, 1, page ); m_fontSize->setValue( m_config->readNumEntry("FontSize", 14) ); - label = new QLabel( i18n("Font si&ze:"), page ); + label = new TQLabel( i18n("Font si&ze:"), page ); label->setBuddy( m_fontSize ); hlay12->addWidget( label ); hlay12->addStretch( 1 ); hlay12->addWidget( m_fontSize ); - QHBoxLayout *hlay1 = new QHBoxLayout( spacingHint() ); + TQHBoxLayout *hlay1 = new TQHBoxLayout( spacingHint() ); vlay->addLayout( hlay1 ); m_foregroundColor = new KColorButton(page); - m_foregroundColor->setColor( QColor( m_config->readEntry("ForegroundColor", "#d0ffd0") ) ); + m_foregroundColor->setColor( TQColor( m_config->readEntry("ForegroundColor", "#d0ffd0") ) ); - label = new QLabel( i18n("&Foreground color:"), page); + label = new TQLabel( i18n("&Foreground color:"), page); label->setBuddy( m_foregroundColor ); hlay1->addWidget( label ); hlay1->addStretch( 1 ); hlay1->addWidget(m_foregroundColor); - QHBoxLayout *hlay2 = new QHBoxLayout( spacingHint() ); + TQHBoxLayout *hlay2 = new TQHBoxLayout( spacingHint() ); vlay->addLayout( hlay2 ); m_backgroundColor = new KColorButton(page); - m_backgroundColor->setColor( QColor(m_config->readEntry("BackgroundColor", "#333333") ) ); + m_backgroundColor->setColor( TQColor(m_config->readEntry("BackgroundColor", "#333333") ) ); - label = new QLabel( i18n("&Background color:"), page); + label = new TQLabel( i18n("&Background color:"), page); hlay2->addWidget( label ); label->setBuddy( m_backgroundColor ); hlay2->addStretch( 1 ); @@ -174,33 +174,33 @@ void KIGPDialog::setupLookPage(const QString& path) { vlay->addStretch(1); } -void KIGPDialog::setupDirectoryPage(const QString& path) { - QFrame *page = addPage( i18n("Folders"), i18n("Folders"), +void KIGPDialog::setupDirectoryPage(const TQString& path) { + TQFrame *page = addPage( i18n("Folders"), i18n("Folders"), BarIcon("folder", KIcon::SizeMedium ) ); m_config->setGroup("Directory"); - QVBoxLayout *dvlay = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *dvlay = new TQVBoxLayout( page, 0, spacingHint() ); - QLabel *label; - label = new QLabel(i18n("&Save to HTML file:"), page); + TQLabel *label; + label = new TQLabel(i18n("&Save to HTML file:"), page); dvlay->addWidget( label ); - QString whatsThis; + TQString whatsThis; whatsThis = i18n("

The name of the HTML file this gallery will be saved to."); - QWhatsThis::add( label, whatsThis ); + TQWhatsThis::add( label, whatsThis ); m_imageNameReq = new KURLRequester(path + "images.html", page); label->setBuddy( m_imageNameReq ); dvlay->addWidget(m_imageNameReq); - connect( m_imageNameReq, SIGNAL(textChanged(const QString&)), - this, SLOT(imageUrlChanged(const QString&)) ); - QWhatsThis::add( m_imageNameReq, whatsThis ); + connect( m_imageNameReq, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(imageUrlChanged(const TQString&)) ); + TQWhatsThis::add( m_imageNameReq, whatsThis ); const bool recurseSubDir = m_config->readBoolEntry("RecurseSubDirectories", false); - m_recurseSubDir = new QCheckBox(i18n("&Recurse subfolders"), page); + m_recurseSubDir = new TQCheckBox(i18n("&Recurse subfolders"), page); m_recurseSubDir->setChecked( recurseSubDir ); whatsThis = i18n("

Whether subfolders should be included for the " "image gallery creation or not."); - QWhatsThis::add( m_recurseSubDir, whatsThis ); + TQWhatsThis::add( m_recurseSubDir, whatsThis ); const int recursionLevel = m_config->readNumEntry("RecursionLevel", 0); m_recursionLevel = new KIntNumInput( recursionLevel, page ); @@ -212,25 +212,25 @@ void KIGPDialog::setupDirectoryPage(const QString& path) { whatsThis = i18n("

You can limit the number of folders the " "image gallery creator will traverse to by setting an " "upper bound for the recursion depth."); - QWhatsThis::add( m_recursionLevel, whatsThis ); + TQWhatsThis::add( m_recursionLevel, whatsThis ); - connect(m_recurseSubDir, SIGNAL( toggled(bool) ), - m_recursionLevel, SLOT( setEnabled(bool) ) ); + connect(m_recurseSubDir, TQT_SIGNAL( toggled(bool) ), + m_recursionLevel, TQT_SLOT( setEnabled(bool) ) ); dvlay->addWidget(m_recurseSubDir); dvlay->addWidget(m_recursionLevel); - m_copyOriginalFiles = new QCheckBox(i18n("Copy or&iginal files"), page); + m_copyOriginalFiles = new TQCheckBox(i18n("Copy or&iginal files"), page); m_copyOriginalFiles->setChecked(m_config->readBoolEntry("CopyOriginalFiles", false) ); dvlay->addWidget(m_copyOriginalFiles); whatsThis = i18n("

This makes a copy of all images and the gallery will refer " "to these copies instead of the original images."); - QWhatsThis::add( m_copyOriginalFiles, whatsThis ); + TQWhatsThis::add( m_copyOriginalFiles, whatsThis ); const bool useCommentFile = m_config->readBoolEntry("UseCommentFile", false); - m_useCommentFile = new QCheckBox(i18n("Use &comment file"), page); + m_useCommentFile = new TQCheckBox(i18n("Use &comment file"), page); m_useCommentFile->setChecked(useCommentFile); dvlay->addWidget(m_useCommentFile); @@ -239,9 +239,9 @@ void KIGPDialog::setupDirectoryPage(const QString& path) { "subtitles for the images." "

For details about the file format please see " "the \"What's This?\" help below."); - QWhatsThis::add( m_useCommentFile, whatsThis ); + TQWhatsThis::add( m_useCommentFile, whatsThis ); - label = new QLabel(i18n("Comments &file:"), page); + label = new TQLabel(i18n("Comments &file:"), page); label->setEnabled( useCommentFile ); dvlay->addWidget( label ); whatsThis = i18n("

You can specify the name of the comment file here. " @@ -254,40 +254,40 @@ void KIGPDialog::setupDirectoryPage(const QString& path) { "
Description" "
" "
and so on"); - QWhatsThis::add( label, whatsThis ); + TQWhatsThis::add( label, whatsThis ); m_commentFileReq = new KURLRequester(path + "comments", page); m_commentFileReq->setEnabled(useCommentFile); label->setBuddy( m_commentFileReq ); dvlay->addWidget(m_commentFileReq); - QWhatsThis::add( m_commentFileReq, whatsThis ); + TQWhatsThis::add( m_commentFileReq, whatsThis ); - connect(m_useCommentFile, SIGNAL(toggled(bool)), - label, SLOT(setEnabled(bool))); - connect(m_useCommentFile, SIGNAL(toggled(bool)), - m_commentFileReq, SLOT(setEnabled(bool))); + connect(m_useCommentFile, TQT_SIGNAL(toggled(bool)), + label, TQT_SLOT(setEnabled(bool))); + connect(m_useCommentFile, TQT_SIGNAL(toggled(bool)), + m_commentFileReq, TQT_SLOT(setEnabled(bool))); dvlay->addStretch(1); } -void KIGPDialog::setupThumbnailPage(const QString& path) { - QFrame *page = addPage( i18n("Thumbnails"), i18n("Thumbnails"), +void KIGPDialog::setupThumbnailPage(const TQString& path) { + TQFrame *page = addPage( i18n("Thumbnails"), i18n("Thumbnails"), BarIcon("thumbnail", KIcon::SizeMedium ) ); m_config->setGroup("Thumbnails"); - QLabel *label; + TQLabel *label; - QVBoxLayout *vlay = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, spacingHint() ); - QHBoxLayout *hlay3 = new QHBoxLayout( spacingHint() ); + TQHBoxLayout *hlay3 = new TQHBoxLayout( spacingHint() ); vlay->addLayout( hlay3 ); - m_imageFormat = new QComboBox(false, page); + m_imageFormat = new TQComboBox(false, page); m_imageFormat->insertItem("JPEG"); m_imageFormat->insertItem("PNG"); m_imageFormat->setCurrentText( m_config->readEntry("ImageFormat", "JPEG") ); - label = new QLabel( i18n("Image format f&or the thumbnails:"), page); + label = new TQLabel( i18n("Image format f&or the thumbnails:"), page); hlay3->addWidget( label ); label->setBuddy( m_imageFormat ); hlay3->addStretch( 1 ); @@ -298,17 +298,17 @@ void KIGPDialog::setupThumbnailPage(const QString& path) { m_thumbnailSize->setLabel( i18n("Thumbnail size:") ); vlay->addWidget( m_thumbnailSize ); - QGridLayout *grid = new QGridLayout( 2, 2 ); + TQGridLayout *grid = new TQGridLayout( 2, 2 ); vlay->addLayout( grid ); - QHBoxLayout *hlay4 = new QHBoxLayout( spacingHint() ); + TQHBoxLayout *hlay4 = new TQHBoxLayout( spacingHint() ); vlay->addLayout( hlay4 ); const bool colorDepthSet = m_config->readBoolEntry("ColorDepthSet", false); - m_colorDepthSet = new QCheckBox(i18n("&Set different color depth:"), page); + m_colorDepthSet = new TQCheckBox(i18n("&Set different color depth:"), page); m_colorDepthSet->setChecked(colorDepthSet); hlay4->addWidget( m_colorDepthSet ); - m_colorDepth = new QComboBox(false, page); + m_colorDepth = new TQComboBox(false, page); m_colorDepth->insertItem("1"); m_colorDepth->insertItem("8"); m_colorDepth->insertItem("16"); @@ -317,8 +317,8 @@ void KIGPDialog::setupThumbnailPage(const QString& path) { m_colorDepth->setEnabled(colorDepthSet); hlay4->addWidget( m_colorDepth ); - connect(m_colorDepthSet, SIGNAL( toggled(bool) ), - m_colorDepth, SLOT( setEnabled(bool) ) ); + connect(m_colorDepthSet, TQT_SIGNAL( toggled(bool) ), + m_colorDepth, TQT_SLOT( setEnabled(bool) ) ); vlay->addStretch(1); @@ -354,7 +354,7 @@ KIGPDialog::~KIGPDialog() { } -void KIGPDialog::imageUrlChanged(const QString &url ) +void KIGPDialog::imageUrlChanged(const TQString &url ) { enableButtonOK( !url.isEmpty()); } @@ -414,42 +414,42 @@ bool KIGPDialog::colorDepthSet() const return m_colorDepthSet->isChecked(); } -const QString KIGPDialog::getTitle() const +const TQString KIGPDialog::getTitle() const { return m_title->text(); } -const QString KIGPDialog::getImageName() const +const TQString KIGPDialog::getImageName() const { return m_imageNameReq->url(); } -const QString KIGPDialog::getCommentFile() const +const TQString KIGPDialog::getCommentFile() const { return m_commentFileReq->url(); } -const QString KIGPDialog::getFontName() const +const TQString KIGPDialog::getFontName() const { return m_fontName->currentText(); } -const QString KIGPDialog::getFontSize() const +const TQString KIGPDialog::getFontSize() const { return m_fontSize->text(); } -const QColor KIGPDialog::getBackgroundColor() const +const TQColor KIGPDialog::getBackgroundColor() const { return m_backgroundColor->color(); } -const QColor KIGPDialog::getForegroundColor() const +const TQColor KIGPDialog::getForegroundColor() const { return m_foregroundColor->color(); } -const QString KIGPDialog::getImageFormat() const +const TQString KIGPDialog::getImageFormat() const { return m_imageFormat->currentText(); } diff --git a/konq-plugins/kimgalleryplugin/imgallerydialog.h b/konq-plugins/kimgalleryplugin/imgallerydialog.h index 7aa6163..22cf68e 100644 --- a/konq-plugins/kimgalleryplugin/imgallerydialog.h +++ b/konq-plugins/kimgalleryplugin/imgallerydialog.h @@ -34,14 +34,14 @@ class QSpinBox; class KColorButton; class KConfig; -typedef QMap CommentMap; +typedef TQMap CommentMap; class KIGPDialog : public KDialogBase { Q_OBJECT public: - KIGPDialog(QWidget *parent=0, const QString& path=0, const char *name=0 ); + KIGPDialog(TQWidget *parent=0, const TQString& path=0, const char *name=0 ); ~KIGPDialog(); bool isDialogOk() const; @@ -58,45 +58,45 @@ class KIGPDialog : public KDialogBase int getThumbnailSize() const; int getColorDepth() const; - const QString getTitle() const; - const QString getImageName() const; - const QString getCommentFile() const; - const QString getFontName() const; - const QString getFontSize() const; + const TQString getTitle() const; + const TQString getImageName() const; + const TQString getCommentFile() const; + const TQString getFontName() const; + const TQString getFontSize() const; - const QColor getBackgroundColor() const; - const QColor getForegroundColor() const; + const TQColor getBackgroundColor() const; + const TQColor getForegroundColor() const; - const QString getImageFormat() const; + const TQString getImageFormat() const; void writeConfig(); protected slots: - void imageUrlChanged(const QString & ); + void imageUrlChanged(const TQString & ); void slotDefault(); private: KColorButton *m_foregroundColor; KColorButton *m_backgroundColor; - QLineEdit *m_title; - QString m_path; + TQLineEdit *m_title; + TQString m_path; KIntNumInput *m_imagesPerRow; KIntNumInput *m_thumbnailSize; KIntNumInput *m_recursionLevel; - QSpinBox *m_fontSize; + TQSpinBox *m_fontSize; - QCheckBox *m_copyOriginalFiles; - QCheckBox *m_imageName; - QCheckBox *m_imageSize; - QCheckBox *m_imageProperty; - QCheckBox *m_useCommentFile; - QCheckBox *m_recurseSubDir; - QCheckBox *m_colorDepthSet; + TQCheckBox *m_copyOriginalFiles; + TQCheckBox *m_imageName; + TQCheckBox *m_imageSize; + TQCheckBox *m_imageProperty; + TQCheckBox *m_useCommentFile; + TQCheckBox *m_recurseSubDir; + TQCheckBox *m_colorDepthSet; - QComboBox* m_fontName; - QComboBox* m_imageFormat; - QComboBox* m_colorDepth; + TQComboBox* m_fontName; + TQComboBox* m_imageFormat; + TQComboBox* m_colorDepth; KURLRequester *m_imageNameReq; KURLRequester *m_commentFileReq; @@ -105,9 +105,9 @@ class KIGPDialog : public KDialogBase KConfig *m_config; private: - void setupLookPage(const QString& path); - void setupDirectoryPage(const QString& path); - void setupThumbnailPage(const QString& path); + void setupLookPage(const TQString& path); + void setupDirectoryPage(const TQString& path); + void setupThumbnailPage(const TQString& path); }; #endif diff --git a/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp b/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp index 43df35b..4b9a5e0 100644 --- a/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp +++ b/konq-plugins/kimgalleryplugin/imgalleryplugin.cpp @@ -18,16 +18,16 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -48,11 +48,11 @@ Boston, MA 02110-1301, USA. typedef KGenericFactory KImGalleryPluginFactory; K_EXPORT_COMPONENT_FACTORY( libkimgallery, KImGalleryPluginFactory( "imgalleryplugin" ) ) -KImGalleryPlugin::KImGalleryPlugin( QObject* parent, const char* name, const QStringList & ) +KImGalleryPlugin::KImGalleryPlugin( TQObject* parent, const char* name, const TQStringList & ) : KParts::Plugin( parent, name ), m_commentMap(0) { new KAction( i18n( "&Create Image Gallery..." ), "imagegallery", CTRL+Key_I, this, - SLOT( slotExecute() ), actionCollection(), "create_img_gallery" ); + TQT_SLOT( slotExecute() ), actionCollection(), "create_img_gallery" ); } void KImGalleryPlugin::slotExecute() @@ -71,7 +71,7 @@ void KImGalleryPlugin::slotExecute() kdDebug(90170) << "dialog is ok" << endl; m_configDlg = new KIGPDialog(m_part->widget(), m_part->url().path(+1)); - if ( m_configDlg->exec() == QDialog::Accepted ) { + if ( m_configDlg->exec() == TQDialog::Accepted ) { kdDebug(90170) << "dialog is ok" << endl; m_configDlg->writeConfig(); m_copyFiles = m_configDlg->copyOriginalFiles(); @@ -81,8 +81,8 @@ void KImGalleryPlugin::slotExecute() KURL url(m_configDlg->getImageName()); if ( !url.isEmpty() && url.isValid()) { - m_progressDlg = new QProgressDialog(m_part->widget(), "progressDlg", true ); - QObject::connect(m_progressDlg, SIGNAL( cancelled() ), this, SLOT( slotCancelled() ) ); + m_progressDlg = new TQProgressDialog(m_part->widget(), "progressDlg", true ); + TQObject::connect(m_progressDlg, TQT_SIGNAL( cancelled() ), this, TQT_SLOT( slotCancelled() ) ); m_progressDlg->setLabelText( i18n("Creating thumbnails") ); m_progressDlg->setCancelButton(new KPushButton(KStdGuiItem::cancel(),m_progressDlg)); @@ -100,7 +100,7 @@ void KImGalleryPlugin::slotExecute() delete m_progressDlg; } -bool KImGalleryPlugin::createDirectory(QDir thumb_dir, QString imgGalleryDir, QString dirName) +bool KImGalleryPlugin::createDirectory(TQDir thumb_dir, TQString imgGalleryDir, TQString dirName) { if (!thumb_dir.exists()) { thumb_dir.setPath( imgGalleryDir); @@ -116,25 +116,25 @@ bool KImGalleryPlugin::createDirectory(QDir thumb_dir, QString imgGalleryDir, QS } } -void KImGalleryPlugin::createHead(QTextStream& stream) +void KImGalleryPlugin::createHead(TQTextStream& stream) { - const QString chsetName = QTextCodec::codecForLocale()->mimeName(); + const TQString chsetName = TQTextCodec::codecForLocale()->mimeName(); stream << "" << endl; stream << "" << endl; stream << "" << endl; stream << "" << endl; - stream << "" << QStyleSheet::escape(m_configDlg->getTitle()) << "" << endl; + stream << "" << TQStyleSheet::escape(m_configDlg->getTitle()) << "" << endl; stream << "" << endl; stream << "" << endl; createCSSSection(stream); stream << "" << endl; } -void KImGalleryPlugin::createCSSSection(QTextStream& stream) +void KImGalleryPlugin::createCSSSection(TQTextStream& stream) { - const QString backgroundColor = m_configDlg->getBackgroundColor().name(); - const QString foregroundColor = m_configDlg->getForegroundColor().name(); + const TQString backgroundColor = m_configDlg->getBackgroundColor().name(); + const TQString foregroundColor = m_configDlg->getForegroundColor().name(); //adding a touch of style stream << "