summaryrefslogtreecommitdiffstats
path: root/src/kvilib/tal/kvi_tal_listbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/tal/kvi_tal_listbox.cpp')
-rw-r--r--src/kvilib/tal/kvi_tal_listbox.cpp218
1 files changed, 109 insertions, 109 deletions
diff --git a/src/kvilib/tal/kvi_tal_listbox.cpp b/src/kvilib/tal/kvi_tal_listbox.cpp
index f5fcc087..e96cc012 100644
--- a/src/kvilib/tal/kvi_tal_listbox.cpp
+++ b/src/kvilib/tal/kvi_tal_listbox.cpp
@@ -26,29 +26,29 @@
#include "kvi_tal_listbox.h"
#ifdef COMPILE_USE_QT4
- #include <qpainter.h>
- #include <qstyle.h>
- #include <qapplication.h>
+ #include <tqpainter.h>
+ #include <tqstyle.h>
+ #include <tqapplication.h>
- KviTalListBox::KviTalListBox(QWidget * pParent,Qt::WFlags f)
+ KviTalListBox::KviTalListBox(TQWidget * pParent,TQt::WFlags f)
: Q3ListBox(pParent,0,f)
{
- connect(this,SIGNAL(highlighted(Q3ListBoxItem *)),this,SLOT(redirect_highlighted(Q3ListBoxItem *)));
- connect(this,SIGNAL(selected(Q3ListBoxItem *)),this,SLOT(redirect_selected(Q3ListBoxItem *)));
- connect(this,SIGNAL(selectionChanged(Q3ListBoxItem *)),this,SLOT(redirect_selectionChanged(Q3ListBoxItem *)));
- connect(this,SIGNAL(currentChanged(Q3ListBoxItem *)),this,SLOT(redirect_currentChanged(Q3ListBoxItem *)));
- connect(this,SIGNAL(clicked(Q3ListBoxItem *)),this,SLOT(redirect_clicked(Q3ListBoxItem *)));
- connect(this,SIGNAL(clicked(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_clicked(Q3ListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(pressed(Q3ListBoxItem *)),this,SLOT(redirect_pressed(Q3ListBoxItem *)));
- connect(this,SIGNAL(pressed(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_pressed(Q3ListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(doubleClicked(Q3ListBoxItem *)),this,SLOT(redirect_doubleClicked(Q3ListBoxItem *)));
- connect(this,SIGNAL(returnPressed(Q3ListBoxItem *)),this,SLOT(redirect_returnPressed(Q3ListBoxItem *)));
- connect(this,SIGNAL(rightButtonClicked(Q3ListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonClicked(Q3ListBoxItem *, const QPoint &)));
- connect(this,SIGNAL(rightButtonPressed(Q3ListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonPressed(Q3ListBoxItem *, const QPoint &)));
- connect(this,SIGNAL(mouseButtonPressed(int,Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,Q3ListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(mouseButtonClicked(int,Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,Q3ListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(contextMenuRequested(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(Q3ListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(onItem(Q3ListBoxItem *)),this,SLOT(redirect_onItem(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(highlighted(Q3ListBoxItem *)),this,TQT_SLOT(redirect_highlighted(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(selected(Q3ListBoxItem *)),this,TQT_SLOT(redirect_selected(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(selectionChanged(Q3ListBoxItem *)),this,TQT_SLOT(redirect_selectionChanged(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(currentChanged(Q3ListBoxItem *)),this,TQT_SLOT(redirect_currentChanged(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(clicked(Q3ListBoxItem *)),this,TQT_SLOT(redirect_clicked(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(clicked(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(Q3ListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(pressed(Q3ListBoxItem *)),this,TQT_SLOT(redirect_pressed(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(pressed(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(Q3ListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(doubleClicked(Q3ListBoxItem *)),this,TQT_SLOT(redirect_doubleClicked(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(returnPressed(Q3ListBoxItem *)),this,TQT_SLOT(redirect_returnPressed(Q3ListBoxItem *)));
+ connect(this,TQT_SIGNAL(rightButtonClicked(Q3ListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(Q3ListBoxItem *, const TQPoint &)));
+ connect(this,TQT_SIGNAL(rightButtonPressed(Q3ListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(Q3ListBoxItem *, const TQPoint &)));
+ connect(this,TQT_SIGNAL(mouseButtonPressed(int,Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,Q3ListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(mouseButtonClicked(int,Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,Q3ListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(contextMenuRequested(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(Q3ListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(onItem(Q3ListBoxItem *)),this,TQT_SLOT(redirect_onItem(Q3ListBoxItem *)));
}
void KviTalListBox::redirect_highlighted(Q3ListBoxItem *item)
@@ -76,7 +76,7 @@
emit clicked((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_clicked(Q3ListBoxItem * item,const QPoint & pnt)
+ void KviTalListBox::redirect_clicked(Q3ListBoxItem * item,const TQPoint & pnt)
{
emit clicked((KviTalListBoxItem *)item,pnt);
}
@@ -86,7 +86,7 @@
emit pressed((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_pressed(Q3ListBoxItem * item,const QPoint & pnt)
+ void KviTalListBox::redirect_pressed(Q3ListBoxItem * item,const TQPoint & pnt)
{
emit pressed((KviTalListBoxItem *)item,pnt);
}
@@ -101,27 +101,27 @@
emit returnPressed((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_rightButtonClicked(Q3ListBoxItem * item, const QPoint &pnt)
+ void KviTalListBox::redirect_rightButtonClicked(Q3ListBoxItem * item, const TQPoint &pnt)
{
emit rightButtonClicked((KviTalListBoxItem *)item,pnt);
}
- void KviTalListBox::redirect_rightButtonPressed(Q3ListBoxItem * item, const QPoint &pnt)
+ void KviTalListBox::redirect_rightButtonPressed(Q3ListBoxItem * item, const TQPoint &pnt)
{
emit rightButtonPressed((KviTalListBoxItem *)item,pnt);
}
- void KviTalListBox::redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const QPoint & pos)
+ void KviTalListBox::redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const TQPoint & pos)
{
emit mouseButtonPressed(button,(KviTalListBoxItem *)item,pos);
}
- void KviTalListBox::redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const QPoint & pos)
+ void KviTalListBox::redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const TQPoint & pos)
{
emit mouseButtonClicked(button,(KviTalListBoxItem *)item,pos);
}
- void KviTalListBox::redirect_contextMenuRequested(Q3ListBoxItem * item,const QPoint & pos)
+ void KviTalListBox::redirect_contextMenuRequested(Q3ListBoxItem * item,const TQPoint & pos)
{
emit contextMenuRequested((KviTalListBoxItem *)item,pos);
}
@@ -131,19 +131,19 @@
emit onItem((KviTalListBoxItem *)i);
}
- KviTalListBoxText::KviTalListBoxText(KviTalListBox *listbox, const QString &text)
+ KviTalListBoxText::KviTalListBoxText(KviTalListBox *listbox, const TQString &text)
:KviTalListBoxItem(listbox)
{
setText(text);
}
- KviTalListBoxText::KviTalListBoxText(const QString &text)
+ KviTalListBoxText::KviTalListBoxText(const TQString &text)
:KviTalListBoxItem()
{
setText(text);
}
- KviTalListBoxText::KviTalListBoxText(KviTalListBox* listbox, const QString &text, KviTalListBoxItem *after)
+ KviTalListBoxText::KviTalListBoxText(KviTalListBox* listbox, const TQString &text, KviTalListBoxItem *after)
: KviTalListBoxItem(listbox, after)
{
setText(text);
@@ -153,10 +153,10 @@
{
}
- void KviTalListBoxText::paint(QPainter *painter)
+ void KviTalListBoxText::paint(TQPainter *painter)
{
int itemHeight = height(listBox());
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
int yPos = ((itemHeight - fm.height()) / 2) + fm.ascent();
painter->drawText(3, yPos, text());
}
@@ -164,13 +164,13 @@
int KviTalListBoxText::height(const KviTalListBox* lb) const
{
int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0;
- return qMax(h, QApplication::globalStrut().height());
+ return qMax(h, TQApplication::globalStrut().height());
}
int KviTalListBoxText::width(const KviTalListBox* lb) const
{
int w = lb ? lb->fontMetrics().width(text()) + 6 : 0;
- return qMax(w, QApplication::globalStrut().width());
+ return qMax(w, TQApplication::globalStrut().width());
}
int KviTalListBoxText::rtti() const
@@ -178,19 +178,19 @@
return RTTI;
}
- KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pixmap)
+ KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pixmap)
: KviTalListBoxItem(listbox)
{
pm = pixmap;
}
- KviTalListBoxPixmap::KviTalListBoxPixmap(const QPixmap &pixmap)
+ KviTalListBoxPixmap::KviTalListBoxPixmap(const TQPixmap &pixmap)
: KviTalListBoxItem()
{
pm = pixmap;
}
- KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pixmap, KviTalListBoxItem *after)
+ KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pixmap, KviTalListBoxItem *after)
: KviTalListBoxItem(listbox, after)
{
pm = pixmap;
@@ -200,21 +200,21 @@
{
}
- KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pix, const QString& text)
+ KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pix, const TQString& text)
: KviTalListBoxItem(listbox)
{
pm = pix;
setText(text);
}
- KviTalListBoxPixmap::KviTalListBoxPixmap(const QPixmap & pix, const QString& text)
+ KviTalListBoxPixmap::KviTalListBoxPixmap(const TQPixmap & pix, const TQString& text)
: KviTalListBoxItem()
{
pm = pix;
setText(text);
}
- KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap & pix, const QString& text,
+ KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap & pix, const TQString& text,
KviTalListBoxItem *after)
: KviTalListBoxItem(listbox, after)
{
@@ -222,19 +222,19 @@
setText(text);
}
- void KviTalListBoxPixmap::paint(QPainter *painter)
+ void KviTalListBoxPixmap::paint(TQPainter *painter)
{
int itemHeight = height(listBox());
int yPos;
- const QPixmap *pm = pixmap();
+ const TQPixmap *pm = pixmap();
if (pm && ! pm->isNull()) {
yPos = (itemHeight - pm->height()) / 2;
painter->drawPixmap(3, yPos, *pm);
}
if (!text().isEmpty()) {
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
yPos = ((itemHeight - fm.height()) / 2) + fm.ascent();
painter->drawText(pm->width() + 5, yPos, text());
}
@@ -247,15 +247,15 @@
h = pm.height();
else
h = qMax(pm.height(), lb->fontMetrics().lineSpacing() + 2);
- return qMax(h, QApplication::globalStrut().height());
+ return qMax(h, TQApplication::globalStrut().height());
}
int KviTalListBoxPixmap::width(const KviTalListBox* lb) const
{
if (text().isEmpty())
- return qMax(pm.width() + 6, QApplication::globalStrut().width());
+ return qMax(pm.width() + 6, TQApplication::globalStrut().width());
return qMax(pm.width() + lb->fontMetrics().width(text()) + 6,
- QApplication::globalStrut().width());
+ TQApplication::globalStrut().width());
}
int KviTalListBoxPixmap::rtti() const
@@ -266,125 +266,125 @@
#include "kvi_tal_listbox_qt4.moc"
#else
- #include <qpainter.h>
- #include <qstyle.h>
- #include <qapplication.h>
-
-
- KviTalListBox::KviTalListBox(QWidget * pParent,Qt::WFlags f)
- : QListBox(pParent,0,f)
- {
- connect(this,SIGNAL(highlighted(QListBoxItem *)),this,SLOT(redirect_highlighted(QListBoxItem *)));
- connect(this,SIGNAL(selected(QListBoxItem *)),this,SLOT(redirect_selected(QListBoxItem *)));
- connect(this,SIGNAL(selectionChanged(QListBoxItem *)),this,SLOT(redirect_selectionChanged(QListBoxItem *)));
- connect(this,SIGNAL(currentChanged(QListBoxItem *)),this,SLOT(redirect_currentChanged(QListBoxItem *)));
- connect(this,SIGNAL(clicked(QListBoxItem *)),this,SLOT(redirect_clicked(QListBoxItem *)));
- connect(this,SIGNAL(clicked(QListBoxItem *,const QPoint &)),this,SLOT(redirect_clicked(QListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(pressed(QListBoxItem *)),this,SLOT(redirect_pressed(QListBoxItem *)));
- connect(this,SIGNAL(pressed(QListBoxItem *,const QPoint &)),this,SLOT(redirect_pressed(QListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(doubleClicked(QListBoxItem *)),this,SLOT(redirect_doubleClicked(QListBoxItem *)));
- connect(this,SIGNAL(returnPressed(QListBoxItem *)),this,SLOT(redirect_returnPressed(QListBoxItem *)));
- connect(this,SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonClicked(QListBoxItem *, const QPoint &)));
- connect(this,SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonPressed(QListBoxItem *, const QPoint &)));
- connect(this,SIGNAL(mouseButtonPressed(int,QListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,QListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(mouseButtonClicked(int,QListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,QListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(contextMenuRequested(QListBoxItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(QListBoxItem *,const QPoint &)));
- connect(this,SIGNAL(onItem(QListBoxItem *)),this,SLOT(redirect_onItem(QListBoxItem *)));
- }
-
- void KviTalListBox::redirect_highlighted(QListBoxItem *item)
+ #include <tqpainter.h>
+ #include <tqstyle.h>
+ #include <tqapplication.h>
+
+
+ KviTalListBox::KviTalListBox(TQWidget * pParent,TQt::WFlags f)
+ : TQListBox(pParent,0,f)
+ {
+ connect(this,TQT_SIGNAL(highlighted(TQListBoxItem *)),this,TQT_SLOT(redirect_highlighted(TQListBoxItem *)));
+ connect(this,TQT_SIGNAL(selected(TQListBoxItem *)),this,TQT_SLOT(redirect_selected(TQListBoxItem *)));
+ connect(this,TQT_SIGNAL(selectionChanged(TQListBoxItem *)),this,TQT_SLOT(redirect_selectionChanged(TQListBoxItem *)));
+ connect(this,TQT_SIGNAL(currentChanged(TQListBoxItem *)),this,TQT_SLOT(redirect_currentChanged(TQListBoxItem *)));
+ connect(this,TQT_SIGNAL(clicked(TQListBoxItem *)),this,TQT_SLOT(redirect_clicked(TQListBoxItem *)));
+ connect(this,TQT_SIGNAL(clicked(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(TQListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(pressed(TQListBoxItem *)),this,TQT_SLOT(redirect_pressed(TQListBoxItem *)));
+ connect(this,TQT_SIGNAL(pressed(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(TQListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(doubleClicked(TQListBoxItem *)),this,TQT_SLOT(redirect_doubleClicked(TQListBoxItem *)));
+ connect(this,TQT_SIGNAL(returnPressed(TQListBoxItem *)),this,TQT_SLOT(redirect_returnPressed(TQListBoxItem *)));
+ connect(this,TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(TQListBoxItem *, const TQPoint &)));
+ connect(this,TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(TQListBoxItem *, const TQPoint &)));
+ connect(this,TQT_SIGNAL(mouseButtonPressed(int,TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,TQListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(mouseButtonClicked(int,TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,TQListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(contextMenuRequested(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(TQListBoxItem *,const TQPoint &)));
+ connect(this,TQT_SIGNAL(onItem(TQListBoxItem *)),this,TQT_SLOT(redirect_onItem(TQListBoxItem *)));
+ }
+
+ void KviTalListBox::redirect_highlighted(TQListBoxItem *item)
{
emit highlighted((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_selected(QListBoxItem *item)
+ void KviTalListBox::redirect_selected(TQListBoxItem *item)
{
emit selected((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_selectionChanged(QListBoxItem * item)
+ void KviTalListBox::redirect_selectionChanged(TQListBoxItem * item)
{
emit selectionChanged((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_currentChanged(QListBoxItem * item)
+ void KviTalListBox::redirect_currentChanged(TQListBoxItem * item)
{
emit currentChanged((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_clicked(QListBoxItem * item)
+ void KviTalListBox::redirect_clicked(TQListBoxItem * item)
{
emit clicked((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_clicked(QListBoxItem * item,const QPoint & pnt)
+ void KviTalListBox::redirect_clicked(TQListBoxItem * item,const TQPoint & pnt)
{
emit clicked((KviTalListBoxItem *)item,pnt);
}
- void KviTalListBox::redirect_pressed(QListBoxItem * item)
+ void KviTalListBox::redirect_pressed(TQListBoxItem * item)
{
emit pressed((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_pressed(QListBoxItem * item,const QPoint & pnt)
+ void KviTalListBox::redirect_pressed(TQListBoxItem * item,const TQPoint & pnt)
{
emit pressed((KviTalListBoxItem *)item,pnt);
}
- void KviTalListBox::redirect_doubleClicked(QListBoxItem * item)
+ void KviTalListBox::redirect_doubleClicked(TQListBoxItem * item)
{
emit doubleClicked((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_returnPressed(QListBoxItem * item)
+ void KviTalListBox::redirect_returnPressed(TQListBoxItem * item)
{
emit returnPressed((KviTalListBoxItem *)item);
}
- void KviTalListBox::redirect_rightButtonClicked(QListBoxItem * item, const QPoint &pnt)
+ void KviTalListBox::redirect_rightButtonClicked(TQListBoxItem * item, const TQPoint &pnt)
{
emit rightButtonClicked((KviTalListBoxItem *)item,pnt);
}
- void KviTalListBox::redirect_rightButtonPressed(QListBoxItem * item, const QPoint &pnt)
+ void KviTalListBox::redirect_rightButtonPressed(TQListBoxItem * item, const TQPoint &pnt)
{
emit rightButtonPressed((KviTalListBoxItem *)item,pnt);
}
- void KviTalListBox::redirect_mouseButtonPressed(int button,QListBoxItem * item,const QPoint & pos)
+ void KviTalListBox::redirect_mouseButtonPressed(int button,TQListBoxItem * item,const TQPoint & pos)
{
emit mouseButtonPressed(button,(KviTalListBoxItem *)item,pos);
}
- void KviTalListBox::redirect_mouseButtonClicked(int button,QListBoxItem * item,const QPoint & pos)
+ void KviTalListBox::redirect_mouseButtonClicked(int button,TQListBoxItem * item,const TQPoint & pos)
{
emit mouseButtonClicked(button,(KviTalListBoxItem *)item,pos);
}
- void KviTalListBox::redirect_contextMenuRequested(QListBoxItem * item,const QPoint & pos)
+ void KviTalListBox::redirect_contextMenuRequested(TQListBoxItem * item,const TQPoint & pos)
{
emit contextMenuRequested((KviTalListBoxItem *)item,pos);
}
- void KviTalListBox::redirect_onItem(QListBoxItem * i)
+ void KviTalListBox::redirect_onItem(TQListBoxItem * i)
{
emit onItem((KviTalListBoxItem *)i);
}
- KviTalListBoxText::KviTalListBoxText( KviTalListBox *listbox, const QString &text )
+ KviTalListBoxText::KviTalListBoxText( KviTalListBox *listbox, const TQString &text )
:KviTalListBoxItem( listbox )
{
setText( text );
}
- KviTalListBoxText::KviTalListBoxText( const QString &text )
+ KviTalListBoxText::KviTalListBoxText( const TQString &text )
:KviTalListBoxItem()
{
setText( text );
}
- KviTalListBoxText::KviTalListBoxText( KviTalListBox* listbox, const QString &text, KviTalListBoxItem *after )
+ KviTalListBoxText::KviTalListBoxText( KviTalListBox* listbox, const TQString &text, KviTalListBoxItem *after )
: KviTalListBoxItem( listbox, after )
{
setText( text );
@@ -394,10 +394,10 @@
{
}
- void KviTalListBoxText::paint( QPainter *painter )
+ void KviTalListBoxText::paint( TQPainter *painter )
{
int itemHeight = height( listBox() );
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
int yPos = ( ( itemHeight - fm.height() ) / 2 ) + fm.ascent();
painter->drawText( 3, yPos, text() );
}
@@ -405,13 +405,13 @@
int KviTalListBoxText::height( const KviTalListBox* lb ) const
{
int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0;
- return QMAX( h, QApplication::globalStrut().height() );
+ return TQMAX( h, TQApplication::globalStrut().height() );
}
int KviTalListBoxText::width( const KviTalListBox* lb ) const
{
int w = lb ? lb->fontMetrics().width( text() ) + 6 : 0;
- return QMAX( w, QApplication::globalStrut().width() );
+ return TQMAX( w, TQApplication::globalStrut().width() );
}
int KviTalListBoxText::RTTI = 1;
@@ -421,19 +421,19 @@
return RTTI;
}
- KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pixmap )
+ KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pixmap )
: KviTalListBoxItem( listbox )
{
pm = pixmap;
}
- KviTalListBoxPixmap::KviTalListBoxPixmap( const QPixmap &pixmap )
+ KviTalListBoxPixmap::KviTalListBoxPixmap( const TQPixmap &pixmap )
: KviTalListBoxItem()
{
pm = pixmap;
}
- KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pixmap, KviTalListBoxItem *after )
+ KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pixmap, KviTalListBoxItem *after )
: KviTalListBoxItem( listbox, after )
{
pm = pixmap;
@@ -443,21 +443,21 @@
{
}
- KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pix, const QString& text)
+ KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pix, const TQString& text)
: KviTalListBoxItem( listbox )
{
pm = pix;
setText( text );
}
- KviTalListBoxPixmap::KviTalListBoxPixmap( const QPixmap & pix, const QString& text)
+ KviTalListBoxPixmap::KviTalListBoxPixmap( const TQPixmap & pix, const TQString& text)
: KviTalListBoxItem()
{
pm = pix;
setText( text );
}
- KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & pix, const QString& text,
+ KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & pix, const TQString& text,
KviTalListBoxItem *after )
: KviTalListBoxItem( listbox, after )
{
@@ -465,19 +465,19 @@
setText( text );
}
- void KviTalListBoxPixmap::paint( QPainter *painter )
+ void KviTalListBoxPixmap::paint( TQPainter *painter )
{
int itemHeight = height( listBox() );
int yPos;
- const QPixmap *pm = pixmap();
+ const TQPixmap *pm = pixmap();
if ( pm && ! pm->isNull() ) {
yPos = ( itemHeight - pm->height() ) / 2;
painter->drawPixmap( 3, yPos, *pm);
}
if ( !text().isEmpty() ) {
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
yPos = ( ( itemHeight - fm.height() ) / 2 ) + fm.ascent();
painter->drawText( pm->width() + 5, yPos, text() );
}
@@ -489,16 +489,16 @@
if ( text().isEmpty() )
h = pm.height();
else
- h = QMAX( pm.height(), lb->fontMetrics().lineSpacing() + 2 );
- return QMAX( h, QApplication::globalStrut().height() );
+ h = TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 2 );
+ return TQMAX( h, TQApplication::globalStrut().height() );
}
int KviTalListBoxPixmap::width( const KviTalListBox* lb ) const
{
if ( text().isEmpty() )
- return QMAX( pm.width() + 6, QApplication::globalStrut().width() );
- return QMAX( pm.width() + lb->fontMetrics().width( text() ) + 6,
- QApplication::globalStrut().width() );
+ return TQMAX( pm.width() + 6, TQApplication::globalStrut().width() );
+ return TQMAX( pm.width() + lb->fontMetrics().width( text() ) + 6,
+ TQApplication::globalStrut().width() );
}
int KviTalListBoxPixmap::RTTI = 2;