diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 10:00:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 10:00:36 -0600 |
commit | 1fffbdafa12271a1a635caf46777fb8acfb6f31b (patch) | |
tree | 707785bd058e254fd865ca30ed35f37f206aebbc /klinkstatus/src/ui/tablelinkstatus.cpp | |
parent | 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076 (diff) | |
download | tdewebdev-1fffbdafa12271a1a635caf46777fb8acfb6f31b.tar.gz tdewebdev-1fffbdafa12271a1a635caf46777fb8acfb6f31b.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076.
Diffstat (limited to 'klinkstatus/src/ui/tablelinkstatus.cpp')
-rw-r--r-- | klinkstatus/src/ui/tablelinkstatus.cpp | 158 |
1 files changed, 79 insertions, 79 deletions
diff --git a/klinkstatus/src/ui/tablelinkstatus.cpp b/klinkstatus/src/ui/tablelinkstatus.cpp index dd72dd9f..6aef2c97 100644 --- a/klinkstatus/src/ui/tablelinkstatus.cpp +++ b/klinkstatus/src/ui/tablelinkstatus.cpp @@ -26,7 +26,7 @@ #include <tqmemarray.h> #include <tqtooltip.h> #include <tqpixmap.h> -#include <clipboard.h> +#include <tqclipboard.h> #include <tqpainter.h> #include <tqprocess.h> @@ -106,17 +106,17 @@ void TableLinkstatus::setColumns(TQStringList const& columns) horizontal_header->adjustHeaderSize(); } -void TableLinkstatus::insertResult(LinkStatus const* linkstatus) +void TableLinkstatus::insertResult(LinktqStatus const* linkstatus) { insereLinha(generateRowOfTableItems(linkstatus)); } -vector<TableItem*> TableLinkstatus::generateRowOfTableItems(LinkStatus const* linkstatus) +vector<TableItem*> TableLinkstatus::generateRowOfTableItems(LinktqStatus const* linkstatus) { vector<TableItem*> items; int column = 1; - TableItem* item1 = new TableItemStatus(this, TQTableItem::Never, + TableItem* item1 = new TableItemtqStatus(this, TQTableItem::Never, linkstatus, column++); TableItem* item2 = new TableItemNome(this, TQTableItem::Never, linkstatus, column++); @@ -147,10 +147,10 @@ void TableLinkstatus::insereLinha(vector<TableItem*> items) setItem(row, col, items[i]); } - if(items[col_url_ - 1]->sizeHint().width() > columnWidth(col_url_ - 1)) + if(items[col_url_ - 1]->tqsizeHint().width() > columnWidth(col_url_ - 1)) { setColumnStretchable(col_url_ - 1, false); - setColumnWidth(col_url_ - 1, items[col_url_ - 1]->sizeHint().width()); + setColumnWidth(col_url_ - 1, items[col_url_ - 1]->tqsizeHint().width()); } ensureCellVisible(row, 0); @@ -178,14 +178,14 @@ void TableLinkstatus::removeColunas() Q_ASSERT(numCols() == 0); } -void TableLinkstatus::show(ResultView::Status const& status) +void TableLinkstatus::show(ResultView::tqStatus const& status) { for(int i = 0; i != numRows(); ++i) { int row = i; TableItem* _item = myItem(row, col_status_); - if(!ResultView::displayableWithStatus(_item->linkStatus(), status)) + if(!ResultView::displayableWithtqStatus(_item->linktqStatus(), status)) hideRow(row); else showRow(row); @@ -230,7 +230,7 @@ bool TableLinkstatus::textFitsInCell(int row, int col) const TQTableItem* itm(myItem(row, col)); Q_ASSERT(itm); - TQSize size_hint(itm->sizeHint()); + TQSize size_hint(itm->tqsizeHint()); int visible_width = 0; if(col == numCols() - 1) @@ -261,8 +261,8 @@ void TableLinkstatus::slotPopupContextMenu(int r, int w, const TQPoint& pos) TableItem* table_item = myItem(r, w); if(table_item) { - TQValueVector<KURL> referrers = table_item->linkStatus()->referrers(); - loadContextTableMenu(referrers, table_item->linkStatus()->isRoot()); + TQValueVector<KURL> referrers = table_item->linktqStatus()->referrers(); + loadContextTableMenu(referrers, table_item->linktqStatus()->isRoot()); context_table_menu_.popup(pos); } } @@ -313,7 +313,7 @@ void TableLinkstatus::loadContextTableMenu(TQValueVector<KURL> const& referrers, void TableLinkstatus::slotCopyUrlToClipboard() const { TableItem* _item = myItem(currentRow(), currentColumn()); - TQString content(_item->linkStatus()->absoluteUrl().prettyURL()); + TQString content(_item->linktqStatus()->absoluteUrl().prettyURL()); TQClipboard* cb = kapp->clipboard(); cb->setText(content); } @@ -321,7 +321,7 @@ void TableLinkstatus::slotCopyUrlToClipboard() const void TableLinkstatus::slotCopyParentUrlToClipboard() const { TableItem* _item = myItem(currentRow(), currentColumn()); - TQString content(_item->linkStatus()->parent()->absoluteUrl().prettyURL()); + TQString content(_item->linktqStatus()->parent()->absoluteUrl().prettyURL()); TQClipboard* cb = kapp->clipboard(); cb->setText(content); } @@ -336,7 +336,7 @@ void TableLinkstatus::slotCopyCellTextToClipboard() const void TableLinkstatus::slotEditReferrersWithQuanta() { TableItem* _item = myItem(currentRow(), currentColumn()); - TQValueVector<KURL> referrers = _item->linkStatus()->referrers(); + TQValueVector<KURL> referrers = _item->linktqStatus()->referrers(); if(Global::isQuantaAvailableViaDCOP()) { @@ -369,7 +369,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(int id) index -= 2; // The list of referrers starts on index = 2 TableItem* _item = myItem(currentRow(), currentColumn()); - TQValueVector<KURL> referrers = _item->linkStatus()->referrers(); + TQValueVector<KURL> referrers = _item->linktqStatus()->referrers(); Q_ASSERT(index >= 0 && (uint)index < referrers.size()); slotEditReferrerWithQuanta(referrers[index]); @@ -386,7 +386,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url) if(!success) { - TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").arg(filePath); + TQString message = i18n("<qt>File <b>%1</b> cannot be opened. Might be a DCOP problem.</qt>").tqarg(filePath); KMessageBox::error(parentWidget(), message); } } @@ -400,7 +400,7 @@ void TableLinkstatus::slotEditReferrerWithQuanta(KURL const& url) void TableLinkstatus::slotViewUrlInBrowser() { TableItem* _item = myItem(currentRow(), currentColumn()); - KURL url = _item->linkStatus()->absoluteUrl(); + KURL url = _item->linktqStatus()->absoluteUrl(); if(url.isValid()) { @@ -414,13 +414,13 @@ void TableLinkstatus::slotViewParentUrlInBrowser() { TableItem* _item = myItem(currentRow(), currentColumn()); - if(_item->linkStatus()->isRoot()) + if(_item->linktqStatus()->isRoot()) { KMessageBox::sorry(this, i18n("ROOT URL.")); } else { - LinkStatus const* ls_parent = _item->linkStatus()->parent(); + LinktqStatus const* ls_parent = _item->linktqStatus()->parent(); Q_ASSERT(ls_parent); KURL url = ls_parent->absoluteUrl(); @@ -439,11 +439,11 @@ void TableLinkstatus::slotViewParentUrlInBrowser() */ TableItem::TableItem(TQTable* table, EditType et, - LinkStatus const* linkstatus, - int column_index, int alignment) + LinktqStatus const* linkstatus, + int column_index, int tqalignment) : TQTableItem(table, et, ""), ResultViewItem(linkstatus, column_index), - /*ls_((LinkStatus*)linkstatus), - column_index_(column_index),*/ alignment_(alignment) + /*ls_((LinktqStatus*)linkstatus), + column_index_(column_index),*/ alignment_(tqalignment) { //Q_ASSERT(ls_); //Q_ASSERT(column_index_ > 0); @@ -467,17 +467,17 @@ int TableItem::columnIndex() const return ResultViewItem::columnIndex(); } -void TableItem::setAlignment(int aFlags) +void TableItem::tqsetAlignment(int aFlags) { alignment_ = aFlags; } -int TableItem::alignment() const +int TableItem::tqalignment() const { return alignment_; } /* -LinkStatus const* const TableItem::linkStatus() const +LinktqStatus const* const TableItem::linktqStatus() const { Q_ASSERT(ls_); return ls_; @@ -485,31 +485,31 @@ LinkStatus const* const TableItem::linkStatus() const TQColor const& TableItem::textStatusColor() const { - if(linkStatus()->errorOccurred()) + if(linktqStatus()->errorOccurred()) { - //kdDebug(23100) << "ERROR: " << linkStatus()->error() << ": " << linkStatus()->absoluteUrl().prettyURL() << endl; - if(linkStatus()->error() == i18n( "Javascript not supported" )) + //kdDebug(23100) << "ERROR: " << linkStatus()->error() << ": " << linktqStatus()->absoluteUrl().prettyURL() << endl; + if(linktqStatus()->error() == i18n( "Javascript not supported" )) return TQt::lightGray; else return TQt::red; } - else if(linkStatus()->absoluteUrl().hasRef()) + else if(linktqStatus()->absoluteUrl().hasRef()) return TQt::blue; - else if(linkStatus()->absoluteUrl().protocol() != "http" && - linkStatus()->absoluteUrl().protocol() != "https") + else if(linktqStatus()->absoluteUrl().protocol() != "http" && + linktqStatus()->absoluteUrl().protocol() != "https") return TQt::darkGreen; else { - TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode())); + TQString status_code(TQString::number(linktqStatus()->httpHeader().statusCode())); if(status_code[0] == '0') { kdWarning(23100) << "status code == 0: " << endl; - kdWarning(23100) << linkStatus()->toString() << endl; - kdWarning(23100) << linkStatus()->httpHeader().toString() << endl; + kdWarning(23100) << linktqStatus()->toString() << endl; + kdWarning(23100) << linktqStatus()->httpHeader().toString() << endl; } //Q_ASSERT(status_code[0] != '0'); @@ -538,7 +538,7 @@ TQColor const& TableItem::textStatusColor() const */ TableItemURL::TableItemURL(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index) + LinktqStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { setText(); @@ -546,17 +546,17 @@ TableItemURL::TableItemURL(TQTable* table, EditType et, void TableItemURL::setText() { - if(linkStatus()->node() && linkStatus()->malformed()) + if(linktqStatus()->node() && linktqStatus()->malformed()) { - if(linkStatus()->node()->url().isEmpty()) - TQTableItem::setText( linkStatus()->node()->content().simplifyWhiteSpace() ); + if(linktqStatus()->node()->url().isEmpty()) + TQTableItem::setText( linktqStatus()->node()->content().simplifyWhiteSpace() ); else - TQTableItem::setText( linkStatus()->node()->url() ); + TQTableItem::setText( linktqStatus()->node()->url() ); } else { - KURL url = linkStatus()->absoluteUrl(); - TQTableItem::setText(::convertToLocal(linkStatus())); + KURL url = linktqStatus()->absoluteUrl(); + TQTableItem::setText(::convertToLocal(linktqStatus())); } } @@ -583,19 +583,19 @@ TQColor const& TableItemURL::textStatusColor() const { // TODO clean this code - TQString status_code(TQString::number(linkStatus()->httpHeader().statusCode())); + TQString status_code(TQString::number(linktqStatus()->httpHeader().statusCode())); - if(linkStatus()->errorOccurred()) + if(linktqStatus()->errorOccurred()) { - if(linkStatus()->error().contains(i18n( "Timeout" ))) + if(linktqStatus()->error().contains(i18n( "Timeout" ))) return darkMagenta; - else if(linkStatus()->error().contains(i18n( "not supported" ))) + else if(linktqStatus()->error().contains(i18n( "not supported" ))) return lightGray; else return red; } - else if(linkStatus()->absoluteUrl().protocol() != "http" && - linkStatus()->absoluteUrl().protocol() != "https") + else if(linktqStatus()->absoluteUrl().protocol() != "http" && + linktqStatus()->absoluteUrl().protocol() != "https") return black; else if(status_code[0] == '5') @@ -610,53 +610,53 @@ TQColor const& TableItemURL::textStatusColor() const /* -********************* TableItemStatus *************************** +********************* TableItemtqStatus *************************** */ -TableItemStatus::TableItemStatus(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index) +TableItemtqStatus::TableItemtqStatus(TQTable* table, EditType et, + LinktqStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { - setAlignment(TQt::AlignHCenter /*| TQt :: AlignVCenter*/); + tqsetAlignment(TQt::AlignHCenter /*| TQt :: AlignVCenter*/); setText(); setPixmap(); } -void TableItemStatus::setText() +void TableItemtqStatus::setText() { - if(linkStatus()->errorOccurred() || - linkStatus()->status() == "OK" || - linkStatus()->status() == "304") + if(linktqStatus()->errorOccurred() || + linktqStatus()->status() == "OK" || + linktqStatus()->status() == "304") { TQTableItem::setText(""); } else { /* - if(linkStatus()->httpHeader().statusCode() == 0) + if(linktqStatus()->httpHeader().statusCode() == 0) { kdDebug(23100) << "TableItemStatus::setText : statusCode() == 0" << endl; - kdDebug(23100) << linkStatus()->toString() << endl; - kdDebug(23100) << linkStatus()->docHtml() << endl; + kdDebug(23100) << linktqStatus()->toString() << endl; + kdDebug(23100) << linktqStatus()->docHtml() << endl; } */ - //Q_ASSERT(linkStatus()->httpHeader().statusCode() != 0); //<------------------------------------------------------------ - //TQTableItem::setText( TQString::number(linkStatus()->httpHeader().statusCode()) ); - TQTableItem::setText( linkStatus()->status() ); + //Q_ASSERT(linktqStatus()->httpHeader().statusCode() != 0); //<------------------------------------------------------------ + //TQTableItem::setText( TQString::number(linktqStatus()->httpHeader().statusCode()) ); + TQTableItem::setText( linktqStatus()->status() ); } } -void TableItemStatus::setPixmap() +void TableItemtqStatus::setPixmap() { - if(linkStatus()->errorOccurred()) + if(linktqStatus()->errorOccurred()) { - if(linkStatus()->error().contains(i18n( "Timeout" ))) + if(linktqStatus()->error().contains(i18n( "Timeout" ))) { TQTableItem::setPixmap(SmallIcon("kalarm")); } - else if(linkStatus()->error() == i18n( "Malformed" )) + else if(linktqStatus()->error() == i18n( "Malformed" )) { TQTableItem::setPixmap(SmallIcon("bug")); } @@ -665,27 +665,27 @@ void TableItemStatus::setPixmap() TQTableItem::setPixmap(SmallIcon("no")); } } - else if(linkStatus()->status() == "304") + else if(linktqStatus()->status() == "304") TQTableItem::setPixmap(UserIcon("304")); - else if(linkStatus()->status() == "OK") + else if(linktqStatus()->status() == "OK") TQTableItem::setPixmap(SmallIcon("ok")); } -TQString TableItemStatus::toolTip() const +TQString TableItemtqStatus::toolTip() const { - if(linkStatus()->errorOccurred() || - linkStatus()->absoluteUrl().hasRef() || - (linkStatus()->absoluteUrl().protocol() != "http" && - linkStatus()->absoluteUrl().protocol() != "https")) + if(linktqStatus()->errorOccurred() || + linktqStatus()->absoluteUrl().hasRef() || + (linktqStatus()->absoluteUrl().protocol() != "http" && + linktqStatus()->absoluteUrl().protocol() != "https")) { - return i18n("%1").arg(linkStatus()->status()); + return i18n("%1").tqarg(linktqStatus()->status()); } else - return i18n("%1").arg(linkStatus()->httpHeader().reasonPhrase()); + return i18n("%1").tqarg(linktqStatus()->httpHeader().reasonPhrase()); } -void TableItemStatus::paint( TQPainter *p, const TQColorGroup &cg, +void TableItemtqStatus::paint( TQPainter *p, const TQColorGroup &cg, const TQRect &cr, bool selected ) { p->fillRect( 0, 0, cr.width(), cr.height(), @@ -716,7 +716,7 @@ void TableItemStatus::paint( TQPainter *p, const TQColorGroup &cg, else p->setPen( m_cg.text() ); p->drawText( x + 2, 0, w - x - 4, h, - wordWrap() ? (alignment() | WordBreak) : alignment(), text() ); + wordWrap() ? (tqalignment() | WordBreak) : tqalignment(), text() ); } /* @@ -726,7 +726,7 @@ void TableItemStatus::paint( TQPainter *p, const TQColorGroup &cg, */ TableItemNome::TableItemNome(TQTable* table, EditType et, - LinkStatus const* linkstatus, int column_index) + LinktqStatus const* linkstatus, int column_index) : TableItem(table, et, linkstatus, column_index) { setText(); @@ -734,7 +734,7 @@ TableItemNome::TableItemNome(TQTable* table, EditType et, void TableItemNome::setText() { - TQString label(linkStatus()->label()); + TQString label(linktqStatus()->label()); if(!label.isNull()) TQTableItem::setText(label.simplifyWhiteSpace()); } |