summaryrefslogtreecommitdiffstats
path: root/src/modules/options/optw_identity.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/options/optw_identity.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/options/optw_identity.cpp')
-rw-r--r--src/modules/options/optw_identity.cpp214
1 files changed, 107 insertions, 107 deletions
diff --git a/src/modules/options/optw_identity.cpp b/src/modules/options/optw_identity.cpp
index 998ca5a4..4c892102 100644
--- a/src/modules/options/optw_identity.cpp
+++ b/src/modules/options/optw_identity.cpp
@@ -24,16 +24,16 @@
#include "optw_identity.h"
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include "kvi_tal_tooltip.h"
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qmessagebox.h>
-#include <qtimer.h>
-#include <qvalidator.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqmessagebox.h>
+#include <tqtimer.h>
+#include <tqvalidator.h>
#include "kvi_defaults.h"
#include "kvi_settings.h"
@@ -51,51 +51,51 @@
//#warning "Info tips"
-KviNickAlternativesDialog::KviNickAlternativesDialog(QWidget * par,const QString &n1,const QString &n2,const QString &n3)
-: QDialog(par)
+KviNickAlternativesDialog::KviNickAlternativesDialog(TQWidget * par,const TQString &n1,const TQString &n2,const TQString &n3)
+: TQDialog(par)
{
- QGridLayout * g = new QGridLayout(this,5,3,4,12);
+ TQGridLayout * g = new TQGridLayout(this,5,3,4,12);
setCaption(__tr2qs_ctx("Nickname alternatives","options"));
- QLabel * l = new QLabel(this);
+ TQLabel * l = new TQLabel(this);
l->setText(__tr2qs_ctx("<center>Here you can choose up to three nicknames " \
"alternative to the primary one. KVIrc will use the alternatives " \
"if the primary nick is already used by someone else on a particular " \
"IRC network.</center>","options"));
g->addMultiCellWidget(l,0,0,0,2);
- l = new QLabel(this);
+ l = new TQLabel(this);
l->setText(__tr2qs_ctx("Alt. Nickname 1:","options"));
g->addWidget(l,1,0);
- m_pNickEdit1 = new QLineEdit(this);
+ m_pNickEdit1 = new TQLineEdit(this);
g->addMultiCellWidget(m_pNickEdit1,1,1,1,2);
m_pNickEdit1->setText(n1);
- l = new QLabel(this);
+ l = new TQLabel(this);
l->setText(__tr2qs_ctx("Alt. Nickname 2:","options"));
g->addWidget(l,2,0);
- m_pNickEdit2 = new QLineEdit(this);
+ m_pNickEdit2 = new TQLineEdit(this);
g->addMultiCellWidget(m_pNickEdit2,2,2,1,2);
m_pNickEdit2->setText(n2);
- l = new QLabel(this);
+ l = new TQLabel(this);
l->setText(__tr2qs_ctx("Alt. Nickname 3:","options"));
g->addWidget(l,3,0);
- m_pNickEdit3 = new QLineEdit(this);
+ m_pNickEdit3 = new TQLineEdit(this);
g->addMultiCellWidget(m_pNickEdit3,3,3,1,2);
m_pNickEdit3->setText(n3);
KviTalHBox * h = new KviTalHBox(this);
h->setSpacing(8);
g->addWidget(h,4,2);
- QPushButton * pb = new QPushButton(__tr2qs_ctx("Cancel","options"),h);
+ TQPushButton * pb = new TQPushButton(__tr2qs_ctx("Cancel","options"),h);
//g->addWidget(pb,4,2);
- connect(pb,SIGNAL(clicked()),this,SLOT(reject()));
+ connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject()));
- pb = new QPushButton(__tr2qs_ctx("Ok","options"),h);
+ pb = new TQPushButton(__tr2qs_ctx("Ok","options"),h);
pb->setDefault(true);
- connect(pb,SIGNAL(clicked()),this,SLOT(accept()));
+ connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(accept()));
g->setColStretch(0,1);
@@ -106,7 +106,7 @@ KviNickAlternativesDialog::~KviNickAlternativesDialog()
{
}
-void KviNickAlternativesDialog::fill(QString &n1,QString &n2,QString &n3)
+void KviNickAlternativesDialog::fill(TQString &n1,TQString &n2,TQString &n3)
{
n1 = m_pNickEdit1->text();
n2 = m_pNickEdit2->text();
@@ -124,25 +124,25 @@ void KviNickAlternativesDialog::fill(QString &n1,QString &n2,QString &n3)
-KviAvatarDownloadDialog::KviAvatarDownloadDialog(QWidget * par,const QString &szUrl)
-: QDialog(par)
+KviAvatarDownloadDialog::KviAvatarDownloadDialog(TQWidget * par,const TQString &szUrl)
+: TQDialog(par)
{
setCaption(__tr2qs_ctx("Avatar Download - KVIrc","options"));
m_szUrl = szUrl;
- QGridLayout * g = new QGridLayout(this,2,2,4,8);
+ TQGridLayout * g = new TQGridLayout(this,2,2,4,8);
- m_pOutput = new QLabel(__tr2qs_ctx("<center>Please wait while the avatar is being downloaded</center>","options"),this);
+ m_pOutput = new TQLabel(__tr2qs_ctx("<center>Please wait while the avatar is being downloaded</center>","options"),this);
g->addMultiCellWidget(m_pOutput,0,0,0,1);
- QPushButton * b = new QPushButton(__tr2qs_ctx("Abort","options"),this);
+ TQPushButton * b = new TQPushButton(__tr2qs_ctx("Abort","options"),this);
g->addWidget(b,1,1);
- connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+ connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked()));
m_pRequest = new KviHttpRequest();
- QTimer::singleShot(0,this,SLOT(startDownload()));
+ TQTimer::singleShot(0,this,TQT_SLOT(startDownload()));
g->setRowStretch(0,1);
g->setColStretch(0,1);
@@ -157,10 +157,10 @@ KviAvatarDownloadDialog::~KviAvatarDownloadDialog()
void KviAvatarDownloadDialog::startDownload()
{
- connect(m_pRequest,SIGNAL(terminated(bool)),this,SLOT(downloadTerminated(bool)));
- connect(m_pRequest,SIGNAL(status(const char *)),this,SLOT(downloadMessage(const char *)));
+ connect(m_pRequest,TQT_SIGNAL(terminated(bool)),this,TQT_SLOT(downloadTerminated(bool)));
+ connect(m_pRequest,TQT_SIGNAL(status(const char *)),this,TQT_SLOT(downloadMessage(const char *)));
- QString tmp = m_szUrl;
+ TQString tmp = m_szUrl;
g_pIconManager->urlToCachedFileName(tmp);
g_pApp->getLocalKvircDirectory(m_szLocalFileName,KviApp::Avatars,tmp);
@@ -172,7 +172,7 @@ void KviAvatarDownloadDialog::startDownload()
}
}
-void KviAvatarDownloadDialog::closeEvent(QCloseEvent * e)
+void KviAvatarDownloadDialog::closeEvent(TQCloseEvent * e)
{
m_szErrorMessage = __tr2qs_ctx("Download aborted by user","options");
e->ignore();
@@ -189,7 +189,7 @@ void KviAvatarDownloadDialog::downloadMessage(const char * message)
{
if(message)
{
- QString txt = "<center>";
+ TQString txt = "<center>";
txt += message;
txt += "</center>";
m_pOutput->setText(message);
@@ -207,15 +207,15 @@ void KviAvatarDownloadDialog::downloadTerminated(bool bSuccess)
}
}
-KviAvatarSelectionDialog::KviAvatarSelectionDialog(QWidget * par,const QString &szInitialPath)
-: QDialog(par)
+KviAvatarSelectionDialog::KviAvatarSelectionDialog(TQWidget * par,const TQString &szInitialPath)
+: TQDialog(par)
{
setCaption(__tr2qs_ctx("Choose Avatar - KVIrc","options"));
- QGridLayout * g = new QGridLayout(this,3,3,4,8);
+ TQGridLayout * g = new TQGridLayout(this,3,3,4,8);
- QString msg = "<center>";
+ TQString msg = "<center>";
msg += __tr2qs_ctx("Please select an avatar image. " \
"The full path to a local file or an image on the Web can be used.<br>" \
"If you wish to use a local image file, click the \"<b>Browse</b>\"" \
@@ -223,30 +223,30 @@ KviAvatarSelectionDialog::KviAvatarSelectionDialog(QWidget * par,const QString &
"The full URL for an image (including <b>http://</b>) can be entered manually.","options");
msg += "</center><br>";
- QLabel * l = new QLabel(msg,this);
+ TQLabel * l = new TQLabel(msg,this);
l->setMinimumWidth(250);
g->addMultiCellWidget(l,0,0,0,2);
- m_pLineEdit = new QLineEdit(this);
+ m_pLineEdit = new TQLineEdit(this);
m_pLineEdit->setText(szInitialPath);
m_pLineEdit->setMinimumWidth(180);
g->addMultiCellWidget(m_pLineEdit,1,1,0,1);
- QPushButton * b = new QPushButton(__tr2qs_ctx("&Browse...","options"),this);
- connect(b,SIGNAL(clicked()),this,SLOT(chooseFileClicked()));
+ TQPushButton * b = new TQPushButton(__tr2qs_ctx("&Browse...","options"),this);
+ connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseFileClicked()));
g->addWidget(b,1,2);
KviTalHBox * h = new KviTalHBox(this);h->setSpacing(8);g->addMultiCellWidget(h,2,2,1,2);
- b = new QPushButton(__tr2qs_ctx("&OK","options"),h);
+ b = new TQPushButton(__tr2qs_ctx("&OK","options"),h);
b->setMinimumWidth(80);
b->setDefault(true);
- connect(b,SIGNAL(clicked()),this,SLOT(okClicked()));
+ connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked()));
//g->addWidget(b,2,1);
- b = new QPushButton(__tr2qs_ctx("Cancel","options"),h);
+ b = new TQPushButton(__tr2qs_ctx("Cancel","options"),h);
b->setMinimumWidth(80);
- connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+ connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked()));
//g->addWidget(b,2,2);
g->setRowStretch(0,1);
@@ -271,15 +271,15 @@ void KviAvatarSelectionDialog::cancelClicked()
void KviAvatarSelectionDialog::chooseFileClicked()
{
- QString tmp;
+ TQString tmp;
if(KviFileDialog::askForOpenFileName(tmp,__tr2qs_ctx("Choose an Image File - KVIrc","options"),
- QString::null,QString::null,false,true,this))
+ TQString(),TQString(),false,true,this))
{
m_pLineEdit->setText(tmp);
}
}
-void KviAvatarSelectionDialog::closeEvent(QCloseEvent * e)
+void KviAvatarSelectionDialog::closeEvent(TQCloseEvent * e)
{
e->ignore();
reject();
@@ -290,8 +290,8 @@ void KviAvatarSelectionDialog::closeEvent(QCloseEvent * e)
-KviIdentityOptionsWidget::KviIdentityOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent)
+KviIdentityOptionsWidget::KviIdentityOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent)
{
}
@@ -302,8 +302,8 @@ KviIdentityOptionsWidget::~KviIdentityOptionsWidget()
-KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent)
+KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent)
{
m_szAltNicknames[0] = KVI_OPTION_STRING(KviOption_stringNickname2);
m_szAltNicknames[1] = KVI_OPTION_STRING(KviOption_stringNickname3);
@@ -311,7 +311,7 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren
createLayout(3,1);
- layout()->setMargin(10);
+ tqlayout()->setMargin(10);
KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Basic Properties","options"));
KviTalHBox * hb = new KviTalHBox(gbox);
@@ -325,11 +325,11 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren
"(case insensitive), you can provide alternative nicknames to be used in case"\
"the server refuses to accept the default one.</center>","options"));
#endif
- QValidator * v = new QRegExpValidator(QRegExp("[^-0-9 ][^ ]*"),hb);
+ TQValidator * v = new TQRegExpValidator(TQRegExp("[^-0-9 ][^ ]*"),TQT_TQOBJECT(hb));
sel->setValidator(v);
- QPushButton * pb = new QPushButton(__tr2qs_ctx("Alternatives...","options"),hb);
- connect(pb,SIGNAL(clicked()),this,SLOT(setNickAlternatives()));
+ TQPushButton * pb = new TQPushButton(__tr2qs_ctx("Alternatives...","options"),hb);
+ connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(setNickAlternatives()));
sel = addStringSelector(gbox,__tr2qs_ctx("Username:","options"),KviOption_stringUsername);
sel->setMinimumLabelWidth(120);
@@ -348,22 +348,22 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren
#endif
- QString szOptionalCtcpUserInfo = __tr2qs_ctx("This field is optional and will appear as part of the CTCP USERINFO reply.","options");
- QString szCenterBegin("<center>");
- QString szCenterEnd("</center>");
- QString szTrailing = "<br><br>" + szOptionalCtcpUserInfo + szCenterEnd;
+ TQString szOptionalCtcpUserInfo = __tr2qs_ctx("This field is optional and will appear as part of the CTCP USERINFO reply.","options");
+ TQString szCenterBegin("<center>");
+ TQString szCenterEnd("</center>");
+ TQString szTrailing = "<br><br>" + szOptionalCtcpUserInfo + szCenterEnd;
gbox = addGroupBox(0,1,0,1,1,Qt::Horizontal,__tr2qs_ctx("Profile","options"));
hb = new KviTalHBox(gbox);
hb->setSpacing(4);
- QLabel * l = new QLabel(__tr2qs_ctx("Age:","options"),hb);
+ TQLabel * l = new TQLabel(__tr2qs_ctx("Age:","options"),hb);
l->setMinimumWidth(120);
- m_pAgeCombo = new QComboBox(hb);
+ m_pAgeCombo = new TQComboBox(hb);
#ifdef COMPILE_INFO_TIPS
- QString szTip1 = szCenterBegin + __tr2qs_ctx("Here you can specify your age.","options") + szTrailing;
+ TQString szTip1 = szCenterBegin + __tr2qs_ctx("Here you can specify your age.","options") + szTrailing;
KviTalToolTip::add(l,szTip1);
KviTalToolTip::add(m_pAgeCombo,szTip1);
#endif
@@ -371,7 +371,7 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren
unsigned int i;
for(i=1;i<120;i++)
{
- QString tmp;
+ TQString tmp;
tmp.setNum(i);
m_pAgeCombo->insertItem(tmp);
}
@@ -388,12 +388,12 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren
hb = new KviTalHBox(gbox);
hb->setSpacing(4);
- l = new QLabel(__tr2qs_ctx("Gender:","options"),hb);
+ l = new TQLabel(__tr2qs_ctx("Gender:","options"),hb);
l->setMinimumWidth(120);
- m_pGenderCombo = new QComboBox(hb);
+ m_pGenderCombo = new TQComboBox(hb);
#ifdef COMPILE_INFO_TIPS
- QString szTip2 = szCenterBegin + __tr2qs_ctx("Here you can specify your gender.","options") + szTrailing;
+ TQString szTip2 = szCenterBegin + __tr2qs_ctx("Here you can specify your gender.","options") + szTrailing;
KviTalToolTip::add(l,szTip2);
KviTalToolTip::add(m_pGenderCombo,szTip2);
#endif
@@ -402,9 +402,9 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(QWidget * paren
m_pGenderCombo->insertItem(__tr2qs_ctx("Female","options"));
m_pGenderCombo->insertItem(__tr2qs_ctx("Male","options"));
- if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male"))
+ if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Male"))
m_pGenderCombo->setCurrentItem(2);
- else if(KviQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female"))
+ else if(KviTQString::equalCI(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender),"Female"))
m_pGenderCombo->setCurrentItem(1);
else
m_pGenderCombo->setCurrentItem(0);
@@ -445,7 +445,7 @@ KviIdentityGeneralOptionsWidget::~KviIdentityGeneralOptionsWidget()
void KviIdentityGeneralOptionsWidget::setNickAlternatives()
{
KviNickAlternativesDialog * dlg = new KviNickAlternativesDialog(this,m_szAltNicknames[0],m_szAltNicknames[1],m_szAltNicknames[2]);
- if(dlg->exec() != QDialog::Accepted)return;
+ if(dlg->exec() != TQDialog::Accepted)return;
dlg->fill(m_szAltNicknames[0],m_szAltNicknames[1],m_szAltNicknames[2]);
delete dlg;
}
@@ -488,18 +488,18 @@ void KviIdentityGeneralOptionsWidget::commit()
}
-KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent)
+KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent)
{
createLayout(4,1);
- layout()->setMargin(10);
+ tqlayout()->setMargin(10);
m_pLocalAvatar = new KviPixmap(KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar));
bool bHaveAvatar = (!KVI_OPTION_STRING(KviOption_stringMyAvatar).isEmpty()) && m_pLocalAvatar->pixmap();
#ifdef COMPILE_INFO_TIPS
- QString szTip = __tr2qs_ctx("Here you can choose your avatar image. It will be visible<br>" \
+ TQString szTip = __tr2qs_ctx("Here you can choose your avatar image. It will be visible<br>" \
"by other people that request it. Choose a nice image of yourself,<br>" \
"possibly avoiding obscenity and offending images. It is a good idea<br>" \
"to choose a relatively small file (say 150 Kb max) because<br>" \
@@ -519,7 +519,7 @@ KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(QWidget * parent)
addWidgetToLayout(m_pAvatarPreview,0,1,0,1);
m_pAvatarPreview->setPixmap(m_pLocalAvatar);
m_pAvatarPreview->setEnabled(bHaveAvatar);
- connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pAvatarPreview,SLOT(setEnabled(bool)));
+ connect(m_pUseAvatarCheck,TQT_SIGNAL(toggled(bool)),m_pAvatarPreview,TQT_SLOT(setEnabled(bool)));
#ifdef COMPILE_INFO_TIPS
mergeTip(m_pAvatarPreview,szTip);
#endif
@@ -528,19 +528,19 @@ KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(QWidget * parent)
hb->setSpacing(4);
addWidgetToLayout(hb,0,2,0,2);
- m_pAvatarNameEdit = new QLineEdit(hb);
+ m_pAvatarNameEdit = new TQLineEdit(hb);
m_pAvatarNameEdit->setReadOnly(true);
m_pAvatarNameEdit->setEnabled(bHaveAvatar);
m_pAvatarNameEdit->setText(KVI_OPTION_STRING(KviOption_stringMyAvatar));
- connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pAvatarNameEdit,SLOT(setEnabled(bool)));
+ connect(m_pUseAvatarCheck,TQT_SIGNAL(toggled(bool)),m_pAvatarNameEdit,TQT_SLOT(setEnabled(bool)));
- m_pChooseAvatarButton = new QPushButton(__tr2qs_ctx("Choose...","options"),hb);
+ m_pChooseAvatarButton = new TQPushButton(__tr2qs_ctx("Choose...","options"),hb);
m_pChooseAvatarButton->setEnabled(bHaveAvatar);
- connect(m_pUseAvatarCheck,SIGNAL(toggled(bool)),m_pChooseAvatarButton,SLOT(setEnabled(bool)));
+ connect(m_pUseAvatarCheck,TQT_SIGNAL(toggled(bool)),m_pChooseAvatarButton,TQT_SLOT(setEnabled(bool)));
- connect(m_pChooseAvatarButton,SIGNAL(clicked()),this,SLOT(chooseAvatar()));
+ connect(m_pChooseAvatarButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseAvatar()));
- layout()->setRowStretch(1,2);
+ tqlayout()->setRowStretch(1,2);
}
KviIdentityAvatarOptionsWidget::~KviIdentityAvatarOptionsWidget()
@@ -553,7 +553,7 @@ void KviIdentityAvatarOptionsWidget::commit(void)
{
KviOptionsWidget::commit();
- QString szAvatarName = m_pAvatarNameEdit->text();
+ TQString szAvatarName = m_pAvatarNameEdit->text();
if(m_pUseAvatarCheck->isChecked() && m_pLocalAvatar->pixmap() && (!szAvatarName.isEmpty()))
{
@@ -570,24 +570,24 @@ void KviIdentityAvatarOptionsWidget::commit(void)
void KviIdentityAvatarOptionsWidget::chooseAvatar()
{
- QString szCurrent = m_pAvatarNameEdit->text();
+ TQString szCurrent = m_pAvatarNameEdit->text();
KviAvatarSelectionDialog dlg(this,szCurrent);
- if(dlg.exec() != QDialog::Accepted)return;
+ if(dlg.exec() != TQDialog::Accepted)return;
szCurrent = dlg.avatarName();
szCurrent.stripWhiteSpace();
- if(KviQString::equalCIN(szCurrent,"http://",7))
+ if(KviTQString::equalCIN(szCurrent,"http://",7))
{
// this is an url
// first check if we have it in the cache
- KviAvatar * a = g_pIconManager->getAvatar(QString::null,szCurrent);
+ KviAvatar * a = g_pIconManager->getAvatar(TQString(),szCurrent);
if(!a)
{
// no cache... try downloading
KviAvatarDownloadDialog dlg(this,szCurrent);
- if(dlg.exec() == QDialog::Accepted)
+ if(dlg.exec() == TQDialog::Accepted)
{
// downloaded!
// try to load it
@@ -595,17 +595,17 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar()
{
// unloadable
szCurrent = "";
- QMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"),
+ TQMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"),
__tr2qs_ctx("Failed to load the avatar image.<br>" \
"It may be an unaccessible file or an " \
- "unsupported image format.","options"),QMessageBox::Ok,QMessageBox::NoButton);
+ "unsupported image format.","options"),TQMessageBox::Ok,TQMessageBox::NoButton);
} // else loaded!
} else {
// unloadable
- QString tmp;
- KviQString::sprintf(tmp,__tr2qs_ctx("Failed to download the avatar image.<br>" \
+ TQString tmp;
+ KviTQString::sprintf(tmp,__tr2qs_ctx("Failed to download the avatar image.<br>" \
"<b>%Q</b>","options"),&(dlg.errorMessage()));
- QMessageBox::warning(this,__tr2qs_ctx("Avatar Download Failed - KVIrc","options"),tmp,QMessageBox::Ok,QMessageBox::NoButton);
+ TQMessageBox::warning(this,__tr2qs_ctx("Avatar Download Failed - KVIrc","options"),tmp,TQMessageBox::Ok,TQMessageBox::NoButton);
szCurrent = "";
m_pLocalAvatar->setNull();
}
@@ -619,14 +619,14 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar()
if(m_pLocalAvatar->load(szCurrent))
{
// local path, loaded
- QString tmp = szCurrent;
- int idx = tmp.findRev("/");
+ TQString tmp = szCurrent;
+ int idx = tmp.tqfindRev("/");
if(idx != -1)
{
szCurrent = tmp.right(tmp.length() - (idx + 1));
tmp = szCurrent;
}
- idx = tmp.findRev("\\");
+ idx = tmp.tqfindRev("\\");
if(idx != -1)
{
szCurrent = tmp.right(tmp.length() - (idx + 1));
@@ -634,10 +634,10 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar()
}
} else {
// unloadable
- QMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"),
+ TQMessageBox::warning(this,__tr2qs_ctx("Failed to Load Avatar - KVIrc","options"),
__tr2qs_ctx("Failed to load the avatar image.<br>" \
"It may be an unaccessible file or an " \
- "unsupported image format.","options"),QMessageBox::Ok,QMessageBox::NoButton);
+ "unsupported image format.","options"),TQMessageBox::Ok,TQMessageBox::NoButton);
szCurrent = "";
}
}
@@ -646,7 +646,7 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar()
{
if((m_pLocalAvatar->pixmap()->width() > 1024) || (m_pLocalAvatar->pixmap()->height() > 768))
{
- QMessageBox::warning(this,__tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"),
+ TQMessageBox::warning(this,__tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"),
__tr2qs_ctx("The avatar you have choosen is bigger than 1024x768 pixels.<br>" \
"Such a big image will not be seen on all the user monitors<br>" \
"and will probably be scaled by the remote clients with poor quality<br>" \
@@ -664,21 +664,21 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar()
-KviIdentityAdvancedOptionsWidget::KviIdentityAdvancedOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent)
+KviIdentityAdvancedOptionsWidget::KviIdentityAdvancedOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent)
{
m_pISelector=0;
m_pWSelector=0;
m_pSSelector=0;
m_sModeStr = KVI_OPTION_STRING(KviOption_stringDefaultUserMode);
- m_bI = m_sModeStr.contains('i');
- m_bW = m_sModeStr.contains('w');
- m_bS = m_sModeStr.contains('s');
+ m_bI = m_sModeStr.tqcontains('i');
+ m_bW = m_sModeStr.tqcontains('w');
+ m_bS = m_sModeStr.tqcontains('s');
createLayout(2,1);
- layout()->setMargin(10);
+ tqlayout()->setMargin(10);
KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("User Mode","options"));
m_pISelector = addBoolSelector(gbox,__tr2qs_ctx("Invisible (+i)","options"),&m_bI);