summaryrefslogtreecommitdiffstats
path: root/src/modules/links/linkswindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/links/linkswindow.cpp')
-rw-r--r--src/modules/links/linkswindow.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/src/modules/links/linkswindow.cpp b/src/modules/links/linkswindow.cpp
index 1dd567f5..73fda996 100644
--- a/src/modules/links/linkswindow.cpp
+++ b/src/modules/links/linkswindow.cpp
@@ -33,10 +33,10 @@
#include "kvi_irccontext.h"
#include "kvi_ircconnection.h"
-#include <qsplitter.h>
-#include <qtooltip.h>
+#include <tqsplitter.h>
+#include <tqtooltip.h>
#include "kvi_tal_hbox.h"
-#include <qlabel.h>
+#include <tqlabel.h>
extern KviPointerList<KviLinksWindow> * g_pLinksWindowList;
@@ -45,26 +45,26 @@ KviLinksWindow::KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole)
{
g_pLinksWindowList->append(this);
- m_pTopSplitter = new QSplitter(Qt::Horizontal,this,"top_splitter");
+ m_pTopSplitter = new TQSplitter(Qt::Horizontal,this,"top_splitter");
// The button box on the left
KviTalHBox * box = new KviTalHBox(m_pTopSplitter);
- m_pRequestButton = new QToolButton(box,"request_button");
+ m_pRequestButton = new TQToolButton(box,"request_button");
m_pRequestButton->setUsesBigPixmap(false);
m_pRequestButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINKS)));
- connect(m_pRequestButton,SIGNAL(clicked()),this,SLOT(requestLinks()));
- QToolTip::add(m_pRequestButton,__tr2qs("Request Links"));
+ connect(m_pRequestButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(requestLinks()));
+ TQToolTip::add(m_pRequestButton,__tr2qs("Request Links"));
- QLabel * l = new QLabel(box,"");
+ TQLabel * l = new TQLabel(box,"");
box->setStretchFactor(l,1);
m_pInfoLabel = new KviThemedLabel(m_pTopSplitter,"info_label");
- connect(lpConsole->context(),SIGNAL(stateChanged()),
- this,SLOT(connectionStateChange()));
+ connect(lpConsole->context(),TQT_SIGNAL(stateChanged()),
+ this,TQT_SLOT(connectionStateChange()));
- m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter");
- m_pVertSplitter = new QSplitter(Qt::Vertical,m_pSplitter,"vsplitter");
+ m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter");
+ m_pVertSplitter = new TQSplitter(Qt::Vertical,m_pSplitter,"vsplitter");
m_pListView = new KviTalListView(m_pVertSplitter);
m_pListView->addColumn(__tr2qs("Link"));
@@ -72,8 +72,8 @@ KviLinksWindow::KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole)
m_pListView->addColumn(__tr2qs("Description"));
m_pListView->setRootIsDecorated(true);
m_pListView->setAllColumnsShowFocus(true);
- connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)),
- this,SLOT(showHostPopup(KviTalListViewItem *,const QPoint &,int)));
+ connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)),
+ this,TQT_SLOT(showHostPopup(KviTalListViewItem *,const TQPoint &,int)));
m_pIrcView = new KviIrcView(m_pVertSplitter,lpFrm,this);
@@ -81,7 +81,7 @@ KviLinksWindow::KviLinksWindow(KviFrame * lpFrm,KviConsole * lpConsole)
m_pLinkList->setAutoDelete(true);
m_pHostPopup = new KviTalPopupMenu();
- connect(m_pHostPopup,SIGNAL(activated(int)),this,SLOT(hostPopupClicked(int)));
+ connect(m_pHostPopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(hostPopupClicked(int)));
connectionStateChange();
@@ -129,43 +129,43 @@ void KviLinksWindow::connectionStateChange()
}
}
-QPixmap * KviLinksWindow::myIconPtr()
+TQPixmap * KviLinksWindow::myIconPtr()
{
return g_pIconManager->getSmallIcon(KVI_SMALLICON_LINKS);
}
-void KviLinksWindow::resizeEvent(QResizeEvent *e)
+void KviLinksWindow::resizeEvent(TQResizeEvent *e)
{
- int hght2 = m_pTopSplitter->sizeHint().height();
+ int hght2 = m_pTopSplitter->tqsizeHint().height();
m_pTopSplitter->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,hght2,width(),height() - hght2);
}
-QSize KviLinksWindow::sizeHint() const
+TQSize KviLinksWindow::tqsizeHint() const
{
- QSize ret(m_pSplitter->sizeHint().width(),
- m_pSplitter->sizeHint().height() + m_pTopSplitter->sizeHint().height());
+ TQSize ret(m_pSplitter->tqsizeHint().width(),
+ m_pSplitter->tqsizeHint().height() + m_pTopSplitter->tqsizeHint().height());
return ret;
}
void KviLinksWindow::fillCaptionBuffers()
{
- KviQString::sprintf(m_szPlainTextCaption,__tr2qs("Links for %Q [IRC Context %u]"),&m_szRootServer,m_pConsole->ircContextId());
+ KviTQString::sprintf(m_szPlainTextCaption,__tr2qs("Links for %Q [IRC Context %u]"),&m_szRootServer,m_pConsole->ircContextId());
- KviQString::sprintf(m_szHtmlActiveCaption,
+ KviTQString::sprintf(m_szHtmlActiveCaption,
__tr2qs("<nobr><font color=\"%s\"><b>Links for %Q</b></font> " \
"<font color=\"%s\">[IRC Context %u]</font></nobr>"),
- KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name().ascii(),
+ TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii(),
&m_szRootServer,
- KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name().ascii(),
+ TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive2).name()).ascii(),
m_pConsole->ircContextId());
- KviQString::sprintf(m_szHtmlInactiveCaption,
+ KviTQString::sprintf(m_szHtmlInactiveCaption,
__tr2qs("<nobr><font color=\"%s\"><b>Links for %Q</b></font> " \
"<font color=\"%s\">[IRC Context %u]</font></nobr>"),
- KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name().ascii(),
+ TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii(),
&m_szRootServer,
- KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name().ascii(),
+ TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive2).name()).ascii(),
m_pConsole->ircContextId());
}
@@ -213,7 +213,7 @@ void KviLinksWindow::endOfLinks()
m_pListView->setUpdatesEnabled(false);
for(KviLink *l=m_pLinkList->first();l;l=m_pLinkList->next()){
totalHosts++;
- if(l->hops == 0)root = new KviTalListViewItem(m_pListView,QString(l->host.ptr()),"0",QString(l->description.ptr()));
+ if(l->hops == 0)root = new KviTalListViewItem(m_pListView,TQString(l->host.ptr()),"0",TQString(l->description.ptr()));
else {
totalHops += l->hops;
if(l->hops < 4){
@@ -229,21 +229,21 @@ void KviLinksWindow::endOfLinks()
maxHops = l->hops;
szMaxHop = l->host;
}
- if(l->host.contains('*'))wildServers++;
+ if(l->host.tqcontains('*'))wildServers++;
it = insertLink(l);
if(!it){
- output(KVI_OUT_SYSTEMERROR,__tr2qs("Broken link: Missing parent (%s) for %s (%d hops): %s (used /LINKS <mask> ?)"),
- l->parent.ptr(),l->host.ptr(),l->hops,l->description.ptr());
+ output(KVI_OUT_SYSTEMERROR,__tr2qs("Broken link: Missing tqparent (%s) for %s (%d hops): %s (used /LINKS <tqmask> ?)"),
+ l->tqparent.ptr(),l->host.ptr(),l->hops,l->description.ptr());
brokenLinks++;
- KviStr tmp(KviStr::Format,__tr2qs("%s: Parent link %s"),l->description.ptr(),l->parent.ptr());
+ KviStr tmp(KviStr::Format,__tr2qs("%s: Parent link %s"),l->description.ptr(),l->tqparent.ptr());
KviStr tmp2(KviStr::Format,"%d",l->hops);
- if(root)it = new KviTalListViewItem(m_pListView,root,QString(l->host.ptr()),QString(tmp2.ptr()),QString(tmp.ptr()));
+ if(root)it = new KviTalListViewItem(m_pListView,root,TQString(l->host.ptr()),TQString(tmp2.ptr()),TQString(tmp.ptr()));
else {
outputNoFmt(KVI_OUT_SYSTEMERROR,__tr2qs("Warning: No root link was sent by the server, the stats may be invalid."));
- it = new KviTalListViewItem(m_pListView,QString(l->host.ptr()),QString(tmp2.ptr()),QString(tmp.ptr()));
+ it = new KviTalListViewItem(m_pListView,TQString(l->host.ptr()),TQString(tmp2.ptr()),TQString(tmp.ptr()));
}
} else {
- it = it->parent();
+ it = it->tqparent();
if(it)
{
int links = it->childCount() + 1;
@@ -277,7 +277,7 @@ void KviLinksWindow::endOfLinks()
m_szRootServer = root->text(0);
output(KVI_OUT_LINKS,__tr2qs("%c%cLinks for %Q"),KVI_TEXT_BOLD,KVI_TEXT_UNDERLINE,&m_szRootServer);
outputNoFmt(KVI_OUT_LINKS,"======================");
- QString tmpo = wildServers ? __tr2qs("Total hosts listed") : __tr2qs("Total hosts in the network");
+ TQString tmpo = wildServers ? __tr2qs("Total hosts listed") : __tr2qs("Total hosts in the network");
output(KVI_OUT_LINKS,"%Q: %d",&tmpo,totalHosts);
if(wildServers)output(KVI_OUT_LINKS,__tr2qs("Wildcard servers (hubs?): %d"),wildServers);
output(KVI_OUT_LINKS,__tr2qs("Direct links: %d (~%d.%d %)"),directLinks,directProcent / 100, directProcent % 100);
@@ -301,18 +301,18 @@ void KviLinksWindow::endOfLinks()
while(!m_pLinkList->isEmpty())m_pLinkList->removeFirst();
m_pListView->setUpdatesEnabled(true);
- m_pListView->repaint();
+ m_pListView->tqrepaint();
}
KviTalListViewItem * KviLinksWindow::insertLink(KviLink *l)
{
__range_valid(l->hops > 0);
- KviTalListViewItem * i = getItemByHost(l->parent.ptr(),0);
+ KviTalListViewItem * i = getItemByHost(l->tqparent.ptr(),0);
KviTalListViewItem * it = 0;
if(!i)return 0;
else {
KviStr hops(KviStr::Format,"%d",l->hops);
- it = new KviTalListViewItem(i,QString(l->host.ptr()),QString(hops.ptr()),QString(l->description.ptr()));
+ it = new KviTalListViewItem(i,TQString(l->host.ptr()),TQString(hops.ptr()),TQString(l->description.ptr()));
i->setOpen(true);
}
return it;
@@ -332,7 +332,7 @@ KviTalListViewItem * KviLinksWindow::getItemByHost(const char *host,KviTalListVi
return 0;
}
-void KviLinksWindow::showHostPopup(KviTalListViewItem *i,const QPoint &p,int)
+void KviLinksWindow::showHostPopup(KviTalListViewItem *i,const TQPoint &p,int)
{
if(!i)return;
KviStr host=i->text(0);
@@ -405,7 +405,7 @@ void KviLinksWindow::processData(KviIrcMessage *msg)
KviLink * l = new KviLink;
l->host = msg->safeParam(1);
- l->parent = msg->safeParam(2);
+ l->tqparent = msg->safeParam(2);
const char * tr = msg->safeTrailing();
@@ -441,7 +441,7 @@ void KviLinksWindow::processData(KviIrcMessage *msg)
// KviWindowProperty p;
// p.rect = externalGeometry();
// p.isDocked = isAttacched();
-// QValueList<int> l(m_pSplitter->sizes());
+// TQValueList<int> l(m_pSplitter->sizes());
// if(l.count() >= 1)p.splitWidth1 = *(l.at(0));
// if(l.count() >= 2)p.splitWidth2 = *(l.at(1));
// p.timestamp = m_pView->timestamp();
@@ -455,7 +455,7 @@ void KviLinksWindow::processData(KviIrcMessage *msg)
//
//void KviLinksWindow::setProperties(KviWindowProperty *p)
//{
-// QValueList<int> l;
+// TQValueList<int> l;
// l.append(p->splitWidth1);
// l.append(p->splitWidth2);
// m_pVertSplitter->setSizes(l);