summaryrefslogtreecommitdiffstats
path: root/src/modules/reguser/dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/reguser/dialog.cpp')
-rw-r--r--src/modules/reguser/dialog.cpp244
1 files changed, 122 insertions, 122 deletions
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 <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#ifdef COMPILE_USE_QT4
-#include <q3header.h>
-#include <qevent.h>
-#include <QImageWriter>
-#include <QImageReader>
+#include <tq3header.h>
+#include <tqevent.h>
+#include <TQImageWriter>
+#include <TQImageReader>
#else
-#include <qheader.h>
+#include <tqheader.h>
#endif
#include "kvi_pointerhashtable.h"
-#include <qimage.h>
-#include <qstring.h>
-#include <qcombobox.h>
+#include <tqimage.h>
+#include <tqstring.h>
+#include <tqcombobox.h>
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
#include "kvi_tal_hbox.h"
#include "kvi_tal_vbox.h"
-#include <qinputdialog.h>
+#include <tqinputdialog.h>
#include "wizard.h"
#include "dialog.h"
#ifdef COMPILE_INFO_TIPS
- #include <qtooltip.h>
+ #include <tqtooltip.h>
#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 = "<nobr><b>";
+ TQString szTmp;
+ TQString t = "<nobr><b>";
t += u->name();
t += "</b> [";
szTmp = m_pUser->getProperty("notify");
@@ -108,7 +108,7 @@ KviRegisteredUsersDialogItem::KviRegisteredUsersDialogItem(KviTalListViewItem *
t += m_pUser->getProperty("comment");
}
t += "</font></nobr>";
- 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("<center>This is the list of registered users. " \
+ TQToolTip::add(m_pListView,__tr2qs("<center>This is the list of registered users. " \
"KVIrc can automatically recognize and associate properties to them.<br>" \
"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.</center>"));
#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.<br>All the data associated with the selected registered users will be exported.<br>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.<br>All the data associated with the selected registered users will be exported.<br>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<QString,KviRegisteredUser> * d = g_pLocalRegisteredUserDataBase->userDict();
+ KviPointerHashTable<TQString,KviRegisteredUser> * 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<QString,KviRegisteredUserGroup> * pGroups = g_pLocalRegisteredUserDataBase->groupDict();
+ KviPointerHashTable<TQString,KviRegisteredUserGroup> * pGroups = g_pLocalRegisteredUserDataBase->groupDict();
m_TmpDict.clear();
- for(KviPointerHashTableEntry<QString,KviRegisteredUserGroup> * g = pGroups->firstEntry();g;g = pGroups->nextEntry())
+ for(KviPointerHashTableEntry<TQString,KviRegisteredUserGroup> * 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<QString,KviRegisteredUsersGroupItem> groupItems(5,false);
+ KviPointerHashTable<TQString,KviRegisteredUsersGroupItem> groupItems(5,false);
groupItems.setAutoDelete(false);
- KviPointerHashTable<QString,KviRegisteredUserGroup> * pGroups = g_pLocalRegisteredUserDataBase->groupDict();
+ KviPointerHashTable<TQString,KviRegisteredUserGroup> * 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<QString,KviRegisteredUser> * d = g_pLocalRegisteredUserDataBase->userDict();
+ KviPointerHashTable<TQString,KviRegisteredUser> * 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<QString,QString> * pd = u->propertyDict();
+ KviPointerHashTable<TQString,TQString> * pd = u->propertyDict();
if(pd)
{
if(!f.save(pd->count()))goto write_error;
- for(KviPointerHashTableEntry<QString,QString> * pCur = pd->firstEntry();pCur;pCur = pd->nextEntry())
+ for(KviPointerHashTableEntry<TQString,TQString> * 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<KviIrcMask> * ml = u->maskList();
+ KviPointerList<KviIrcMask> * 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;