From 0a80cfd57d271dd44221467efb426675fa470356 Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 28 Jun 2011 18:31:12 +0000 Subject: 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 --- src/modules/reguser/dialog.cpp | 244 ++++++++++++------------- src/modules/reguser/dialog.h | 49 ++--- src/modules/reguser/edituser.cpp | 282 ++++++++++++++--------------- src/modules/reguser/edituser.h | 85 ++++----- src/modules/reguser/libkvireguser.cpp | 324 +++++++++++++++++----------------- src/modules/reguser/wizard.cpp | 198 ++++++++++----------- src/modules/reguser/wizard.h | 65 +++---- 7 files changed, 626 insertions(+), 621 deletions(-) (limited to 'src/modules/reguser') diff --git a/src/modules/reguser/dialog.cpp b/src/modules/reguser/dialog.cpp index b8d02fe2..59c272d8 100644 --- a/src/modules/reguser/dialog.cpp +++ b/src/modules/reguser/dialog.cpp @@ -40,35 +40,35 @@ #include "kvi_stringconversion.h" #include "kvi_options.h" -#include -#include +#include +#include #ifdef COMPILE_USE_QT4 -#include -#include -#include -#include +#include +#include +#include +#include #else -#include +#include #endif #include "kvi_pointerhashtable.h" -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" -#include +#include #include "wizard.h" #include "dialog.h" #ifdef COMPILE_INFO_TIPS - #include + #include #endif // COMPILE_INFO_TIPS @@ -84,8 +84,8 @@ extern KviRegisteredUsersDialog * g_pRegisteredUsersDialog; KviRegisteredUsersDialogItem::KviRegisteredUsersDialogItem(KviTalListViewItem * par,KviRegisteredUser * u) : KviRegisteredUsersDialogItemBase(User,par), m_pUser(u) { - QString szTmp; - QString t = ""; + TQString szTmp; + TQString t = ""; t += u->name(); t += " ["; szTmp = m_pUser->getProperty("notify"); @@ -108,7 +108,7 @@ KviRegisteredUsersDialogItem::KviRegisteredUsersDialogItem(KviTalListViewItem * t += m_pUser->getProperty("comment"); } t += ""; - m_pText = new QSimpleRichText(t,listView()->font()); + m_pText = new TQSimpleRichText(t,listView()->font()); //setText(0,u->name()); } @@ -118,27 +118,27 @@ KviRegisteredUsersDialogItem::~KviRegisteredUsersDialogItem() delete m_pText; } -QString KviRegisteredUsersDialogItem::key(int,bool) const +TQString KviRegisteredUsersDialogItem::key(int,bool) const { return m_pUser->name(); } -void KviRegisteredUsersDialogItem::paintCell(QPainter * p,const QColorGroup &cg,int column,int width,int align) +void KviRegisteredUsersDialogItem::paintCell(TQPainter * p,const TQColorGroup &cg,int column,int width,int align) { KviTalListViewItem::paintCell(p,cg,column,width,align); if(column==0) { - p->drawPixmap(LVI_BORDER,LVI_BORDER, *(g_pIconManager->getBigIcon(QString(KVI_BIGICON_REGUSERS))) ); + p->drawPixmap(LVI_BORDER,LVI_BORDER, *(g_pIconManager->getBigIcon(TQString(KVI_BIGICON_REGUSERS))) ); int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int www = listView()->visibleWidth() - (afterIcon + LVI_BORDER); m_pText->setWidth(www); if(isSelected()) { - QColorGroup cg2(cg); - cg2.setColor(QColorGroup::HighlightedText,cg.text()); - m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg2); + TQColorGroup cg2(cg); + cg2.setColor(TQColorGroup::HighlightedText,cg.text()); + m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg2); } else { - m_pText->draw(p,afterIcon,LVI_BORDER,QRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); + m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,height() - (LVI_BORDER * 2)),cg); } } else { if(m_pUser) @@ -164,8 +164,8 @@ void KviRegisteredUsersDialogItem::setup() } -KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) -: QWidget(par) +KviRegisteredUsersDialog::KviRegisteredUsersDialog(TQWidget * par) +: TQWidget(par) { g_pRegisteredUsersDialog = this; @@ -175,7 +175,7 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_REGUSERS))); setCaption(__tr2qs("Registered Users - KVIrc")); - QGridLayout * g = new QGridLayout(this,4,3,4,4); + TQGridLayout * g = new TQGridLayout(this,4,3,4,4); m_pListView = new KviTalListView(this); @@ -189,15 +189,15 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) m_pListView->setRootIsDecorated(TRUE); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pListView,__tr2qs("
This is the list of registered users. " \ + TQToolTip::add(m_pListView,__tr2qs("
This is the list of registered users. " \ "KVIrc can automatically recognize and associate properties to them.
" \ "Use the buttons on the right to add, edit and remove entries. " \ "The \"notify\" column allows you to quickly add users to the notify list. " \ "Notify list fine-tuning can be performed by editing the entry properties.
")); #endif // COMPILE_INFO_TIPS - connect(m_pListView,SIGNAL(pressed(KviTalListViewItem *,const QPoint &,int)),this,SLOT(itemPressed(KviTalListViewItem *,const QPoint &,int))); - connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem *)),this,SLOT(itemDoubleClicked(KviTalListViewItem *))); + connect(m_pListView,TQT_SIGNAL(pressed(KviTalListViewItem *,const TQPoint &,int)),this,TQT_SLOT(itemPressed(KviTalListViewItem *,const TQPoint &,int))); + connect(m_pListView,TQT_SIGNAL(doubleClicked(KviTalListViewItem *)),this,TQT_SLOT(itemDoubleClicked(KviTalListViewItem *))); g->addMultiCellWidget(m_pListView,0,1,0,1); @@ -205,61 +205,61 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) vbox->setSpacing(4); g->addWidget(vbox,0,2); - m_pWizardAddButton = new QPushButton(__tr2qs("Add (Wizard)..."),vbox); - connect(m_pWizardAddButton,SIGNAL(clicked()),this,SLOT(addWizardClicked())); + m_pWizardAddButton = new TQPushButton(__tr2qs("Add (Wizard)..."),vbox); + connect(m_pWizardAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addWizardClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pWizardAddButton,__tr2qs("Add a registered user by means of a user-friendly wizard.")); + TQToolTip::add(m_pWizardAddButton,__tr2qs("Add a registered user by means of a user-friendly wizard.")); #endif // COMPILE_INFO_TIPS m_pWizardAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEMBYWIZARD))); - m_pAddButton = new QPushButton(__tr2qs("&Add..."),vbox); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); + m_pAddButton = new TQPushButton(__tr2qs("&Add..."),vbox); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pAddButton,__tr2qs("Open the edit dialog to create a new user entry.")); + TQToolTip::add(m_pAddButton,__tr2qs("Open the edit dialog to create a new user entry.")); #endif // COMPILE_INFO_TIPS m_pAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pAddGroupButton = new QPushButton(__tr2qs("&Add Group..."),vbox); - connect(m_pAddGroupButton,SIGNAL(clicked()),this,SLOT(addGroupClicked())); + m_pAddGroupButton = new TQPushButton(__tr2qs("&Add Group..."),vbox); + connect(m_pAddGroupButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addGroupClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pAddGroupButton,__tr2qs("Adds a new group")); + TQToolTip::add(m_pAddGroupButton,__tr2qs("Adds a new group")); #endif // COMPILE_INFO_TIPS m_pAddGroupButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pRemoveButton = new QPushButton(__tr2qs("Re&move"),vbox); - connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); + m_pRemoveButton = new TQPushButton(__tr2qs("Re&move"),vbox); + connect(m_pRemoveButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeClicked())); m_pRemoveButton->setEnabled(false); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pRemoveButton,__tr2qs("Remove the currently selected entries.")); + TQToolTip::add(m_pRemoveButton,__tr2qs("Remove the currently selected entries.")); #endif // COMPILE_INFO_TIPS m_pRemoveButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); - m_pEditButton = new QPushButton(__tr2qs("&Edit..."),vbox); - connect(m_pEditButton,SIGNAL(clicked()),this,SLOT(editClicked())); + m_pEditButton = new TQPushButton(__tr2qs("&Edit..."),vbox); + connect(m_pEditButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editClicked())); m_pEditButton->setEnabled(false); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pEditButton,__tr2qs("Edit the first selected entry.")); + TQToolTip::add(m_pEditButton,__tr2qs("Edit the first selected entry.")); #endif // COMPILE_INFO_TIPS m_pEditButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EDITITEM))); - QFrame * f = new QFrame(vbox); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame * f = new TQFrame(vbox); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); - m_pExportButton = new QPushButton(__tr("Export To..."),vbox); + m_pExportButton = new TQPushButton(__tr("Export To..."),vbox); m_pExportButton->setEnabled(false); - connect(m_pExportButton,SIGNAL(clicked()),this,SLOT(exportClicked())); + connect(m_pExportButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(exportClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pExportButton,__tr2qs("Export the selected entries to a file.
All the data associated with the selected registered users will be exported.
You (or anyone else) can later import the entries by using the \"Import\" button.")); + TQToolTip::add(m_pExportButton,__tr2qs("Export the selected entries to a file.
All the data associated with the selected registered users will be exported.
You (or anyone else) can later import the entries by using the \"Import\" button.")); #endif // COMPILE_INFO_TIPS m_pExportButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FLOPPY))); - m_pImportButton = new QPushButton(__tr("Import From..."),vbox); - connect(m_pImportButton,SIGNAL(clicked()),this,SLOT(importClicked())); + m_pImportButton = new TQPushButton(__tr("Import From..."),vbox); + connect(m_pImportButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(importClicked())); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pImportButton,__tr2qs("Import entries from a file exported earlier by the \"export\" function of this dialog.")); + TQToolTip::add(m_pImportButton,__tr2qs("Import entries from a file exported earlier by the \"export\" function of this dialog.")); #endif // COMPILE_INFO_TIPS m_pImportButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_FOLDER))); @@ -268,16 +268,16 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) hbox->setSpacing(4); g->addMultiCellWidget(hbox,3,3,1,2); - QPushButton * b; + TQPushButton * b; - b = new QPushButton(__tr2qs("&OK"),hbox); - connect(b,SIGNAL(clicked()),this,SLOT(okClicked())); + b = new TQPushButton(__tr2qs("&OK"),hbox); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); //b->setMinimumWidth(120); - b = new QPushButton(__tr2qs("Cancel"),hbox); - connect(b,SIGNAL(clicked()),this,SLOT(cancelClicked())); + b = new TQPushButton(__tr2qs("Cancel"),hbox); + connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked())); b->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); //b->setMinimumWidth(120); @@ -287,12 +287,12 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) g->setColStretch(0,1); g->setRowStretch(1,1); - connect(m_pListView,SIGNAL(selectionChanged()),this,SLOT(selectionChanged())); - connect(m_pListView,SIGNAL(rightButtonClicked ( KviTalListViewItem *, const QPoint &, int ) ),this,SLOT(listViewRightButtonClicked ( KviTalListViewItem *, const QPoint &, int ))); + connect(m_pListView,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(selectionChanged())); + connect(m_pListView,TQT_SIGNAL(rightButtonClicked ( KviTalListViewItem *, const TQPoint &, int ) ),this,TQT_SLOT(listViewRightButtonClicked ( KviTalListViewItem *, const TQPoint &, int ))); fillList(); - if(!parent()) + if(!tqparent()) { if(KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry).y() < 5) { @@ -309,10 +309,10 @@ KviRegisteredUsersDialog::KviRegisteredUsersDialog(QWidget * par) KviRegisteredUsersDialog::~KviRegisteredUsersDialog() { #ifndef Q_OS_MACX - if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = QRect(pos().x(),pos().y(), + if(!tqparent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = TQRect(pos().x(),pos().y(), size().width(),size().height()); #else - if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = geometry(); + if(!tqparent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = tqgeometry(); #endif g_pRegisteredUsersDialog = 0; @@ -321,7 +321,7 @@ KviRegisteredUsersDialog::~KviRegisteredUsersDialog() g_pLocalRegisteredUserDataBase = 0; } -void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const QPoint &pnt,int c) +void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int c) { if(!it)return; KviRegisteredUsersDialogItemBase* b=(KviRegisteredUsersDialogItemBase*)it; @@ -329,10 +329,10 @@ void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const QPoint & { KviRegisteredUsersDialogItem *i = (KviRegisteredUsersDialogItem *)it; - QRect r = m_pListView->itemRect(i); + TQRect r = m_pListView->tqitemRect(i); int daw = m_pListView->columnWidth(0); - QPoint ppp = m_pListView->mapFromGlobal(pnt); + TQPoint ppp = m_pListView->mapFromGlobal(pnt); if((c == 1) && (ppp.x() < (r.height() + 5 + daw))) { @@ -342,12 +342,12 @@ void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const QPoint & i->user()->setProperty("notify",""); // kill that } else { // try to find the nicknames to be notified - QString szMask; + TQString szMask; - for(KviIrcMask * m = i->user()->maskList()->first();m;m = i->user()->maskList()->next()) + for(KviIrcMask * m = i->user()->tqmaskList()->first();m;m = i->user()->tqmaskList()->next()) { - QString tmp = m->nick(); - if((tmp.find('*') == -1) && (tmp.find('?') == -1) && (!tmp.isEmpty())) + TQString tmp = m->nick(); + if((tmp.tqfind('*') == -1) && (tmp.tqfind('?') == -1) && (!tmp.isEmpty())) { if(!szMask.isEmpty())szMask.append(' '); szMask.append(tmp); @@ -355,10 +355,10 @@ void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const QPoint & } // if the nickname list is still empty , build a dummy nick to notify szMask = i->user()->name(); - szMask.replace(" ",""); - szMask.replace("'",""); - szMask.replace("&",""); - szMask.replace(",",""); + szMask.tqreplace(" ",""); + szMask.tqreplace("'",""); + szMask.tqreplace("&",""); + szMask.tqreplace(",",""); i->user()->setProperty("notify",szMask); } @@ -383,9 +383,9 @@ void KviRegisteredUsersDialog::itemDoubleClicked(KviTalListViewItem *it) void KviRegisteredUsersDialog::addGroupClicked() { bool ok; - QString text = QInputDialog::getText( - "KVIrc", __tr("Group name:"), QLineEdit::Normal, - QString::null, &ok, this ); + TQString text = TQInputDialog::getText( + "KVIrc", __tr("Group name:"), TQLineEdit::Normal, + TQString(), &ok, this ); if ( ok && !text.isEmpty() ) { g_pLocalRegisteredUserDataBase->addGroup(text); fillList(); @@ -395,18 +395,18 @@ void KviRegisteredUsersDialog::editGroup(KviRegisteredUserGroup* group) { bool ok; - QString text = QInputDialog::getText( - "KVIrc", __tr("Group name:"), QLineEdit::Normal, + TQString text = TQInputDialog::getText( + "KVIrc", __tr("Group name:"), TQLineEdit::Normal, group->name(), &ok, this ); if ( ok && !text.isEmpty() ) { - QString szOldGroup=group->name(); + TQString szOldGroup=group->name(); g_pLocalRegisteredUserDataBase->groupDict()->setAutoDelete(0); g_pLocalRegisteredUserDataBase->groupDict()->remove(szOldGroup); g_pLocalRegisteredUserDataBase->groupDict()->setAutoDelete(1); group->setName(text); g_pLocalRegisteredUserDataBase->groupDict()->insert(text,group); - KviPointerHashTable * d = g_pLocalRegisteredUserDataBase->userDict(); + KviPointerHashTable * d = g_pLocalRegisteredUserDataBase->userDict(); for(KviRegisteredUser * u = d->first();u;u = d->next()) { @@ -419,7 +419,7 @@ void KviRegisteredUsersDialog::editGroup(KviRegisteredUserGroup* group) } } -void KviRegisteredUsersDialog::listViewRightButtonClicked ( KviTalListViewItem * pItem, const QPoint & point, int ) +void KviRegisteredUsersDialog::listViewRightButtonClicked ( KviTalListViewItem * pItem, const TQPoint & point, int ) { if(pItem) { @@ -428,15 +428,15 @@ void KviRegisteredUsersDialog::listViewRightButtonClicked ( KviTalListViewItem * { KviTalPopupMenu *groups = new KviTalPopupMenu; - KviPointerHashTable * pGroups = g_pLocalRegisteredUserDataBase->groupDict(); + KviPointerHashTable * pGroups = g_pLocalRegisteredUserDataBase->groupDict(); m_TmpDict.clear(); - for(KviPointerHashTableEntry * g = pGroups->firstEntry();g;g = pGroups->nextEntry()) + for(KviPointerHashTableEntry * g = pGroups->firstEntry();g;g = pGroups->nextEntry()) { int id=groups->insertItem(g->key()); - m_TmpDict.replace(id,g->data()); + m_TmpDict.tqreplace(id,g->data()); } - connect(groups,SIGNAL(activated ( int )),this,SLOT(moveToGroupMenuClicked(int))); + connect(groups,TQT_SIGNAL(activated ( int )),this,TQT_SLOT(moveToGroupMenuClicked(int))); KviTalPopupMenu *mainPopup = new KviTalPopupMenu; mainPopup->insertItem(__tr("Move to group"),groups); @@ -447,7 +447,7 @@ void KviRegisteredUsersDialog::listViewRightButtonClicked ( KviTalListViewItem * void KviRegisteredUsersDialog::moveToGroupMenuClicked(int id) { - QString szGroup=m_TmpDict.find(id)->name(); + TQString szGroup=m_TmpDict.tqfind(id)->name(); KviTalListViewItemIterator it( m_pListView, KviTalListViewItemIterator::Selected ); while ( it.current() ) { KviRegisteredUsersDialogItemBase* b=(KviRegisteredUsersDialogItemBase*)(it.current()); @@ -463,10 +463,10 @@ void KviRegisteredUsersDialog::moveToGroupMenuClicked(int id) void KviRegisteredUsersDialog::fillList() { m_pListView->clear(); - KviPointerHashTable groupItems(5,false); + KviPointerHashTable groupItems(5,false); groupItems.setAutoDelete(false); - KviPointerHashTable * pGroups = g_pLocalRegisteredUserDataBase->groupDict(); + KviPointerHashTable * pGroups = g_pLocalRegisteredUserDataBase->groupDict(); for(KviRegisteredUserGroup * g = pGroups->first();g;g = pGroups->next()) { KviRegisteredUsersGroupItem* pCur = new KviRegisteredUsersGroupItem(m_pListView,g); @@ -474,17 +474,17 @@ void KviRegisteredUsersDialog::fillList() pCur->setOpen(TRUE); } - KviPointerHashTable * d = g_pLocalRegisteredUserDataBase->userDict(); + KviPointerHashTable * d = g_pLocalRegisteredUserDataBase->userDict(); KviRegisteredUsersDialogItem * item; for(KviRegisteredUser * u = d->first();u;u = d->next()) { if(u->group().isEmpty()) u->setGroup(__tr("Default")); - if(groupItems.find(u->group())) - item = new KviRegisteredUsersDialogItem(groupItems.find(u->group()),u); - else if(groupItems.find(__tr("Default"))) - item = new KviRegisteredUsersDialogItem(groupItems.find(__tr("Default")),u); + if(groupItems.tqfind(u->group())) + item = new KviRegisteredUsersDialogItem(groupItems.tqfind(u->group()),u); + else if(groupItems.tqfind(__tr("Default"))) + item = new KviRegisteredUsersDialogItem(groupItems.tqfind(__tr("Default")),u); else { //should never be called KviRegisteredUserGroup* pGroup = g_pLocalRegisteredUserDataBase->addGroup(__tr("Default")); KviRegisteredUsersGroupItem* pCur = new KviRegisteredUsersGroupItem(m_pListView,pGroup); @@ -499,7 +499,7 @@ void KviRegisteredUsersDialog::fillList() } } -void KviRegisteredUsersDialog::closeEvent(QCloseEvent *e) +void KviRegisteredUsersDialog::closeEvent(TQCloseEvent *e) { m_pListView->clear(); e->accept(); @@ -529,7 +529,7 @@ void KviRegisteredUsersDialog::addClicked() if(!g_pRegisteredUsersDialog)return; // we have been deleted! - if(ret == QDialog::Accepted) + if(ret == TQDialog::Accepted) { fillList(); } @@ -541,7 +541,7 @@ void KviRegisteredUsersDialog::addWizardClicked() int ret = w->exec(); delete w; if(!g_pRegisteredUsersDialog)return; // we have been deleted! - if(ret == QDialog::Accepted) + if(ret == TQDialog::Accepted) { fillList(); } @@ -603,7 +603,7 @@ void KviRegisteredUsersDialog::editItem(KviRegisteredUsersDialogItem * i) i->setUser(0); - QString szName = u->name(); + TQString szName = u->name(); KviRegisteredUserEntryDialog * dlg = new KviRegisteredUserEntryDialog(this,u); int res = dlg->exec(); @@ -611,7 +611,7 @@ void KviRegisteredUsersDialog::editItem(KviRegisteredUsersDialogItem * i) if(!g_pRegisteredUsersDialog)return; // we have been deleted! - if(res == QDialog::Accepted) + if(res == TQDialog::Accepted) { fillList(); @@ -619,8 +619,8 @@ void KviRegisteredUsersDialog::editItem(KviRegisteredUsersDialogItem * i) KviTalListViewItem * i = m_pListView->firstChild(); while(i) { - QString szTmp = i->text(0); - if(KviQString::equalCI(szTmp,szName)) + TQString szTmp = i->text(0); + if(KviTQString::equalCI(szTmp,szName)) { m_pListView->setSelected(i,true); m_pListView->setCurrentItem(i); @@ -675,7 +675,7 @@ void KviRegisteredUsersDialog::exportClicked() return; } - QString buffer; + TQString buffer; if(!KviFileDialog::askForSaveFileName(buffer,__tr("Choose a Filename - KVIrc"),0,0,true,true))return; @@ -698,18 +698,18 @@ void KviRegisteredUsersDialog::exportClicked() while ( it.current() ) { KviRegisteredUsersDialogItemBase *pBase = (KviRegisteredUsersDialogItemBase *)(it.current()); if(pBase->type()!=KviRegisteredUsersDialogItemBase::User) continue; - QString szName = it.current()->text(0); + TQString szName = it.current()->text(0); KviRegisteredUser * u = ((KviRegisteredUsersDialogItem *)(it.current()))->user(); if(u) { if(!f.save(szName))goto write_error; - KviPointerHashTable * pd = u->propertyDict(); + KviPointerHashTable * pd = u->propertyDict(); if(pd) { if(!f.save(pd->count()))goto write_error; - for(KviPointerHashTableEntry * pCur = pd->firstEntry();pCur;pCur = pd->nextEntry()) + for(KviPointerHashTableEntry * pCur = pd->firstEntry();pCur;pCur = pd->nextEntry()) { - QString key = pCur->key(); + TQString key = pCur->key(); if(!f.save(key))goto write_error; if(!f.save(*(pCur->data())))goto write_error; } @@ -717,38 +717,38 @@ void KviRegisteredUsersDialog::exportClicked() if(!f.save(0))goto write_error; } - KviPointerList * ml = u->maskList(); + KviPointerList * ml = u->tqmaskList(); if(ml) { if(!f.save(ml->count()))goto write_error; for(KviIrcMask * m = ml->first();m;m = ml->next()) { - QString fullMask; - m->mask(fullMask,KviIrcMask::NickUserHost); + TQString fullMask; + m->tqmask(fullMask,KviIrcMask::NickUserHost); if(!f.save(fullMask))goto write_error; } } else { if(!f.save(0))goto write_error; } - QString avatar; + TQString avatar; if(u->getProperty("avatar",avatar)) { - KviAvatar * av = g_pIconManager->getAvatar(QString::null,avatar); + KviAvatar * av = g_pIconManager->getAvatar(TQString(),avatar); if(av) { if(!av->pixmap()->isNull()) { if(!f.save(1))goto write_error; #ifdef COMPILE_USE_QT4 - QImageWriter io; + TQImageWriter io; io.setDevice(&f); io.setFormat("PNG"); if(!io.write(av->pixmap()->convertToImage()))goto write_error; #else - QImageIO io; + TQImageIO io; io.setImage(av->pixmap()->convertToImage()); - io.setIODevice(&f); + io.setIODevice(TQT_TQIODEVICE(&f)); io.setFormat("PNG"); if(!io.write())goto write_error; #endif @@ -781,7 +781,7 @@ succesfull_export: void KviRegisteredUsersDialog::importClicked() { //KviStr buffer; - QString buffer; + TQString buffer; if(!KviFileDialog::askForOpenFileName(buffer,__tr("Choose a Filename - KVIrc")))return; @@ -817,14 +817,14 @@ void KviRegisteredUsersDialog::importClicked() for(idx = 0;idx < hf.nentries;idx++) { - QString szName; + TQString szName; if(!f.load(szName))goto read_error; KviRegisteredUser * u = g_pLocalRegisteredUserDataBase->getUser(szName); unsigned int count = 0; if(!f.load(count))goto read_error; for(unsigned int up = 0;up < count;up++) { - QString szKey,szValue; + TQString szKey,szValue; if(!f.load(szKey))goto read_error; if(!f.load(szValue))goto read_error; u->setProperty(szKey,szValue); @@ -832,7 +832,7 @@ void KviRegisteredUsersDialog::importClicked() if(!f.load(count))goto read_error; for(unsigned int um = 0;um < count;um++) { - QString szMask; + TQString szMask; if(!f.load(szMask))goto read_error; if(!szMask.isEmpty()) { @@ -844,18 +844,18 @@ void KviRegisteredUsersDialog::importClicked() if(count) { // there is an avatar - QImage img; + TQImage img; #ifdef COMPILE_USE_QT4 - QImageReader io; + TQImageReader io; io.setDevice(&f); io.setFormat("PNG"); img=io.read(); // if(io.read())goto read_error; #else - QImageIO io; + TQImageIO io; io.setImage(img); - io.setIODevice(&f); + io.setIODevice(TQT_TQIODEVICE(&f)); io.setFormat("PNG"); if(!io.read())goto read_error; diff --git a/src/modules/reguser/dialog.h b/src/modules/reguser/dialog.h index c292adc4..28ff1a15 100644 --- a/src/modules/reguser/dialog.h +++ b/src/modules/reguser/dialog.h @@ -27,20 +27,20 @@ #include "kvi_regusersdb.h" #include "kvi_selectors.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_listview.h" #include "kvi_tal_listbox.h" #include "kvi_pointerhashtable.h" #include "kvi_tal_popupmenu.h" #ifdef COMPILE_USE_QT4 - #include - #include - #define QSimpleRichText Q3SimpleRichText + #include + #include + #define TQSimpleRichText Q3SimpleRichText #else - #include - #include + #include + #include #endif @@ -88,46 +88,47 @@ class KviRegisteredUsersDialogItem : public KviRegisteredUsersDialogItemBase { protected: KviRegisteredUser * m_pUser; - QSimpleRichText * m_pText; + TQSimpleRichText * m_pText; public: KviRegisteredUsersDialogItem(KviTalListViewItem * par,KviRegisteredUser * u); ~KviRegisteredUsersDialogItem(); public: KviRegisteredUser * user(){ return m_pUser; }; void setUser(KviRegisteredUser * u){ m_pUser = u; }; - virtual void paintCell(QPainter * p,const QColorGroup &cg,int column,int width,int align); + virtual void paintCell(TQPainter * p,const TQColorGroup &cg,int column,int width,int align); virtual void setup(); - virtual QString key(int,bool) const; + virtual TQString key(int,bool) const; }; -class KviRegisteredUsersDialog : public QWidget +class KviRegisteredUsersDialog : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviRegisteredUsersDialog(QWidget * par = 0); + KviRegisteredUsersDialog(TQWidget * par = 0); ~KviRegisteredUsersDialog(); public: KviTalListView * m_pListView; - QPushButton * m_pAddButton; - QPushButton * m_pWizardAddButton; - QPushButton * m_pRemoveButton; - QPushButton * m_pEditButton; - QPushButton * m_pImportButton; - QPushButton * m_pExportButton; - QPushButton * m_pAddGroupButton; + TQPushButton * m_pAddButton; + TQPushButton * m_pWizardAddButton; + TQPushButton * m_pRemoveButton; + TQPushButton * m_pEditButton; + TQPushButton * m_pImportButton; + TQPushButton * m_pExportButton; + TQPushButton * m_pAddGroupButton; #ifdef COMPILE_USE_QT4 Q3IntDict m_TmpDict; #else - QIntDict m_TmpDict; + TQIntDict m_TmpDict; #endif protected slots: - void itemPressed(KviTalListViewItem *it,const QPoint &pnt,int c); + void itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int c); void itemDoubleClicked(KviTalListViewItem *it); protected: void fillList(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); void editItem(KviRegisteredUsersDialogItem * i); void editGroup(KviRegisteredUserGroup* group); protected slots: @@ -141,7 +142,7 @@ protected slots: void exportClicked(); void addWizardClicked(); void addGroupClicked(); - void listViewRightButtonClicked ( KviTalListViewItem *, const QPoint &, int ); + void listViewRightButtonClicked ( KviTalListViewItem *, const TQPoint &, int ); void moveToGroupMenuClicked(int); }; diff --git a/src/modules/reguser/edituser.cpp b/src/modules/reguser/edituser.cpp index f0d6d6b9..6fd82caa 100644 --- a/src/modules/reguser/edituser.cpp +++ b/src/modules/reguser/edituser.cpp @@ -41,34 +41,34 @@ #include "kvi_stringconversion.h" #include "kvi_options.h" -#include -#include -#include +#include +#include +#include #ifdef COMPILE_USE_QT4 -#include -#include -#include +#include +#include +#include #else -#include +#include #endif #include "kvi_pointerhashtable.h" -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" -#include +#include #include "wizard.h" #include "dialog.h" #ifdef COMPILE_INFO_TIPS - #include + #include #endif // COMPILE_INFO_TIPS // kvi_app.cpp @@ -78,20 +78,20 @@ KviRegisteredUserDataBase * g_pLocalRegisteredUserDataBase; // local copy! -KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHashTable * dict) -: QDialog(p,"property_editor",true) +KviReguserPropertiesDialog::KviReguserPropertiesDialog(TQWidget * p,KviPointerHashTable * dict) +: TQDialog(p,"property_editor",true) { m_pPropertyDict = dict; setCaption(__tr2qs("Property Editor")); setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); - QGridLayout * g = new QGridLayout(this,3,3,4,4); + TQGridLayout * g = new TQGridLayout(this,3,3,4,4); #ifdef COMPILE_USE_QT4 m_pTable = new Q3Table(this); #else - m_pTable = new QTable(this); + m_pTable = new TQTable(this); #endif g->addMultiCellWidget(m_pTable,0,1,0,1); @@ -102,31 +102,31 @@ KviReguserPropertiesDialog::KviReguserPropertiesDialog(QWidget * p,KviPointerHas m_pTable->horizontalHeader()->setLabel(1,__tr2qs("Value")); m_pTable->setMinimumSize(250,250); - //connect(m_pTable,SIGNAL(valueChanged(int,int)),this,SLOT(propertyValueChanged(int,int))); + //connect(m_pTable,TQT_SIGNAL(valueChanged(int,int)),this,TQT_SLOT(propertyValueChanged(int,int))); KviTalVBox * vb = new KviTalVBox(this); vb->setSpacing(4); g->addWidget(vb,0,2); - m_pAddButton = new QPushButton(__tr2qs("&New"),vb); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); + m_pAddButton = new TQPushButton(__tr2qs("&New"),vb); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); m_pAddButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pDelButton = new QPushButton(__tr2qs("&Remove"),vb); - connect(m_pDelButton,SIGNAL(clicked()),this,SLOT(delClicked())); + m_pDelButton = new TQPushButton(__tr2qs("&Remove"),vb); + connect(m_pDelButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(delClicked())); m_pDelButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); KviTalHBox * b = new KviTalHBox(this); b->setSpacing(4); g->addMultiCellWidget(b,2,2,1,2); - QPushButton * pb = new QPushButton(__tr2qs("&OK"),b); - connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * pb = new TQPushButton(__tr2qs("&OK"),b); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); pb->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); - pb = new QPushButton(__tr2qs("Cancel"),b); - connect(pb,SIGNAL(clicked()),this,SLOT(reject())); + pb = new TQPushButton(__tr2qs("Cancel"),b); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); pb->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->setRowStretch(1,1); @@ -139,7 +139,7 @@ KviReguserPropertiesDialog::~KviReguserPropertiesDialog() { } -void KviReguserPropertiesDialog::closeEvent(QCloseEvent *e) +void KviReguserPropertiesDialog::closeEvent(TQCloseEvent *e) { e->accept(); //delete this; @@ -148,7 +148,7 @@ void KviReguserPropertiesDialog::closeEvent(QCloseEvent *e) void KviReguserPropertiesDialog::fillData() { m_pTable->setNumRows(m_pPropertyDict->count()); - KviPointerHashTableIterator it(*m_pPropertyDict); + KviPointerHashTableIterator it(*m_pPropertyDict); int row = 0; while(it.current()) { @@ -167,11 +167,11 @@ void KviReguserPropertiesDialog::okClicked() int n = m_pTable->numRows(); for(int i=0;itext(i,0); - QString szValue = m_pTable->text(i,1); + TQString szName = m_pTable->text(i,0); + TQString szValue = m_pTable->text(i,1); if((!szName.isEmpty()) && (!szValue.isEmpty())) { - m_pPropertyDict->replace(szName,new QString(szValue)); + m_pPropertyDict->tqreplace(szName,new TQString(szValue)); } } @@ -207,69 +207,69 @@ void KviReguserPropertiesDialog::delClicked() } -KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m) -: QDialog(p,"reguser_mask_editor",true) +KviReguserMaskDialog::KviReguserMaskDialog(TQWidget * p,KviIrcMask * m) +: TQDialog(p,"reguser_tqmask_editor",true) { m_pMask = m; setCaption(__tr2qs("Mask Editor")); - QGridLayout * g = new QGridLayout(this,3,2,4,4); + TQGridLayout * g = new TQGridLayout(this,3,2,4,4); - QLabel * l = new QLabel(__tr2qs("Insert a mask for this user.
It can contain the wildcard characters '*' and '?'."),this); - //l->setAlignment(Qt::AlignCenter); + TQLabel * l = new TQLabel(__tr2qs("Insert a tqmask for this user.
It can contain the wildcard characters '*' and '?'."),this); + //l->tqsetAlignment(TQt::AlignCenter); g->addMultiCellWidget(l,0,0,0,1); KviTalHBox * b = new KviTalHBox(this); g->addMultiCellWidget(b,1,1,0,1); - m_pNickEdit = new QLineEdit(b); + m_pNickEdit = new TQLineEdit(b); //m_pNickEdit->setMinimumWidth(120); - m_pNickEdit->setAlignment(Qt::AlignRight); + m_pNickEdit->tqsetAlignment(TQt::AlignRight); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pNickEdit,__tr2qs("
This the nickname that will match this user, default value is the registered name.
")); + TQToolTip::add(m_pNickEdit,__tr2qs("
This the nickname that will match this user, default value is the registered name.
")); #endif - l = new QLabel("
!
",b); - l->setAlignment(Qt::AlignCenter); + l = new TQLabel("
!
",b); + l->tqsetAlignment(TQt::AlignCenter); //l->setMinimumWidth(40); - m_pUserEdit = new QLineEdit(b); + m_pUserEdit = new TQLineEdit(b); //m_pUserEdit->setMinimumWidth(120); - m_pUserEdit->setAlignment(Qt::AlignCenter); + m_pUserEdit->tqsetAlignment(TQt::AlignCenter); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pUserEdit,__tr2qs("
This the username that will match this user. * will match any username.
")); + TQToolTip::add(m_pUserEdit,__tr2qs("
This the username that will match this user. * will match any username.
")); #endif - l = new QLabel("
@
",b); - l->setAlignment(Qt::AlignCenter); + l = new TQLabel("
@
",b); + l->tqsetAlignment(TQt::AlignCenter); //l->setMinimumWidth(40); - m_pHostEdit = new QLineEdit(b); + m_pHostEdit = new TQLineEdit(b); //m_pHostEdit->setMinimumWidth(120); - m_pHostEdit->setAlignment(Qt::AlignLeft); + m_pHostEdit->tqsetAlignment(TQt::AlignLeft); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pHostEdit,__tr2qs("
This the hostname that will match this user. * will match any hostname.
")); + TQToolTip::add(m_pHostEdit,__tr2qs("
This the hostname that will match this user. * will match any hostname.
")); #endif // just a spacer -// l = new QLabel(" ",this); +// l = new TQLabel(" ",this); // g->addMultiCellWidget(l,2,2,0,1); -// QFrame * f = new QFrame(this); -// f->setFrameStyle(QFrame::HLine | QFrame::Sunken); +// TQFrame * f = new TQFrame(this); +// f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); // g->addMultiCellWidget(f,3,3,0,1); b = new KviTalHBox(this); b->setSpacing(4); g->addWidget(b,2,1); - QPushButton * pb = new QPushButton(__tr2qs("&OK"),b); - connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); + TQPushButton * pb = new TQPushButton(__tr2qs("&OK"),b); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); //pb->setMinimumWidth(120); - pb = new QPushButton(__tr2qs("Cancel"),b); - connect(pb,SIGNAL(clicked()),this,SLOT(reject())); + pb = new TQPushButton(__tr2qs("Cancel"),b); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); //pb->setMinimumWidth(120); @@ -286,7 +286,7 @@ KviReguserMaskDialog::~KviReguserMaskDialog() { } -void KviReguserMaskDialog::closeEvent(QCloseEvent *e) +void KviReguserMaskDialog::closeEvent(TQCloseEvent *e) { e->accept(); //delete this; @@ -312,19 +312,19 @@ void KviReguserMaskDialog::okClicked() -KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegisteredUser * r,bool bModal) +KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(TQWidget *p,KviRegisteredUser * r,bool bModal) : KviTalTabDialog(p,"reguser_entry_editor",bModal) { m_pUser = r; - m_pCustomColor = new QColor(); + m_pCustomColor = new TQColor(); if(r) { - QString col=r->getProperty("customColor"); + TQString col=r->getProperty("customColor"); KviStringConversion::fromString(col,(*m_pCustomColor)); } - m_pPropertyDict = new KviPointerHashTable(17,false); + m_pPropertyDict = new KviPointerHashTable(17,false); m_pPropertyDict->setAutoDelete(true); //setMinimumSize(400,450); @@ -332,31 +332,31 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste setIcon(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_LINUX))); setCaption(__tr2qs("Registered User Entry")); - QWidget * p1 = new QWidget(this); + TQWidget * p1 = new TQWidget(this); - QGridLayout * g = new QGridLayout(p1,6,2,4,4); + TQGridLayout * g = new TQGridLayout(p1,6,2,4,4); - QLabel * l = new QLabel(__tr2qs("Name:"),p1); + TQLabel * l = new TQLabel(__tr2qs("Name:"),p1); g->addWidget(l,0,0); - m_pNameEdit = new QLineEdit(p1); + m_pNameEdit = new TQLineEdit(p1); g->addWidget(m_pNameEdit,0,1); - l = new QLabel(__tr2qs("Comment:"),p1); + l = new TQLabel(__tr2qs("Comment:"),p1); g->addWidget(l,1,0); - m_pCommentEdit = new QLineEdit(p1); + m_pCommentEdit = new TQLineEdit(p1); g->addWidget(m_pCommentEdit,1,1); - QFrame * f = new QFrame(p1); + TQFrame * f = new TQFrame(p1); g->addMultiCellWidget(f,2,2,0,1); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); - l = new QLabel(__tr2qs("Masks:"),p1); + l = new TQLabel(__tr2qs("Masks:"),p1); g->addMultiCellWidget(l,3,3,0,1); m_pMaskListBox = new KviTalListBox(p1); - connect(m_pMaskListBox,SIGNAL(currentChanged(KviTalListBoxItem *)),this,SLOT(maskCurrentChanged(KviTalListBoxItem *))); + connect(m_pMaskListBox,TQT_SIGNAL(currentChanged(KviTalListBoxItem *)),this,TQT_SLOT(tqmaskCurrentChanged(KviTalListBoxItem *))); m_pMaskListBox->setMinimumSize(300,200); g->addMultiCellWidget(m_pMaskListBox,4,4,0,1); @@ -365,18 +365,18 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste g->addMultiCellWidget(b,5,5,0,1); b->setSpacing(4); - m_pAddMaskButton = new QPushButton(__tr2qs("&Add..."),b); - connect(m_pAddMaskButton,SIGNAL(clicked()),this,SLOT(addMaskClicked())); + m_pAddMaskButton = new TQPushButton(__tr2qs("&Add..."),b); + connect(m_pAddMaskButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addMaskClicked())); m_pAddMaskButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NEWITEM))); - m_pDelMaskButton = new QPushButton(__tr2qs("Re&move"),b); + m_pDelMaskButton = new TQPushButton(__tr2qs("Re&move"),b); m_pDelMaskButton->setEnabled(false); - connect(m_pDelMaskButton,SIGNAL(clicked()),this,SLOT(delMaskClicked())); + connect(m_pDelMaskButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(delMaskClicked())); m_pDelMaskButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DELETEITEM))); - m_pEditMaskButton = new QPushButton(__tr2qs("&Edit"),b); + m_pEditMaskButton = new TQPushButton(__tr2qs("&Edit"),b); m_pEditMaskButton->setEnabled(false); - connect(m_pEditMaskButton,SIGNAL(clicked()),this,SLOT(editMaskClicked())); + connect(m_pEditMaskButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editMaskClicked())); m_pEditMaskButton->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_EDITITEM))); g->setRowStretch(4,1); @@ -386,30 +386,30 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste - QWidget * p2 = new QWidget(this); + TQWidget * p2 = new TQWidget(this); - g = new QGridLayout(p2,6,3,5,2); + g = new TQGridLayout(p2,6,3,5,2); m_pNotifyCheck = new KviStyledCheckBox(__tr2qs("Notify when user is online"),p2); g->addMultiCellWidget(m_pNotifyCheck,0,0,0,2); - l = new QLabel(__tr2qs("Notify nicknames:"),p2); + l = new TQLabel(__tr2qs("Notify nicknames:"),p2); l->setEnabled(m_pNotifyCheck->isChecked()); g->addWidget(l,1,0); - connect(m_pNotifyCheck,SIGNAL(toggled(bool)),l,SLOT(setEnabled(bool))); + connect(m_pNotifyCheck,TQT_SIGNAL(toggled(bool)),l,TQT_SLOT(setEnabled(bool))); #ifdef COMPILE_INFO_TIPS - QToolTip::add(m_pNotifyCheck,__tr2qs("
You can enter a space separated list of nicknames.
")); + TQToolTip::add(m_pNotifyCheck,__tr2qs("
You can enter a space separated list of nicknames.
")); #endif - m_pNotifyNick = new QLineEdit(p2); + m_pNotifyNick = new TQLineEdit(p2); m_pNotifyNick->setEnabled(false); g->addMultiCellWidget(m_pNotifyNick,1,1,1,2); - connect(m_pNotifyCheck,SIGNAL(toggled(bool)),m_pNotifyNick,SLOT(setEnabled(bool))); + connect(m_pNotifyCheck,TQT_SIGNAL(toggled(bool)),m_pNotifyNick,TQT_SLOT(setEnabled(bool))); - f = new QFrame(p2); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f = new TQFrame(p2); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); g->addMultiCellWidget(f,2,2,0,2); m_pAvatar = 0; @@ -426,8 +426,8 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste m_pAvatarSelector = new KviPixmapSelector(p2,__tr2qs("Avatar"),m_pAvatar,true); g->addMultiCellWidget(m_pAvatarSelector,3,3,0,2); - f = new QFrame(p2); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f = new TQFrame(p2); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); g->addMultiCellWidget(f,4,4,0,2); m_pCustomColorCheck = new KviStyledCheckBox(__tr2qs("Use custom color in userlist"),p2); @@ -435,11 +435,11 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste m_pCustomColorCheck->setChecked(r->getBoolProperty("useCustomColor")); g->addMultiCellWidget(m_pCustomColorCheck,5,5,0,1); - m_pCustomColorSelector = new KviColorSelector(p2,QString::null,m_pCustomColor,1); + m_pCustomColorSelector = new KviColorSelector(p2,TQString(),m_pCustomColor,1); g->addWidget(m_pCustomColorSelector,5,2); - QPushButton * pb = new QPushButton(__tr2qs("All Properties..."),p2); - connect(pb,SIGNAL(clicked()),this,SLOT(editAllPropertiesClicked())); + TQPushButton * pb = new TQPushButton(__tr2qs("All Properties..."),p2); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(editAllPropertiesClicked())); g->addWidget(pb,6,2); g->setColStretch(1,1); @@ -451,60 +451,60 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste #ifdef COMPILE_USE_QT4 Q3VBox * vb = new Q3VBox(this); #else - QVBox * vb = new QVBox(this); + TQVBox * vb = new TQVBox(this); #endif vb->setMargin(10); m_pIgnoreEnabled = new KviStyledCheckBox(__tr2qs("Enable ignore for this user"),vb); - QGroupBox * gb = new QGroupBox(__tr2qs("Ignore features"),vb); - connect(m_pIgnoreEnabled,SIGNAL(toggled(bool)),gb,SLOT(setEnabled(bool))); + TQGroupBox * gb = new TQGroupBox(__tr2qs("Ignore features"),vb); + connect(m_pIgnoreEnabled,TQT_SIGNAL(toggled(bool)),gb,TQT_SLOT(setEnabled(bool))); - QVBoxLayout * layout = new QVBoxLayout(gb,20,3); + TQVBoxLayout * tqlayout = new TQVBoxLayout(gb,20,3); m_pIgnoreQuery = new KviStyledCheckBox(__tr2qs("Ignore query-messages"),gb); - layout->addWidget(m_pIgnoreQuery); + tqlayout->addWidget(m_pIgnoreQuery); m_pIgnoreChannel = new KviStyledCheckBox(__tr2qs("Ignore channel-messages"),gb); - layout->addWidget(m_pIgnoreChannel); + tqlayout->addWidget(m_pIgnoreChannel); m_pIgnoreNotice = new KviStyledCheckBox(__tr2qs("Ignore notice-messages"),gb); - layout->addWidget(m_pIgnoreNotice); + tqlayout->addWidget(m_pIgnoreNotice); m_pIgnoreCtcp = new KviStyledCheckBox(__tr2qs("Ignore ctcp-messages"),gb); - layout->addWidget(m_pIgnoreCtcp); + tqlayout->addWidget(m_pIgnoreCtcp); m_pIgnoreInvite = new KviStyledCheckBox(__tr2qs("Ignore invites"),gb); - layout->addWidget(m_pIgnoreInvite); + tqlayout->addWidget(m_pIgnoreInvite); m_pIgnoreDcc = new KviStyledCheckBox(__tr2qs("Ignore DCCs"),gb); - layout->addWidget(m_pIgnoreDcc); + tqlayout->addWidget(m_pIgnoreDcc); - QWidget *w = new QWidget(vb); - w->setSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored); + TQWidget *w = new TQWidget(vb); + w->tqsetSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored); addTab(vb,__tr2qs("Ignore")); setCancelButton(__tr2qs("Cancel")); setOkButton(__tr2qs("&OK")); - connect(this,SIGNAL(applyButtonPressed()),this,SLOT(okClicked())); - connect(this,SIGNAL(cancelButtonPressed()),this,SLOT(reject())); + connect(this,TQT_SIGNAL(applyButtonPressed()),this,TQT_SLOT(okClicked())); + connect(this,TQT_SIGNAL(cancelButtonPressed()),this,TQT_SLOT(reject())); if(r) { m_pNameEdit->setText(r->name()); m_pCommentEdit->setText(r->getProperty("comment")); - for(KviIrcMask * m = r->maskList()->first();m;m = r->maskList()->next()) + for(KviIrcMask * m = r->tqmaskList()->first();m;m = r->tqmaskList()->next()) { - QString mk = m->nick(); - mk += QChar('!'); + TQString mk = m->nick(); + mk += TQChar('!'); mk += m->user(); - mk += QChar('@'); + mk += TQChar('@'); mk += m->host(); m_pMaskListBox->insertItem(mk); } - QString szNotifyNicks = r->getProperty("notify"); + TQString szNotifyNicks = r->getProperty("notify"); if(!szNotifyNicks.isEmpty()) { m_pNotifyCheck->setChecked(true); @@ -514,10 +514,10 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste if(r->propertyDict()) { - KviPointerHashTableIterator it(*(r->propertyDict())); - while(QString *s = it.current()) + KviPointerHashTableIterator it(*(r->propertyDict())); + while(TQString *s = it.current()) { - m_pPropertyDict->insert(it.currentKey(),new QString(*s)); + m_pPropertyDict->insert(it.currentKey(),new TQString(*s)); ++it; } } @@ -541,7 +541,7 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegiste } } -void KviRegisteredUserEntryDialog::closeEvent(QCloseEvent *e) +void KviRegisteredUserEntryDialog::closeEvent(TQCloseEvent *e) { e->accept(); okClicked(); @@ -555,7 +555,7 @@ KviRegisteredUserEntryDialog::~KviRegisteredUserEntryDialog() delete m_pCustomColor; } -void KviRegisteredUserEntryDialog::maskCurrentChanged(KviTalListBoxItem *it) +void KviRegisteredUserEntryDialog::tqmaskCurrentChanged(KviTalListBoxItem *it) { m_pDelMaskButton->setEnabled(it); m_pEditMaskButton->setEnabled(it); @@ -563,20 +563,20 @@ void KviRegisteredUserEntryDialog::maskCurrentChanged(KviTalListBoxItem *it) void KviRegisteredUserEntryDialog::okClicked() { - QString szGroup; + TQString szGroup; if(m_pUser) { szGroup=m_pUser->group(); g_pLocalRegisteredUserDataBase->removeUser(m_pUser->name()); } - QString name = m_pNameEdit->text(); + TQString name = m_pNameEdit->text(); if(name.isEmpty())name = "user"; KviRegisteredUser * u; - QString szNameOk = name; + TQString szNameOk = name; int idx = 1; @@ -584,7 +584,7 @@ void KviRegisteredUserEntryDialog::okClicked() u = g_pLocalRegisteredUserDataBase->findUserByName(szNameOk); if(u) { - KviQString::sprintf(szNameOk,"%Q%d",&name,idx); + KviTQString::sprintf(szNameOk,"%Q%d",&name,idx); idx++; } } while(u); @@ -606,8 +606,8 @@ void KviRegisteredUserEntryDialog::okClicked() idx = 0; while(cnt > 0) { - QString mask = m_pMaskListBox->text(idx); - KviIrcMask * mk = new KviIrcMask(mask); + TQString tqmask = m_pMaskListBox->text(idx); + KviIrcMask * mk = new KviIrcMask(tqmask); g_pLocalRegisteredUserDataBase->removeMask(*mk); g_pLocalRegisteredUserDataBase->addMask(u,mk); cnt--; @@ -619,13 +619,13 @@ void KviRegisteredUserEntryDialog::okClicked() if(!m_pAvatar->isNull()) { - QString szPath = m_pAvatar->path(); + TQString szPath = m_pAvatar->path(); u->setProperty("avatar",szPath); } if(m_pNotifyCheck->isChecked()) { - QString szNicks = m_pNotifyNick->text(); + TQString szNicks = m_pNotifyNick->text(); if(!szNicks.isEmpty()) { @@ -636,8 +636,8 @@ void KviRegisteredUserEntryDialog::okClicked() m_pPropertyDict->remove("notify"); m_pPropertyDict->remove("avatar"); - KviPointerHashTableIterator it(*m_pPropertyDict); - while(QString *s = it.current()) + KviPointerHashTableIterator it(*m_pPropertyDict); + while(TQString *s = it.current()) { u->setProperty(it.currentKey(),*s); ++it; @@ -645,7 +645,7 @@ void KviRegisteredUserEntryDialog::okClicked() u->setProperty("useCustomColor",m_pCustomColorCheck->isChecked()); - QString col; + TQString col; KviStringConversion::toString(m_pCustomColorSelector->getColor(),col); u->setProperty("customColor",col); @@ -675,12 +675,12 @@ void KviRegisteredUserEntryDialog::addMaskClicked() { KviIrcMask mk; KviReguserMaskDialog * dlg = new KviReguserMaskDialog(this,&mk); - if(dlg->exec() == QDialog::Accepted) + if(dlg->exec() == TQDialog::Accepted) { - QString m = mk.nick(); - m += QChar('!'); + TQString m = mk.nick(); + m += TQChar('!'); m += mk.user(); - m += QChar('@'); + m += TQChar('@'); m += mk.host(); m_pMaskListBox->insertItem(m); } @@ -703,12 +703,12 @@ void KviRegisteredUserEntryDialog::editMaskClicked() KviIrcMask mk(szM.ptr()); KviReguserMaskDialog * dlg = new KviReguserMaskDialog(this,&mk); - if(dlg->exec() == QDialog::Accepted) + if(dlg->exec() == TQDialog::Accepted) { - QString m = mk.nick(); - m += QChar('!'); + TQString m = mk.nick(); + m += TQChar('!'); m += mk.user(); - m += QChar('@'); + m += TQChar('@'); m += mk.host(); m_pMaskListBox->changeItem(m,idx); } @@ -725,16 +725,16 @@ void KviRegisteredUserEntryDialog::editAllPropertiesClicked() } else { KviStr szPath = m_pAvatar->path(); if(szPath.isEmpty())m_pPropertyDict->remove("avatar"); - else m_pPropertyDict->replace("avatar",new QString(szPath)); + else m_pPropertyDict->tqreplace("avatar",new TQString(szPath)); } if(m_pNotifyCheck->isChecked()) { - QString szNicks = m_pNotifyNick->text(); + TQString szNicks = m_pNotifyNick->text(); if(!szNicks.isEmpty()) { - m_pPropertyDict->replace("notify",new QString(szNicks)); + m_pPropertyDict->tqreplace("notify",new TQString(szNicks)); } else { m_pPropertyDict->remove("notify"); } @@ -744,14 +744,14 @@ void KviRegisteredUserEntryDialog::editAllPropertiesClicked() KviReguserPropertiesDialog * dlg = new KviReguserPropertiesDialog(this,m_pPropertyDict); - if(dlg->exec() != QDialog::Accepted) + if(dlg->exec() != TQDialog::Accepted) { delete dlg; return; } delete dlg; - QString * notify = m_pPropertyDict->find("notify"); + TQString * notify = m_pPropertyDict->tqfind("notify"); bool bGotIt = false; if(notify) { @@ -765,7 +765,7 @@ void KviRegisteredUserEntryDialog::editAllPropertiesClicked() m_pNotifyNick->setEnabled(bGotIt); if(!bGotIt)m_pNotifyNick->setText(""); - QString * avatar = m_pPropertyDict->find("avatar"); + TQString * avatar = m_pPropertyDict->tqfind("avatar"); bGotIt = false; if(avatar) { diff --git a/src/modules/reguser/edituser.h b/src/modules/reguser/edituser.h index fecbbf09..0318dbdd 100644 --- a/src/modules/reguser/edituser.h +++ b/src/modules/reguser/edituser.h @@ -28,22 +28,22 @@ #include "kvi_regusersdb.h" #include "kvi_selectors.h" -#include -#include -#include +#include +#include +#include #include "kvi_tal_listview.h" #include "kvi_tal_listbox.h" #include "kvi_pointerhashtable.h" #include #ifdef COMPILE_USE_QT4 -#include +#include #define Kvi_Tal_Table Q3Table #define Kvi_Tal_TableItem Q3TableItem #else -#include -#define Kvi_Tal_Table QTable -#define Kvi_Tal_TableItem QTableItem +#include +#define Kvi_Tal_Table TQTable +#define Kvi_Tal_TableItem TQTableItem #endif #include "kvi_tal_popupmenu.h" @@ -54,24 +54,25 @@ class KviRegisteredUser; -class KviReguserPropertiesDialog : public QDialog +class KviReguserPropertiesDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviReguserPropertiesDialog(QWidget *p,KviPointerHashTable * dict); + KviReguserPropertiesDialog(TQWidget *p,KviPointerHashTable * dict); ~KviReguserPropertiesDialog(); protected: #ifdef COMPILE_USE_QT4 Q3Table *m_pTable; #else - QTable * m_pTable; + TQTable * m_pTable; #endif - KviPointerHashTable * m_pPropertyDict; - QPushButton * m_pDelButton; - QPushButton * m_pAddButton; + KviPointerHashTable * m_pPropertyDict; + TQPushButton * m_pDelButton; + TQPushButton * m_pAddButton; protected: void fillData(); - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); protected slots: void okClicked(); void addClicked(); @@ -79,20 +80,21 @@ protected slots: }; -class KviReguserMaskDialog : public QDialog +class KviReguserMaskDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviReguserMaskDialog(QWidget * p,KviIrcMask * m); + KviReguserMaskDialog(TQWidget * p,KviIrcMask * m); ~KviReguserMaskDialog(); protected: KviIrcMask * m_pMask; - QLineEdit * m_pNickEdit; - QLineEdit * m_pUserEdit; - QLineEdit * m_pHostEdit; + TQLineEdit * m_pNickEdit; + TQLineEdit * m_pUserEdit; + TQLineEdit * m_pHostEdit; - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); protected slots: void okClicked(); }; @@ -101,50 +103,51 @@ protected slots: class KviRegisteredUserEntryDialog : public KviTalTabDialog { Q_OBJECT + TQ_OBJECT public: - KviRegisteredUserEntryDialog(QWidget * p,KviRegisteredUser * r,bool bModal = true); + KviRegisteredUserEntryDialog(TQWidget * p,KviRegisteredUser * r,bool bModal = true); virtual ~KviRegisteredUserEntryDialog(); protected: KviRegisteredUser * m_pUser; - QLineEdit * m_pNameEdit; - QLineEdit * m_pCommentEdit; + TQLineEdit * m_pNameEdit; + TQLineEdit * m_pCommentEdit; KviTalListBox * m_pMaskListBox; - QPushButton * m_pDelMaskButton; - QPushButton * m_pEditMaskButton; - QPushButton * m_pAddMaskButton; + TQPushButton * m_pDelMaskButton; + TQPushButton * m_pEditMaskButton; + TQPushButton * m_pAddMaskButton; - QCheckBox * m_pNotifyCheck; - QLineEdit * m_pNotifyNick; + TQCheckBox * m_pNotifyCheck; + TQLineEdit * m_pNotifyNick; KviPixmap * m_pAvatar; KviPixmapSelector * m_pAvatarSelector; - KviPointerHashTable * m_pPropertyDict; + KviPointerHashTable * m_pPropertyDict; - QCheckBox * m_pCustomColorCheck; - QColor * m_pCustomColor; + TQCheckBox * m_pCustomColorCheck; + TQColor * m_pCustomColor; KviColorSelector * m_pCustomColorSelector; //Ignore TAB - QCheckBox * m_pIgnoreEnabled; - QCheckBox * m_pIgnoreQuery; - QCheckBox * m_pIgnoreChannel; - QCheckBox * m_pIgnoreNotice; - QCheckBox * m_pIgnoreCtcp; - QCheckBox * m_pIgnoreInvite; - QCheckBox * m_pIgnoreDcc; - - virtual void closeEvent(QCloseEvent *); + TQCheckBox * m_pIgnoreEnabled; + TQCheckBox * m_pIgnoreQuery; + TQCheckBox * m_pIgnoreChannel; + TQCheckBox * m_pIgnoreNotice; + TQCheckBox * m_pIgnoreCtcp; + TQCheckBox * m_pIgnoreInvite; + TQCheckBox * m_pIgnoreDcc; + + virtual void closeEvent(TQCloseEvent *); protected slots: void okClicked(); void addMaskClicked(); void delMaskClicked(); void editMaskClicked(); void editAllPropertiesClicked(); - void maskCurrentChanged(KviTalListBoxItem *it); + void tqmaskCurrentChanged(KviTalListBoxItem *it); }; diff --git a/src/modules/reguser/libkvireguser.cpp b/src/modules/reguser/libkvireguser.cpp index 49e4a204..b8363175 100644 --- a/src/modules/reguser/libkvireguser.cpp +++ b/src/modules/reguser/libkvireguser.cpp @@ -40,7 +40,7 @@ #include "dialog.h" #include "kvi_pointerlist.h" -#include // FIXME: REmove this! +#include // FIXME: REmove this! //#warning "$reguser.matches..." //#warning "$reguser.clear" @@ -68,16 +68,16 @@ KviRegisteredUsersDialog * g_pRegisteredUsersDialog = 0; The reguser module is the scripting interface to the [doc:registered_users]registered users database[/doc].[br] It provides the following set of commands:[br] [cmd]reguser.add[/cmd]: adds an user entry to the database[br] - [cmd]reguser.addmask[/cmd]: adds an user's mask to the database[br] + [cmd]reguser.addtqmask[/cmd]: adds an user's tqmask to the database[br] [cmd]reguser.remove[/cmd]: removes an user entry from the database[br] [fnc]$reguser.list[/fnc]: lists the entries[br] [cmd]reguser.setproperty[/cmd]: sets a property associated to an entry[br] [cmd]reguser.edit[/cmd]: shows an editor for an user entry - [fnc]$reguser.match[/fnc](): finds an entry by matching masks[br] - [fnc]$reguser.exactMatch[/fnc](): finds an entry by comparing masks[br] + [fnc]$reguser.match[/fnc](): finds an entry by matching tqmasks[br] + [fnc]$reguser.exactMatch[/fnc](): finds an entry by comparing tqmasks[br] [fnc]$reguser.property[/fnc](): finds a property associated to an entry[br] [fnc]$reguser.matchProperty[/fnc](): shortcut for [fnc]$reguser.property[/fnc]([fnc]$reguser.match[/fnc]())[br] - [fnc]$reguser.mask[/fnc](): returns the registration masks for an entry + [fnc]$reguser.tqmask[/fnc](): returns the registration tqmasks for an entry */ /* @@ -105,7 +105,7 @@ KviRegisteredUsersDialog * g_pRegisteredUsersDialog = 0; [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc] */ @@ -115,14 +115,14 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c) { if(c->hasSwitch('t',"toplevel")) { - if(g_pRegisteredUsersDialog->parent()) + if(g_pRegisteredUsersDialog->tqparent()) { - g_pRegisteredUsersDialog->reparent(0,QPoint(0,0),true); + g_pRegisteredUsersDialog->reparent(0,TQPoint(0,0),true); } } else { - if(g_pRegisteredUsersDialog->parent() != c->window()->frame()->splitter()) + if(TQT_BASE_OBJECT(g_pRegisteredUsersDialog->tqparent()) != TQT_BASE_OBJECT(c->window()->frame()->splitter())) { - g_pRegisteredUsersDialog->reparent(c->window()->frame()->splitter(),QPoint(0,0),true); + g_pRegisteredUsersDialog->reparent(c->window()->frame()->splitter(),TQPoint(0,0),true); } } } else { @@ -150,19 +150,19 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c) @short: Registers an user @syntax: - reguser.add [-r] [-f] [-q] [-g=group] [mask] + reguser.add [-r] [-f] [-q] [-g=group] [tqmask] @description: Adds a new entry with the specified to the database.[br] If the database contains an entry with the same , this command just prints a warning and returns.[br] - If no [mask] is given the new entry has no registration masks: so it can't be "matched" yet. You have to add - at least one mask with [cmd]reguser.addmask[/cmd]. - If [mask] is given, then it is added to the entry mask list.[br] + If no [tqmask] is given the new entry has no registration tqmasks: so it can't be "matched" yet. You have to add + at least one tqmask with [cmd]reguser.addtqmask[/cmd]. + If [tqmask] is given, then it is added to the entry tqmask list.[br] The parameter may contain any character: even spaces are allowed (obviously you have to use quotes in that case).[br] If the '-r' switch is given , the new entry replaces any previous one with the same (the old entry is removed).[br] If the '-f' switch is given , and there is an existing entry with the same name , no warning is printed - and the old entry is treated just like it has been just added (thus the [mask] is eventually added to its mask list).[br] + and the old entry is treated just like it has been just added (thus the [tqmask] is eventually added to its tqmask list).[br] The '-q' switch causes the command to run in "quiet" mode and print no warning.[br] @examples: [example] @@ -172,17 +172,17 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c) [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc] */ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) { - QString szName; - QString szMask; + TQString szName; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) if(szName.isEmpty()) { @@ -190,11 +190,11 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) return true; } - if(c->hasSwitch('r',"replace"))g_pRegisteredUserDataBase->removeUser(szName); + if(c->hasSwitch('r',"tqreplace"))g_pRegisteredUserDataBase->removeUser(szName); KviRegisteredUser * u = g_pRegisteredUserDataBase->addUser(szName); - QString group; + TQString group; if(c->hasSwitch('g',"group")) { c->switches()->getAsStringIfExisting('g',"group",group); @@ -253,13 +253,13 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c) [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc] */ static bool reguser_kvs_cmd_remove(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -280,51 +280,51 @@ static bool reguser_kvs_cmd_remove(KviKvsModuleCommandCall * c) } /* - @doc: reguser.addmask + @doc: reguser.addtqmask @type: command @title: - reguser.addmask + reguser.addtqmask @keyterms: registering users @short: - Adds a mask to a registered user + Adds a tqmask to a registered user @syntax: - reguser.addmask [-f] + reguser.addtqmask [-f] @description: - Adds a registration mask to the database entry with name .[br] - The has the common [doc:irc_masks]irc mask[/doc] format.[br] - The only restriction on the is that it must be unique inside the - regusers database: you can't match two users with the same mask (it would + Adds a registration tqmask to the database entry with name .[br] + The has the common [doc:irc_tqmasks]irc tqmask[/doc] format.[br] + The only restriction on the is that it must be unique inside the + regusers database: you can't match two users with the same tqmask (it would have rather undefined results).[br] - If -f is used , KVIrc ensures that the mask is unique in the database + If -f is used , KVIrc ensures that the tqmask is unique in the database and associates is to THIS registered user (breaking the previous associations).
- Once at least one mask has been added, the user can be "matched" + Once at least one tqmask has been added, the user can be "matched" by using the [fnc]$reguser.match[/fnc]() function.[br] - Each database entry can have an unlimited number of masks.[br] + Each database entry can have an unlimited number of tqmasks.[br] @examples: [example] [cmd]reguser.add[/cmd] "Szymon Stefanek" - reguser.addmask "Szymon Stefanek" Pragma!*@*.it + reguser.addtqmask "Szymon Stefanek" Pragma!*@*.it [/example] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.delmask[/cmd], + [cmd]reguser.deltqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.exactMatch[/fnc] */ -static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) +static bool reguser_kvs_cmd_addtqmask(KviKvsModuleCommandCall * c) { - QString szName; - QString szMask; + TQString szName; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) if(szName.isEmpty()) @@ -335,7 +335,7 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) if(szMask.isEmpty()) { - c->warning(__tr2qs("No mask specified")); + c->warning(__tr2qs("No tqmask specified")); return true; } @@ -357,27 +357,27 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) } /* - @doc: reguser.delmask + @doc: reguser.deltqmask @type: command @title: - reguser.delmask + reguser.deltqmask @keyterms: registering users @short: - Removes a mask from the regusers database + Removes a tqmask from the regusers database @syntax: - reguser.delmask + reguser.deltqmask @description: - Removes a mask from the regusers database.[br] - Since masks are unique in the database , you don't need to pass - an parameter: if an entry has the , removing that + Removes a tqmask from the regusers database.[br] + Since tqmasks are unique in the database , you don't need to pass + an parameter: if an entry has the , removing that will surely remove it from that entry. (contorsions ?)[br] @examples: [example] [cmd]reguser.add[/cmd] "Szymon Stefanek" - [cmd]reguser.addmask[/cmd] "Szymon Stefanek" Pragma!*@*.it - reguser.delmask Pragma!*@*.it + [cmd]reguser.addtqmask[/cmd] "Szymon Stefanek" Pragma!*@*.it + reguser.deltqmask Pragma!*@*.it [fnc]$reguser.list[/fnc] [/example] @seealso: @@ -385,22 +385,22 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.exactMatch[/fnc] */ -static bool reguser_kvs_cmd_delmask(KviKvsModuleCommandCall * c) +static bool reguser_kvs_cmd_deltqmask(KviKvsModuleCommandCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) if(szMask.isEmpty()) { - c->warning(__tr2qs("No mask specified")); + c->warning(__tr2qs("No tqmask specified")); return true; } @@ -440,7 +440,7 @@ static bool reguser_kvs_cmd_delmask(KviKvsModuleCommandCall * c) static bool reguser_kvs_cmd_setIgnoreEnabled(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; bool bEnabled; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) @@ -507,7 +507,7 @@ static bool reguser_kvs_cmd_setIgnoreEnabled(KviKvsModuleCommandCall * c) static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -564,8 +564,8 @@ static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], - [cmd]reguser.delmask[/cmd], + [cmd]reguser.addtqmask[/cmd], + [cmd]reguser.deltqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.matchProperty[/fnc] @@ -573,8 +573,8 @@ static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c) static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c) { - QString szName; - QString szFlags; + TQString szName; + TQString szFlags; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -619,8 +619,8 @@ static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], - [cmd]reguser.delmask[/cmd], + [cmd]reguser.addtqmask[/cmd], + [cmd]reguser.deltqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.matchProperty[/fnc] @@ -628,7 +628,7 @@ static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c) static bool reguser_kvs_fnc_isIgnoreEnabled(KviKvsModuleFunctionCall * c) { - QString szName; + TQString szName; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETERS_END(c) @@ -681,11 +681,11 @@ static bool reguser_kvs_fnc_isIgnoreEnabled(KviKvsModuleFunctionCall * c) static bool reguser_kvs_cmd_setproperty(KviKvsModuleCommandCall * c) { - QString szName; - QString szProperty; - QString szValue; + TQString szName; + TQString szProperty; + TQString szValue; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,0,szName) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szName) KVSM_PARAMETER("property",KVS_PT_STRING,0,szProperty) KVSM_PARAMETER("value",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETERS_END(c) @@ -720,46 +720,46 @@ static bool reguser_kvs_cmd_setproperty(KviKvsModuleCommandCall * c) @title: $reguser.list @short: - Get a list of registered user masks + Get a list of registered user tqmasks @syntax: - $reguser.list([mask]) + $reguser.list([tqmask]) @description: Returns an array of the entries in the registered users database.[br] - If is specified, only entries matching the - and the entries with no registration masks are listed.[br] - Please note that is a wildcard string that will match + If is specified, only entries matching the + and the entries with no registration tqmasks are listed.[br] + Please note that is a wildcard string that will match wildcard strings... don't get messed with that :D[br] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.exactMatch[/fnc] */ static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("user_mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); + KviIrcMask tqmask(szMask); KviKvsArray* pArray = new KviKvsArray(); int aid=0; int cnt = 0; - KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); + KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); while(KviRegisteredUser * u = it.current()) { - KviPointerList * ml = u->maskList(); - if(u->matches(mask) || (ml->count() == 0)) + KviPointerList * ml = u->tqmaskList(); + if(u->matches(tqmask) || (ml->count() == 0)) { pArray->set(aid,new KviKvsVariant(u->name())); aid++; @@ -781,12 +781,12 @@ static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c) @short: Lists the registered users @syntax: - reguser.showlist [mask] + reguser.showlist [tqmask] @description: Lists the entries in the registered users database.[br] - If is specified, only entries matching the - and the entries with no registration masks are listed.[br] - Please note that is a wildcard string that will match + If is specified, only entries matching the + and the entries with no registration tqmasks are listed.[br] + Please note that is a wildcard string that will match wildcard strings... don't get messed with that :D[br] @seealso: [module:reguser]Registered users database interface[/module], @@ -799,28 +799,28 @@ static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c) static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); + KviIrcMask tqmask(szMask); c->window()->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Registered users database dump:")); int count = 0; - KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); - KviPointerHashTableIterator it(*d); + KviPointerHashTable * d = g_pRegisteredUserDataBase->userDict(); + KviPointerHashTableIterator it(*d); while(KviRegisteredUser * u = it.current()) { - KviPointerList * ml = u->maskList(); - if(u->matches(mask) || (ml->count() == 0)) + KviPointerList * ml = u->tqmaskList(); + if(u->matches(tqmask) || (ml->count() == 0)) { c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" User: %c%Q"),KVI_TEXT_BOLD,&(u->name())); if(ml->count() == 0) { - c->window()->output(KVI_OUT_SYSTEMWARNING,__tr2qs(" Warning: this user has no registration masks")); + c->window()->output(KVI_OUT_SYSTEMWARNING,__tr2qs(" Warning: this user has no registration tqmasks")); } else { for(KviIrcMask * m = ml->first();m;m = ml->next()) { @@ -828,13 +828,13 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) } } - KviPointerHashTable * pd = u->propertyDict(); + KviPointerHashTable * pd = u->propertyDict(); if(pd) { - KviPointerHashTableIterator pdit(*pd); + KviPointerHashTableIterator pdit(*pd); while(pdit.current()) { - QString key = pdit.currentKey(); + TQString key = pdit.currentKey(); c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" Property: %Q=%Q"),&(key),pdit.current()); ++pdit; } @@ -859,30 +859,30 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c) @short: Returns an entry in the registered user database @syntax: - $reguser.match() + $reguser.match() @description: - Returns the name of the first entry matching in the registered user database.[br] - The has the common [doc:irc_masks]irc mask[/doc] format but can't contain wildcards.[br] + Returns the name of the first entry matching in the registered user database.[br] + The has the common [doc:irc_tqmasks]irc tqmask[/doc] format but can't contain wildcards.[br] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.exactMatch[/fnc] */ static bool reguser_kvs_fnc_match(KviKvsModuleFunctionCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); -//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(mask.nick(),mask.user(),mask.host()); - KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(mask.nick(),mask.user(),mask.host()); + KviIrcMask tqmask(szMask); +//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(tqmask.nick(),tqmask.user(),tqmask.host()); + KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(tqmask.nick(),tqmask.user(),tqmask.host()); if(u) c->returnValue()->setString(u->name()); return true; } @@ -896,29 +896,29 @@ static bool reguser_kvs_fnc_match(KviKvsModuleFunctionCall * c) @short: Returns an entry in the registered user database @syntax: - $reguser.exactMatch() + $reguser.exactMatch() @description: - Returns the name of the registered user database entry that has in its registration mask list.[br] - The has the common [doc:irc_masks]wild irc mask[/doc] format and can contain wildcards.[br] + Returns the name of the registered user database entry that has in its registration tqmask list.[br] + The has the common [doc:irc_tqmasks]wild irc tqmask[/doc] format and can contain wildcards.[br] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc] */ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); - KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserWithMask(mask); + KviIrcMask tqmask(szMask); + KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserWithMask(tqmask); if(u) c->returnValue()->setString(u->name()); return true; } @@ -932,24 +932,24 @@ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c) // @short: // Returns entries in the registered user database // @syntax: -// $reguser.matches() +// $reguser.matches() // @description: -// Returns a comma separated list of registered user masks that match .[br] -// User mask must be in the format !@ , where and +// Returns a comma separated list of registered user tqmasks that match .[br] +// User tqmask must be in the format !@ , where and // may contain '*' wildcards.[br] -// If no registered mask matches the an empty string is returned.[br] +// If no registered tqmask matches the an empty string is returned.[br] // @seealso: // [module:reguser]reguser module documentation[/module] //*/ -//static void search_reguser_list(KviRegisteredUserList * l,KviWindow * w,const char * mask,KviStr & buffer) +//static void search_reguser_list(KviRegisteredUserList * l,KviWindow * w,const char * tqmask,KviStr & buffer) //{ // for(KviRegisteredUser * u = l->first();u;u = l->next()) // { -// if(u->matches(mask)) +// if(u->matches(tqmask)) // { // if(buffer.hasData())buffer.append(','); -// buffer.append(u->mask()); +// buffer.append(u->tqmask()); // } // } //} @@ -977,43 +977,43 @@ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c) /* - @doc: reguser.mask + @doc: reguser.tqmask @type: function @title: - $reguser.mask + $reguser.tqmask @short: - Returns the registration masks for a db entry + Returns the registration tqmasks for a db entry @syntax: - $reguser.mask([,]) + $reguser.tqmask([,]) @description: - Returns the th registration mask for the registered user database record identified - by . If is not given , returns an array of registration masks for that entry.[br] + Returns the th registration tqmask for the registered user database record identified + by . If is not given , returns an array of registration tqmasks for that entry.[br] If does not identify a valid entry an empty string is returned; - if is out of range (or there are no masks at all) , an empty string is returned.[br] + if is out of range (or there are no tqmasks at all) , an empty string is returned.[br] is a ZERO BASED index.[br] @examples: [example] [cmd]reguser.add[/cmd] Pragma - [cmd]reguser.addmask[/cmd] Pragma Pragma!*@*.it - [cmd]echo[/cmd] $reguser.mask(Pragma,0) + [cmd]reguser.addtqmask[/cmd] Pragma Pragma!*@*.it + [cmd]echo[/cmd] $reguser.tqmask(Pragma,0) [/example] @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], - [cmd]reguser.delmask[/cmd], + [cmd]reguser.addtqmask[/cmd], + [cmd]reguser.deltqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.matchProperty[/fnc] */ -static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) +static bool reguser_kvs_fnc_tqmask(KviKvsModuleFunctionCall * c) { - QString szName; - QString szN; + TQString szName; + TQString szN; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("name",KVS_PT_STRING,0,szName) KVSM_PARAMETER("N",KVS_PT_STRING,KVS_PF_OPTIONAL,szN) @@ -1027,13 +1027,13 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) KviStr n = szName; if(n.hasData() && n.isUnsignedNum()) { - KviIrcMask * m = u->maskList()->at(n.toInt()); + KviIrcMask * m = u->tqmaskList()->at(n.toInt()); if(m) c->returnValue()->setString(m->nick()+"!"+m->user()+"@"+m->host()); } else { int id=0; - for(KviIrcMask * m = u->maskList()->first();m;m = u->maskList()->next()) + for(KviIrcMask * m = u->tqmaskList()->first();m;m = u->tqmaskList()->next()) { - pArray->set(aid,new KviKvsVariant(QString(m->nick()+"!"+m->user()+"@"+m->host()))); + pArray->set(aid,new KviKvsVariant(TQString(m->nick()+"!"+m->user()+"@"+m->host()))); aid++; } c->returnValue()->setArray(pArray); @@ -1058,7 +1058,7 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) @examples: [example] [cmd]reguser.add[/cmd] Pragma - [cmd]reguser.addmask[/cmd] Pragma Pragma!*@*.it + [cmd]reguser.addtqmask[/cmd] Pragma Pragma!*@*.it [cmd]reguser.setproperty[/cmd] Pragma isDev 1 [cmd]echo[/cmd] $reguser.property(Pragma,isDev) [/example] @@ -1067,7 +1067,7 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.matchProperty[/fnc] @@ -1075,8 +1075,8 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c) static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) { - QString szName; - QString szProperty; + TQString szName; + TQString szProperty; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("user_name",KVS_PT_STRING,0,szName) KVSM_PARAMETER("property_name",KVS_PT_STRING,KVS_PF_OPTIONAL,szProperty) @@ -1085,7 +1085,7 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(szName); if(u) { - QString tmp; + TQString tmp; u->getProperty(szProperty,tmp); c->returnValue()->setString(tmp); } @@ -1100,19 +1100,19 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) @short: Returns a property of an entry in the registered user database @syntax: - $reguser.matchProperty(,) + $reguser.matchProperty(,) @description: Returns the value of the property identified by and - bound to the first entry matched by by .[br] + bound to the first entry matched by by .[br] If the property is not set, an empty string is returned.[br] - If no entry matches this function returns an empty string + If no entry matches this function returns an empty string and does not print any error.[br] [example] - %property = $reguser.matchProperty(,) + %property = $reguser.matchProperty(,) [/example] Is actually a shortcut for:[br] [example] - %tmp = [fnc]$reguser.match[/fnc]() + %tmp = [fnc]$reguser.match[/fnc]() if("%tmp" != "")%property = $reguser.property(%tmp,) [/example] @seealso: @@ -1120,7 +1120,7 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) [doc:registered_users]Registered users database[/doc], [cmd]reguser.add[/cmd], [cmd]reguser.remove[/cmd], - [cmd]reguser.addmask[/cmd], + [cmd]reguser.addtqmask[/cmd], [fnc]$reguser.list[/fnc], [fnc]$reguser.match[/fnc], [fnc]$reguser.property[/fnc] @@ -1128,19 +1128,19 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c) { - QString szMask; - QString szProperty; + TQString szMask; + TQString szProperty; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask) + KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask) KVSM_PARAMETER("property_name",KVS_PT_STRING,KVS_PF_OPTIONAL,szProperty) KVSM_PARAMETERS_END(c) - KviIrcMask mask(szMask); -//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(mask.nick(),mask.user(),mask.host()); - KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(mask.nick(),mask.user(),mask.host()); + KviIrcMask tqmask(szMask); +//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(tqmask.nick(),tqmask.user(),tqmask.host()); + KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(tqmask.nick(),tqmask.user(),tqmask.host()); if(u) { - QString tmp; + TQString tmp; u->getProperty(szProperty,tmp); c->returnValue()->setString(tmp); } @@ -1158,10 +1158,10 @@ static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c) @short: Shows a registration wizard dialog @syntax: - reguser.wizard [mask] + reguser.wizard [tqmask] @description: Allows registering an user with an intuitive and easy to use interface. - If [mask] is specified , it is used as inital mask in the dialog. + If [tqmask] is specified , it is used as inital tqmask in the dialog. @seealso: [module:reguser]Registered users database interface[/module], [doc:registered_users]Registered users database[/doc], @@ -1170,9 +1170,9 @@ static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c) static bool reguser_kvs_cmd_wizard(KviKvsModuleCommandCall * c) { - QString szMask; + TQString szMask; KVSM_PARAMETERS_BEGIN(c) - KVSM_PARAMETER("mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) + KVSM_PARAMETER("tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask) KVSM_PARAMETERS_END(c) KviRegistrationWizard * w = new KviRegistrationWizard(szMask); @@ -1188,8 +1188,8 @@ static bool reguser_module_init(KviModule * m) KVSM_REGISTER_SIMPLE_COMMAND(m,"add",reguser_kvs_cmd_add); KVSM_REGISTER_SIMPLE_COMMAND(m,"remove",reguser_kvs_cmd_remove); - KVSM_REGISTER_SIMPLE_COMMAND(m,"addmask",reguser_kvs_cmd_addmask); - KVSM_REGISTER_SIMPLE_COMMAND(m,"delmask",reguser_kvs_cmd_delmask); + KVSM_REGISTER_SIMPLE_COMMAND(m,"addtqmask",reguser_kvs_cmd_addtqmask); + KVSM_REGISTER_SIMPLE_COMMAND(m,"deltqmask",reguser_kvs_cmd_deltqmask); KVSM_REGISTER_SIMPLE_COMMAND(m,"edit",reguser_kvs_cmd_edit); KVSM_REGISTER_SIMPLE_COMMAND(m,"showlist",reguser_kvs_cmd_showlist); KVSM_REGISTER_SIMPLE_COMMAND(m,"setproperty",reguser_kvs_cmd_setproperty); @@ -1200,7 +1200,7 @@ static bool reguser_module_init(KviModule * m) KVSM_REGISTER_FUNCTION(m,"match",reguser_kvs_fnc_match); KVSM_REGISTER_FUNCTION(m,"list",reguser_kvs_fnc_list); KVSM_REGISTER_FUNCTION(m,"exactMatch",reguser_kvs_fnc_exactMatch); - KVSM_REGISTER_FUNCTION(m,"mask",reguser_kvs_fnc_mask); + KVSM_REGISTER_FUNCTION(m,"tqmask",reguser_kvs_fnc_tqmask); KVSM_REGISTER_FUNCTION(m,"property",reguser_kvs_fnc_property); KVSM_REGISTER_FUNCTION(m,"matchProperty",reguser_kvs_fnc_matchProperty); KVSM_REGISTER_FUNCTION(m,"getIgnoreFlags",reguser_kvs_fnc_getIgnoreFlags); diff --git a/src/modules/reguser/wizard.cpp b/src/modules/reguser/wizard.cpp index 1777621d..8d61617e 100644 --- a/src/modules/reguser/wizard.cpp +++ b/src/modules/reguser/wizard.cpp @@ -32,23 +32,23 @@ #include "kvi_regusersdb.h" #include "kvi_iconmanager.h" #ifdef COMPILE_USE_QT4 -#include +#include #endif -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include extern KVIRC_API KviRegisteredUserDataBase * g_pRegisteredUserDataBase; extern KviPointerList * g_pRegistrationWizardList; -KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db,QWidget * par,bool bModal) +KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db,TQWidget * par,bool bModal) : KviTalWizard(par) { m_pDb = db; @@ -57,22 +57,22 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere m_bModal = bModal; - KviIrcMask mask(startMask ? startMask : "*!*@*"); + KviIrcMask tqmask(startMask ? startMask : "*!*@*"); g_pRegistrationWizardList->append(this); - QGridLayout* m_pPage1Layout; - QGridLayout* m_pPage2Layout; - QGridLayout* m_pPage3Layout; - QGridLayout* m_pPage4Layout; - QGridLayout* m_pPage5Layout; + TQGridLayout* m_pPage1Layout; + TQGridLayout* m_pPage2Layout; + TQGridLayout* m_pPage3Layout; + TQGridLayout* m_pPage4Layout; + TQGridLayout* m_pPage5Layout; - QLabel* TextLabel10_2; - QLabel* TextLabel10; - QLabel* TextLabel10_3; - QLabel* TextLabel10_3_2; + TQLabel* TextLabel10_2; + TQLabel* TextLabel10; + TQLabel* TextLabel10_3; + TQLabel* TextLabel10_3_2; - QFrame * f; + TQFrame * f; // resize( 490, 456 ); setCaption(__tr2qs("User Registration Wizard - KVIrc")); @@ -80,91 +80,91 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere setSizeGripEnabled( TRUE ); - m_pPage1 = new QWidget(this); - m_pPage1Layout = new QGridLayout(m_pPage1); + m_pPage1 = new TQWidget(this); + m_pPage1Layout = new TQGridLayout(m_pPage1); m_pPage1Layout->setSpacing(4); m_pPage1Layout->setMargin(8); - m_pLabel1 = new QLabel(m_pPage1); + m_pLabel1 = new TQLabel(m_pPage1); m_pLabel1->setText(__tr2qs("

Welcome to the user registration wizard.
This process allows you to add an IRC user to the database and set properties for that user. KVIrc will be (hopefully) able to recognize the user, add him to the notify list, and display the associated avatar.

First of all, you must insert an entry name or real name for the user you're going to register. The name will be used to identify the database entry and has no specific requirements, it can be a given name, nickname, or just some text to remind you of the real person.
Examples: \"George W Bush\", \"Dubya\".\n

" )); m_pPage1Layout->addWidget(m_pLabel1, 0, 0); - m_pEditRealName = new QLineEdit(m_pPage1); - //m_pEditRealName->setAlignment(int(QLineEdit::AlignHCenter)); + m_pEditRealName = new TQLineEdit(m_pPage1); + //m_pEditRealName->tqsetAlignment(int(TQLineEdit::AlignHCenter)); m_pPage1Layout->addWidget(m_pEditRealName,1,0); addPage( m_pPage1,__tr2qs("Step 1: Entry Name")); - if(mask.nick() != "*")m_pEditRealName->setText(mask.nick()); + if(tqmask.nick() != "*")m_pEditRealName->setText(tqmask.nick()); - connect(m_pEditRealName,SIGNAL(textChanged(const QString &)),this,SLOT(realNameChanged(const QString &))); + connect(m_pEditRealName,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(realNameChanged(const TQString &))); // PAGE 2 - m_pPage2 = new QWidget(this); - m_pPage2Layout = new QGridLayout( m_pPage2 ); + m_pPage2 = new TQWidget(this); + m_pPage2Layout = new TQGridLayout( m_pPage2 ); m_pPage2Layout->setSpacing( 4 ); m_pPage2Layout->setMargin( 8 ); - m_pLabel2 = new QLabel( m_pPage2); - m_pLabel2->setText(__tr2qs("

A registered user is identified by one or more IRC masks.
A mask must be in the following form:
nickname!username@hostname
and can contain wildcard characters '*' and '?'. Be careful in choosing the masks, as they are the only way to verify the identity of a registered user.

You can enter at most two masks here, if you wish to add more masks, use the \"Edit\" button in the Registered Users dialog. You must enter at least one mask.

")); + m_pLabel2 = new TQLabel( m_pPage2); + m_pLabel2->setText(__tr2qs("

A registered user is identified by one or more IRC tqmasks.
A tqmask must be in the following form:
nickname!username@hostname
and can contain wildcard characters '*' and '?'. Be careful in choosing the tqmasks, as they are the only way to verify the identity of a registered user.

You can enter at most two tqmasks here, if you wish to add more tqmasks, use the \"Edit\" button in the Registered Users dialog. You must enter at least one tqmask.

")); m_pPage2Layout->addMultiCellWidget(m_pLabel2,0,0,0,4); //KviStr szMask; - //mask.mask(szMask,11); + //tqmask.tqmask(szMask,11); - //KviIrcMask masktempl(szMask.ptr()); + //KviIrcMask tqmasktempl(szMask.ptr()); - m_pNicknameEdit1 = new QLineEdit(m_pPage2); - m_pNicknameEdit1->setAlignment(Qt::AlignRight); - if(mask.nick() != "*")m_pNicknameEdit1->setText(mask.nick()); - connect(m_pNicknameEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &))); + m_pNicknameEdit1 = new TQLineEdit(m_pPage2); + m_pNicknameEdit1->tqsetAlignment(TQt::AlignRight); + if(tqmask.nick() != "*")m_pNicknameEdit1->setText(tqmask.nick()); + connect(m_pNicknameEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(tqmaskChanged(const TQString &))); m_pPage2Layout->addWidget( m_pNicknameEdit1, 1, 0 ); - m_pUsernameEdit1 = new QLineEdit(m_pPage2); - m_pUsernameEdit1->setAlignment(Qt::AlignHCenter); - if(mask.hasUser())m_pUsernameEdit1->setText(mask.user()); - connect(m_pUsernameEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &))); + m_pUsernameEdit1 = new TQLineEdit(m_pPage2); + m_pUsernameEdit1->tqsetAlignment(TQt::AlignHCenter); + if(tqmask.hasUser())m_pUsernameEdit1->setText(tqmask.user()); + connect(m_pUsernameEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(tqmaskChanged(const TQString &))); m_pPage2Layout->addWidget(m_pUsernameEdit1,1,2); - m_pHostEdit1 = new QLineEdit(m_pPage2); - if(mask.hasHost())m_pHostEdit1->setText(mask.host()); - connect(m_pHostEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(maskChanged(const QString &))); + m_pHostEdit1 = new TQLineEdit(m_pPage2); + if(tqmask.hasHost())m_pHostEdit1->setText(tqmask.host()); + connect(m_pHostEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(tqmaskChanged(const TQString &))); m_pPage2Layout->addWidget(m_pHostEdit1,1,4); - m_pNicknameEdit2 = new QLineEdit(m_pPage2); - m_pNicknameEdit2->setAlignment(Qt::AlignRight); + m_pNicknameEdit2 = new TQLineEdit(m_pPage2); + m_pNicknameEdit2->tqsetAlignment(TQt::AlignRight); m_pPage2Layout->addWidget(m_pNicknameEdit2,2,0); - m_pUsernameEdit2 = new QLineEdit(m_pPage2); - m_pUsernameEdit2->setAlignment(Qt::AlignHCenter); + m_pUsernameEdit2 = new TQLineEdit(m_pPage2); + m_pUsernameEdit2->tqsetAlignment(TQt::AlignHCenter); m_pPage2Layout->addWidget(m_pUsernameEdit2,2,2); - m_pHostEdit2 = new QLineEdit(m_pPage2); + m_pHostEdit2 = new TQLineEdit(m_pPage2); m_pPage2Layout->addWidget(m_pHostEdit2,2,4); - TextLabel10_2 = new QLabel(m_pPage2); + TextLabel10_2 = new TQLabel(m_pPage2); TextLabel10_2->setText("
!
"); - TextLabel10_2->setAlignment(int(Qt::AlignCenter)); + TextLabel10_2->tqsetAlignment(int(TQt::AlignCenter)); m_pPage2Layout->addWidget(TextLabel10_2,2,1); - TextLabel10 = new QLabel(m_pPage2); + TextLabel10 = new TQLabel(m_pPage2); TextLabel10->setText("
!
"); - TextLabel10->setAlignment(int(Qt::AlignCenter)); + TextLabel10->tqsetAlignment(int(TQt::AlignCenter)); m_pPage2Layout->addWidget(TextLabel10,1,1); - TextLabel10_3 = new QLabel(m_pPage2); + TextLabel10_3 = new TQLabel(m_pPage2); TextLabel10_3->setText("
@
"); - TextLabel10_3->setAlignment(int(Qt::AlignCenter)); + TextLabel10_3->tqsetAlignment(int(TQt::AlignCenter)); m_pPage2Layout->addWidget(TextLabel10_3,1,3); - TextLabel10_3_2 = new QLabel(m_pPage2); + TextLabel10_3_2 = new TQLabel(m_pPage2); TextLabel10_3_2->setText("
@
"); - TextLabel10_3_2->setAlignment(int(Qt::AlignCenter)); + TextLabel10_3_2->tqsetAlignment(int(TQt::AlignCenter)); m_pPage2Layout->addWidget(TextLabel10_3_2,2,3); addPage(m_pPage2,__tr2qs("Step 2: Mask Selection")); @@ -173,17 +173,17 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere - m_pPage3 = new QWidget(this); - m_pPage3Layout = new QGridLayout(m_pPage3); + m_pPage3 = new TQWidget(this); + m_pPage3Layout = new TQGridLayout(m_pPage3); m_pPage3Layout->setSpacing(4); m_pPage3Layout->setMargin(8); - m_pLabel3 = new QLabel(m_pPage3); + m_pLabel3 = new TQLabel(m_pPage3); m_pLabel3->setText(__tr2qs("

If you want to store an avatar image for this user, you can set it here. KVIrc will show the avatar in the userlist next to the user's nickname.
An avatar can be in any supported image format (PNG is recommended). Keep in mind that KVIrc stores avatars in memory and has to resize them to fit in the userlist, thus it's better to use small, low-resolution images.

")); m_pPage3Layout->addWidget(m_pLabel3,0,0); - f = new QFrame(m_pPage3); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f = new TQFrame(m_pPage3); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); m_pPage3Layout->addWidget(f,1,0); m_pAvatar = new KviPixmap(); @@ -197,41 +197,41 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere - m_pPage4 = new QWidget(this); - m_pPage4Layout = new QGridLayout(m_pPage4); + m_pPage4 = new TQWidget(this); + m_pPage4Layout = new TQGridLayout(m_pPage4); m_pPage4Layout->setSpacing(4); m_pPage4Layout->setMargin(8); - m_pLabel4 = new QLabel(m_pPage4); + m_pLabel4 = new TQLabel(m_pPage4); m_pLabel4->setText(__tr2qs("

If you want to be notified when this user is online or goes offline, you must specify the list of nicknames that KVIrc will look for.

You can enter at most two nicknames here, if you wish to add more nicknames, use the \"Edit\" button in the Registered Users dialog.

")); m_pPage4Layout->addMultiCellWidget(m_pLabel4,0,0,0,1); - f = new QFrame(m_pPage4); - f->setFrameStyle(QFrame::HLine | QFrame::Sunken); + f = new TQFrame(m_pPage4); + f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); m_pPage4Layout->addMultiCellWidget(f,1,1,0,1); - m_pNotifyCheck = new QCheckBox(m_pPage4); + m_pNotifyCheck = new TQCheckBox(m_pPage4); m_pNotifyCheck->setText(__tr2qs("Add this user to the notify list")); m_pNotifyCheck->setChecked(false); - connect(m_pNotifyCheck,SIGNAL(toggled(bool)),this,SLOT(notifyCheckToggled(bool))); + connect(m_pNotifyCheck,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(notifyCheckToggled(bool))); m_pPage4Layout->addMultiCellWidget(m_pNotifyCheck,2,2,0,1); - m_pNotifyNickLabel1 = new QLabel(m_pPage4); + m_pNotifyNickLabel1 = new TQLabel(m_pPage4); m_pNotifyNickLabel1->setText(__tr2qs("Nickname:")); m_pPage4Layout->addWidget(m_pNotifyNickLabel1,3,0); - m_pNotifyNickLabel2 = new QLabel(m_pPage4); + m_pNotifyNickLabel2 = new TQLabel(m_pPage4); m_pNotifyNickLabel2->setText(__tr2qs("Nickname 2:")); m_pPage4Layout->addWidget(m_pNotifyNickLabel2,4,0); - m_pNotifyNickEdit1 = new QLineEdit(m_pPage4); - if(mask.nick() != "*")m_pNotifyNickEdit1->setText(mask.nick()); - connect(m_pNotifyNickEdit1,SIGNAL(textChanged(const QString &)),this,SLOT(notifyNickChanged(const QString &))); + m_pNotifyNickEdit1 = new TQLineEdit(m_pPage4); + if(tqmask.nick() != "*")m_pNotifyNickEdit1->setText(tqmask.nick()); + connect(m_pNotifyNickEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(notifyNickChanged(const TQString &))); m_pPage4Layout->addWidget(m_pNotifyNickEdit1,3,1); - m_pNotifyNickEdit2 = new QLineEdit(m_pPage4); - connect(m_pNotifyNickEdit2,SIGNAL(textChanged(const QString &)),this,SLOT(notifyNickChanged(const QString &))); + m_pNotifyNickEdit2 = new TQLineEdit(m_pPage4); + connect(m_pNotifyNickEdit2,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(notifyNickChanged(const TQString &))); m_pPage4Layout->addWidget(m_pNotifyNickEdit2,4,1); m_pPage4Layout->setRowStretch(0,1); @@ -242,24 +242,24 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere - m_pPage5 = new QWidget(this); - m_pPage5Layout = new QGridLayout(m_pPage5); + m_pPage5 = new TQWidget(this); + m_pPage5Layout = new TQGridLayout(m_pPage5); m_pPage5Layout->setSpacing(4); m_pPage5Layout->setMargin(8); - m_pTextLabel5 = new QLabel(m_pPage5); + m_pTextLabel5 = new TQLabel(m_pPage5); m_pTextLabel5->setText(__tr2qs("

That's it. The user registration has been completed.

Click \"Finish\" to close this dialog.

")); m_pPage5Layout->addWidget(m_pTextLabel5,0,0); addPage(m_pPage5,__tr2qs("Registration Complete")); setFinishEnabled(m_pPage5,true); - QString dummy; - maskChanged(dummy); + TQString dummy; + tqmaskChanged(dummy); realNameChanged(dummy); notifyCheckToggled(false); - setMinimumSize(QSize(350,420)); + setMinimumSize(TQSize(350,420)); // signals and slots connections } @@ -289,7 +289,7 @@ void KviRegistrationWizard::accept() m_pDb = g_pRegisteredUserDataBase; } - QString szName = m_pEditRealName->text(); + TQString szName = m_pEditRealName->text(); KviRegisteredUser * u; @@ -297,7 +297,7 @@ void KviRegistrationWizard::accept() { if(szName.isEmpty()) szName = "user"; - QString szNameOk = szName; + TQString szNameOk = szName; int idx = 1; @@ -305,7 +305,7 @@ void KviRegistrationWizard::accept() u = m_pDb->findUserByName(szNameOk); if(u) { - KviQString::sprintf(szNameOk,"%Q%d",&szNameOk,idx); + KviTQString::sprintf(szNameOk,"%Q%d",&szNameOk,idx); idx++; } } while(u); @@ -326,9 +326,9 @@ void KviRegistrationWizard::accept() return; } - QString m1 = m_pNicknameEdit1->text(); - QString m2 = m_pUsernameEdit1->text(); - QString m3 = m_pHostEdit1->text(); + TQString m1 = m_pNicknameEdit1->text(); + TQString m2 = m_pUsernameEdit1->text(); + TQString m3 = m_pHostEdit1->text(); KviIrcMask * mk = new KviIrcMask(m1,m2,m3); m_pDb->removeMask(*mk); m_pDb->addMask(u,mk); @@ -350,7 +350,7 @@ void KviRegistrationWizard::accept() if(!m_pAvatar->isNull()) { - QString szPath = m_pAvatar->path(); + TQString szPath = m_pAvatar->path(); u->setProperty("avatar",szPath); bSetAvatar = true; } @@ -384,14 +384,14 @@ void KviRegistrationWizard::accept() } -void KviRegistrationWizard::showEvent(QShowEvent *e) +void KviRegistrationWizard::showEvent(TQShowEvent *e) { if(height() < 420)resize(width(),420); move((g_pApp->desktop()->width() - width())/2,(g_pApp->desktop()->height() - height())/2); KviTalWizard::showEvent(e); } -void KviRegistrationWizard::maskChanged(const QString &) +void KviRegistrationWizard::tqmaskChanged(const TQString &) { KviStr tmp1 = m_pNicknameEdit1->text(); KviStr tmp2 = m_pUsernameEdit1->text(); @@ -415,20 +415,20 @@ void KviRegistrationWizard::maskChanged(const QString &) return; } - KviStr mask(KviStr::Format,"%s!%s@%s",tmp1.ptr(),tmp2.ptr(),tmp3.ptr()); + KviStr tqmask(KviStr::Format,"%s!%s@%s",tmp1.ptr(),tmp2.ptr(),tmp3.ptr()); - //KviIrcMask m(mask.ptr()); + //KviIrcMask m(tqmask.ptr()); - setNextEnabled(m_pPage2,mask!="*!*@*"); + setNextEnabled(m_pPage2,tqmask!="*!*@*"); } -void KviRegistrationWizard::realNameChanged(const QString &) +void KviRegistrationWizard::realNameChanged(const TQString &) { - QString tmp = m_pEditRealName->text(); + TQString tmp = m_pEditRealName->text(); setNextEnabled(m_pPage1,!(tmp.isEmpty() || tmp.isNull())); } -void KviRegistrationWizard::notifyNickChanged(const QString &) +void KviRegistrationWizard::notifyNickChanged(const TQString &) { bool bYes = !m_pNotifyCheck->isChecked(); @@ -457,7 +457,7 @@ void KviRegistrationWizard::notifyCheckToggled(bool) m_pNotifyNickLabel1->setEnabled(bYes); m_pNotifyNickLabel2->setEnabled(bYes); - QString dummy; + TQString dummy; notifyNickChanged(dummy); } diff --git a/src/modules/reguser/wizard.h b/src/modules/reguser/wizard.h index f1446ec6..23cb4572 100644 --- a/src/modules/reguser/wizard.h +++ b/src/modules/reguser/wizard.h @@ -30,18 +30,19 @@ class KviPixmap; class KviPixmapSelector; class KviTalVBoxLayout; class KviTalHBoxLayout; -class QGridLayout; -class QCheckBox; -class QLabel; -class QLineEdit; -class QWidget; +class TQGridLayout; +class TQCheckBox; +class TQLabel; +class TQLineEdit; +class TQWidget; class KviRegisteredUserDataBase; class KviRegistrationWizard : public KviTalWizard { Q_OBJECT + TQ_OBJECT public: - KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db = 0,QWidget * par = 0,bool bModal = false); + KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db = 0,TQWidget * par = 0,bool bModal = false); ~KviRegistrationWizard(); KviRegisteredUserDataBase * m_pDb; @@ -50,39 +51,39 @@ public: bool m_bModal; - QWidget* m_pPage1; - QLabel* m_pLabel1; - QLineEdit* m_pEditRealName; - QWidget* m_pPage2; - QLabel* m_pLabel2; - QLineEdit* m_pNicknameEdit1; - QLineEdit* m_pNicknameEdit2; - QLineEdit* m_pHostEdit1; - QLineEdit* m_pHostEdit2; - QLineEdit* m_pUsernameEdit1; - QLineEdit* m_pUsernameEdit2; - QWidget* m_pPage3; - QLabel* m_pLabel3; + TQWidget* m_pPage1; + TQLabel* m_pLabel1; + TQLineEdit* m_pEditRealName; + TQWidget* m_pPage2; + TQLabel* m_pLabel2; + TQLineEdit* m_pNicknameEdit1; + TQLineEdit* m_pNicknameEdit2; + TQLineEdit* m_pHostEdit1; + TQLineEdit* m_pHostEdit2; + TQLineEdit* m_pUsernameEdit1; + TQLineEdit* m_pUsernameEdit2; + TQWidget* m_pPage3; + TQLabel* m_pLabel3; KviPixmapSelector * m_pAvatarSelector; - QWidget* m_pPage4; - QCheckBox* m_pNotifyCheck; - QLabel* m_pNotifyNickLabel1; - QLabel* m_pNotifyNickLabel2; - QLabel* m_pLabel4; - QLineEdit* m_pNotifyNickEdit1; - QLineEdit* m_pNotifyNickEdit2; - QWidget* m_pPage5; - QLabel* m_pTextLabel5; + TQWidget* m_pPage4; + TQCheckBox* m_pNotifyCheck; + TQLabel* m_pNotifyNickLabel1; + TQLabel* m_pNotifyNickLabel2; + TQLabel* m_pLabel4; + TQLineEdit* m_pNotifyNickEdit1; + TQLineEdit* m_pNotifyNickEdit2; + TQWidget* m_pPage5; + TQLabel* m_pTextLabel5; KviPixmap * m_pAvatar; protected: - virtual void showEvent(QShowEvent *e); + virtual void showEvent(TQShowEvent *e); virtual void accept(); virtual void reject(); protected slots: - void realNameChanged(const QString &str); - void maskChanged(const QString &str); - void notifyNickChanged(const QString &); + void realNameChanged(const TQString &str); + void tqmaskChanged(const TQString &str); + void notifyNickChanged(const TQString &); void notifyCheckToggled(bool); }; -- cgit v1.2.1