summaryrefslogtreecommitdiffstats
path: root/src/modules/options/optw_messages.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/options/optw_messages.cpp
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/options/optw_messages.cpp')
-rw-r--r--src/modules/options/optw_messages.cpp172
1 files changed, 84 insertions, 88 deletions
diff --git a/src/modules/options/optw_messages.cpp b/src/modules/options/optw_messages.cpp
index 54b4629a..9e79daa5 100644
--- a/src/modules/options/optw_messages.cpp
+++ b/src/modules/options/optw_messages.cpp
@@ -26,11 +26,11 @@
#include "optw_messages.h"
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include "kvi_tal_vbox.h"
-#include <qcursor.h>
-#include <qpainter.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
#include "kvi_styled_controls.h"
#include "kvi_settings.h"
@@ -50,11 +50,11 @@
//#warning "Info tips"
#ifdef COMPILE_PSEUDO_TRANSPARENCY
- extern KVIRC_API QPixmap * g_pShadedChildGlobalDesktopBackground;
+ extern KVIRC_API TQPixmap * g_pShadedChildGlobalDesktopBackground;
#endif
-KviMessageOptionsWidget::KviMessageOptionsWidget(QWidget * pParent)
+KviMessageOptionsWidget::KviMessageOptionsWidget(TQWidget * pParent)
: KviOptionsWidget(pParent)
{
}
@@ -68,8 +68,8 @@ KviMessageOptionsWidget::~KviMessageOptionsWidget()
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-KviPrivmsgOptionsWidget::KviPrivmsgOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent,"privmsg_options_widget")
+KviPrivmsgOptionsWidget::KviPrivmsgOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent,"privmsg_options_widget")
{
createLayout(4,1);
@@ -89,33 +89,33 @@ KviPrivmsgOptionsWidget::KviPrivmsgOptionsWidget(QWidget * parent)
b1 = addBoolSelector(g,__tr2qs_ctx("\"Smart\" nickname colors","options"),KviOption_boolColorNicks);
b2 = addBoolSelector(g,__tr2qs_ctx("Use same colors as in the userlist","options"),KviOption_boolUseUserListColorsAsNickColors,!KVI_OPTION_BOOL(KviOption_boolColorNicks));
- connect(b1,SIGNAL(toggled(bool)),b2,SLOT(setNotEnabled(bool)));
+ connect(b1,TQT_SIGNAL(toggled(bool)),b2,TQT_SLOT(setNotEnabled(bool)));
addBoolSelector(g,__tr2qs_ctx("Show nicknames in bold","options"),KviOption_boolBoldedNicks);
addBoolSelector(g,__tr2qs_ctx("Show user and host","options"),KviOption_boolShowUserAndHostInPrivmsgView);
addBoolSelector(g,__tr2qs_ctx("Show channel mode prefix","options"),KviOption_boolShowChannelUserFlagInPrivmsgView);
KviBoolSelector * b = addBoolSelector(g,__tr2qs_ctx("User-defined prefix and postfix","options"),KviOption_boolUseExtendedPrivmsgView);
- QLabel * l = addLabel(g,__tr2qs_ctx("[PREFIX]nickname[!user@host][POSTFIX] message","options"));
+ TQLabel * l = addLabel(g,__tr2qs_ctx("[PREFIX]nickname[!user@host][POSTFIX] message","options"));
l->setEnabled(KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView));
connect(b,
- SIGNAL(toggled(bool)),
+ TQT_SIGNAL(toggled(bool)),
l,
- SLOT(setEnabled(bool)));
+ TQT_SLOT(setEnabled(bool)));
KviTalVBox * vb = new KviTalVBox(g);
vb->setSpacing(5);
connect(
b,
- SIGNAL(toggled(bool)),
+ TQT_SIGNAL(toggled(bool)),
addStringSelector(vb,__tr2qs_ctx("Prefix:","options"),KviOption_stringExtendedPrivmsgPrefix,KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)),
- SLOT(setEnabled(bool)));
+ TQT_SLOT(setEnabled(bool)));
connect(
b,
- SIGNAL(toggled(bool)),
+ TQT_SIGNAL(toggled(bool)),
addStringSelector(vb,__tr2qs_ctx("Postfix:","options"),KviOption_stringExtendedPrivmsgPostfix,KVI_OPTION_BOOL(KviOption_boolUseExtendedPrivmsgView)),
- SLOT(setEnabled(bool)));
+ TQT_SLOT(setEnabled(bool)));
addRowSpacer(0,3,0,3);
}
@@ -124,30 +124,30 @@ KviPrivmsgOptionsWidget::~KviPrivmsgOptionsWidget()
}
-KviTimestampOptionsWidget::KviTimestampOptionsWidget(QWidget * pParent)
+KviTimestampOptionsWidget::KviTimestampOptionsWidget(TQWidget * pParent)
: KviOptionsWidget(pParent)
{
createLayout(5,1);
m_pUseTimestampSelector = addBoolSelector(0,0,0,0,__tr2qs_ctx("Show timestamp","options"),KviOption_boolIrcViewTimestamp);
- connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),this,SLOT(enableDisableTimestampSelector(bool)));
+ connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableDisableTimestampSelector(bool)));
KviBoolSelector* b = addBoolSelector(0,1,0,1,__tr2qs_ctx("Use UTC time for timestamp","options"),KviOption_boolIrcViewTimestampUTC,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp));
- connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),b,SLOT(setEnabled(bool)));
+ connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),b,TQT_SLOT(setEnabled(bool)));
KviTalHBox *hb = new KviTalHBox(this);
addWidgetToLayout(hb,0,2,0,2);
m_pSpecialTimestampColorSelector = addBoolSelector(hb,__tr2qs_ctx("Use special color for timestamps","options"),KviOption_boolUseSpecialColorForTimestamp,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp));
- connect(m_pSpecialTimestampColorSelector,SIGNAL(toggled(bool)),this,SLOT(enableDisableTimestampSelector(bool)));
- connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,SLOT(setEnabled(bool)));
+ connect(m_pSpecialTimestampColorSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableDisableTimestampSelector(bool)));
+ connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,TQT_SLOT(setEnabled(bool)));
m_pTimestampColorSelector = addMircTextColorSelector(hb,"",KviOption_uintTimeStampForeground,KviOption_uintTimeStampBackground,KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp) && KVI_OPTION_BOOL(KviOption_boolUseSpecialColorForTimestamp));
KviStringSelector * st=addStringSelector(0,3,0,3,__tr2qs_ctx("Timestamp format:","options"),KviOption_stringIrcViewTimestampFormat);
- connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),st,SLOT(setEnabled(bool)));
+ connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),st,TQT_SLOT(setEnabled(bool)));
- connect(m_pUseTimestampSelector,SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,SLOT(setEnabled(bool)));
+ connect(m_pUseTimestampSelector,TQT_SIGNAL(toggled(bool)),m_pSpecialTimestampColorSelector,TQT_SLOT(setEnabled(bool)));
addRowSpacer(0,4,0,4);
}
@@ -162,8 +162,8 @@ void KviTimestampOptionsWidget::enableDisableTimestampSelector(bool)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-KviStandardColorsOptionsWidget::KviStandardColorsOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent,"stdcolors")
+KviStandardColorsOptionsWidget::KviStandardColorsOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent,"stdcolors")
{
createLayout(5,4);
@@ -186,7 +186,7 @@ KviStandardColorsOptionsWidget::KviStandardColorsOptionsWidget(QWidget * parent)
addRowSpacer(0,4,3,4);
- layout()->setRowStretch(4,1);
+ tqlayout()->setRowStretch(4,1);
}
KviStandardColorsOptionsWidget::~KviStandardColorsOptionsWidget()
@@ -197,7 +197,7 @@ KviStandardColorsOptionsWidget::~KviStandardColorsOptionsWidget()
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-KviMessageListView::KviMessageListView(QWidget * par)
+KviMessageListView::KviMessageListView(TQWidget * par)
: KviTalListView(par)
{
setItemMargin(2);
@@ -208,19 +208,19 @@ KviMessageListView::~KviMessageListView()
}
-void KviMessageListView::paintEmptyAreaInternal(QPainter * p,const QRect &viewportRect,const QRect &painterRect)
+void KviMessageListView::paintEmptyAreaInternal(TQPainter * p,const TQRect &viewportRect,const TQRect &painterRect)
{
#ifdef COMPILE_PSEUDO_TRANSPARENCY
if(g_pShadedChildGlobalDesktopBackground)
{
- QPoint pnt = viewport()->mapToGlobal(viewportRect.topLeft());
+ TQPoint pnt = viewport()->mapToGlobal(viewportRect.topLeft());
p->drawTiledPixmap(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y());
} else {
#endif
- QPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap();
+ TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap();
if(pix)
{
- QPoint pnt = viewportToContents(viewportRect.topLeft());
+ TQPoint pnt = viewportToContents(viewportRect.topLeft());
p->fillRect(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
p->drawTiledPixmap(painterRect.x(),painterRect.y(),painterRect.width(),painterRect.height(),*pix,pnt.x(),pnt.y());
} else {
@@ -231,7 +231,7 @@ void KviMessageListView::paintEmptyAreaInternal(QPainter * p,const QRect &viewpo
#endif
}
-void KviMessageListView::paintEmptyArea(QPainter * p,const QRect &rct)
+void KviMessageListView::paintEmptyArea(TQPainter * p,const TQRect &rct)
{
paintEmptyAreaInternal(p,rct,rct);
KviTalListView::paintEmptyArea(p,rct);
@@ -256,19 +256,19 @@ KviMessageListViewItem::~KviMessageListViewItem()
delete m_pMsgType;
}
-void KviMessageListViewItem::paintCell(QPainter * p,const QColorGroup &,int,int w,int)
+void KviMessageListViewItem::paintCell(TQPainter * p,const TQColorGroup &,int,int w,int)
{
#ifdef COMPILE_PSEUDO_TRANSPARENCY
if(g_pShadedChildGlobalDesktopBackground)
{
- QPoint pnt = listView()->viewport()->mapToGlobal(QPoint(int(p->worldMatrix().dx()),int(p->worldMatrix().dy())));
+ TQPoint pnt = listView()->viewport()->mapToGlobal(TQPoint(int(p->tqworldMatrix().dx()),int(p->tqworldMatrix().dy())));
p->drawTiledPixmap(0,0,w,height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y());
} else {
#endif
- QPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap();
+ TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap();
if(pix)
{
- QPoint pnt = listView()->viewportToContents(QPoint(int(p->worldMatrix().dx()),int(p->worldMatrix().dy())));
+ TQPoint pnt = listView()->viewportToContents(TQPoint(int(p->tqworldMatrix().dx()),int(p->tqworldMatrix().dy())));
p->fillRect(0,0,w,height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
p->drawTiledPixmap(0,0,w,height(),*pix,pnt.x(),pnt.y());
} else {
@@ -283,23 +283,23 @@ void KviMessageListViewItem::paintCell(QPainter * p,const QColorGroup &,int,int
// draw the background
if(m_pMsgType->back() < 16)
{
- QColor bColor = KVI_OPTION_MIRCCOLOR(m_pMsgType->back());
+ TQColor bColor = KVI_OPTION_MIRCCOLOR(m_pMsgType->back());
p->fillRect(22,listView()->itemMargin(),w - 24,height() - (listView()->itemMargin() * 2),bColor);
}
unsigned char ucFore = m_pMsgType->fore();
if(ucFore > 15)ucFore = 0;
- p->setPen(QPen(KVI_OPTION_MIRCCOLOR(ucFore)));
+ p->setPen(TQPen(KVI_OPTION_MIRCCOLOR(ucFore)));
// skip the msgtype prefix
- QString txt = (g_msgtypeOptionsTable[m_iOptId].name + 7);
+ TQString txt = (g_msgtypeOptionsTable[m_iOptId].name + 7);
txt += " (";
- txt += __tr2qs_no_xgettext(QString::fromUtf8(m_pMsgType->type()));
+ txt += __tr2qs_no_xgettext(TQString::fromUtf8(m_pMsgType->type()));
txt += ")";
- p->drawText(24,listView()->itemMargin(),w - 24,height() - (listView()->itemMargin() * 2),Qt::AlignLeft | Qt::AlignVCenter,txt);
+ p->drawText(24,listView()->itemMargin(),w - 24,height() - (listView()->itemMargin() * 2),TQt::AlignLeft | TQt::AlignVCenter,txt);
if(isSelected())
{
#ifdef COMPILE_USE_QT4
- QPen pen(KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
- pen.setStyle(Qt::DashLine);
+ TQPen pen(KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
+ pen.setStyle(TQt::DashLine);
p->setPen( pen);
p->drawRect(0,0,w,height());
p->drawRect(1,1,w - 2,height() - 2);
@@ -312,8 +312,8 @@ void KviMessageListViewItem::paintCell(QPainter * p,const QColorGroup &,int,int
}
-KviMessageColorListBoxItem::KviMessageColorListBoxItem(KviTalListBox * b,const QColor &clr,int idx)
-: KviTalListBoxText(b,QString::null)
+KviMessageColorListBoxItem::KviMessageColorListBoxItem(KviTalListBox * b,const TQColor &clr,int idx)
+: KviTalListBoxText(b,TQString())
{
m_clr = clr;
m_iClrIdx = idx;
@@ -324,29 +324,25 @@ KviMessageColorListBoxItem::~KviMessageColorListBoxItem()
{
}
-void KviMessageColorListBoxItem::paint(QPainter * p)
+void KviMessageColorListBoxItem::paint(TQPainter * p)
{
- QColor clr;
+ TQColor clr;
const KviTalListBox * lb = (const KviTalListBox *)listBox();
if((m_iClrIdx >= 0) && (m_iClrIdx <= 15))
{
- clr = lb->isEnabled() ? KVI_OPTION_MIRCCOLOR(m_iClrIdx) : Qt::gray;
+ clr = lb->isEnabled() ? KVI_OPTION_MIRCCOLOR(m_iClrIdx) : TQt::gray;
p->fillRect(0,0,width(lb),height(lb),clr);
} else {
- clr = listBox()->colorGroup().background();
+ clr = listBox()->tqcolorGroup().background();
KviTalListBoxText::paint(p);
}
-#if QT_VERSION >= 300
if(isSelected())
-#else
- if(selected())
-#endif
{
#ifdef COMPILE_USE_QT4
- QPen pen(clr);
- pen.setStyle(Qt::DashLine);
+ TQPen pen(clr);
+ pen.setStyle(TQt::DashLine);
p->setPen( pen);
p->drawRect(0,0,width(lb),height(lb));
p->drawRect(1,1,width(lb) - 2,height(lb) - 2);
@@ -374,8 +370,8 @@ int KviMessageColorListBoxItem::height(const KviTalListBox *) const
*/
/*
-KviIrcColorsOptionsWidget::KviIrcColorsOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent,"irccolors","options")
+KviIrcColorsOptionsWidget::KviIrcColorsOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent,"irccolors","options")
{
createLayout(5,4);
@@ -387,8 +383,8 @@ KviIrcColorsOptionsWidget::~KviIrcColorsOptionsWidget()
}
*/
-KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent)
-: KviOptionsWidget(parent,"messages")
+KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(TQWidget * tqparent)
+: KviOptionsWidget(tqparent,"messages")
{
int i;
@@ -404,9 +400,9 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent)
m_pListView->setFont(KVI_OPTION_FONT(KviOption_fontIrcView));
m_pListView->setStaticBackground(true);
#ifdef COMPILE_USE_QT4
- m_pListView->viewport()->setBackgroundMode(Qt::NoBackground);
+ m_pListView->viewport()->setBackgroundMode(TQt::NoBackground);
#else
- m_pListView->viewport()->setBackgroundMode(QWidget::NoBackground);
+ m_pListView->viewport()->setBackgroundMode(TQWidget::NoBackground);
#endif
addWidgetToLayout(m_pListView,0,0,2,0);
@@ -414,16 +410,16 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent)
KviTalVBox * box = new KviTalVBox(this);
addWidgetToLayout(box,3,0,3,0);
- QLabel * l = new QLabel(__tr2qs_ctx("Background:","options"),box);
+ TQLabel * l = new TQLabel(__tr2qs_ctx("Background:","options"),box);
m_pBackListBox = new KviTalListBox(box);
- m_pBackItems[16] = new KviMessageColorListBoxItem(m_pBackListBox,Qt::gray,KVI_TRANSPARENT);
+ m_pBackItems[16] = new KviMessageColorListBoxItem(m_pBackListBox,TQt::gray,KVI_TRANSPARENT);
for(i=0;i<16;i++)
{
m_pBackItems[i] = new KviMessageColorListBoxItem(m_pBackListBox,KVI_OPTION_MIRCCOLOR(i),i);
}
- l = new QLabel(__tr2qs_ctx("Foreground:","options"),box);
+ l = new TQLabel(__tr2qs_ctx("Foreground:","options"),box);
m_pForeListBox = new KviTalListBox(box);
for(i=0;i<16;i++)
@@ -431,23 +427,23 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent)
m_pForeItems[i] = new KviMessageColorListBoxItem(m_pForeListBox,KVI_OPTION_MIRCCOLOR(i),i);
}
- l = new QLabel(__tr2qs_ctx("Alert level:","options"),box);
+ l = new TQLabel(__tr2qs_ctx("Alert level:","options"),box);
m_pLevelListBox = new KviTalListBox(box);
KviTalListBoxText * lbt;
for(i=0;i<6;i++)
{
- QString tmpn;
+ TQString tmpn;
tmpn.setNum(i);
lbt = new KviTalListBoxText(m_pLevelListBox,tmpn);
}
m_pIconButton = new KviStyledToolButton(box);
- connect(m_pIconButton,SIGNAL(clicked()),this,SLOT(iconButtonClicked()));
+ connect(m_pIconButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(iconButtonClicked()));
m_pIconPopup = new KviTalPopupMenu(this);
KviIconWidget * iw = new KviIconWidget(m_pIconPopup);
- connect(iw,SIGNAL(selected(int)),this,SLOT(newIconSelected(int)));
+ connect(iw,TQT_SIGNAL(selected(int)),this,TQT_SLOT(newIconSelected(int)));
m_pIconPopup->insertItem(iw);
@@ -455,10 +451,10 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent)
KviTalHBox * h = new KviTalHBox(this);
addWidgetToLayout(h,0,1,3,1);
- QPushButton * b = new QPushButton(__tr2qs_ctx("Load From...","options"),h);
- connect(b,SIGNAL(clicked()),this,SLOT(load()));
- b = new QPushButton(__tr2qs_ctx("Save As...","options"),h);
- connect(b,SIGNAL(clicked()),this,SLOT(save()));
+ TQPushButton * b = new TQPushButton(__tr2qs_ctx("Load From...","options"),h);
+ connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(load()));
+ b = new TQPushButton(__tr2qs_ctx("Save As...","options"),h);
+ connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(save()));
KviMessageListViewItem * it;
@@ -468,12 +464,12 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(QWidget * parent)
it = new KviMessageListViewItem(m_pListView,i);
}
- layout()->setRowStretch(0,1);
- layout()->setColStretch(0,1);
+ tqlayout()->setRowStretch(0,1);
+ tqlayout()->setColStretch(0,1);
- connect(m_pListView,SIGNAL(selectionChanged(KviTalListViewItem *)),this,SLOT(itemChanged(KviTalListViewItem *)));
- connect(m_pForeListBox,SIGNAL(selectionChanged(KviTalListBoxItem *)),this,SLOT(colorChanged(KviTalListBoxItem *)));
- connect(m_pBackListBox,SIGNAL(selectionChanged(KviTalListBoxItem *)),this,SLOT(colorChanged(KviTalListBoxItem *)));
+ connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(itemChanged(KviTalListViewItem *)));
+ connect(m_pForeListBox,TQT_SIGNAL(selectionChanged(KviTalListBoxItem *)),this,TQT_SLOT(colorChanged(KviTalListBoxItem *)));
+ connect(m_pBackListBox,TQT_SIGNAL(selectionChanged(KviTalListBoxItem *)),this,TQT_SLOT(colorChanged(KviTalListBoxItem *)));
itemChanged(0);
}
@@ -488,7 +484,7 @@ void KviMessageColorsOptionsWidget::newIconSelected(int iconId)
if(iconId >= KVI_NUM_SMALL_ICONS)return;
m_pLastItem->msgType()->setPixId(iconId);
m_pIconButton->setIconSet(*(g_pIconManager->getSmallIcon(iconId)));
- m_pListView->repaintItem(m_pLastItem);
+ m_pListView->tqrepaintItem(m_pLastItem);
}
void KviMessageColorsOptionsWidget::saveLastItem()
@@ -514,7 +510,7 @@ void KviMessageColorsOptionsWidget::saveLastItem()
curIt = m_pLevelListBox->currentItem();
if(curIt < 0 || curIt > 5)curIt = 1;
m_pLastItem->msgType()->setLevel(curIt);
- m_pListView->repaintItem(m_pLastItem);
+ m_pListView->tqrepaintItem(m_pLastItem);
}
void KviMessageColorsOptionsWidget::itemChanged(KviTalListViewItem * it)
@@ -561,7 +557,7 @@ void KviMessageColorsOptionsWidget::colorChanged(KviTalListBoxItem *)
void KviMessageColorsOptionsWidget::iconButtonClicked()
{
- m_pIconPopup->popup(QCursor::pos());
+ m_pIconPopup->popup(TQCursor::pos());
}
void KviMessageColorsOptionsWidget::commit()
@@ -582,8 +578,8 @@ void KviMessageColorsOptionsWidget::commit()
void KviMessageColorsOptionsWidget::save()
{
- QString szName;
- QString szInit;
+ TQString szName;
+ TQString szInit;
g_pApp->getLocalKvircDirectory(szInit,KviApp::MsgColors);
if(KviFileDialog::askForSaveFileName(szName,__tr2qs_ctx("Choose a Filename - KVIrc","options"),szInit))
@@ -623,18 +619,18 @@ void KviMessageColorsOptionsWidget::load()
{
//KviStr szName;
- QString szName;
+ TQString szName;
//KviStr szInit;
- QString szInit;
+ TQString szInit;
g_pApp->getLocalKvircDirectory(szInit,KviApp::MsgColors);
#ifndef COMPILE_ON_WINDOWS
// symlink local to global
//KviStr szGlobal;
- QString szGlobal;
+ TQString szGlobal;
g_pApp->getGlobalKvircDirectory(szGlobal,KviApp::MsgColors);
//KviStr szLocal;
- QString szLocal;
+ TQString szLocal;
g_pApp->getLocalKvircDirectory(szLocal,KviApp::MsgColors,"presets");
//debug("SYMLINKING %s to %s",szGlobal.ptr(),szLocal.ptr());
//debug("SYMLINK RETURNS %d (%d)",::symlink(szGlobal.ptr(),szLocal.ptr()));
@@ -654,7 +650,7 @@ void KviMessageColorsOptionsWidget::load()
cfg.setGroup("Messages");
//KviStr tmp;
- QString tmp;
+ TQString tmp;
KviMessageListViewItem * it = (KviMessageListViewItem *)m_pListView->firstChild();
while(it)
@@ -682,7 +678,7 @@ void KviMessageColorsOptionsWidget::load()
int iLevel = cfg.readIntEntry(tmp,it->msgType()->level());
it->msgType()->setLevel(iLevel);
- m_pListView->repaintItem(it);
+ m_pListView->tqrepaintItem(it);
it = (KviMessageListViewItem *)(it->nextSibling());
}