summaryrefslogtreecommitdiffstats
path: root/src/modules/term
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
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')
-rw-r--r--src/modules/term/libkviterm.cpp2
-rw-r--r--src/modules/term/termwidget.cpp52
-rw-r--r--src/modules/term/termwidget.h27
-rw-r--r--src/modules/term/termwindow.cpp8
-rw-r--r--src/modules/term/termwindow.h7
5 files changed, 49 insertions, 47 deletions
diff --git a/src/modules/term/libkviterm.cpp b/src/modules/term/libkviterm.cpp
index 742aaa62..66717cf1 100644
--- a/src/modules/term/libkviterm.cpp
+++ b/src/modules/term/libkviterm.cpp
@@ -28,7 +28,7 @@
#include "kvi_frame.h"
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include "kvi_pointerlist.h"
#ifdef COMPILE_KDE_SUPPORT
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"
diff --git a/src/modules/term/termwidget.h b/src/modules/term/termwidget.h
index 88e9d9a7..75739677 100644
--- a/src/modules/term/termwidget.h
+++ b/src/modules/term/termwidget.h
@@ -26,9 +26,9 @@
#ifdef COMPILE_KDE_SUPPORT
-#include <qframe.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include "kvi_tal_hbox.h"
#include "kparts/part.h"
@@ -36,30 +36,31 @@
class KviFrame;
-class KviTermWidget : public QFrame
+class KviTermWidget : public TQFrame
{
Q_OBJECT
- Q_PROPERTY( int KviProperty_ChildFocusOwner READ dummy )
+ TQ_OBJECT
+ TQ_PROPERTY( int KviProperty_ChildFocusOwner READ dummy )
public:
- KviTermWidget(QWidget * par,KviFrame * lpFrm,bool bIsStandalone = false);
+ KviTermWidget(TQWidget * par,KviFrame * lpFrm,bool bIsStandalone = false);
~KviTermWidget();
private:
KviTalHBox * m_pHBox;
- QLabel * m_pTitleLabel;
- QPushButton * m_pCloseButton;
+ TQLabel * m_pTitleLabel;
+ TQPushButton * m_pCloseButton;
KParts::Part * m_pKonsolePart;
bool m_bIsStandalone;
- QWidget * m_pKonsoleWidget;
+ TQWidget * m_pKonsoleWidget;
protected:
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
protected slots:
void closeClicked();
- void changeTitle(int i,const QString& str);
+ void changeTitle(int i,const TQString& str);
void notifySize(int,int);
void changeColumns(int);
public:
- QWidget * konsoleWidget(){ return m_pKonsoleWidget ? m_pKonsoleWidget : this; };
- virtual QSize sizeHint() const;
+ TQWidget * konsoleWidget(){ return m_pKonsoleWidget ? m_pKonsoleWidget : this; };
+ virtual TQSize tqsizeHint() const;
int dummy() const { return 0; };
protected slots:
void konsoleDestroyed();
diff --git a/src/modules/term/termwindow.cpp b/src/modules/term/termwindow.cpp
index 39b6cc1a..700328fc 100644
--- a/src/modules/term/termwindow.cpp
+++ b/src/modules/term/termwindow.cpp
@@ -50,19 +50,19 @@ KviTermWindow::~KviTermWindow()
if(g_pTermWindowList->isEmpty() && g_pTermWidgetList->isEmpty())g_pTermModule->unlock();
}
-QPixmap * KviTermWindow::myIconPtr()
+TQPixmap * KviTermWindow::myIconPtr()
{
return g_pIconManager->getSmallIcon(KVI_SMALLICON_RAW);
}
-void KviTermWindow::resizeEvent(QResizeEvent *e)
+void KviTermWindow::resizeEvent(TQResizeEvent *e)
{
if(m_pTermWidget)m_pTermWidget->setGeometry(0,0,width(),height());
}
-QSize KviTermWindow::sizeHint() const
+TQSize KviTermWindow::tqsizeHint() const
{
- return m_pTermWidget ? m_pTermWidget->sizeHint() : KviWindow::sizeHint();
+ return m_pTermWidget ? m_pTermWidget->tqsizeHint() : KviWindow::tqsizeHint();
}
void KviTermWindow::fillCaptionBuffers()
diff --git a/src/modules/term/termwindow.h b/src/modules/term/termwindow.h
index e3a9d556..340e7439 100644
--- a/src/modules/term/termwindow.h
+++ b/src/modules/term/termwindow.h
@@ -35,17 +35,18 @@ class KviTermWidget;
class KviTermWindow : public KviWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
KviTermWindow(KviFrame * lpFrm,const char * name);
~KviTermWindow();
protected:
KviTermWidget * m_pTermWidget;
protected:
- virtual QPixmap * myIconPtr();
+ virtual TQPixmap * myIconPtr();
virtual void fillCaptionBuffers();
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
public:
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
};