summaryrefslogtreecommitdiffstats
path: root/src/modules/term/termwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/term/termwidget.cpp
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/term/termwidget.cpp')
-rw-r--r--src/modules/term/termwidget.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/modules/term/termwidget.cpp b/src/modules/term/termwidget.cpp
index 45bf63a0..04d61567 100644
--- a/src/modules/term/termwidget.cpp
+++ b/src/modules/term/termwidget.cpp
@@ -28,10 +28,10 @@
#include "kvi_iconmanager.h"
#include "kvi_locale.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include "kvi_pointerlist.h"
-#include <qtooltip.h>
-#include <qtimer.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
#ifdef COMPILE_KDE_SUPPORT
@@ -44,8 +44,8 @@ extern KviPointerList<KviTermWidget> * g_pTermWidgetList;
extern KviPointerList<KviTermWindow> * g_pTermWindowList;
extern KviStr g_szKonsoleLibraryName;
-KviTermWidget::KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone)
-: QFrame(par,"term_widget")
+KviTermWidget::KviTermWidget(TQWidget * par,KviFrame * lpFrm,bool bIsStandalone)
+: TQFrame(par,"term_widget")
{
if(bIsStandalone)g_pTermWidgetList->append(this);
m_bIsStandalone = bIsStandalone;
@@ -56,20 +56,20 @@ KviTermWidget::KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone)
if(bIsStandalone)
{
m_pHBox = new KviTalHBox(this);
- m_pTitleLabel = new QLabel(__tr2qs("Terminal emulator"),m_pHBox);
- m_pTitleLabel->setFrameStyle(QFrame::Raised | QFrame::WinPanel);
- m_pCloseButton = new QPushButton("",m_pHBox);
+ m_pTitleLabel = new TQLabel(__tr2qs("Terminal emulator"),m_pHBox);
+ m_pTitleLabel->setFrameStyle(TQFrame::Raised | TQFrame::WinPanel);
+ m_pCloseButton = new TQPushButton("",m_pHBox);
m_pCloseButton->setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)));
- QToolTip::add(m_pCloseButton,__tr2qs("Close this window"));
+ TQToolTip::add(m_pCloseButton,__tr2qs("Close this window"));
m_pHBox->setStretchFactor(m_pTitleLabel,2);
- connect(m_pCloseButton,SIGNAL(clicked()),this,SLOT(closeClicked()));
+ connect(m_pCloseButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(closeClicked()));
} else {
m_pHBox = 0;
m_pTitleLabel = 0;
m_pCloseButton = 0;
}
- setFrameStyle(QFrame::Sunken | QFrame::Panel);
+ setFrameStyle(TQFrame::Sunken | TQFrame::Panel);
KParts::Factory * pKonsoleFactory = static_cast<KParts::Factory *>(
KLibLoader::self()->factory(g_szKonsoleLibraryName.ptr()));
@@ -84,15 +84,15 @@ KviTermWidget::KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone)
{
// debug("PART %d",m_pKonsolePart);
m_pKonsoleWidget = m_pKonsolePart->widget();
- connect(m_pKonsoleWidget,SIGNAL(destroyed()),this,SLOT(konsoleDestroyed()));
+ connect(m_pKonsoleWidget,TQT_SIGNAL(destroyed()),this,TQT_SLOT(konsoleDestroyed()));
// debug("Widget %d",m_pKonsoleWidget);
} else {
- m_pKonsoleWidget = new QLabel(this,
+ m_pKonsoleWidget = new TQLabel(this,
__tr2qs("Can't create the terminal emulation part"));
}
} else {
- m_pKonsoleWidget = new QLabel(this,
+ m_pKonsoleWidget = new TQLabel(this,
__tr2qs("Can't retrieve the terminal emulation factory"));
}
}
@@ -100,24 +100,24 @@ KviTermWidget::KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone)
KviTermWidget::~KviTermWidget()
{
if(m_pKonsoleWidget)
- disconnect(m_pKonsoleWidget,SIGNAL(destroyed()),this,SLOT(konsoleDestroyed()));
+ disconnect(m_pKonsoleWidget,TQT_SIGNAL(destroyed()),this,TQT_SLOT(konsoleDestroyed()));
if(m_bIsStandalone)g_pTermWidgetList->removeRef(this);
if(g_pTermWindowList->isEmpty() && g_pTermWidgetList->isEmpty())g_pTermModule->unlock();
// debug("DELETING KONSOLE WIDGET");
-// if(m_pKonsoleWidget)delete m_pKonsoleWidget; <--// Qt will delete it
+// if(m_pKonsoleWidget)delete m_pKonsoleWidget; <--// TQt will delete it
// debug("DELETING KONSOLE PART");
// if(m_pKonsolePart)delete m_pKonsolePart; <--// the part will delete self when the widget will die
// debug("KONSOLE PART DELETED");
}
-void KviTermWidget::resizeEvent(QResizeEvent *e)
+void KviTermWidget::resizeEvent(TQResizeEvent *e)
{
int hght = 0;
if(m_bIsStandalone)
{
- hght = m_pCloseButton->sizeHint().height();
+ hght = m_pCloseButton->tqsizeHint().height();
m_pHBox->setGeometry(1,1,width() - 2,hght + 1);
}
@@ -135,16 +135,16 @@ void KviTermWidget::konsoleDestroyed()
m_pKonsoleWidget = 0;
m_pKonsolePart = 0;
hide();
- QTimer::singleShot(0,this,SLOT(autoClose()));
+ TQTimer::singleShot(0,this,TQT_SLOT(autoClose()));
}
void KviTermWidget::autoClose()
{
if(m_bIsStandalone)delete this;
- else ((KviWindow *)parent())->close();
+ else ((KviWindow *)tqparent())->close();
}
-void KviTermWidget::changeTitle(int i,const QString& str)
+void KviTermWidget::changeTitle(int i,const TQString& str)
{
if(m_bIsStandalone)m_pTitleLabel->setText(str);
}
@@ -157,21 +157,21 @@ void KviTermWidget::changeColumns(int)
{
}
-QSize KviTermWidget::sizeHint() const
+TQSize KviTermWidget::tqsizeHint() const
{
int hght = 0;
int wdth = 0;
if(m_pKonsoleWidget)
{
- hght += m_pKonsoleWidget->sizeHint().height();
- wdth = m_pKonsoleWidget->sizeHint().width();
+ hght += m_pKonsoleWidget->tqsizeHint().height();
+ wdth = m_pKonsoleWidget->tqsizeHint().width();
}
if(m_pCloseButton)
{
- hght += m_pCloseButton->sizeHint().height();
+ hght += m_pCloseButton->tqsizeHint().height();
}
- return QSize(wdth + 2,hght + 2);
+ return TQSize(wdth + 2,hght + 2);
}
#include "termwidget.moc"