summaryrefslogtreecommitdiffstats
path: root/src/modules/channelsjoin
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/channelsjoin
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/channelsjoin')
-rw-r--r--src/modules/channelsjoin/channelsjoinwindow.cpp76
-rw-r--r--src/modules/channelsjoin/channelsjoinwindow.h21
-rw-r--r--src/modules/channelsjoin/libkvichannelsjoin.cpp10
3 files changed, 54 insertions, 53 deletions
diff --git a/src/modules/channelsjoin/channelsjoinwindow.cpp b/src/modules/channelsjoin/channelsjoinwindow.cpp
index 5f73b55e..b05bb5a7 100644
--- a/src/modules/channelsjoin/channelsjoinwindow.cpp
+++ b/src/modules/channelsjoin/channelsjoinwindow.cpp
@@ -35,71 +35,71 @@
#include "kvi_regchan.h"
#include "kvi_kvs_script.h"
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include "kvi_tal_listview.h"
#include <kvi_tal_groupbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#ifdef COMPILE_USE_QT4
- #include <q3header.h>
+ #include <tq3header.h>
#else
- #include <qheader.h>
+ #include <tqheader.h>
#endif
-#include <qevent.h>
+#include <tqevent.h>
extern KviChannelsJoinWindow * g_pChannelsWindow;
-extern QRect g_rectChannelsJoinGeometry;
+extern TQRect g_rectChannelsJoinGeometry;
// kvi_app.cpp
extern KVIRC_API KviRegisteredChannelDataBase * g_pRegisteredChannelDataBase;
-KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name)
-: QDialog(par,name)
+KviChannelsJoinWindow::KviChannelsJoinWindow(TQWidget * par, const char * name)
+: TQDialog(par,name)
{
m_pConsole=0;
setCaption(__tr2qs("Join Channels"));
setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)));
- QGridLayout * g = new QGridLayout(this,4,2,4,8);
+ TQGridLayout * g = new TQGridLayout(this,4,2,4,8);
m_pListView = new KviTalListView(this);
m_pListView->addColumn(__tr2qs("Channel"));
m_pListView->setRootIsDecorated(true);
m_pListView->setSelectionMode(KviTalListView::Single);
g->addMultiCellWidget(m_pListView,0,0,0,1);
- connect(m_pListView,SIGNAL(clicked(KviTalListViewItem *)),this,SLOT(itemClicked(KviTalListViewItem *)));
- connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem *)),this,SLOT(itemDoubleClicked(KviTalListViewItem *)));
+ connect(m_pListView,TQT_SIGNAL(clicked(KviTalListViewItem *)),this,TQT_SLOT(itemClicked(KviTalListViewItem *)));
+ connect(m_pListView,TQT_SIGNAL(doubleClicked(KviTalListViewItem *)),this,TQT_SLOT(itemDoubleClicked(KviTalListViewItem *)));
m_pGroupBox = new KviTalGroupBox(2,Qt::Horizontal,__tr2qs("Channel" ),this);
- QString szMsg = __tr2qs("Name");
+ TQString szMsg = __tr2qs("Name");
szMsg.append(":");
- QLabel * l = new QLabel(szMsg,m_pGroupBox);
+ TQLabel * l = new TQLabel(szMsg,m_pGroupBox);
- m_pChannelEdit = new QLineEdit(m_pGroupBox);
- connect(m_pChannelEdit,SIGNAL(returnPressed()), this, SLOT(editReturnPressed()));
- connect(m_pChannelEdit,SIGNAL(textChanged(const QString &)),this,SLOT(editTextChanged(const QString &)));
+ m_pChannelEdit = new TQLineEdit(m_pGroupBox);
+ connect(m_pChannelEdit,TQT_SIGNAL(returnPressed()), this, TQT_SLOT(editReturnPressed()));
+ connect(m_pChannelEdit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(editTextChanged(const TQString &)));
szMsg = __tr2qs("Password");
szMsg.append(":");
- l = new QLabel(szMsg,m_pGroupBox);
+ l = new TQLabel(szMsg,m_pGroupBox);
- m_pPass = new QLineEdit(m_pGroupBox);
- m_pPass->setEchoMode(QLineEdit::Password);
+ m_pPass = new TQLineEdit(m_pGroupBox);
+ m_pPass->setEchoMode(TQLineEdit::Password);
g->addMultiCellWidget(m_pGroupBox,1,1,0,1);
- m_pJoinButton = new QPushButton(__tr2qs("&Join"),this);
+ m_pJoinButton = new TQPushButton(__tr2qs("&Join"),this);
// Join on return pressed
m_pJoinButton->setDefault(true);
- connect(m_pJoinButton,SIGNAL(clicked()),this,SLOT(joinClicked()));
+ connect(m_pJoinButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(joinClicked()));
#ifdef COMPILE_USE_QT4
- g->addMultiCellWidget(m_pJoinButton,2,2,0,1,Qt::AlignHCenter);
+ g->addMultiCellWidget(m_pJoinButton,2,2,0,1,TQt::AlignHCenter);
#else
g->addMultiCellWidget(m_pJoinButton,2,2,0,1,AlignHCenter);
#endif
@@ -110,8 +110,8 @@ KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name)
g->addWidget(m_pShowAtStartupCheck,3,0);
- QPushButton * cancelButton = new QPushButton(__tr2qs("Close"),this);
- connect(cancelButton,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+ TQPushButton * cancelButton = new TQPushButton(__tr2qs("Close"),this);
+ connect(cancelButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked()));
g->addWidget(cancelButton,3,1);
@@ -119,10 +119,10 @@ KviChannelsJoinWindow::KviChannelsJoinWindow(QWidget * par, const char * name)
KviTalHBox * hb = new KviTalHBox(this);
hb->setSpacing(4);
- QPushButton * namesButton = new QPushButton("/names", hb);
- connect(namesButton,SIGNAL(clicked()),this,SLOT(namesClicked()));
- QPushButton * whoButton = new QPushButton("/who", hb);
- connect(whoButton,SIGNAL(clicked()),this,SLOT(whoClicked()));
+ TQPushButton * namesButton = new TQPushButton("/names", hb);
+ connect(namesButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(namesClicked()));
+ TQPushButton * whoButton = new TQPushButton("/who", hb);
+ connect(whoButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(whoClicked()));
g->addWidget(hb,2,0);
*/
@@ -144,7 +144,7 @@ KviChannelsJoinWindow::~KviChannelsJoinWindow()
{
KVI_OPTION_BOOL(KviOption_boolShowChannelsJoinOnIrc) = m_pShowAtStartupCheck->isChecked();
- g_rectChannelsJoinGeometry = QRect(pos().x(),pos().y(),size().width(),size().height());
+ g_rectChannelsJoinGeometry = TQRect(pos().x(),pos().y(),size().width(),size().height());
g_pChannelsWindow = 0;
}
@@ -167,10 +167,10 @@ void KviChannelsJoinWindow::fillListView()
if(m_pConsole)
{
- QStringList* pList=g_pApp->getRecentChannels(m_pConsole->currentNetworkName());
+ TQStringList* pList=g_pApp->getRecentChannels(m_pConsole->currentNetworkName());
if(pList)
{
- for(QStringList::Iterator it = pList->begin(); it != pList->end(); ++it)
+ for(TQStringList::Iterator it = pList->begin(); it != pList->end(); ++it)
{
chld = new KviTalListViewItem(par,*it);
chld->setPixmap(0,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CHANNEL)));
@@ -200,7 +200,7 @@ void KviChannelsJoinWindow::fillListView()
void KviChannelsJoinWindow::itemClicked(KviTalListViewItem * it)
{
if(!it)return;
- if(!it->parent())return;
+ if(!it->tqparent())return;
KviStr tmp = it->text(0);
m_pChannelEdit->setText(tmp.ptr());
enableJoin();
@@ -209,7 +209,7 @@ void KviChannelsJoinWindow::itemClicked(KviTalListViewItem * it)
void KviChannelsJoinWindow::itemDoubleClicked(KviTalListViewItem * it)
{
if(!it)return;
- if(!it->parent())return;
+ if(!it->tqparent())return;
KviStr tmp = it->text(0);
m_pChannelEdit->setText(tmp.ptr());
enableJoin();
@@ -217,7 +217,7 @@ void KviChannelsJoinWindow::itemDoubleClicked(KviTalListViewItem * it)
}
-void KviChannelsJoinWindow::editTextChanged(const QString &)
+void KviChannelsJoinWindow::editTextChanged(const TQString &)
{
enableJoin();
}
@@ -292,7 +292,7 @@ void KviChannelsJoinWindow::editReturnPressed()
joinClicked();
}
-void KviChannelsJoinWindow::closeEvent(QCloseEvent *e)
+void KviChannelsJoinWindow::closeEvent(TQCloseEvent *e)
{
e->ignore();
delete this;
diff --git a/src/modules/channelsjoin/channelsjoinwindow.h b/src/modules/channelsjoin/channelsjoinwindow.h
index d0ce62a9..7e6abf5b 100644
--- a/src/modules/channelsjoin/channelsjoinwindow.h
+++ b/src/modules/channelsjoin/channelsjoinwindow.h
@@ -26,38 +26,39 @@
#include "kvi_window.h"
#include "kvi_string.h"
-#include <qdialog.h>
+#include <tqdialog.h>
class KviConsole;
class KviTalGroupBox;
-class QPushButton;
-class QLineEdit;
+class TQPushButton;
+class TQLineEdit;
#include "kvi_styled_controls.h"
#include "kvi_tal_listview.h"
-class KviChannelsJoinWindow : public QDialog
+class KviChannelsJoinWindow : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviChannelsJoinWindow(QWidget * par, const char * name);
+ KviChannelsJoinWindow(TQWidget * par, const char * name);
~KviChannelsJoinWindow();
protected:
- QLineEdit * m_pChannelEdit;
+ TQLineEdit * m_pChannelEdit;
KviTalListView * m_pListView;
KviTalGroupBox * m_pGroupBox;
- QLineEdit * m_pPass;
+ TQLineEdit * m_pPass;
KviStyledCheckBox * m_pShowAtStartupCheck;
KviStyledCheckBox * m_pCloseAfterJoinCheck;
- QPushButton * m_pJoinButton;
+ TQPushButton * m_pJoinButton;
KviConsole * m_pConsole;
public:
- virtual void closeEvent(QCloseEvent *e);
+ virtual void closeEvent(TQCloseEvent *e);
void fillListView();
void enableJoin();
void setConsole(KviConsole * pConsole);
protected slots:
- void editTextChanged(const QString &);
+ void editTextChanged(const TQString &);
void itemClicked(KviTalListViewItem *it);
void itemDoubleClicked(KviTalListViewItem *it);
void editReturnPressed();
diff --git a/src/modules/channelsjoin/libkvichannelsjoin.cpp b/src/modules/channelsjoin/libkvichannelsjoin.cpp
index a2936e8e..2cb992da 100644
--- a/src/modules/channelsjoin/libkvichannelsjoin.cpp
+++ b/src/modules/channelsjoin/libkvichannelsjoin.cpp
@@ -30,10 +30,10 @@
#include "kvi_locale.h"
#include "kvi_config.h"
-#include <qsplitter.h>
+#include <tqsplitter.h>
KviChannelsJoinWindow * g_pChannelsWindow = 0;
-QRect g_rectChannelsJoinGeometry;
+TQRect g_rectChannelsJoinGeometry;
/*
@doc: channelsjoin.open
@@ -68,11 +68,11 @@ static bool channelsjoin_kvs_cmd_open(KviKvsModuleCommandCall * c)
static bool channelsjoin_module_init(KviModule * m)
{
- QString fName;
+ TQString fName;
m->getDefaultConfigFileName(fName);
KviConfig cfg(fName,KviConfig::Read);
- g_rectChannelsJoinGeometry = cfg.readRectEntry("geometry",QRect(30,30,320,410));
+ g_rectChannelsJoinGeometry = cfg.readRectEntry("geometry",TQRect(30,30,320,410));
KVSM_REGISTER_SIMPLE_COMMAND(m,"open",channelsjoin_kvs_cmd_open);
return true;
@@ -80,7 +80,7 @@ static bool channelsjoin_module_init(KviModule * m)
static bool channelsjoin_module_cleanup(KviModule *m)
{
- QString fName;
+ TQString fName;
m->getDefaultConfigFileName(fName);
KviConfig cfg(fName,KviConfig::Write);