summaryrefslogtreecommitdiffstats
path: root/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/sidebar/metabar/src/metabarwidget.cpp')
-rw-r--r--konq-plugins/sidebar/metabar/src/metabarwidget.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/konq-plugins/sidebar/metabar/src/metabarwidget.cpp b/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
index bf074e8..965319e 100644
--- a/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
+++ b/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
@@ -73,7 +73,7 @@
#define EVENT_TYPE DOM::DOMString("click")
#define ACTIVATION 1
-MetabarWidget::MetabarWidget(TQWidget *parent, const char *name) : TQWidget(parent, name)
+MetabarWidget::MetabarWidget(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name)
{
skip = false;
loadComplete = false;
@@ -94,14 +94,14 @@ MetabarWidget::MetabarWidget(TQWidget *parent, const char *name) : TQWidget(pare
html->setCaretVisible(false);
html->setDNDEnabled(false);
html->setJavaEnabled(false);
- html->view()->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
+ html->view()->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
html->view()->hide();
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);
+ functions = new MetabarFunctions(html, TQT_TQOBJECT(this));
currentPlugin = 0;
defaultPlugin = new DefaultPlugin(html, functions);
@@ -114,14 +114,14 @@ MetabarWidget::MetabarWidget(TQWidget *parent, const char *name) : TQWidget(pare
plugins.insert("http", httpPlugin);
plugins.insert("https", httpPlugin);
- TQVBoxLayout *layout = new TQVBoxLayout(this);
- layout->addWidget(html->view());
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
+ tqlayout->addWidget(html->view());
popup = new KPopupMenu(0);
- KAction *configAction = new KAction(i18n("Configure %1...").arg("Metabar"), "configure", KShortcut(), this, TQT_SLOT(slotShowConfig()), html->actionCollection(), "configure");
+ KAction *configAction = new KAction(i18n("Configure %1...").tqarg("Metabar"), "configure", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotShowConfig()), html->actionCollection(), "configure");
configAction->plug(popup);
- KAction *reloadAction = new KAction(i18n("Reload Theme"), "reload", KShortcut(), this, TQT_SLOT(setTheme()), html->actionCollection(), "reload");
+ KAction *reloadAction = new KAction(i18n("Reload Theme"), "reload", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(setTheme()), html->actionCollection(), "reload");
reloadAction->plug(popup);
setTheme();
@@ -210,12 +210,12 @@ void MetabarWidget::setFileItems(const KFileItemList &items, bool check)
TQString MetabarWidget::getCurrentURL()
{
- DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
+ DCOPRef ref(kapp->dcopClient()->appId(), this->tqtopLevelWidget()->name());
DCOPReply reply = ref.call("currentURL()");
if (reply.isValid()) {
TQString url;
- reply.get(url, "TQString");
+ reply.get(url, TQSTRING_OBJECT_NAME_STRING);
if(!url.isNull() && !url.isEmpty()){
return url;
@@ -226,19 +226,19 @@ TQString MetabarWidget::getCurrentURL()
void MetabarWidget::openURL(const TQString &url)
{
- DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
+ DCOPRef ref(kapp->dcopClient()->appId(), this->tqtopLevelWidget()->name());
DCOPReply reply = ref.call("openURL", url);
}
void MetabarWidget::openTab(const TQString &url)
{
- DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
+ DCOPRef ref(kapp->dcopClient()->appId(), this->tqtopLevelWidget()->name());
DCOPReply reply = ref.call("newTab", url);
}
void MetabarWidget::callAction(const TQString &action)
{
- DCOPRef ref(kapp->dcopClient()->appId(), TQString(this->topLevelWidget()->name()).append("/action/").append(action).utf8());
+ DCOPRef ref(kapp->dcopClient()->appId(), TQString(TQString(this->tqtopLevelWidget()->name()).append("/action/").append(action)).utf8());
if(ref.call("enabled()")){
ref.call("activate()");
}
@@ -289,7 +289,7 @@ void MetabarWidget::loadCompleted()
if(node.hasAttribute("image")){
TQString icon = node.getAttribute("image").string();
TQString url = getIconPath(icon);
- TQString style = TQString("background-image: url(%1);").arg(url);
+ TQString style = TQString("background-image: url(%1);").tqarg(url);
node.setAttribute("style", style);
}
@@ -308,7 +308,7 @@ void MetabarWidget::loadCompleted()
}
config->setGroup("General");
- TQString file = locate("data", TQString("metabar/themes/%1/default.css").arg(config->readEntry("Theme", "default")));
+ TQString file = locate("data", TQString("metabar/themes/%1/default.css").tqarg(config->readEntry("Theme", "default")));
if(file.isNull()){
file = locate("data", TQString("metabar/themes/default/default.css"));
}
@@ -319,7 +319,7 @@ void MetabarWidget::loadCompleted()
TQString tmp = stream.read();
cssfile.close();
- tmp.replace("./", KURL::fromPathOrURL(file).directory(false));
+ tmp.tqreplace("./", KURL::fromPathOrURL(file).directory(false));
html->setUserStyleSheet(tmp);
}
@@ -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 += TQString("<ul style=\"width: %1px; height: %1px\">").arg(image.width(), image.height());
+ innerHTML += TQString("<ul style=\"width: %1px; height: %1px\">").tqarg(image.width(), image.height());
innerHTML += "<object class=\"preview\" type=\"";
innerHTML += item->mimetype();
innerHTML += "\" data=\"";
innerHTML += item->url().url();
innerHTML += "\" width=\"";
- innerHTML += TQString().setNum(image.width());
+ innerHTML += TQString(TQString().setNum(image.width()));
innerHTML += "\" height=\"";
- innerHTML += TQString().setNum(image.height());
+ innerHTML += TQString(TQString().setNum(image.height()));
innerHTML += "\" /></ul>";
node.setInnerHTML(innerHTML);
}
@@ -419,8 +419,8 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
for(uint i = 0; i < list.length(); i++){
DOM::HTMLElement node = static_cast<DOM::HTMLElement>(list.item(i));
if(!node.isNull()){
- DOM::HTMLElement parent = static_cast<DOM::HTMLElement>(node.parentNode());
- DOM::CSSStyleDeclaration style = parent.style();
+ DOM::HTMLElement tqparent = static_cast<DOM::HTMLElement>(node.parentNode());
+ DOM::CSSStyleDeclaration style = tqparent.style();
DOM::DOMString display = style.getPropertyValue("display");
DOM::DOMString newDisplay = display == "none" ? "block" : "none";
@@ -431,13 +431,13 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
}
if(element.id().string().startsWith("hidden")){
- TQString style = TQString("background-image: url(%1);").arg(getIconPath(showMore ? "1downarrow" : "1uparrow"));
+ TQString style = TQString("background-image: url(%1);").tqarg(getIconPath(showMore ? "1downarrow" : "1uparrow"));
element.setInnerText( showMore ? i18n("More") : i18n("Less") );
element.setAttribute("style", style);
}
- DOM::HTMLElement parent = static_cast<DOM::HTMLElement>(element.parentNode().parentNode());
- functions->adjustSize(parent.id());
+ DOM::HTMLElement tqparent = static_cast<DOM::HTMLElement>(element.parentNode().parentNode());
+ functions->adjustSize(tqparent.id());
}
else if(protocol == "function"){
@@ -475,7 +475,7 @@ TQString MetabarWidget::getIconPath(const TQString &name)
buffer.open(IO_WriteOnly);
icon.save(&buffer, "PNG");
- return TQString::fromLatin1("data:image/png;base64,%1").arg(KCodecs::base64Encode(data));
+ return TQString::tqfromLatin1("data:image/png;base64,%1").tqarg(KCodecs::base64Encode(data).data());
}
void MetabarWidget::slotShowSharingDialog()
@@ -584,7 +584,7 @@ void MetabarWidget::setTheme()
loadComplete = false;
config->setGroup("General");
- TQString file = locate("data", TQString("metabar/themes/%1/layout.html").arg(config->readEntry("Theme", "default")));
+ TQString file = locate("data", TQString("metabar/themes/%1/tqlayout.html").tqarg(config->readEntry("Theme", "default")));
html->openURL(KURL(file));
}