summaryrefslogtreecommitdiffstats
path: root/src/modules/options/optw_nickserv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/options/optw_nickserv.cpp')
-rw-r--r--src/modules/options/optw_nickserv.cpp114
1 files changed, 57 insertions, 57 deletions
diff --git a/src/modules/options/optw_nickserv.cpp b/src/modules/options/optw_nickserv.cpp
index f182dc32..92d17036 100644
--- a/src/modules/options/optw_nickserv.cpp
+++ b/src/modules/options/optw_nickserv.cpp
@@ -24,13 +24,13 @@
#include "optw_nickserv.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include "kvi_tal_tooltip.h"
#include "kvi_tal_listview.h"
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qmessagebox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqmessagebox.h>
#include "kvi_qstring.h"
#include "kvi_options.h"
@@ -42,43 +42,43 @@
extern KVIRC_API KviNickServRuleSet * g_pNickServRuleSet;
-KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskField)
-: QDialog(par)
+KviNickServRuleEditor::KviNickServRuleEditor(TQWidget * par,bool bUseServerMaskField)
+: TQDialog(par)
{
setCaption(__tr2qs_ctx("NickServ Authentication Rule","options"));
- QString html_center_begin = "<center>";
- QString html_center_end = "</center>";
+ TQString html_center_begin = "<center>";
+ TQString html_center_end = "</center>";
- QGridLayout * gl = new QGridLayout(this,bUseServerMaskField ? 7 : 6,4,10,5);
+ TQGridLayout * gl = new TQGridLayout(this,bUseServerMaskField ? 7 : 6,4,10,5);
- QLabel * l = new QLabel(__tr2qs_ctx("Registered NickName","options"),this);
+ TQLabel * l = new TQLabel(__tr2qs_ctx("Registered NickName","options"),this);
gl->addWidget(l,0,0);
- m_pRegisteredNickEdit = new QLineEdit(this);
+ m_pRegisteredNickEdit = new TQLineEdit(this);
#ifdef COMPILE_INFO_TIPS
KviTalToolTip::add(m_pRegisteredNickEdit,html_center_begin + __tr2qs_ctx("Put here the nickname that you have registered with NickServ","options") + html_center_end);
#endif
gl->addMultiCellWidget(m_pRegisteredNickEdit,0,0,1,3);
- l = new QLabel(__tr2qs_ctx("NickServ Mask","options"),this);
+ l = new TQLabel(__tr2qs_ctx("NickServ Mask","options"),this);
gl->addWidget(l,1,0);
- m_pNickServMaskEdit = new QLineEdit(this);
+ m_pNickServMaskEdit = new TQLineEdit(this);
#ifdef COMPILE_INFO_TIPS
KviTalToolTip::add(m_pNickServMaskEdit,
- html_center_begin + __tr2qs_ctx("This is the mask that NickServ must match to be correctly identified as the NickServ service. " \
+ html_center_begin + __tr2qs_ctx("This is the tqmask that NickServ must match to be correctly identified as the NickServ service. " \
"This usually will be something like <b>[email protected]</b>.<br>" \
"You can use wildcards for this field, but generally it is a security flaw. " \
"If you're 100%% sure that NO user on the network can use the nickname \"NickServ\", " \
- "the mask <b>NickServ!*@*</b> may be safe to use in this field.","options") + html_center_end);
+ "the tqmask <b>NickServ!*@*</b> may be safe to use in this field.","options") + html_center_end);
#endif
gl->addMultiCellWidget(m_pNickServMaskEdit,1,1,1,3);
- l = new QLabel(__tr2qs_ctx("Message Regexp","options"),this);
+ l = new TQLabel(__tr2qs_ctx("Message Regexp","options"),this);
gl->addWidget(l,2,0);
- m_pMessageRegexpEdit = new QLineEdit(this);
+ m_pMessageRegexpEdit = new TQLineEdit(this);
gl->addMultiCellWidget(m_pMessageRegexpEdit,2,2,1,3);
#ifdef COMPILE_INFO_TIPS
@@ -89,14 +89,14 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi
"and it is sent when the NickServ wants you to authenticate yourself. " \
"You can use the * and ? wildcards.","options") + html_center_end);
#endif
- l = new QLabel(__tr2qs_ctx("Identify Command","options"),this);
+ l = new TQLabel(__tr2qs_ctx("Identify Command","options"),this);
gl->addWidget(l,3,0);
- m_pIdentifyCommandEdit = new QLineEdit(this);
+ m_pIdentifyCommandEdit = new TQLineEdit(this);
#ifdef COMPILE_INFO_TIPS
KviTalToolTip::add(m_pIdentifyCommandEdit,
html_center_begin + __tr2qs_ctx("This is the command that will be executed when NickServ requests authentication " \
- "for the nickname described in this rule (if the both server and NickServ mask are matched). " \
+ "for the nickname described in this rule (if the both server and NickServ tqmask are matched). " \
"This usually will be something like <b>msg NickServ identify &lt;yourpassword&gt;</b>.<br>" \
"You can use <b>msg -q</b> if you don't want the password echoed on the screen. " \
"Please note that there is no leading slash in this command.","options") + html_center_end);
@@ -108,13 +108,13 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi
if(bUseServerMaskField)
{
- l = new QLabel(__tr2qs_ctx("Server mask","options"),this);
+ l = new TQLabel(__tr2qs_ctx("Server tqmask","options"),this);
gl->addWidget(l,4,0);
- m_pServerMaskEdit = new QLineEdit(this);
+ m_pServerMaskEdit = new TQLineEdit(this);
#ifdef COMPILE_INFO_TIPS
KviTalToolTip::add(m_pServerMaskEdit,
- html_center_begin + __tr2qs_ctx("This is the mask that the current server must match in order " \
+ html_center_begin + __tr2qs_ctx("This is the tqmask that the current server must match in order " \
"for this rule to apply. It can contain * and ? wildcards.<br>Do NOT use simply \"*\" here...","options") + html_center_end);
#endif
gl->addMultiCellWidget(m_pServerMaskEdit,4,4,1,3);
@@ -125,24 +125,24 @@ KviNickServRuleEditor::KviNickServRuleEditor(QWidget * par,bool bUseServerMaskFi
#ifdef COMPILE_INFO_TIPS
- l = new QLabel(html_center_begin + __tr2qs_ctx("Hint: Move the mouse cursor over the fields to get help","options") + html_center_end,this);
+ l = new TQLabel(html_center_begin + __tr2qs_ctx("Hint: Move the mouse cursor over the fields to get help","options") + html_center_end,this);
#else
- l = new QLabel("",this);
+ l = new TQLabel("",this);
#endif
l->setMargin(10);
gl->addMultiCellWidget(l,iNextLine,iNextLine,0,3);
iNextLine++;
- QPushButton * p = new QPushButton(__tr2qs_ctx("Cancel","options"),this);
+ TQPushButton * p = new TQPushButton(__tr2qs_ctx("Cancel","options"),this);
p->setMinimumWidth(100);
- connect(p,SIGNAL(clicked()),this,SLOT(reject()));
+ connect(p,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject()));
gl->addWidget(p,iNextLine,2);
- m_pOkButton = new QPushButton(__tr2qs_ctx("OK","options"),this);
+ m_pOkButton = new TQPushButton(__tr2qs_ctx("OK","options"),this);
m_pOkButton->setMinimumWidth(100);
m_pOkButton->setDefault(true);
- connect(m_pOkButton,SIGNAL(clicked()),this,SLOT(okPressed()));
+ connect(m_pOkButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(okPressed()));
gl->addWidget(m_pOkButton,iNextLine,3);
gl->setColStretch(1,1);
@@ -159,20 +159,20 @@ KviNickServRuleEditor::~KviNickServRuleEditor()
bool KviNickServRuleEditor::validate()
{
- QString s = m_pRegisteredNickEdit->text();
+ TQString s = m_pRegisteredNickEdit->text();
- QString m = __tr2qs_ctx("Invalid NickServ Rule","options");
- QString o = __tr2qs_ctx("OK","options");
+ TQString m = __tr2qs_ctx("Invalid NickServ Rule","options");
+ TQString o = __tr2qs_ctx("OK","options");
if(s.isEmpty())
{
- QMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't be empty!","options"),o);
+ TQMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't be empty!","options"),o);
return false;
}
- if(s.find(QChar(' ')) != -1)
+ if(s.tqfind(TQChar(' ')) != -1)
{
- QMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't contain spaces!","options"),o);
+ TQMessageBox::warning(this,m,__tr2qs_ctx("The Nickname field can't contain spaces!","options"),o);
return false;
}
@@ -180,7 +180,7 @@ bool KviNickServRuleEditor::validate()
if(s.isEmpty())
{
- QMessageBox::warning(this,m,__tr2qs_ctx("The NickServ mask can't be empty!<br>You must put at least * there.","options"),o);
+ TQMessageBox::warning(this,m,__tr2qs_ctx("The NickServ tqmask can't be empty!<br>You must put at least * there.","options"),o);
return false;
}
@@ -188,7 +188,7 @@ bool KviNickServRuleEditor::validate()
if(s.isEmpty())
{
- QMessageBox::warning(this,m,__tr2qs_ctx("The Message Regexp can't be empty!<br>You must put at least * there.","options"),o);
+ TQMessageBox::warning(this,m,__tr2qs_ctx("The Message Regexp can't be empty!<br>You must put at least * there.","options"),o);
return false;
}
@@ -196,7 +196,7 @@ bool KviNickServRuleEditor::validate()
if(s.isEmpty())
{
- QMessageBox::warning(this,m,__tr2qs_ctx("The Identify Command can't be empty!","options"),o);
+ TQMessageBox::warning(this,m,__tr2qs_ctx("The Identify Command can't be empty!","options"),o);
return false;
}
@@ -212,14 +212,14 @@ void KviNickServRuleEditor::okPressed()
bool KviNickServRuleEditor::editRule(KviNickServRule * r)
{
- m_pRegisteredNickEdit->setText(r->registeredNick().isEmpty() ? QString("MyNick") : r->registeredNick());
- m_pNickServMaskEdit->setText(r->nickServMask().isEmpty() ? QString("NickServ!*@*") : r->nickServMask());
- m_pMessageRegexpEdit->setText(r->messageRegexp().isEmpty() ? QString("*IDENTIFY*") : r->messageRegexp());
- m_pIdentifyCommandEdit->setText(r->identifyCommand().isEmpty() ? QString("msg -q NickServ IDENTIFY <password>") : r->identifyCommand());
+ m_pRegisteredNickEdit->setText(r->registeredNick().isEmpty() ? TQString("MyNick") : r->registeredNick());
+ m_pNickServMaskEdit->setText(r->nickServMask().isEmpty() ? TQString("NickServ!*@*") : r->nickServMask());
+ m_pMessageRegexpEdit->setText(r->messageRegexp().isEmpty() ? TQString("*IDENTIFY*") : r->messageRegexp());
+ m_pIdentifyCommandEdit->setText(r->identifyCommand().isEmpty() ? TQString("msg -q NickServ IDENTIFY <password>") : r->identifyCommand());
if(m_pServerMaskEdit)
- m_pServerMaskEdit->setText(r->serverMask().isEmpty() ? QString("irc.yourserver.org") : r->serverMask());
+ m_pServerMaskEdit->setText(r->serverMask().isEmpty() ? TQString("irc.yourserver.org") : r->serverMask());
m_pRegisteredNickEdit->selectAll();
- if(exec() != QDialog::Accepted)return false;
+ if(exec() != TQDialog::Accepted)return false;
r->setRegisteredNick(m_pRegisteredNickEdit->text());
r->setNickServMask(m_pNickServMaskEdit->text());
r->setMessageRegexp(m_pMessageRegexpEdit->text());
@@ -231,12 +231,12 @@ bool KviNickServRuleEditor::editRule(KviNickServRule * r)
-KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent,"nickserv_options_widget")
+KviNickServOptionsWidget::KviNickServOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent,"nickserv_options_widget")
{
createLayout(3,3);
- QGridLayout * gl = layout();
+ TQGridLayout * gl = tqlayout();
KviNickServRuleSet * rs = g_pNickServRuleSet;
bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false;
@@ -253,11 +253,11 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent)
m_pNickServListView->setSelectionMode(KviTalListView::Single);
m_pNickServListView->setAllColumnsShowFocus(true);
m_pNickServListView->addColumn(__tr2qs_ctx("Nickname","options"));
- m_pNickServListView->addColumn(__tr2qs_ctx("Server mask","options"));
+ m_pNickServListView->addColumn(__tr2qs_ctx("Server tqmask","options"));
m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Mask","options"));
m_pNickServListView->addColumn(__tr2qs_ctx("NickServ Request Mask","options"));
m_pNickServListView->addColumn(__tr2qs_ctx("Identify Command","options"));
- connect(m_pNickServListView,SIGNAL(selectionChanged()),this,SLOT(enableDisableNickServControls()));
+ connect(m_pNickServListView,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(enableDisableNickServControls()));
gl->addMultiCellWidget(m_pNickServListView,1,1,0,2);
#ifdef COMPILE_INFO_TIPS
@@ -273,19 +273,19 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(QWidget * parent)
"</center>","options"));
#endif
- m_pAddRuleButton = new QPushButton(__tr2qs_ctx("Add Rule","options"),this);
- connect(m_pAddRuleButton,SIGNAL(clicked()),this,SLOT(addNickServRule()));
+ m_pAddRuleButton = new TQPushButton(__tr2qs_ctx("Add Rule","options"),this);
+ connect(m_pAddRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addNickServRule()));
gl->addWidget(m_pAddRuleButton,2,0);
- m_pEditRuleButton = new QPushButton(__tr2qs_ctx("Edit Rule","options"),this);
- connect(m_pEditRuleButton,SIGNAL(clicked()),this,SLOT(editNickServRule()));
+ m_pEditRuleButton = new TQPushButton(__tr2qs_ctx("Edit Rule","options"),this);
+ connect(m_pEditRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editNickServRule()));
gl->addWidget(m_pEditRuleButton,2,1);
- m_pDelRuleButton = new QPushButton(__tr2qs_ctx("Delete Rule","options"),this);
- connect(m_pDelRuleButton,SIGNAL(clicked()),this,SLOT(delNickServRule()));
+ m_pDelRuleButton = new TQPushButton(__tr2qs_ctx("Delete Rule","options"),this);
+ connect(m_pDelRuleButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(delNickServRule()));
gl->addWidget(m_pDelRuleButton,2,2);
- connect(m_pNickServCheck,SIGNAL(toggled(bool)),this,SLOT(enableDisableNickServControls()));
+ connect(m_pNickServCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableDisableNickServControls()));
if(rs && rs->rules())
{