summaryrefslogtreecommitdiffstats
path: root/konq-plugins/sidebar/metabar
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/sidebar/metabar')
-rw-r--r--konq-plugins/sidebar/metabar/src/configdialog.cpp290
-rw-r--r--konq-plugins/sidebar/metabar/src/configdialog.h38
-rw-r--r--konq-plugins/sidebar/metabar/src/defaultplugin.cpp80
-rw-r--r--konq-plugins/sidebar/metabar/src/defaultplugin.h8
-rw-r--r--konq-plugins/sidebar/metabar/src/httpplugin.cpp8
-rw-r--r--konq-plugins/sidebar/metabar/src/metabar.cpp8
-rw-r--r--konq-plugins/sidebar/metabar/src/metabar.h8
-rw-r--r--konq-plugins/sidebar/metabar/src/metabarfunctions.cpp24
-rw-r--r--konq-plugins/sidebar/metabar/src/metabarfunctions.h10
-rw-r--r--konq-plugins/sidebar/metabar/src/metabarwidget.cpp128
-rw-r--r--konq-plugins/sidebar/metabar/src/metabarwidget.h24
-rw-r--r--konq-plugins/sidebar/metabar/src/protocolplugin.cpp12
-rw-r--r--konq-plugins/sidebar/metabar/src/serviceloader.cpp56
-rw-r--r--konq-plugins/sidebar/metabar/src/serviceloader.h18
-rw-r--r--konq-plugins/sidebar/metabar/src/settingsplugin.cpp18
15 files changed, 365 insertions, 365 deletions
diff --git a/konq-plugins/sidebar/metabar/src/configdialog.cpp b/konq-plugins/sidebar/metabar/src/configdialog.cpp
index 13e1e27..047437e 100644
--- a/konq-plugins/sidebar/metabar/src/configdialog.cpp
+++ b/konq-plugins/sidebar/metabar/src/configdialog.cpp
@@ -19,16 +19,16 @@
***************************************************************************/
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qmap.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqmap.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,19 +44,19 @@
#include "configdialog.h"
-LinkEntry::LinkEntry(QString name, QString url, QString icon){
+LinkEntry::LinkEntry(TQString name, TQString url, TQString icon){
LinkEntry::name = name;
LinkEntry::url = url;
LinkEntry::icon = icon;
}
-ActionListItem::ActionListItem(QListBox *listbox, const QString &action, const QString &text, const QPixmap &pixmap) : QListBoxPixmap(listbox, pixmap)
+ActionListItem::ActionListItem(TQListBox *listbox, const TQString &action, const TQString &text, const TQPixmap &pixmap) : TQListBoxPixmap(listbox, pixmap)
{
setAction(action);
setText(text);
}
-ConfigDialog::ConfigDialog(QWidget *parent, const char *name) : QDialog(parent, name)
+ConfigDialog::ConfigDialog(TQWidget *parent, const char *name) : TQDialog(parent, name)
{
topWidgetName = parent->topLevelWidget()->name();
config = new KConfig("metabarrc");
@@ -66,21 +66,21 @@ ConfigDialog::ConfigDialog(QWidget *parent, const char *name) : QDialog(parent,
setIcon(SmallIcon("metabar"));
ok = new KPushButton(KStdGuiItem::ok(), this);
- connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
cancel = new KPushButton(KStdGuiItem::cancel(), this);
- connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()));
- QTabWidget *tab = new QTabWidget(this);
+ TQTabWidget *tab = new TQTabWidget(this);
//general page
config->setGroup("General");
- QWidget *general = new QWidget;
+ TQWidget *general = new QWidget;
- QGroupBox *entries_group = new QGroupBox(2, Qt::Horizontal, i18n("Items"), general);
- entries_group->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ TQGroupBox *entries_group = new TQGroupBox(2, Qt::Horizontal, i18n("Items"), general);
+ entries_group->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred);
- QLabel *entries_label = new QLabel(i18n("Open with:"), entries_group);
+ TQLabel *entries_label = new TQLabel(i18n("Open with:"), entries_group);
max_entries = new KIntSpinBox(entries_group);
max_entries->setMinValue(1);
max_entries->setMaxValue(99);
@@ -88,7 +88,7 @@ ConfigDialog::ConfigDialog(QWidget *parent, const char *name) : QDialog(parent,
max_entries->setValue(config->readNumEntry("MaxEntries", 3));
entries_label->setBuddy(max_entries);
- QLabel *actions_label = new QLabel(i18n("Actions:"), entries_group);
+ TQLabel *actions_label = new TQLabel(i18n("Actions:"), entries_group);
max_actions = new KIntSpinBox(entries_group);
max_actions->setMinValue(1);
max_actions->setMaxValue(99);
@@ -97,62 +97,62 @@ ConfigDialog::ConfigDialog(QWidget *parent, const char *name) : QDialog(parent,
actions_label->setBuddy(max_actions);
- QGroupBox *appearance_group = new QGroupBox(1, Qt::Horizontal, i18n("Appearance"), general);
- appearance_group->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ TQGroupBox *appearance_group = new TQGroupBox(1, Qt::Horizontal, i18n("Appearance"), general);
+ appearance_group->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred);
- animate = new QCheckBox(i18n("Animate resize"), appearance_group);
+ animate = new TQCheckBox(i18n("Animate resize"), appearance_group);
animate->setChecked(config->readBoolEntry("AnimateResize", false));
- servicemenus = new QCheckBox(i18n("Show service menus"), appearance_group);
+ servicemenus = new TQCheckBox(i18n("Show service menus"), appearance_group);
servicemenus->setChecked(config->readBoolEntry("ShowServicemenus", true));
- showframe = new QCheckBox(i18n("Show frame"), appearance_group);
+ showframe = new TQCheckBox(i18n("Show frame"), appearance_group);
showframe->setChecked(config->readBoolEntry("ShowFrame", true));
- QGroupBox *theme_group = new QGroupBox(2, Qt::Horizontal, i18n("Themes"), general);
- theme_group->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
+ TQGroupBox *theme_group = new TQGroupBox(2, Qt::Horizontal, i18n("Themes"), general);
+ theme_group->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred);
themes = new KComboBox(theme_group);
- themes->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ themes->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
install_theme = new KPushButton(i18n("Install New Theme..."), theme_group);
- install_theme->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
- connect(install_theme, SIGNAL(clicked()), this, SLOT(installTheme()));
+ install_theme->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred);
+ connect(install_theme, TQT_SIGNAL(clicked()), this, TQT_SLOT(installTheme()));
loadThemes();
//link page
- QWidget *links = new QWidget;
+ TQWidget *links = new QWidget;
link_create = new KPushButton(i18n("New..."), links);
- connect(link_create, SIGNAL(clicked()), this, SLOT(createLink()));
+ connect(link_create, TQT_SIGNAL(clicked()), this, TQT_SLOT(createLink()));
link_delete = new KPushButton(i18n("Delete"), links);
- connect(link_delete, SIGNAL(clicked()), this, SLOT(deleteLink()));
+ connect(link_delete, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteLink()));
link_edit = new KPushButton(i18n("Edit..."), links);
- connect(link_edit, SIGNAL(clicked()), this, SLOT(editLink()));
+ connect(link_edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(editLink()));
link_up = new KPushButton(links);
link_up->setIconSet(SmallIconSet("up"));
link_up->setEnabled(false);
- connect(link_up, SIGNAL(clicked()), this, SLOT(moveLinkUp()));
+ connect(link_up, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveLinkUp()));
link_down = new KPushButton(links);
link_down->setIconSet(SmallIconSet("down"));
link_down->setEnabled(false);
- connect(link_down, SIGNAL(clicked()), this, SLOT(moveLinkDown()));
+ connect(link_down, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveLinkDown()));
link_list = new KListView(links);
- link_list->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ link_list->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
link_list->setSorting(-1);
link_list->setItemsMovable(TRUE);
link_list->addColumn(i18n("Name"));
link_list->addColumn(i18n("Address"));
- connect(link_list, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(editLink(QListViewItem*)));
- connect(link_list, SIGNAL(selectionChanged()), SLOT(updateArrows()));
+ connect(link_list, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(editLink(TQListViewItem*)));
+ connect(link_list, TQT_SIGNAL(selectionChanged()), TQT_SLOT(updateArrows()));
- QWidget *actionPage = new QWidget;
+ TQWidget *actionPage = new QWidget;
actionSelector = new KActionSelector(actionPage);
loadAvailableActions();
@@ -162,81 +162,81 @@ ConfigDialog::ConfigDialog(QWidget *parent, const char *name) : QDialog(parent,
tab->addTab(links, i18n("Links"));
//layout
- QGridLayout *general_layout = new QGridLayout(general, 2, 2, 5, 5);
+ TQGridLayout *general_layout = new TQGridLayout(general, 2, 2, 5, 5);
general_layout->addWidget(entries_group, 0, 0);
general_layout->addWidget(appearance_group, 0, 1);
general_layout->addMultiCellWidget(theme_group, 1, 1, 0, 1);
- general_layout->addItem(new QSpacerItem(10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding), 2, 0);
- //general_layout->addItem(new QSpacerItem(10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding), 0, 2);
+ general_layout->addItem(new TQSpacerItem(10, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding), 2, 0);
+ //general_layout->addItem(new TQSpacerItem(10, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding), 0, 2);
- QVBoxLayout *link_button_layout = new QVBoxLayout(0, 0, 5);
+ TQVBoxLayout *link_button_layout = new TQVBoxLayout(0, 0, 5);
link_button_layout->addWidget(link_create);
link_button_layout->addWidget(link_edit);
link_button_layout->addWidget(link_delete);
- link_button_layout->addItem(new QSpacerItem(10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ link_button_layout->addItem(new TQSpacerItem(10, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
link_button_layout->addWidget(link_up);
link_button_layout->addWidget(link_down);
- QHBoxLayout *link_layout = new QHBoxLayout(links, 5, 5);
+ TQHBoxLayout *link_layout = new TQHBoxLayout(links, 5, 5);
link_layout->addWidget(link_list);
link_layout->addLayout(link_button_layout);
- QHBoxLayout *action_layout = new QHBoxLayout(actionPage, 5, 5);
+ TQHBoxLayout *action_layout = new TQHBoxLayout(actionPage, 5, 5);
action_layout->addWidget(actionSelector);
- QHBoxLayout *bottom_layout = new QHBoxLayout(0, 5, 5);
- bottom_layout->addItem(new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ TQHBoxLayout *bottom_layout = new TQHBoxLayout(0, 5, 5);
+ bottom_layout->addItem(new TQSpacerItem(10, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
bottom_layout->addWidget(ok);
bottom_layout->addWidget(cancel);
- QVBoxLayout *main_layout = new QVBoxLayout(this, 5, 5);
+ TQVBoxLayout *main_layout = new TQVBoxLayout(this, 5, 5);
main_layout->addWidget(tab);
main_layout->addLayout(bottom_layout);
//load config
config->setGroup("General");
- QStringList _links = config->readListEntry("Links");
+ TQStringList _links = config->readListEntry("Links");
- for(QStringList::Iterator it = _links.begin(); it != _links.end(); ++it){
+ for(TQStringList::Iterator it = _links.begin(); it != _links.end(); ++it){
config->setGroup("Link_" + (*it));
- QString icon_str = config->readEntry("Icon", "folder");
- QPixmap icon(icon_str);
+ TQString icon_str = config->readEntry("Icon", "folder");
+ TQPixmap icon(icon_str);
if(icon.isNull()){
icon = SmallIcon(icon_str);
}
- QListViewItem *item = new QListViewItem(link_list, link_list->lastItem(), config->readEntry("Name"), config->readEntry("URL"));
+ TQListViewItem *item = new TQListViewItem(link_list, link_list->lastItem(), config->readEntry("Name"), config->readEntry("URL"));
item->setPixmap(0, icon);
linkList.insert(item, new LinkEntry(config->readEntry("Name"), config->readEntry("URL"), icon_str));
}
config->setGroup("General");
- QStringList actions = config->readListEntry("Actions");
- for(QStringList::Iterator it = actions.begin(); it != actions.end(); ++it){
+ TQStringList actions = config->readListEntry("Actions");
+ for(TQStringList::Iterator it = actions.begin(); it != actions.end(); ++it){
if((*it).startsWith("metabar/")){
if((*it).right((*it).length() - 8) == "share"){
- QString text = i18n("Share");
+ TQString text = i18n("Share");
ActionListItem *item = new ActionListItem(actionSelector->selectedListBox(), *it, text, SmallIcon("network"));
- QListBoxItem *avItem = actionSelector->availableListBox()->findItem(text, Qt::ExactMatch);
+ TQListBoxItem *avItem = actionSelector->availableListBox()->findItem(text, Qt::ExactMatch);
if(avItem){
delete avItem;
}
}
}
else{
- DCOPRef action(kapp->dcopClient()->appId(), QCString(topWidgetName).append("/action/").append((*it).utf8()));
+ DCOPRef action(kapp->dcopClient()->appId(), TQCString(topWidgetName).append("/action/").append((*it).utf8()));
- QString text = action.call("plainText()");
- QString icon = iconConfig->readEntry(*it, action.call("icon()"));
+ TQString text = action.call("plainText()");
+ TQString icon = iconConfig->readEntry(*it, action.call("icon()"));
- ActionListItem *item = new ActionListItem(actionSelector->selectedListBox(), QString(*it), text, SmallIcon(icon));
+ ActionListItem *item = new ActionListItem(actionSelector->selectedListBox(), TQString(*it), text, SmallIcon(icon));
- QListBoxItem *avItem = actionSelector->availableListBox()->findItem(text, Qt::ExactMatch);
+ TQListBoxItem *avItem = actionSelector->availableListBox()->findItem(text, Qt::ExactMatch);
if(avItem){
delete avItem;
}
@@ -254,17 +254,17 @@ ConfigDialog::~ConfigDialog()
void ConfigDialog::accept()
{
- QStringList groups = config->groupList();
- for(QStringList::Iterator it = groups.begin(); it != groups.end(); ++it){
+ TQStringList groups = config->groupList();
+ for(TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it){
if((*it).startsWith("Link_")){
config->deleteGroup(*it);
}
}
- QStringList links;
- QPtrDictIterator<LinkEntry> it(linkList);
+ TQStringList links;
+ TQPtrDictIterator<LinkEntry> it(linkList);
- QListViewItem *item = link_list->firstChild();
+ TQListViewItem *item = link_list->firstChild();
while(item) {
LinkEntry *entry = linkList[item];
config->setGroup("Link_" + entry->name);
@@ -277,8 +277,8 @@ void ConfigDialog::accept()
item = item->nextSibling();
}
- QStringList actions;
- QListBox *box = actionSelector->selectedListBox();
+ TQStringList actions;
+ TQListBox *box = actionSelector->selectedListBox();
for(int i = 0; i < box->numRows(); i++){
ActionListItem *item = static_cast<ActionListItem*>(box->item(i));
@@ -301,65 +301,65 @@ void ConfigDialog::accept()
config->sync();
- QDialog::accept();
+ TQDialog::accept();
}
void ConfigDialog::createLink()
{
- QDialog *main = new QDialog(this);
+ TQDialog *main = new TQDialog(this);
main->setCaption(i18n("Create Link"));
main->setIcon(SmallIcon("metabar"));
KPushButton *ok = new KPushButton(KStdGuiItem::ok(), main);
- connect(ok, SIGNAL(clicked()), main, SLOT(accept()));
+ connect(ok, TQT_SIGNAL(clicked()), main, TQT_SLOT(accept()));
KPushButton *cancel = new KPushButton(KStdGuiItem::cancel(), main);
- connect(cancel, SIGNAL(clicked()), main, SLOT(reject()));
+ connect(cancel, TQT_SIGNAL(clicked()), main, TQT_SLOT(reject()));
- QLineEdit *name = new QLineEdit(i18n("New link"), main);
- QLineEdit *url = new QLineEdit("file:/", main);
+ TQLineEdit *name = new TQLineEdit(i18n("New link"), main);
+ TQLineEdit *url = new TQLineEdit("file:/", main);
KIconButton *icon = new KIconButton(main);
- icon->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ icon->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
icon->setIconType(KIcon::Small, KIcon::Any);
icon->setStrictIconSize(true);
icon->setIcon("folder");
- QHBoxLayout *bottom_layout = new QHBoxLayout(0, 0, 5);
- bottom_layout->addItem(new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ TQHBoxLayout *bottom_layout = new TQHBoxLayout(0, 0, 5);
+ bottom_layout->addItem(new TQSpacerItem(10, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
bottom_layout->addWidget(ok);
bottom_layout->addWidget(cancel);
- QGridLayout *layout = new QGridLayout(0, 2, 3, 0, 5);
+ TQGridLayout *layout = new TQGridLayout(0, 2, 3, 0, 5);
layout->addMultiCellWidget(icon, 0, 1, 0, 0);
- layout->addWidget(new QLabel(i18n("Name:"), main), 0, 1);
+ layout->addWidget(new TQLabel(i18n("Name:"), main), 0, 1);
layout->addWidget(name, 0, 2);
- layout->addWidget(new QLabel(i18n("URL:"), main), 1, 1);
+ layout->addWidget(new TQLabel(i18n("URL:"), main), 1, 1);
layout->addWidget(url, 1, 2);
- QVBoxLayout *main_layout = new QVBoxLayout(main, 5, 5);
+ TQVBoxLayout *main_layout = new TQVBoxLayout(main, 5, 5);
main_layout->addLayout(layout);
- main_layout->addItem(new QSpacerItem(10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ main_layout->addItem(new TQSpacerItem(10, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
main_layout->addLayout(bottom_layout);
main->resize(300, main->sizeHint().height());
- if(main->exec() == QDialog::Accepted){
- QString name_str = name->text();
- QString url_str = url->text();
- QString icon_str = icon->icon();
+ if(main->exec() == TQDialog::Accepted){
+ TQString name_str = name->text();
+ TQString url_str = url->text();
+ TQString icon_str = icon->icon();
if(!name_str.isEmpty() && !url_str.isEmpty()){
if(icon_str.isEmpty()){
icon_str = kapp->iconLoader()->iconPath("folder", KIcon::Small);
}
- QPixmap icon(icon_str);
+ TQPixmap icon(icon_str);
if(icon.isNull()){
icon = SmallIcon(icon_str);
}
- QListViewItem *item = new QListViewItem(link_list, link_list->lastItem(), name_str, url_str);
+ TQListViewItem *item = new TQListViewItem(link_list, link_list->lastItem(), name_str, url_str);
item->setPixmap(0, icon);
linkList.insert(item, new LinkEntry(name_str, url_str, icon_str));
@@ -372,7 +372,7 @@ void ConfigDialog::createLink()
void ConfigDialog::deleteLink()
{
- QListViewItem *item = link_list->selectedItem();
+ TQListViewItem *item = link_list->selectedItem();
if(item){
linkList.remove(item);
delete item;
@@ -382,62 +382,62 @@ void ConfigDialog::deleteLink()
void ConfigDialog::editLink()
{
- QListViewItem *item = link_list->selectedItem();
+ TQListViewItem *item = link_list->selectedItem();
editLink(item);
}
-void ConfigDialog::editLink(QListViewItem *item)
+void ConfigDialog::editLink(TQListViewItem *item)
{
if(item){
- QDialog *main = new QDialog(this);
+ TQDialog *main = new TQDialog(this);
main->setCaption(i18n("Edit Link"));
main->setIcon(SmallIcon("metabar"));
KPushButton *ok = new KPushButton(KStdGuiItem::ok(), main);
- connect(ok, SIGNAL(clicked()), main, SLOT(accept()));
+ connect(ok, TQT_SIGNAL(clicked()), main, TQT_SLOT(accept()));
KPushButton *cancel = new KPushButton(KStdGuiItem::cancel(), main);
- connect(cancel, SIGNAL(clicked()), main, SLOT(reject()));
+ connect(cancel, TQT_SIGNAL(clicked()), main, TQT_SLOT(reject()));
- QLineEdit *name = new QLineEdit(linkList[item]->name, main);
- QLineEdit *url = new QLineEdit(linkList[item]->url, main);
+ TQLineEdit *name = new TQLineEdit(linkList[item]->name, main);
+ TQLineEdit *url = new TQLineEdit(linkList[item]->url, main);
KIconButton *icon = new KIconButton(main);
- icon->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ icon->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
icon->setIconType(KIcon::Small, KIcon::Any);
icon->setStrictIconSize(true);
icon->setIcon(linkList[item]->icon);
- QHBoxLayout *bottom_layout = new QHBoxLayout(0, 0, 5);
- bottom_layout->addItem(new QSpacerItem(10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ TQHBoxLayout *bottom_layout = new TQHBoxLayout(0, 0, 5);
+ bottom_layout->addItem(new TQSpacerItem(10, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
bottom_layout->addWidget(ok);
bottom_layout->addWidget(cancel);
- QGridLayout *layout = new QGridLayout(0, 2, 3, 0, 5);
+ TQGridLayout *layout = new TQGridLayout(0, 2, 3, 0, 5);
layout->addMultiCellWidget(icon, 0, 1, 0, 0);
- layout->addWidget(new QLabel(i18n("Name:"), main), 0, 1);
+ layout->addWidget(new TQLabel(i18n("Name:"), main), 0, 1);
layout->addWidget(name, 0, 2);
- layout->addWidget(new QLabel(i18n("URL:"), main), 1, 1);
+ layout->addWidget(new TQLabel(i18n("URL:"), main), 1, 1);
layout->addWidget(url, 1, 2);
- QVBoxLayout *main_layout = new QVBoxLayout(main, 5, 5);
+ TQVBoxLayout *main_layout = new TQVBoxLayout(main, 5, 5);
main_layout->addLayout(layout);
- main_layout->addItem(new QSpacerItem(10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding));
+ main_layout->addItem(new TQSpacerItem(10, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding));
main_layout->addLayout(bottom_layout);
main->resize(300, main->sizeHint().height());
- if(main->exec() == QDialog::Accepted){
- QString name_str = name->text();
- QString url_str = url->text();
- QString icon_str = icon->icon();
+ if(main->exec() == TQDialog::Accepted){
+ TQString name_str = name->text();
+ TQString url_str = url->text();
+ TQString icon_str = icon->icon();
if(!name_str.isEmpty() && !url_str.isEmpty()){
if(icon_str.isEmpty()){
icon_str = kapp->iconLoader()->iconPath("folder", KIcon::Small);
}
- QPixmap icon(icon_str);
+ TQPixmap icon(icon_str);
if(icon.isNull()){
icon = SmallIcon(icon_str);
}
@@ -458,21 +458,21 @@ void ConfigDialog::editLink(QListViewItem *item)
void ConfigDialog::moveLinkUp()
{
- QListViewItem *item = link_list->selectedItem();
+ TQListViewItem *item = link_list->selectedItem();
if(item){
if(link_list->itemIndex(item) > 0){
- QListViewItem *after;
- QListViewItem *above = item->itemAbove();
+ TQListViewItem *after;
+ TQListViewItem *above = item->itemAbove();
if(above){
after = above->itemAbove();
}
- QString name = linkList[item]->name;
- QString url = linkList[item]->url;
- QString icon_str = linkList[item]->icon;
+ TQString name = linkList[item]->name;
+ TQString url = linkList[item]->url;
+ TQString icon_str = linkList[item]->icon;
- QPixmap icon(icon_str);
+ TQPixmap icon(icon_str);
if(icon.isNull()){
icon = SmallIcon(icon_str);
}
@@ -481,7 +481,7 @@ void ConfigDialog::moveLinkUp()
linkList.remove(item);
delete item;
- QListViewItem *newItem = new QListViewItem(link_list, after, name, url);
+ TQListViewItem *newItem = new TQListViewItem(link_list, after, name, url);
newItem->setPixmap(0, icon);
link_list->setSelected(newItem, TRUE);
@@ -493,17 +493,17 @@ void ConfigDialog::moveLinkUp()
void ConfigDialog::moveLinkDown()
{
- QListViewItem *item = link_list->selectedItem();
+ TQListViewItem *item = link_list->selectedItem();
if(item){
if(link_list->itemIndex(item) < linkList.count() - 1){
- QListViewItem *after = item->itemBelow();
+ TQListViewItem *after = item->itemBelow();
- QString name = linkList[item]->name;
- QString url = linkList[item]->url;
- QString icon_str = linkList[item]->icon;
+ TQString name = linkList[item]->name;
+ TQString url = linkList[item]->url;
+ TQString icon_str = linkList[item]->icon;
- QPixmap icon(icon_str);
+ TQPixmap icon(icon_str);
if(icon.isNull()){
icon = SmallIcon(icon_str);
}
@@ -512,7 +512,7 @@ void ConfigDialog::moveLinkDown()
linkList.remove(item);
delete item;
- QListViewItem *newItem = new QListViewItem(link_list, after, name, url);
+ TQListViewItem *newItem = new TQListViewItem(link_list, after, name, url);
newItem->setPixmap(0, icon);
link_list->setSelected(newItem, TRUE);
@@ -524,29 +524,29 @@ void ConfigDialog::moveLinkDown()
void ConfigDialog::loadAvailableActions()
{
- QListBox *box = actionSelector->availableListBox();
+ TQListBox *box = actionSelector->availableListBox();
- QByteArray data, replyData;
- QCString replyType;
+ TQByteArray data, replyData;
+ TQCString replyType;
if(DCOPClient::mainClient()->call(kapp->dcopClient()->appId(), topWidgetName, "actionMap()", data, replyType, replyData)){
- if(replyType == "QMap<QCString,DCOPRef>"){
- QMap<QCString,DCOPRef> actionMap;
+ if(replyType == "TQMap<TQCString,DCOPRef>"){
+ TQMap<TQCString,DCOPRef> actionMap;
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
reply >> actionMap;
iconConfig->setGroup("Icons");
- QMap<QCString,DCOPRef>::Iterator it;
+ TQMap<TQCString,DCOPRef>::Iterator it;
for(it = actionMap.begin(); it != actionMap.end(); ++it){
DCOPRef action = it.data();
- QString text = action.call("plainText()");
- QCString cname = action.call("name()");
- QString icon = iconConfig->readEntry(QString(cname), action.call("icon()"));
+ TQString text = action.call("plainText()");
+ TQCString cname = action.call("name()");
+ TQString icon = iconConfig->readEntry(TQString(cname), action.call("icon()"));
- ActionListItem *item = new ActionListItem(box, QString(cname), text, SmallIcon(icon));
+ ActionListItem *item = new ActionListItem(box, TQString(cname), text, SmallIcon(icon));
}
}
}
@@ -565,12 +565,12 @@ void ConfigDialog::loadThemes()
{
themes->clear();
- QString theme = config->readEntry("Theme", "default");
+ TQString theme = config->readEntry("Theme", "default");
bool foundTheme = false;
- QStringList dirs = kapp->dirs()->findDirs("data", "metabar/themes");
- for(QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it){
- QStringList theme_list = QDir(*it).entryList(QDir::Dirs);
+ TQStringList dirs = kapp->dirs()->findDirs("data", "metabar/themes");
+ for(TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it){
+ TQStringList theme_list = TQDir(*it).entryList(TQDir::Dirs);
theme_list.remove(".");
theme_list.remove("..");
@@ -591,10 +591,10 @@ void ConfigDialog::loadThemes()
void ConfigDialog::installTheme()
{
- QString file = KFileDialog::getOpenFileName();
+ TQString file = KFileDialog::getOpenFileName();
if(file.isNull() && file.isEmpty()) return;
- QString themedir = locateLocal("data", "metabar/themes");
+ TQString themedir = locateLocal("data", "metabar/themes");
if(themedir.isNull()) return;
KTar archive(file);
diff --git a/konq-plugins/sidebar/metabar/src/configdialog.h b/konq-plugins/sidebar/metabar/src/configdialog.h
index 4153054..94f5fee 100644
--- a/konq-plugins/sidebar/metabar/src/configdialog.h
+++ b/konq-plugins/sidebar/metabar/src/configdialog.h
@@ -20,26 +20,26 @@
#ifndef _CONFIGDIALOG_H_
#define _CONFIGDIALOG_H_
-#include <qdialog.h>
+#include <tqdialog.h>
#include <kpushbutton.h>
#include <klistview.h>
#include <knuminput.h>
#include <kconfig.h>
-#include <qptrdict.h>
-#include <qlistbox.h>
+#include <tqptrdict.h>
+#include <tqlistbox.h>
#include <kactionselector.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
class LinkEntry{
public:
- LinkEntry(QString name, QString url, QString icon);
+ LinkEntry(TQString name, TQString url, TQString icon);
~LinkEntry(){}
- QString name;
- QString url;
- QString icon;
+ TQString name;
+ TQString url;
+ TQString icon;
};
class ConfigDialog : public QDialog
@@ -47,7 +47,7 @@ class ConfigDialog : public QDialog
Q_OBJECT
public:
- ConfigDialog(QWidget *parent = 0, const char *name = 0);
+ ConfigDialog(TQWidget *parent = 0, const char *name = 0);
~ConfigDialog();
protected:
@@ -65,19 +65,19 @@ class ConfigDialog : public QDialog
KIntSpinBox *max_entries;
KIntSpinBox *max_actions;
- QCheckBox *animate;
- QCheckBox *servicemenus;
- QCheckBox *showframe;
+ TQCheckBox *animate;
+ TQCheckBox *servicemenus;
+ TQCheckBox *showframe;
KListView *link_list;
KComboBox *themes;
- QCString topWidgetName;
+ TQCString topWidgetName;
KActionSelector *actionSelector;
- QPtrDict<LinkEntry> linkList;
+ TQPtrDict<LinkEntry> linkList;
KConfig *config;
KConfig *iconConfig;
@@ -87,7 +87,7 @@ class ConfigDialog : public QDialog
void createLink();
void deleteLink();
void editLink();
- void editLink(QListViewItem *item);
+ void editLink(TQListViewItem *item);
void moveLinkUp();
void moveLinkDown();
void updateArrows();
@@ -101,14 +101,14 @@ class ConfigDialog : public QDialog
class ActionListItem : public QListBoxPixmap
{
public:
- ActionListItem(QListBox *listbox, const QString &action, const QString &text, const QPixmap &pixmap);
+ ActionListItem(TQListBox *listbox, const TQString &action, const TQString &text, const TQPixmap &pixmap);
~ActionListItem(){}
- const QString action() { return act; }
- void setAction(const QString act){ ActionListItem::act = act; }
+ const TQString action() { return act; }
+ void setAction(const TQString act){ ActionListItem::act = act; }
private:
- QString act;
+ TQString act;
};
#endif
diff --git a/konq-plugins/sidebar/metabar/src/defaultplugin.cpp b/konq-plugins/sidebar/metabar/src/defaultplugin.cpp
index d6c44c1..6c3982e 100644
--- a/konq-plugins/sidebar/metabar/src/defaultplugin.cpp
+++ b/konq-plugins/sidebar/metabar/src/defaultplugin.cpp
@@ -41,11 +41,11 @@
#include <dcopclient.h>
#include <dcopref.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qrect.h>
-#include <qpoint.h>
-#include <qbuffer.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqrect.h>
+#include <tqpoint.h>
+#include <tqbuffer.h>
#include <dom_string.h>
#include <html_image.h>
@@ -92,26 +92,26 @@ void DefaultPlugin::loadActions(DOM::HTMLElement node)
DOM::DOMString innerHTML;
- QStringList actions = config.readListEntry("Actions");
+ TQStringList actions = config.readListEntry("Actions");
int maxActions = config.readNumEntry("MaxActions", 5);
int actionCount = 0;
- for(QStringList::Iterator it = actions.begin(); it != actions.end(); ++it){
+ for(TQStringList::Iterator it = actions.begin(); it != actions.end(); ++it){
if((*it).startsWith("metabar/")){
if((*it).right((*it).length() - 8) == "share"){
- MetabarWidget::addEntry(innerHTML, i18n("Share"), "action://" + *it, "network", QString::null, actionCount < maxActions ? QString::null : QString("hiddenaction"), actionCount >= maxActions);
+ MetabarWidget::addEntry(innerHTML, i18n("Share"), "action://" + *it, "network", TQString::null, actionCount < maxActions ? TQString::null : TQString("hiddenaction"), actionCount >= maxActions);
actionCount++;
}
}
else{
- DCOPRef action(kapp->dcopClient()->appId(), QCString(m_html->view()->topLevelWidget()->name()).append("/action/").append((*it).utf8()));
+ DCOPRef action(kapp->dcopClient()->appId(), TQCString(m_html->view()->topLevelWidget()->name()).append("/action/").append((*it).utf8()));
if(!action.isNull()){
if(action.call("enabled()")){
- QString text = action.call("plainText()");
- QString icon = iconConfig.readEntry(*it, action.call("icon()"));
+ TQString text = action.call("plainText()");
+ TQString icon = iconConfig.readEntry(*it, action.call("icon()"));
- MetabarWidget::addEntry(innerHTML, text, "action://" + *it, icon, QString::null, actionCount < maxActions ? QString::null : QString("hiddenaction"), actionCount >= maxActions);
+ MetabarWidget::addEntry(innerHTML, text, "action://" + *it, icon, TQString::null, actionCount < maxActions ? TQString::null : TQString("hiddenaction"), actionCount >= maxActions);
actionCount++;
}
}
@@ -142,7 +142,7 @@ void DefaultPlugin::loadApplications(DOM::HTMLElement node)
KFileItem *item = m_items.getFirst();
KURL url = item->url();
- QDir dir(url.path());
+ TQDir dir(url.path());
dir = dir.canonicalPath();
if(item->isDir() || dir.isRoot()){
@@ -180,11 +180,11 @@ void DefaultPlugin::loadApplications(DOM::HTMLElement node)
KTrader::OfferList::ConstIterator it = offers.begin();
for(; it != offers.end(); it++){
- QString nam;
+ TQString nam;
nam.setNum(id);
bool hide = id >= max;
- MetabarWidget::addEntry(innerHTML, (*it)->name(), "exec://" + nam, (*it)->icon(), QString::null, hide ? QString("hiddenapp") : QString::null, hide);
+ MetabarWidget::addEntry(innerHTML, (*it)->name(), "exec://" + nam, (*it)->icon(), TQString::null, hide ? TQString("hiddenapp") : TQString::null, hide);
runMap.insert(id, *it);
id++;
@@ -241,21 +241,21 @@ void DefaultPlugin::loadInformation(DOM::HTMLElement node)
if(!item->isDir()){
const KFileMetaInfo &metaInfo = item->metaInfo();
if(metaInfo.isValid()){
- QStringList groups = metaInfo.supportedGroups();
+ TQStringList groups = metaInfo.supportedGroups();
int id = 0;
- QString nam;
+ TQString nam;
- for(QStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it){
+ for(TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it){
KFileMetaInfoGroup group = metaInfo.group(*it);
if(group.isValid()){
nam.setNum(id);
innerHTML += "<ul class=\"info\"><a class=\"infotitle\" id=\"info_" + nam + "\" href=\"more://info_" + nam + "\">" + group.translatedName() + "</a></ul>";
- QStringList keys = group.supportedKeys();
+ TQStringList keys = group.supportedKeys();
- for(QStringList::ConstIterator it = keys.begin(); it != keys.end(); ++it){
+ for(TQStringList::ConstIterator it = keys.begin(); it != keys.end(); ++it){
const KFileMetaInfoItem metaInfoItem = group.item(*it);
if(metaInfoItem.isValid()){
@@ -294,11 +294,11 @@ void DefaultPlugin::loadInformation(DOM::HTMLElement node)
innerHTML += "<ul class=\"info\"><b>" + i18n("Size") + ": </b>";
innerHTML += KIO::convertSize(size);
innerHTML += "</ul><ul class=\"info\"><b>" + i18n("Files") + ": </b>";
- innerHTML += QString().setNum(files);
+ innerHTML += TQString().setNum(files);
innerHTML += "</ul><ul class=\"info\"><b>" + i18n("Folders") + ": </b>";
- innerHTML += QString().setNum(dirs);
+ innerHTML += TQString().setNum(dirs);
innerHTML += "</ul><ul class=\"info\"><b>" + i18n("Total Entries") + ": </b>";
- innerHTML += QString().setNum(m_items.count());
+ innerHTML += TQString().setNum(m_items.count());
innerHTML += "</ul>";
node.setInnerHTML(innerHTML);
}
@@ -311,7 +311,7 @@ void DefaultPlugin::loadPreview(DOM::HTMLElement node)
KFileItem *item = m_items.getFirst();
KURL url = item->url();
- QDir dir(url.path());
+ TQDir dir(url.path());
dir = dir.canonicalPath();
if(item->isDir() || dir.isRoot()){
@@ -336,9 +336,9 @@ void DefaultPlugin::loadPreview(DOM::HTMLElement node)
preview_job = KIO::filePreview(KURL::List(url), m_html->view()->width() - 30);
- connect(preview_job, SIGNAL(gotPreview(const KFileItem*, const QPixmap&)), this, SLOT(slotSetPreview(const KFileItem*, const QPixmap&)));
- connect(preview_job, SIGNAL(failed(const KFileItem *)), this, SLOT(slotPreviewFailed(const KFileItem *)));
- connect(preview_job, SIGNAL(result(KIO::Job *)), this, SLOT(slotJobFinished(KIO::Job *)));
+ connect(preview_job, TQT_SIGNAL(gotPreview(const KFileItem*, const TQPixmap&)), this, TQT_SLOT(slotSetPreview(const KFileItem*, const TQPixmap&)));
+ connect(preview_job, TQT_SIGNAL(failed(const KFileItem *)), this, TQT_SLOT(slotPreviewFailed(const KFileItem *)));
+ connect(preview_job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotJobFinished(KIO::Job *)));
}
m_functions->show("preview");
@@ -354,22 +354,22 @@ void DefaultPlugin::loadBookmarks(DOM::HTMLElement node)
m_functions->hide("bookmarks");
}
-void DefaultPlugin::slotSetPreview(const KFileItem *item, const QPixmap &pix)
+void DefaultPlugin::slotSetPreview(const KFileItem *item, const TQPixmap &pix)
{
DOM::HTMLDocument doc = m_html->htmlDocument();
DOM::HTMLElement node = doc.getElementById("preview");
- QByteArray data;
- QBuffer buffer(data);
+ TQByteArray data;
+ TQBuffer buffer(data);
buffer.open(IO_WriteOnly);
pix.save(&buffer, "PNG");
- QString src = QString::fromLatin1("data:image/png;base64,%1").arg(KCodecs::base64Encode(data));
+ TQString src = TQString::fromLatin1("data:image/png;base64,%1").arg(KCodecs::base64Encode(data));
bool media = item->mimetype().startsWith("video/");
DOM::DOMString innerHTML;
- innerHTML += QString("<ul style=\"height: %1px\"><a class=\"preview\"").arg(pix.height() + 15);
+ innerHTML += TQString("<ul style=\"height: %1px\"><a class=\"preview\"").arg(pix.height() + 15);
if(media){
innerHTML += " href=\"preview:///\"";
@@ -377,9 +377,9 @@ void DefaultPlugin::slotSetPreview(const KFileItem *item, const QPixmap &pix)
innerHTML +="><img id=\"previewimage\" src=\"";
innerHTML += src;
innerHTML += "\" width=\"";
- innerHTML += QString().setNum(pix.width());
+ innerHTML += TQString().setNum(pix.width());
innerHTML += "\" height=\"";
- innerHTML += QString().setNum(pix.height());
+ innerHTML += TQString().setNum(pix.height());
innerHTML += "\" /></a></ul>";
if(media){
@@ -413,12 +413,12 @@ void DefaultPlugin::slotJobFinished(KIO::Job *job)
bool DefaultPlugin::handleRequest(const KURL &url)
{
- QString protocol = url.protocol();
+ TQString protocol = url.protocol();
if(protocol == "exec"){
int id = url.host().toInt();
- QMap<int,KService::Ptr>::Iterator it = runMap.find(id);
+ TQMap<int,KService::Ptr>::Iterator it = runMap.find(id);
if(it != runMap.end()){
KFileItem *item = m_items.getFirst();
@@ -430,21 +430,21 @@ bool DefaultPlugin::handleRequest(const KURL &url)
}
else if(protocol == "service"){
- QString name = url.url().right(url.url().length() - 10);
+ TQString name = url.url().right(url.url().length() - 10);
services->runAction(name);
return true;
}
else if(protocol == "servicepopup"){
- QString id = url.host();
+ TQString id = url.host();
DOM::HTMLDocument doc = m_html->htmlDocument();
DOM::HTMLElement node = static_cast<DOM::HTMLElement>(doc.getElementById("popup" + id));
if(!node.isNull()){
- QRect rect = node.getRect();
- QPoint p = m_html->view()->mapToGlobal(rect.bottomLeft());
+ TQRect rect = node.getRect();
+ TQPoint p = m_html->view()->mapToGlobal(rect.bottomLeft());
services->showPopup(id, p);
}
diff --git a/konq-plugins/sidebar/metabar/src/defaultplugin.h b/konq-plugins/sidebar/metabar/src/defaultplugin.h
index 36b0060..319d771 100644
--- a/konq-plugins/sidebar/metabar/src/defaultplugin.h
+++ b/konq-plugins/sidebar/metabar/src/defaultplugin.h
@@ -26,8 +26,8 @@
#include <kio/previewjob.h>
-#include <qdict.h>
-#include <qmap.h>
+#include <tqdict.h>
+#include <tqmap.h>
class DefaultPlugin : public ProtocolPlugin
{
@@ -50,13 +50,13 @@ class DefaultPlugin : public ProtocolPlugin
void loadBookmarks(DOM::HTMLElement node);
private:
- QMap<int,KService::Ptr> runMap;
+ TQMap<int,KService::Ptr> runMap;
KIO::PreviewJob *preview_job;
ServiceLoader *services;
private slots:
- void slotSetPreview(const KFileItem*, const QPixmap&);
+ void slotSetPreview(const KFileItem*, const TQPixmap&);
void slotPreviewFailed(const KFileItem *item);
void slotJobFinished(KIO::Job *item);
};
diff --git a/konq-plugins/sidebar/metabar/src/httpplugin.cpp b/konq-plugins/sidebar/metabar/src/httpplugin.cpp
index d4b772b..bbfb9e2 100644
--- a/konq-plugins/sidebar/metabar/src/httpplugin.cpp
+++ b/konq-plugins/sidebar/metabar/src/httpplugin.cpp
@@ -32,8 +32,8 @@
#include <dcopref.h>
#include <dcopclient.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <dom_node.h>
#include <html_inline.h>
@@ -100,8 +100,8 @@ void HTTPPlugin::loadBookmarks(DOM::HTMLElement node)
bool HTTPPlugin::handleRequest(const KURL &url)
{
if(url.protocol() == "find"){
- QString keyword = url.queryItem("find");
- QString type = url.queryItem("type");
+ TQString keyword = url.queryItem("find");
+ TQString type = url.queryItem("type");
if(!keyword.isNull() && !keyword.isEmpty()){
KURL url("http://www.google.com/search");
diff --git a/konq-plugins/sidebar/metabar/src/metabar.cpp b/konq-plugins/sidebar/metabar/src/metabar.cpp
index 8181a11..6a020f0 100644
--- a/konq-plugins/sidebar/metabar/src/metabar.cpp
+++ b/konq-plugins/sidebar/metabar/src/metabar.cpp
@@ -1,5 +1,5 @@
#include <kinstance.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kimageio.h>
#include <klocale.h>
@@ -7,7 +7,7 @@
#include "metabar.h"
#include "metabar.moc"
-Metabar::Metabar(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name):
+Metabar::Metabar(KInstance *inst,TQObject *parent,TQWidget *widgetParent, TQString &desktopName, const char* name):
KonqSidebarPlugin(inst,parent,widgetParent,desktopName,name)
{
KImageIO::registerFormats();
@@ -37,7 +37,7 @@ void Metabar::handlePreview(const KFileItemList &items)
extern "C" {
- bool add_konqsidebar_metabar(QString* fn, QString* param, QMap<QString,QString> *map) {
+ bool add_konqsidebar_metabar(TQString* fn, TQString* param, TQMap<TQString,TQString> *map) {
Q_UNUSED(param);
map->insert("Type", "Link");
@@ -52,7 +52,7 @@ extern "C" {
extern "C"
{
- void* create_konqsidebar_metabar(KInstance *instance,QObject *par,QWidget *widp,QString &desktopname,const char *name)
+ void* create_konqsidebar_metabar(KInstance *instance,TQObject *par,TQWidget *widp,TQString &desktopname,const char *name)
{
return new Metabar(instance,par,widp,desktopname,name);
}
diff --git a/konq-plugins/sidebar/metabar/src/metabar.h b/konq-plugins/sidebar/metabar/src/metabar.h
index 6d43592..d4bb63f 100644
--- a/konq-plugins/sidebar/metabar/src/metabar.h
+++ b/konq-plugins/sidebar/metabar/src/metabar.h
@@ -6,7 +6,7 @@
#endif
#include <konqsidebarplugin.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kconfig.h>
@@ -15,11 +15,11 @@ class Metabar : public KonqSidebarPlugin
Q_OBJECT
public:
- Metabar(KInstance *inst,QObject *parent,QWidget *widgetParent, QString &desktopName, const char* name=0);
+ Metabar(KInstance *inst,TQObject *parent,TQWidget *widgetParent, TQString &desktopName, const char* name=0);
~Metabar();
- virtual QWidget *getWidget(){ return widget; }
- virtual void *provides(const QString &) { return 0; }
+ virtual TQWidget *getWidget(){ return widget; }
+ virtual void *provides(const TQString &) { return 0; }
protected:
MetabarWidget *widget;
diff --git a/konq-plugins/sidebar/metabar/src/metabarfunctions.cpp b/konq-plugins/sidebar/metabar/src/metabarfunctions.cpp
index 8c457de..1aaf9e8 100644
--- a/konq-plugins/sidebar/metabar/src/metabarfunctions.cpp
+++ b/konq-plugins/sidebar/metabar/src/metabarfunctions.cpp
@@ -26,16 +26,16 @@
#include <kconfig.h>
-#include <qrect.h>
+#include <tqrect.h>
#define CSS_PRIORITY "important"
#define RESIZE_SPEED 5
#define RESIZE_STEP 2
-MetabarFunctions::MetabarFunctions(KHTMLPart *html, QObject *parent, const char* name) : QObject(parent, name), m_html(html)
+MetabarFunctions::MetabarFunctions(KHTMLPart *html, TQObject *parent, const char* name) : TQObject(parent, name), m_html(html)
{
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), this, SLOT(animate()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(animate()));
}
MetabarFunctions::~MetabarFunctions()
@@ -47,8 +47,8 @@ MetabarFunctions::~MetabarFunctions()
void MetabarFunctions::handleRequest(const KURL &url)
{
- QString function = url.host();
- QStringList params = QStringList::split(',', url.filename());
+ TQString function = url.host();
+ TQStringList params = TQStringList::split(',', url.filename());
if(function == "toggle"){
if(params.size() == 1){
@@ -106,7 +106,7 @@ void MetabarFunctions::toggle(DOM::DOMString item)
}
}
else{
- style.setProperty("height", QString("%1px").arg(height), CSS_PRIORITY);
+ style.setProperty("height", TQString("%1px").arg(height), CSS_PRIORITY);
}
}
}
@@ -137,7 +137,7 @@ void MetabarFunctions::adjustSize(DOM::DOMString item)
}
}
else{
- style.setProperty("height", QString("%1px").arg(height), CSS_PRIORITY);
+ style.setProperty("height", TQString("%1px").arg(height), CSS_PRIORITY);
}
}
}
@@ -145,9 +145,9 @@ void MetabarFunctions::adjustSize(DOM::DOMString item)
void MetabarFunctions::animate()
{
- QMap<QString, int>::Iterator it;
+ TQMap<TQString, int>::Iterator it;
for(it = resizeMap.begin(); it != resizeMap.end(); ++it ) {
- QString id = it.key();
+ TQString id = it.key();
int height = it.data();
int currentHeight = 0;
@@ -155,7 +155,7 @@ void MetabarFunctions::animate()
DOM::HTMLElement node = static_cast<DOM::HTMLElement>(doc.getElementById(id));
DOM::CSSStyleDeclaration style = node.style();
- QString currentHeightString = style.getPropertyValue("height").string();
+ TQString currentHeightString = style.getPropertyValue("height").string();
if(currentHeightString.endsWith("px")){
currentHeight = currentHeightString.left(currentHeightString.length() - 2).toInt();
}
@@ -176,7 +176,7 @@ void MetabarFunctions::animate()
}
int change = currentHeight < height ? changeValue : -changeValue;
- style.setProperty("height", QString("%1px").arg(currentHeight + change), CSS_PRIORITY);
+ style.setProperty("height", TQString("%1px").arg(currentHeight + change), CSS_PRIORITY);
doc.updateRendering();
}
}
diff --git a/konq-plugins/sidebar/metabar/src/metabarfunctions.h b/konq-plugins/sidebar/metabar/src/metabarfunctions.h
index aa5f110..1ccce3c 100644
--- a/konq-plugins/sidebar/metabar/src/metabarfunctions.h
+++ b/konq-plugins/sidebar/metabar/src/metabarfunctions.h
@@ -23,8 +23,8 @@
#include <dom_string.h>
-#include <qtimer.h>
-#include <qmap.h>
+#include <tqtimer.h>
+#include <tqmap.h>
#include <kurl.h>
#include <khtml_part.h>
@@ -34,7 +34,7 @@ class MetabarFunctions : public QObject
Q_OBJECT
public:
- MetabarFunctions(KHTMLPart *html, QObject *parent = 0, const char* name=0);
+ MetabarFunctions(KHTMLPart *html, TQObject *parent = 0, const char* name=0);
~MetabarFunctions();
void toggle(DOM::DOMString item);
@@ -47,9 +47,9 @@ class MetabarFunctions : public QObject
KHTMLPart *m_html;
private:
- QTimer *timer;
+ TQTimer *timer;
- QMap<QString, int> resizeMap;
+ TQMap<TQString, int> resizeMap;
int getHeight(DOM::HTMLElement &element);
private slots:
diff --git a/konq-plugins/sidebar/metabar/src/metabarwidget.cpp b/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
index 07b010a..bf074e8 100644
--- a/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
+++ b/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
@@ -26,14 +26,14 @@
#include "remoteplugin.h"
#include "httpplugin.h"
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qvaluelist.h>
-#include <qurl.h>
-#include <qbuffer.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqvaluelist.h>
+#include <tqurl.h>
+#include <tqbuffer.h>
#include <khtmlview.h>
#include <kapplication.h>
@@ -73,7 +73,7 @@
#define EVENT_TYPE DOM::DOMString("click")
#define ACTIVATION 1
-MetabarWidget::MetabarWidget(QWidget *parent, const char *name) : QWidget(parent, name)
+MetabarWidget::MetabarWidget(TQWidget *parent, const char *name) : TQWidget(parent, name)
{
skip = false;
loadComplete = false;
@@ -84,9 +84,9 @@ MetabarWidget::MetabarWidget(QWidget *parent, const char *name) : QWidget(parent
config = new KConfig("metabarrc");
dir_watch = new KDirWatch();
- connect(dir_watch, SIGNAL(dirty(const QString&)), this, SLOT(slotUpdateCurrentInfo(const QString&)));
- connect(dir_watch, SIGNAL(created(const QString&)), this, SLOT(slotUpdateCurrentInfo(const QString&)));
- connect(dir_watch, SIGNAL(deleted(const QString&)), this, SLOT(slotDeleteCurrentInfo(const QString&)));
+ connect(dir_watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(slotUpdateCurrentInfo(const TQString&)));
+ connect(dir_watch, TQT_SIGNAL(created(const TQString&)), this, TQT_SLOT(slotUpdateCurrentInfo(const TQString&)));
+ connect(dir_watch, TQT_SIGNAL(deleted(const TQString&)), this, TQT_SLOT(slotDeleteCurrentInfo(const TQString&)));
html = new KHTMLPart(this, "metabarhtmlpart");
html->setJScriptEnabled(true);
@@ -94,12 +94,12 @@ MetabarWidget::MetabarWidget(QWidget *parent, const char *name) : QWidget(parent
html->setCaretVisible(false);
html->setDNDEnabled(false);
html->setJavaEnabled(false);
- html->view()->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ html->view()->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
html->view()->hide();
- connect(html->browserExtension(), SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs & )), this, SLOT(handleURLRequest(const KURL &, const KParts::URLArgs &)));
- connect(html, SIGNAL(completed()), this, SLOT(loadCompleted()));
- connect(html, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(slotShowPopup(const QString&, const QPoint &)));
+ connect(html->browserExtension(), TQT_SIGNAL(openURLRequest( const KURL &, const KParts::URLArgs & )), this, TQT_SLOT(handleURLRequest(const KURL &, const KParts::URLArgs &)));
+ connect(html, TQT_SIGNAL(completed()), this, TQT_SLOT(loadCompleted()));
+ connect(html, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(slotShowPopup(const TQString&, const TQPoint &)));
functions = new MetabarFunctions(html, this);
@@ -114,14 +114,14 @@ MetabarWidget::MetabarWidget(QWidget *parent, const char *name) : QWidget(parent
plugins.insert("http", httpPlugin);
plugins.insert("https", httpPlugin);
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
layout->addWidget(html->view());
popup = new KPopupMenu(0);
- KAction *configAction = new KAction(i18n("Configure %1...").arg("Metabar"), "configure", KShortcut(), this, SLOT(slotShowConfig()), html->actionCollection(), "configure");
+ KAction *configAction = new KAction(i18n("Configure %1...").arg("Metabar"), "configure", KShortcut(), this, TQT_SLOT(slotShowConfig()), html->actionCollection(), "configure");
configAction->plug(popup);
- KAction *reloadAction = new KAction(i18n("Reload Theme"), "reload", KShortcut(), this, SLOT(setTheme()), html->actionCollection(), "reload");
+ KAction *reloadAction = new KAction(i18n("Reload Theme"), "reload", KShortcut(), this, TQT_SLOT(setTheme()), html->actionCollection(), "reload");
reloadAction->plug(popup);
setTheme();
@@ -197,7 +197,7 @@ void MetabarWidget::setFileItems(const KFileItemList &items, bool check)
currentPlugin->deactivate();
}
- QString protocol = currentItems->getFirst()->url().protocol();
+ TQString protocol = currentItems->getFirst()->url().protocol();
currentPlugin = plugins[protocol];
if(!currentPlugin){
@@ -208,14 +208,14 @@ void MetabarWidget::setFileItems(const KFileItemList &items, bool check)
currentPlugin->setFileItems(*currentItems);
}
-QString MetabarWidget::getCurrentURL()
+TQString MetabarWidget::getCurrentURL()
{
DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
DCOPReply reply = ref.call("currentURL()");
if (reply.isValid()) {
- QString url;
- reply.get(url, "QString");
+ TQString url;
+ reply.get(url, "TQString");
if(!url.isNull() && !url.isEmpty()){
return url;
@@ -224,21 +224,21 @@ QString MetabarWidget::getCurrentURL()
return 0;
}
-void MetabarWidget::openURL(const QString &url)
+void MetabarWidget::openURL(const TQString &url)
{
DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
DCOPReply reply = ref.call("openURL", url);
}
-void MetabarWidget::openTab(const QString &url)
+void MetabarWidget::openTab(const TQString &url)
{
DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
DCOPReply reply = ref.call("newTab", url);
}
-void MetabarWidget::callAction(const QString &action)
+void MetabarWidget::callAction(const TQString &action)
{
- DCOPRef ref(kapp->dcopClient()->appId(), QString(this->topLevelWidget()->name()).append("/action/").append(action).utf8());
+ DCOPRef ref(kapp->dcopClient()->appId(), TQString(this->topLevelWidget()->name()).append("/action/").append(action).utf8());
if(ref.call("enabled()")){
ref.call("activate()");
}
@@ -247,7 +247,7 @@ void MetabarWidget::callAction(const QString &action)
void MetabarWidget::loadLinks()
{
config->setGroup("General");
- QStringList links = config->readListEntry("Links");
+ TQStringList links = config->readListEntry("Links");
if(links.count() == 0){
functions->hide("links");
@@ -261,7 +261,7 @@ void MetabarWidget::loadLinks()
if(!node.isNull()){
DOM::DOMString innerHTML;
- for(QStringList::Iterator it = links.begin(); it != links.end(); ++it){
+ for(TQStringList::Iterator it = links.begin(); it != links.end(); ++it){
config->setGroup("Link_" + (*it));
addEntry(innerHTML, config->readEntry("Name"), config->readEntry("URL"), config->readEntry("Icon", "folder"));
}
@@ -282,14 +282,14 @@ void MetabarWidget::loadCompleted()
DOM::HTMLElement node = static_cast<DOM::HTMLElement>(i18n_a_list.item(i));
if(!node.isNull()){
if(node.hasAttribute("i18n")){
- QString text = node.innerText().string();
+ TQString text = node.innerText().string();
node.setInnerText(DOM::DOMString(i18n(text.utf8().data())));
}
if(node.hasAttribute("image")){
- QString icon = node.getAttribute("image").string();
- QString url = getIconPath(icon);
- QString style = QString("background-image: url(%1);").arg(url);
+ TQString icon = node.getAttribute("image").string();
+ TQString url = getIconPath(icon);
+ TQString style = TQString("background-image: url(%1);").arg(url);
node.setAttribute("style", style);
}
@@ -301,22 +301,22 @@ void MetabarWidget::loadCompleted()
DOM::HTMLElement node = static_cast<DOM::HTMLElement>(i18n_ul_list.item(i));
if(!node.isNull()){
if(node.hasAttribute("i18n")){
- QString text = node.innerText().string();
+ TQString text = node.innerText().string();
node.setInnerText(DOM::DOMString(i18n(text.utf8().data())));
}
}
}
config->setGroup("General");
- QString file = locate("data", QString("metabar/themes/%1/default.css").arg(config->readEntry("Theme", "default")));
+ TQString file = locate("data", TQString("metabar/themes/%1/default.css").arg(config->readEntry("Theme", "default")));
if(file.isNull()){
- file = locate("data", QString("metabar/themes/default/default.css"));
+ file = locate("data", TQString("metabar/themes/default/default.css"));
}
- QFile cssfile(file);
+ TQFile cssfile(file);
if(cssfile.open(IO_ReadOnly)){
- QTextStream stream( &cssfile );
- QString tmp = stream.read();
+ TQTextStream stream( &cssfile );
+ TQString tmp = stream.read();
cssfile.close();
tmp.replace("./", KURL::fromPathOrURL(file).directory(false));
@@ -324,14 +324,14 @@ void MetabarWidget::loadCompleted()
}
loadComplete = true;
- html->view()->setFrameShape(config->readBoolEntry("ShowFrame", true) ? QFrame::StyledPanel : QFrame::NoFrame);
+ html->view()->setFrameShape(config->readBoolEntry("ShowFrame", true) ? TQFrame::StyledPanel : TQFrame::NoFrame);
html->view()->show();
if(currentItems && !currentItems->isEmpty()){
setFileItems(*currentItems, false);
}
else{
- QString url = getCurrentURL();
+ TQString url = getCurrentURL();
KFileItem *item = new KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL(url), true);
KFileItemList list;
list.append(item);
@@ -347,14 +347,14 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
return;
}
- QString protocol = url.protocol();
+ TQString protocol = url.protocol();
if(currentPlugin->handleRequest(url)){
return;
}
if(protocol == "desktop"){
- QString path = url.path();
+ TQString path = url.path();
if(KDesktopFile::isDesktopFile(path)){
KRun::run(new KDesktopFile(path, true), KURL::List());
@@ -362,15 +362,15 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
}
else if(protocol == "kcmshell"){
- QString module = url.path().remove('/');
+ TQString module = url.path().remove('/');
KRun::runCommand("kcmshell " + module);
}
else if(protocol == "action"){
- QString action = url.url().right(url.url().length() - 9);
+ TQString action = url.url().right(url.url().length() - 9);
if(action.startsWith("metabar/")){
- QString newact = action.right(action.length() - 8);
+ TQString newact = action.right(action.length() - 8);
if(newact == "share"){
slotShowSharingDialog();
@@ -393,15 +393,15 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
skip = true; //needed to prevent some weired reload
DOM::DOMString innerHTML;
- innerHTML += QString("<ul style=\"width: %1px; height: %1px\">").arg(image.width(), image.height());
+ innerHTML += TQString("<ul style=\"width: %1px; height: %1px\">").arg(image.width(), image.height());
innerHTML += "<object class=\"preview\" type=\"";
innerHTML += item->mimetype();
innerHTML += "\" data=\"";
innerHTML += item->url().url();
innerHTML += "\" width=\"";
- innerHTML += QString().setNum(image.width());
+ innerHTML += TQString().setNum(image.width());
innerHTML += "\" height=\"";
- innerHTML += QString().setNum(image.height());
+ innerHTML += TQString().setNum(image.height());
innerHTML += "\" /></ul>";
node.setInnerHTML(innerHTML);
}
@@ -409,7 +409,7 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
}
else if(protocol == "more"){
- QString name = url.host();
+ TQString name = url.host();
DOM::HTMLDocument doc = html->htmlDocument();
DOM::NodeList list = doc.getElementsByName(name);
@@ -431,7 +431,7 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
}
if(element.id().string().startsWith("hidden")){
- QString style = QString("background-image: url(%1);").arg(getIconPath(showMore ? "1downarrow" : "1uparrow"));
+ TQString style = TQString("background-image: url(%1);").arg(getIconPath(showMore ? "1downarrow" : "1uparrow"));
element.setInnerText( showMore ? i18n("More") : i18n("Less") );
element.setAttribute("style", style);
}
@@ -466,16 +466,16 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
}
}
-QString MetabarWidget::getIconPath(const QString &name)
+TQString MetabarWidget::getIconPath(const TQString &name)
{
- QPixmap icon = SmallIcon(name);
+ TQPixmap icon = SmallIcon(name);
- QByteArray data;
- QBuffer buffer(data);
+ TQByteArray data;
+ TQBuffer buffer(data);
buffer.open(IO_WriteOnly);
icon.save(&buffer, "PNG");
- return QString::fromLatin1("data:image/png;base64,%1").arg(KCodecs::base64Encode(data));
+ return TQString::fromLatin1("data:image/png;base64,%1").arg(KCodecs::base64Encode(data));
}
void MetabarWidget::slotShowSharingDialog()
@@ -489,7 +489,7 @@ void MetabarWidget::slotShowSharingDialog()
void MetabarWidget::slotShowConfig()
{
ConfigDialog *config_dialog = new ConfigDialog(this);
- if(config_dialog->exec() == QDialog::Accepted){
+ if(config_dialog->exec() == TQDialog::Accepted){
config->reparseConfiguration();
setFileItems(*currentItems, false);
@@ -497,18 +497,18 @@ void MetabarWidget::slotShowConfig()
setTheme();
- html->view()->setFrameShape(config->readBoolEntry("ShowFrame", true) ? QFrame::StyledPanel : QFrame::NoFrame);
+ html->view()->setFrameShape(config->readBoolEntry("ShowFrame", true) ? TQFrame::StyledPanel : TQFrame::NoFrame);
}
delete config_dialog;
}
-void MetabarWidget::slotShowPopup(const QString &url, const QPoint &point)
+void MetabarWidget::slotShowPopup(const TQString &url, const TQPoint &point)
{
popup->exec(point);
}
-void MetabarWidget::slotUpdateCurrentInfo(const QString &path)
+void MetabarWidget::slotUpdateCurrentInfo(const TQString &path)
{
if(currentItems){
KFileItem *item = new KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL(path), true);
@@ -522,10 +522,10 @@ void MetabarWidget::slotUpdateCurrentInfo(const QString &path)
}
}
-void MetabarWidget::slotDeleteCurrentInfo(const QString&)
+void MetabarWidget::slotDeleteCurrentInfo(const TQString&)
{
if(currentItems && currentItems->count() == 1){
- QString url = getCurrentURL();
+ TQString url = getCurrentURL();
KURL currentURL;
if(currentItems){
@@ -548,7 +548,7 @@ void MetabarWidget::slotDeleteCurrentInfo(const QString&)
}
}
-void MetabarWidget::addEntry(DOM::DOMString &html, const QString name, const QString url, const QString icon, const QString id, const QString nameatt, bool hidden)
+void MetabarWidget::addEntry(DOM::DOMString &html, const TQString name, const TQString url, const TQString icon, const TQString id, const TQString nameatt, bool hidden)
{
html += "<ul";
@@ -584,7 +584,7 @@ void MetabarWidget::setTheme()
loadComplete = false;
config->setGroup("General");
- QString file = locate("data", QString("metabar/themes/%1/layout.html").arg(config->readEntry("Theme", "default")));
+ TQString file = locate("data", TQString("metabar/themes/%1/layout.html").arg(config->readEntry("Theme", "default")));
html->openURL(KURL(file));
}
diff --git a/konq-plugins/sidebar/metabar/src/metabarwidget.h b/konq-plugins/sidebar/metabar/src/metabarwidget.h
index abd901d..e88a003 100644
--- a/konq-plugins/sidebar/metabar/src/metabarwidget.h
+++ b/konq-plugins/sidebar/metabar/src/metabarwidget.h
@@ -30,7 +30,7 @@
#include <kpopupmenu.h>
#include <kdirwatch.h>
-#include <qmap.h>
+#include <tqmap.h>
#include "protocolplugin.h"
#include "metabarfunctions.h"
@@ -40,13 +40,13 @@ class MetabarWidget : public QWidget
Q_OBJECT
public:
- MetabarWidget(QWidget *parent = 0, const char* name=0);
+ MetabarWidget(TQWidget *parent = 0, const char* name=0);
~MetabarWidget();
void setFileItems(const KFileItemList &items, bool check = true);
- static QString getIconPath(const QString &name);
- static void addEntry(DOM::DOMString &html, const QString name, const QString url, const QString icon, const QString id = QString::null, const QString nameatt = QString::null, bool hidden = false);
+ static TQString getIconPath(const TQString &name);
+ static void addEntry(DOM::DOMString &html, const TQString name, const TQString url, const TQString icon, const TQString id = TQString::null, const TQString nameatt = TQString::null, bool hidden = false);
private:
KFileItemList *currentItems;
@@ -62,26 +62,26 @@ class MetabarWidget : public QWidget
KDirWatch *dir_watch;
KPopupMenu *popup;
- QDict<ProtocolPlugin> plugins;
+ TQDict<ProtocolPlugin> plugins;
bool skip;
bool loadComplete;
- void callAction(const QString &action);
- void openURL(const QString &url);
- void openTab(const QString &url);
+ void callAction(const TQString &action);
+ void openURL(const TQString &url);
+ void openTab(const TQString &url);
void loadLinks();
- QString getCurrentURL();
+ TQString getCurrentURL();
private slots:
void loadCompleted();
void slotShowSharingDialog();
void slotShowConfig();
- void slotShowPopup(const QString &url, const QPoint &pos);
+ void slotShowPopup(const TQString &url, const TQPoint &pos);
void handleURLRequest(const KURL &url, const KParts::URLArgs &args);
- void slotUpdateCurrentInfo(const QString &path);
- void slotDeleteCurrentInfo(const QString &path);
+ void slotUpdateCurrentInfo(const TQString &path);
+ void slotDeleteCurrentInfo(const TQString &path);
void setTheme();
};
diff --git a/konq-plugins/sidebar/metabar/src/protocolplugin.cpp b/konq-plugins/sidebar/metabar/src/protocolplugin.cpp
index ad8f2e5..99f5b31 100644
--- a/konq-plugins/sidebar/metabar/src/protocolplugin.cpp
+++ b/konq-plugins/sidebar/metabar/src/protocolplugin.cpp
@@ -20,7 +20,7 @@
#include "protocolplugin.h"
-#include <qbuffer.h>
+#include <tqbuffer.h>
#include <kimageio.h>
#include <kmdcodec.h>
@@ -32,7 +32,7 @@
ProtocolPlugin* ProtocolPlugin::activePlugin = 0;
-ProtocolPlugin::ProtocolPlugin(KHTMLPart *html, MetabarFunctions *functions, const char* name) : QObject(html, name), m_html(html), m_functions(functions)
+ProtocolPlugin::ProtocolPlugin(KHTMLPart *html, MetabarFunctions *functions, const char* name) : TQObject(html, name), m_html(html), m_functions(functions)
{
}
@@ -59,7 +59,7 @@ void ProtocolPlugin::setFileItems(const KFileItemList &items)
DOM::HTMLElement size = doc.getElementById("size");
if(!icon.isNull()){
- QPixmap pix;
+ TQPixmap pix;
if(m_items.count() == 1){
pix = m_items.getFirst()->pixmap(KIcon::SizeLarge);
}
@@ -67,11 +67,11 @@ void ProtocolPlugin::setFileItems(const KFileItemList &items)
pix = DesktopIcon("kmultiple", KIcon::SizeLarge);
}
- QByteArray data;
- QBuffer buffer(data);
+ TQByteArray data;
+ TQBuffer buffer(data);
buffer.open(IO_WriteOnly);
pix.save(&buffer, "PNG");
- QString icondata = QString::fromLatin1("data:image/png;base64,%1").arg(KCodecs::base64Encode(data));
+ TQString icondata = TQString::fromLatin1("data:image/png;base64,%1").arg(KCodecs::base64Encode(data));
icon.setSrc(icondata);
}
diff --git a/konq-plugins/sidebar/metabar/src/serviceloader.cpp b/konq-plugins/sidebar/metabar/src/serviceloader.cpp
index 7e3e60d..1b59527 100644
--- a/konq-plugins/sidebar/metabar/src/serviceloader.cpp
+++ b/konq-plugins/sidebar/metabar/src/serviceloader.cpp
@@ -20,9 +20,9 @@
#include "serviceloader.h"
-#include <qdir.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqdir.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
#include <dcopclient.h>
@@ -37,7 +37,7 @@
#include <kstandarddirs.h>
-ServiceLoader::ServiceLoader(QWidget *parent, const char *name) : QObject(parent, name)
+ServiceLoader::ServiceLoader(TQWidget *parent, const char *name) : TQObject(parent, name)
{
popups.setAutoDelete(true);
}
@@ -51,40 +51,40 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int
popups.clear();
KURL url = item.url();
- QString mimeType = item.mimetype();
- QString mimeGroup = mimeType.left(mimeType.find('/'));
+ TQString mimeType = item.mimetype();
+ TQString mimeGroup = mimeType.left(mimeType.find('/'));
urlList.clear();
urlList.append(url);
- QStringList dirs = KGlobal::dirs()->findDirs( "data", "konqueror/servicemenus/" );
+ TQStringList dirs = KGlobal::dirs()->findDirs( "data", "konqueror/servicemenus/" );
KConfig config("metabarrc", true, false);
config.setGroup("General");
int maxActions = config.readNumEntry("MaxActions");
bool matchAll = false; // config.readBoolEntry("MatchAll");
int id = 0;
- QString idString;
+ TQString idString;
- for(QStringList::Iterator dit = dirs.begin(); dit != dirs.end(); ++dit){
+ for(TQStringList::Iterator dit = dirs.begin(); dit != dirs.end(); ++dit){
idString.setNum(id);
- QDir dir(*dit);
- QStringList entries = dir.entryList("*.desktop", QDir::Files);
+ TQDir dir(*dit);
+ TQStringList entries = dir.entryList("*.desktop", TQDir::Files);
- for(QStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit){
+ for(TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit){
KSimpleConfig cfg( *dit + *eit, true );
cfg.setDesktopGroup();
if(cfg.hasKey("X-KDE-ShowIfRunning" )){
- const QString app = cfg.readEntry( "X-KDE-ShowIfRunning" );
+ const TQString app = cfg.readEntry( "X-KDE-ShowIfRunning" );
if(!kapp->dcopClient()->isApplicationRegistered(app.utf8())){
continue;
}
}
if(cfg.hasKey("X-KDE-Protocol")){
- const QString protocol = cfg.readEntry( "X-KDE-Protocol" );
+ const TQString protocol = cfg.readEntry( "X-KDE-Protocol" );
if(protocol != url.protocol()){
continue;
}
@@ -95,18 +95,18 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int
}
if(cfg.hasKey("X-KDE-Require")){
- const QStringList capabilities = cfg.readListEntry( "X-KDE-Require" );
+ const TQStringList capabilities = cfg.readListEntry( "X-KDE-Require" );
if (capabilities.contains( "Write" )){
continue;
}
}
if ( cfg.hasKey( "Actions" ) && cfg.hasKey( "ServiceTypes" ) ){
- const QStringList types = cfg.readListEntry( "ServiceTypes" );
- const QStringList excludeTypes = cfg.readListEntry( "ExcludeServiceTypes" );
+ const TQStringList types = cfg.readListEntry( "ServiceTypes" );
+ const TQStringList excludeTypes = cfg.readListEntry( "ExcludeServiceTypes" );
bool ok = false;
- for (QStringList::ConstIterator it = types.begin(); it != types.end() && !ok; ++it){
+ for (TQStringList::ConstIterator it = types.begin(); it != types.end() && !ok; ++it){
bool checkTheMimetypes = false;
if(matchAll){
@@ -131,7 +131,7 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int
if(checkTheMimetypes){
ok = true;
- for(QStringList::ConstIterator itex = excludeTypes.begin(); itex != excludeTypes.end(); ++itex){
+ for(TQStringList::ConstIterator itex = excludeTypes.begin(); itex != excludeTypes.end(); ++itex){
if( ((*itex).right(1) == "*" && (*itex).left((*itex).find('/')) == mimeGroup) ||
((*itex) == mimeType))
{
@@ -142,8 +142,8 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int
}
}
if (ok){
- const QString priority = cfg.readEntry("X-KDE-Priority");
- const QString submenuName = cfg.readEntry( "X-KDE-Submenu" );
+ const TQString priority = cfg.readEntry("X-KDE-Priority");
+ const TQString submenuName = cfg.readEntry( "X-KDE-Submenu" );
bool usePopup = false;
KPopupMenu *popup;
@@ -154,7 +154,7 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int
popup = popups[submenuName];
}
else{
- MetabarWidget::addEntry(html, submenuName, "servicepopup://" + idString, "1rightarrow", "popup" + idString, count < maxActions ? QString::null : QString("hiddenaction"), count >= maxActions);
+ MetabarWidget::addEntry(html, submenuName, "servicepopup://" + idString, "1rightarrow", "popup" + idString, count < maxActions ? TQString::null : TQString("hiddenaction"), count >= maxActions);
popup = new KPopupMenu();
popups.insert(idString, popup);
@@ -163,16 +163,16 @@ void ServiceLoader::loadServices(const KFileItem item, DOM::DOMString &html, int
}
}
- QValueList<KDEDesktopMimeType::Service> list = KDEDesktopMimeType::userDefinedServices( *dit + *eit, url.isLocalFile());
+ TQValueList<KDEDesktopMimeType::Service> list = KDEDesktopMimeType::userDefinedServices( *dit + *eit, url.isLocalFile());
- for (QValueList<KDEDesktopMimeType::Service>::iterator it = list.begin(); it != list.end(); ++it){
+ for (TQValueList<KDEDesktopMimeType::Service>::iterator it = list.begin(); it != list.end(); ++it){
if(usePopup){
- KAction *action = new KAction((*it).m_strName, (*it).m_strIcon, KShortcut(), this, SLOT(runAction()), popup, idString.utf8());
+ KAction *action = new KAction((*it).m_strName, (*it).m_strIcon, KShortcut(), this, TQT_SLOT(runAction()), popup, idString.utf8());
action->plug(popup);
}
else{
- MetabarWidget::addEntry(html, (*it).m_strName, "service://" + idString, (*it).m_strIcon, QString::null, count < maxActions ? QString::null : QString("hiddenaction"), count >= maxActions);
+ MetabarWidget::addEntry(html, (*it).m_strName, "service://" + idString, (*it).m_strIcon, TQString::null, count < maxActions ? TQString::null : TQString("hiddenaction"), count >= maxActions);
count++;
}
@@ -194,7 +194,7 @@ void ServiceLoader::runAction()
}
}
-void ServiceLoader::runAction(const QString& name)
+void ServiceLoader::runAction(const TQString& name)
{
KDEDesktopMimeType::Service s = services[name];
if(!s.isEmpty()){
@@ -202,7 +202,7 @@ void ServiceLoader::runAction(const QString& name)
}
}
-void ServiceLoader::showPopup(const QString &popup, const QPoint &point)
+void ServiceLoader::showPopup(const TQString &popup, const TQPoint &point)
{
KPopupMenu *p = popups[popup];
if(p){
diff --git a/konq-plugins/sidebar/metabar/src/serviceloader.h b/konq-plugins/sidebar/metabar/src/serviceloader.h
index cd3fa8c..527ea97 100644
--- a/konq-plugins/sidebar/metabar/src/serviceloader.h
+++ b/konq-plugins/sidebar/metabar/src/serviceloader.h
@@ -21,10 +21,10 @@
#ifndef _SERVICELOADER_H_
#define _SERVICELOADER_H_
-#include <qstring.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kpopupmenu.h>
#include <kfileitem.h>
@@ -40,16 +40,16 @@ class ServiceLoader : public QObject
Q_OBJECT
public:
- ServiceLoader(QWidget *parent, const char *name = 0);
+ ServiceLoader(TQWidget *parent, const char *name = 0);
~ServiceLoader();
void loadServices(const KFileItem item, DOM::DOMString &html, int &count);
- void runAction(const QString &name);
- void showPopup(const QString &popup, const QPoint &point);
+ void runAction(const TQString &name);
+ void showPopup(const TQString &popup, const TQPoint &point);
private:
- QDict<KPopupMenu> popups;
- QMap<QString,KDEDesktopMimeType::Service> services;
+ TQDict<KPopupMenu> popups;
+ TQMap<TQString,KDEDesktopMimeType::Service> services;
KURL::List urlList;
private slots:
diff --git a/konq-plugins/sidebar/metabar/src/settingsplugin.cpp b/konq-plugins/sidebar/metabar/src/settingsplugin.cpp
index 91bb96d..76853c6 100644
--- a/konq-plugins/sidebar/metabar/src/settingsplugin.cpp
+++ b/konq-plugins/sidebar/metabar/src/settingsplugin.cpp
@@ -58,14 +58,14 @@ void SettingsPlugin::loadActions(DOM::HTMLElement node)
if(url.path().endsWith("/")){
list_job = KIO::listDir(url, true, false);
- connect(list_job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), this, SLOT(slotGotEntries(KIO::Job *, const KIO::UDSEntryList &)));
- connect(list_job, SIGNAL(result(KIO::Job *)), this, SLOT(slotJobFinished(KIO::Job *)));
+ connect(list_job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), this, TQT_SLOT(slotGotEntries(KIO::Job *, const KIO::UDSEntryList &)));
+ connect(list_job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotJobFinished(KIO::Job *)));
m_functions->show("actions");
}
else{
- QString path = url.path();
- QString name = url.filename();
+ TQString path = url.path();
+ TQString name = url.filename();
KService::Ptr service = KService::serviceByStorageId(name);
if(service && service->isValid()){
@@ -90,8 +90,8 @@ void SettingsPlugin::loadInformation(DOM::HTMLElement node)
m_functions->hide("info");
}
else{
- QString path = url.path();
- QString name = url.filename();
+ TQString path = url.path();
+ TQString name = url.filename();
KService::Ptr service = KService::serviceByStorageId(name);
if(service && service->isValid()){
@@ -154,9 +154,9 @@ void SettingsPlugin::slotGotEntries(KIO::Job *job, const KIO::UDSEntryList &list
KIO::UDSEntryList::ConstIterator it = list.begin();
KIO::UDSEntryList::ConstIterator it_end = list.end();
for(; it != it_end; ++it){
- QString name;
- QString icon;
- QString url;
+ TQString name;
+ TQString icon;
+ TQString url;
long type;
KIO::UDSEntry::ConstIterator atomit = (*it).begin();