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.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/konq-plugins/sidebar/metabar/src/metabarwidget.cpp b/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
index 0439c98..a8c2b69 100644
--- a/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
+++ b/konq-plugins/sidebar/metabar/src/metabarwidget.cpp
@@ -27,10 +27,10 @@
#include "httpplugin.h"
#include <tqwidget.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqdir.h>
#include <tqfile.h>
-#include <tqtextstream.h>
+#include <textstream.h>
#include <tqvaluelist.h>
#include <tqurl.h>
#include <tqbuffer.h>
@@ -94,7 +94,7 @@ MetabarWidget::MetabarWidget(TQWidget *parent, const char *name) : TQWidget(pare
html->setCaretVisible(false);
html->setDNDEnabled(false);
html->setJavaEnabled(false);
- html->view()->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
+ html->view()->setSizePolicy(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 &)));
@@ -114,11 +114,11 @@ MetabarWidget::MetabarWidget(TQWidget *parent, const char *name) : TQWidget(pare
plugins.insert("http", httpPlugin);
plugins.insert("https", httpPlugin);
- TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
- tqlayout->addWidget(html->view());
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+ layout->addWidget(html->view());
popup = new KPopupMenu(0);
- KAction *configAction = new KAction(i18n("Configure %1...").tqarg("Metabar"), "configure", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotShowConfig()), html->actionCollection(), "configure");
+ KAction *configAction = new KAction(i18n("Configure %1...").arg("Metabar"), "configure", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(slotShowConfig()), html->actionCollection(), "configure");
configAction->plug(popup);
KAction *reloadAction = new KAction(i18n("Reload Theme"), "reload", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(setTheme()), html->actionCollection(), "reload");
@@ -210,7 +210,7 @@ void MetabarWidget::setFileItems(const KFileItemList &items, bool check)
TQString MetabarWidget::getCurrentURL()
{
- DCOPRef ref(kapp->dcopClient()->appId(), this->tqtopLevelWidget()->name());
+ DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
DCOPReply reply = ref.call("currentURL()");
if (reply.isValid()) {
@@ -226,19 +226,19 @@ TQString MetabarWidget::getCurrentURL()
void MetabarWidget::openURL(const TQString &url)
{
- DCOPRef ref(kapp->dcopClient()->appId(), this->tqtopLevelWidget()->name());
+ DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
DCOPReply reply = ref.call("openURL", url);
}
void MetabarWidget::openTab(const TQString &url)
{
- DCOPRef ref(kapp->dcopClient()->appId(), this->tqtopLevelWidget()->name());
+ DCOPRef ref(kapp->dcopClient()->appId(), this->topLevelWidget()->name());
DCOPReply reply = ref.call("newTab", url);
}
void MetabarWidget::callAction(const TQString &action)
{
- DCOPRef ref(kapp->dcopClient()->appId(), TQString(TQString(this->tqtopLevelWidget()->name()).append("/action/").append(action)).utf8());
+ DCOPRef ref(kapp->dcopClient()->appId(), TQString(TQString(this->topLevelWidget()->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);").tqarg(url);
+ TQString style = TQString("background-image: url(%1);").arg(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").tqarg(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", TQString("metabar/themes/default/default.css"));
}
@@ -393,7 +393,7 @@ 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\">").tqarg(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=\"";
@@ -431,7 +431,7 @@ void MetabarWidget::handleURLRequest(const KURL &url, const KParts::URLArgs &arg
}
if(element.id().string().startsWith("hidden")){
- TQString style = TQString("background-image: url(%1);").tqarg(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);
}
@@ -475,7 +475,7 @@ TQString MetabarWidget::getIconPath(const TQString &name)
buffer.open(IO_WriteOnly);
icon.save(&buffer, "PNG");
- return TQString::tqfromLatin1("data:image/png;base64,%1").tqarg(KCodecs::base64Encode(data).data());
+ return TQString::fromLatin1("data:image/png;base64,%1").arg(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/tqlayout.html").tqarg(config->readEntry("Theme", "default")));
+ TQString file = locate("data", TQString("metabar/themes/%1/layout.html").arg(config->readEntry("Theme", "default")));
html->openURL(KURL(file));
}