summaryrefslogtreecommitdiffstats
path: root/kdict/queryview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kdict/queryview.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdict/queryview.cpp')
-rw-r--r--kdict/queryview.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kdict/queryview.cpp b/kdict/queryview.cpp
index 045b4e49..e48397e1 100644
--- a/kdict/queryview.cpp
+++ b/kdict/queryview.cpp
@@ -40,8 +40,8 @@
TQString SaveHelper::lastPath;
-SaveHelper::SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent)
- : p_arent(parent), s_aveName(saveName), f_ilter(filter), file(0), tmpFile(0)
+SaveHelper::SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *tqparent)
+ : p_arent(tqparent), s_aveName(saveName), f_ilter(filter), file(0), tmpFile(0)
{
}
@@ -74,7 +74,7 @@ TQFile* SaveHelper::getFile(const TQString &dialogTitle)
if (url.isLocalFile()) {
if (TQFileInfo(url.path()).exists() &&
(KMessageBox::warningContinueCancel(global->topLevel,
- i18n("A file named %1 already exists.\nDo you want to replace it?").arg(url.path()),
+ i18n("A file named %1 already exists.\nDo you want to replace it?").tqarg(url.path()),
dialogTitle, i18n("&Replace")) != KMessageBox::Continue)) {
return 0;
}
@@ -109,8 +109,8 @@ BrowseData::BrowseData(const TQString &Nhtml, const TQString &NqueryText)
//********* DictHTMLPart ******************************************
-DictHTMLPart::DictHTMLPart(TQWidget *parentWidget, const char *widgetname)
- : KHTMLPart(parentWidget,widgetname)
+DictHTMLPart::DictHTMLPart(TQWidget *tqparentWidget, const char *widgetname)
+ : KHTMLPart(tqparentWidget,widgetname)
{}
@@ -120,7 +120,7 @@ DictHTMLPart::~DictHTMLPart()
void DictHTMLPart::khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *event)
{
- if (event->qmouseEvent()->button()==MidButton)
+ if (event->qmouseEvent()->button()==Qt::MidButton)
emit(middleButtonClicked());
else
KHTMLPart::khtmlMouseReleaseEvent(event);
@@ -140,7 +140,7 @@ QueryView::QueryView(TQWidget *_parent)
part->setJScriptEnabled(false);
part->setJavaEnabled(false);
part->setURLCursor(KCursor::handCursor());
- setFocusPolicy(TQWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
connect(part, TQT_SIGNAL(completed()), TQT_SLOT(partCompleted()));
connect(part, TQT_SIGNAL(middleButtonClicked()), TQT_SLOT(middleButtonClicked()));
rightBtnMenu = new KPopupMenu(this);
@@ -184,11 +184,11 @@ void QueryView::optionsChanged()
saveCurrentResultPos();
currentHTMLHeader = TQString("<html><head><style type=\"text/css\">\n");
- currentHTMLHeader += TQString("body { background-color:%1; color:%2; }\n").arg(global->backgroundColor().name()).arg(global->textColor().name());
- currentHTMLHeader += TQString("a:link, a:active { color:%1; text-decoration:none; }\n").arg(global->linksColor().name());
- currentHTMLHeader += TQString("a:visited { color:%1; text-decoration:none; }\n").arg(global->visitedLinksColor().name());
- currentHTMLHeader += TQString("a:hover { color:%1; text-decoration:underline; }\n").arg(global->linksColor().name());
- currentHTMLHeader += TQString("p.heading { margin-left:0mm; margin-top:2mm; margin-bottom:2mm; padding:1mm; background-color:%1; color:%2; font-family:%3; font-size:%4pt; ").arg(global->headingsBackgroundColor().name()).arg(global->headingsTextColor().name()).arg(global->headingsFont().family()).arg(global->headingsFont().pointSize());
+ currentHTMLHeader += TQString("body { background-color:%1; color:%2; }\n").tqarg(global->backgroundColor().name()).tqarg(global->textColor().name());
+ currentHTMLHeader += TQString("a:link, a:active { color:%1; text-decoration:none; }\n").tqarg(global->linksColor().name());
+ currentHTMLHeader += TQString("a:visited { color:%1; text-decoration:none; }\n").tqarg(global->visitedLinksColor().name());
+ currentHTMLHeader += TQString("a:hover { color:%1; text-decoration:underline; }\n").tqarg(global->linksColor().name());
+ currentHTMLHeader += TQString("p.heading { margin-left:0mm; margin-top:2mm; margin-bottom:2mm; padding:1mm; background-color:%1; color:%2; font-family:%3; font-size:%4pt; ").tqarg(global->headingsBackgroundColor().name()).tqarg(global->headingsTextColor().name()).tqarg(global->headingsFont().family()).tqarg(global->headingsFont().pointSize());
if (global->headingsFont().italic())
currentHTMLHeader += TQString("font-style:italic; ");
if (global->headingsFont().bold())
@@ -196,7 +196,7 @@ void QueryView::optionsChanged()
currentHTMLHeader += TQString("}\n");
currentHTMLHeader += TQString("p.definition { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
currentHTMLHeader += TQString("table { margin-left:1.5mm; margin-top:2mm; margin-bottom:2mm;}\n");
- currentHTMLHeader += TQString("pre { font-family:%1; font-size:%2pt; ").arg(global->textFont().family()).arg(global->textFont().pointSize());
+ currentHTMLHeader += TQString("pre { font-family:%1; font-size:%2pt; ").tqarg(global->textFont().family()).tqarg(global->textFont().pointSize());
if (global->textFont().italic())
currentHTMLHeader += TQString("font-style:italic; ");
if (global->textFont().bold())
@@ -231,9 +231,9 @@ void QueryView::saveQuery()
if (!browseList.isEmpty()) {
BrowseData* brw = browseList.at(browsePos);
TQString fName = brw->queryText+".html";
- fName.replace(TQRegExp("[\\s/]"),"_");
+ fName.tqreplace(TQRegExp("[\\s/]"),"_");
SaveHelper helper(fName,"*.html",global->topLevel);
- TQFile *file = helper.getFile(TQString::null);
+ TQFile *file = helper.getFile(TQString());
if (file) {
TQTextStream stream(file);
@@ -276,13 +276,13 @@ void QueryView::selectAll()
void QueryView::copySelection()
{
- kapp->clipboard()->setText(part->selectedText());
+ kapp->tqclipboard()->setText(part->selectedText());
}
void QueryView::showFindDialog()
{
- KAction *act = part->actionCollection()->action("find");
+ KAction *act = part->actionCollection()->action("tqfind");
if (act)
act->activate();
}
@@ -441,14 +441,14 @@ void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point)
this,TQT_SLOT(popupMatchSelect()));
rightBtnMenu->insertSeparator();
} else {
- kapp->clipboard()->setSelectionMode(false);
- TQString text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(false);
+ TQString text = kapp->tqclipboard()->text();
if (text.isEmpty()) {
- kapp->clipboard()->setSelectionMode(true);
- text = kapp->clipboard()->text();
+ kapp->tqclipboard()->setSelectionMode(true);
+ text = kapp->tqclipboard()->text();
}
if (!text.isEmpty()) {
- popupSelect = TQApplication::clipboard()->text();
+ popupSelect = TQApplication::tqclipboard()->text();
rightBtnMenu->insertItem(SmallIcon("define_clip"),
i18n("&Define Clipboard Content"),
this,TQT_SLOT(popupDefineSelect()));
@@ -467,7 +467,7 @@ void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point)
this,TQT_SLOT(browseBack()));
else
rightBtnMenu->insertItem(SmallIcon("back"),
- i18n("&Back: '%1'").arg(getShortString(browseList.at(browsePos-1)->queryText,25)),
+ i18n("&Back: '%1'").tqarg(getShortString(browseList.at(browsePos-1)->queryText,25)),
this,TQT_SLOT(browseBack()));
} else {
ID = rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back"), this, TQT_SLOT(browseBack()));
@@ -481,7 +481,7 @@ void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point)
this,TQT_SLOT(browseForward()));
else
rightBtnMenu->insertItem(SmallIcon("forward"),
- i18n("&Forward: '%1'").arg(getShortString(browseList.at(browsePos+1)->queryText,25)),
+ i18n("&Forward: '%1'").tqarg(getShortString(browseList.at(browsePos+1)->queryText,25)),
this,TQT_SLOT(browseForward()));
} else {
ID = rightBtnMenu->insertItem(SmallIcon("forward"),i18n("&Forward"),this,TQT_SLOT(browseForward()));
@@ -569,7 +569,7 @@ void QueryView::updateBrowseActions()
if (browseList.at(browsePos-1)->queryText.isEmpty())
actBack->setText(i18n("&Back: Information"));
else
- actBack->setText(i18n("&Back: '%1'").arg(getShortString(browseList.at(browsePos-1)->queryText,25)));
+ actBack->setText(i18n("&Back: '%1'").tqarg(getShortString(browseList.at(browsePos-1)->queryText,25)));
actBack->popupMenu()->clear();
int i = browsePos-1;
@@ -593,7 +593,7 @@ void QueryView::updateBrowseActions()
if (browseList.at(browsePos+1)->queryText.isEmpty())
actForward->setText(i18n("&Forward: Information"));
else
- actForward->setText(i18n("&Forward: '%1'").arg(getShortString(browseList.at(browsePos+1)->queryText,25)));
+ actForward->setText(i18n("&Forward: '%1'").tqarg(getShortString(browseList.at(browsePos+1)->queryText,25)));
actForward->popupMenu()->clear();
int i = browsePos+1;