summaryrefslogtreecommitdiffstats
path: root/konq-plugins/sidebar/metabar/src/configdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/sidebar/metabar/src/configdialog.cpp')
-rw-r--r--konq-plugins/sidebar/metabar/src/configdialog.cpp290
1 files changed, 145 insertions, 145 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);