summaryrefslogtreecommitdiffstats
path: root/klinkstatus/src/ui/treeview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'klinkstatus/src/ui/treeview.cpp')
-rw-r--r--klinkstatus/src/ui/treeview.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/klinkstatus/src/ui/treeview.cpp b/klinkstatus/src/ui/treeview.cpp
index 21bcdf02..8bc51471 100644
--- a/klinkstatus/src/ui/treeview.cpp
+++ b/klinkstatus/src/ui/treeview.cpp
@@ -30,7 +30,7 @@
#include <tqvaluevector.h>
#include <tqheader.h>
-#include <tqclipboard.h>
+#include <clipboard.h>
#include "treeview.h"
#include "../global.h"
@@ -114,16 +114,16 @@ void TreeView::removeColunas()
clear();
}
-void TreeView::show(ResultView::tqStatus const& status)
+void TreeView::show(ResultView::Status const& status)
{
TQListViewItemIterator it(static_cast<KListView*> (this));
while(it.current())
{
TreeViewItem* item = myItem(it.current());
- if(!ResultView::displayableWithtqStatus(item->linktqStatus(), status))
+ if(!ResultView::displayableWithStatus(item->linkStatus(), status))
{
item->setVisible(false);
- //kdDebug(23100) << "Hide: " << item->linktqStatus()->absoluteUrl().url() << endl;
+ //kdDebug(23100) << "Hide: " << item->linkStatus()->absoluteUrl().url() << endl;
}
else
{
@@ -135,7 +135,7 @@ void TreeView::show(ResultView::tqStatus const& status)
TreeViewItem* parent = myItem(item->parent());
while(parent)
{
- kdDebug(23100) << "Show: " << parent->linktqStatus()->absoluteUrl().url() << endl;
+ kdDebug(23100) << "Show: " << parent->linkStatus()->absoluteUrl().url() << endl;
parent->setVisible(true);
//parent->setEnabled(false);
@@ -159,7 +159,7 @@ void TreeView::show(LinkMatcher link_matcher)
while(it.current())
{
TreeViewItem* item = myItem(it.current());
- bool match = link_matcher.matches(*(item->linktqStatus()));
+ bool match = link_matcher.matches(*(item->linkStatus()));
if(tree_display_)
item->setEnabled(match);
@@ -199,7 +199,7 @@ void TreeView::resizeEvent(TQResizeEvent *e)
{
KListView::resizeEvent(e);
resetColumns();
- clipper()->tqrepaint();
+ clipper()->repaint();
}
void TreeView::slotPopupContextMenu(TQListViewItem* item, const TQPoint& pos, int col)
@@ -209,8 +209,8 @@ void TreeView::slotPopupContextMenu(TQListViewItem* item, const TQPoint& pos, in
TreeViewItem* tree_item = myItem(item);
if(tree_item)
{
- TQValueVector<KURL> referrers = tree_item->linktqStatus()->referrers();
- loadContextTableMenu(referrers, tree_item->linktqStatus()->isRoot());
+ TQValueVector<KURL> referrers = tree_item->linkStatus()->referrers();
+ loadContextTableMenu(referrers, tree_item->linkStatus()->isRoot());
context_table_menu_.popup(pos);
}
}
@@ -218,16 +218,16 @@ void TreeView::slotPopupContextMenu(TQListViewItem* item, const TQPoint& pos, in
void TreeView::slotCopyUrlToClipboard() const
{
TreeViewItem* _item = myItem(currentItem());
- TQString content(_item->linktqStatus()->absoluteUrl().prettyURL());
- TQClipboard* cb = kapp->tqclipboard();
+ TQString content(_item->linkStatus()->absoluteUrl().prettyURL());
+ TQClipboard* cb = kapp->clipboard();
cb->setText(content);
}
void TreeView::slotCopyParentUrlToClipboard() const
{
TreeViewItem* _item = myItem(currentItem());
- TQString content(_item->linktqStatus()->parent()->absoluteUrl().prettyURL());
- TQClipboard* cb = kapp->tqclipboard();
+ TQString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL());
+ TQClipboard* cb = kapp->clipboard();
cb->setText(content);
}
@@ -235,14 +235,14 @@ void TreeView::slotCopyCellTextToClipboard() const
{
TreeViewItem* _item = myItem(currentItem());
TQString cell_text(_item->text(current_column_));
- TQClipboard* cb = kapp->tqclipboard();
+ TQClipboard* cb = kapp->clipboard();
cb->setText(cell_text);
}
void TreeView::slotEditReferrersWithQuanta()
{
TreeViewItem* _item = myItem(currentItem());
- TQValueVector<KURL> referrers = _item->linktqStatus()->referrers();
+ TQValueVector<KURL> referrers = _item->linkStatus()->referrers();
if(Global::isQuantaAvailableViaDCOP())
{
@@ -275,7 +275,7 @@ void TreeView::slotEditReferrerWithQuanta(int id)
index -= 2; // The list of referrers starts on index = 2
TreeViewItem* _item = myItem(currentItem());
- TQValueVector<KURL> referrers = _item->linktqStatus()->referrers();
+ TQValueVector<KURL> referrers = _item->linkStatus()->referrers();
Q_ASSERT(index >= 0 && (uint)index < referrers.size());
slotEditReferrerWithQuanta(referrers[index]);
@@ -292,7 +292,7 @@ void TreeView::slotEditReferrerWithQuanta(KURL const& url)
if(!success)
{
- TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").tqarg(filePath);
+ TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath);
KMessageBox::error(parentWidget(), message);
}
}
@@ -306,7 +306,7 @@ void TreeView::slotEditReferrerWithQuanta(KURL const& url)
void TreeView::slotViewUrlInBrowser()
{
TreeViewItem* _item = myItem(currentItem());
- KURL url = _item->linktqStatus()->absoluteUrl();
+ KURL url = _item->linkStatus()->absoluteUrl();
if(url.isValid())
{
@@ -320,13 +320,13 @@ void TreeView::slotViewParentUrlInBrowser()
{
TreeViewItem* _item = myItem(currentItem());
- if(_item->linktqStatus()->isRoot())
+ if(_item->linkStatus()->isRoot())
{
KMessageBox::sorry(this, i18n("ROOT URL."));
}
else
{
- LinktqStatus const* ls_parent = _item->linktqStatus()->parent();
+ LinkStatus const* ls_parent = _item->linkStatus()->parent();
Q_ASSERT(ls_parent);
KURL url = ls_parent->absoluteUrl();
@@ -393,7 +393,7 @@ TreeViewItem* TreeView::myItem(TQListViewItem* item) const
/* ******************************* TreeViewItem ******************************* */
TreeViewItem::TreeViewItem(TreeView* parent, TQListViewItem* after,
- LinktqStatus const* linkstatus)
+ LinkStatus const* linkstatus)
: KListViewItem(parent, after),
last_child_(0), root_(parent)
{
@@ -401,7 +401,7 @@ TreeViewItem::TreeViewItem(TreeView* parent, TQListViewItem* after,
}
TreeViewItem::TreeViewItem(TreeView* root, TQListViewItem* listview_item, TQListViewItem* after,
- LinktqStatus const* linkstatus)
+ LinkStatus const* linkstatus)
: KListViewItem(listview_item, after),
last_child_(0), root_(root)
@@ -412,7 +412,7 @@ TreeViewItem::TreeViewItem(TreeView* root, TQListViewItem* listview_item, TQList
TreeViewItem::~TreeViewItem()
{}
-void TreeViewItem::init(LinktqStatus const* linkstatus)
+void TreeViewItem::init(LinkStatus const* linkstatus)
{
setOpen(true);
@@ -450,15 +450,15 @@ TQString TreeViewItem::key(int column, bool) const
switch(column)
{
case 1: // status column
- return linktqStatus()->statusText();
+ return linkStatus()->statusText();
}
return text(column);
}
-LinktqStatus const* TreeViewItem::linktqStatus() const
+LinkStatus const* TreeViewItem::linkStatus() const
{
- return column_items_[0].linktqStatus();
+ return column_items_[0].linkStatus();
}
void TreeViewItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align)
@@ -478,7 +478,7 @@ void TreeViewItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column,
/* ******************************* TreeColumnViewItem ******************************* */
-TreeColumnViewItem::TreeColumnViewItem(TreeView* root, LinktqStatus const* linkstatus, int column_index)
+TreeColumnViewItem::TreeColumnViewItem(TreeView* root, LinkStatus const* linkstatus, int column_index)
: root_(root), ls_(linkstatus), column_index_(column_index)
{
Q_ASSERT(ls_);
@@ -501,7 +501,7 @@ int TreeColumnViewItem::columnIndex() const
return column_index_;
}
-LinktqStatus const* TreeColumnViewItem::linktqStatus() const
+LinkStatus const* TreeColumnViewItem::linkStatus() const
{
Q_ASSERT(ls_);
return ls_;
@@ -511,23 +511,23 @@ TQColor const& TreeColumnViewItem::textStatusColor() const
{
if(columnIndex() == root_->urlColumnIndex() || columnIndex() == root_->statusColumnIndex())
{
- if(linktqStatus()->status() == LinktqStatus::BROKEN)
+ if(linkStatus()->status() == LinkStatus::BROKEN)
return TQt::red;
- else if(linktqStatus()->status() == LinktqStatus::HTTP_CLIENT_ERROR)
+ else if(linkStatus()->status() == LinkStatus::HTTP_CLIENT_ERROR)
return TQt::red;
- else if(linktqStatus()->status() == LinktqStatus::HTTP_REDIRECTION)
+ else if(linkStatus()->status() == LinkStatus::HTTP_REDIRECTION)
return TQt::black;
- else if(linktqStatus()->status() == LinktqStatus::HTTP_SERVER_ERROR)
+ else if(linkStatus()->status() == LinkStatus::HTTP_SERVER_ERROR)
return TQt::darkMagenta;
- else if(linktqStatus()->status() == LinktqStatus::MALFORMED)
+ else if(linkStatus()->status() == LinkStatus::MALFORMED)
return TQt::red;
- else if(linktqStatus()->status() == LinktqStatus::NOT_SUPPORTED)
+ else if(linkStatus()->status() == LinkStatus::NOT_SUPPORTED)
return TQt::lightGray;
- else if(linktqStatus()->status() == LinktqStatus::SUCCESSFULL)
+ else if(linkStatus()->status() == LinkStatus::SUCCESSFULL)
return TQt::black;
- else if(linktqStatus()->status() == LinktqStatus::TIMEOUT)
+ else if(linkStatus()->status() == LinkStatus::TIMEOUT)
return TQt::darkMagenta;
- else if(linktqStatus()->status() == LinktqStatus::UNDETERMINED)
+ else if(linkStatus()->status() == LinkStatus::UNDETERMINED)
return TQt::blue;
return TQt::red;
@@ -544,17 +544,17 @@ TQString TreeColumnViewItem::text(int column) const
if(column == root_->urlColumnIndex())
{
- if(linktqStatus()->node() && linktqStatus()->malformed())
+ if(linkStatus()->node() && linkStatus()->malformed())
{
- if(linktqStatus()->node()->url().isEmpty())
- return linktqStatus()->node()->content().simplifyWhiteSpace();
+ if(linkStatus()->node()->url().isEmpty())
+ return linkStatus()->node()->content().simplifyWhiteSpace();
else
- return linktqStatus()->node()->url();
+ return linkStatus()->node()->url();
}
else
{
- KURL url = linktqStatus()->absoluteUrl();
- return Url::convertToLocal(linktqStatus());
+ KURL url = linkStatus()->absoluteUrl();
+ return Url::convertToLocal(linkStatus());
}
}
else if(column == root_->statusColumnIndex())
@@ -563,7 +563,7 @@ TQString TreeColumnViewItem::text(int column) const
}
else if(column == root_->labelColumnIndex())
{
- TQString label(linktqStatus()->label());
+ TQString label(linkStatus()->label());
if(!label.isNull())
return label.simplifyWhiteSpace();
}
@@ -577,28 +577,28 @@ TQPixmap TreeColumnViewItem::pixmap(int column) const
if(column == root_->statusColumnIndex())
{
- if(linktqStatus()->status() == LinktqStatus::BROKEN)
+ if(linkStatus()->status() == LinkStatus::BROKEN)
return SmallIcon("no");
- else if(linktqStatus()->status() == LinktqStatus::HTTP_CLIENT_ERROR)
+ else if(linkStatus()->status() == LinkStatus::HTTP_CLIENT_ERROR)
return SmallIcon("no");
- else if(linktqStatus()->status() == LinktqStatus::HTTP_REDIRECTION)
+ else if(linkStatus()->status() == LinkStatus::HTTP_REDIRECTION)
{
- if(linktqStatus()->statusText() == "304")
+ if(linkStatus()->statusText() == "304")
return UserIcon("304");
else
return SmallIcon("redo");
}
- else if(linktqStatus()->status() == LinktqStatus::HTTP_SERVER_ERROR)
+ else if(linkStatus()->status() == LinkStatus::HTTP_SERVER_ERROR)
return SmallIcon("no");
- else if(linktqStatus()->status() == LinktqStatus::MALFORMED)
+ else if(linkStatus()->status() == LinkStatus::MALFORMED)
return SmallIcon("editdelete");
- else if(linktqStatus()->status() == LinktqStatus::NOT_SUPPORTED)
+ else if(linkStatus()->status() == LinkStatus::NOT_SUPPORTED)
return SmallIcon("help");
- else if(linktqStatus()->status() == LinktqStatus::SUCCESSFULL)
+ else if(linkStatus()->status() == LinkStatus::SUCCESSFULL)
return SmallIcon("ok");
- else if(linktqStatus()->status() == LinktqStatus::TIMEOUT)
+ else if(linkStatus()->status() == LinkStatus::TIMEOUT)
return SmallIcon("history_clear");
- else if(linktqStatus()->status() == LinktqStatus::UNDETERMINED)
+ else if(linkStatus()->status() == LinkStatus::UNDETERMINED)
return SmallIcon("help");
}