summaryrefslogtreecommitdiffstats
path: root/knode/knwidgets.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /knode/knwidgets.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knode/knwidgets.cpp')
-rw-r--r--knode/knwidgets.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/knode/knwidgets.cpp b/knode/knwidgets.cpp
index d71624eb6..d75cf9bf7 100644
--- a/knode/knwidgets.cpp
+++ b/knode/knwidgets.cpp
@@ -14,15 +14,15 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "knwidgets.h"
//====================================================================================
-KNListBoxItem::KNListBoxItem(const QString& text, QPixmap *pm)
+KNListBoxItem::KNListBoxItem(const TQString& text, TQPixmap *pm)
{
p_m=pm;
setText(text);
@@ -34,10 +34,10 @@ KNListBoxItem::~KNListBoxItem()
}
-void KNListBoxItem::paint(QPainter *p)
+void KNListBoxItem::paint(TQPainter *p)
{
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
int tYPos=0, tXPos=3, pYPos=0;
@@ -62,7 +62,7 @@ void KNListBoxItem::paint(QPainter *p)
}
-int KNListBoxItem::height(const QListBox *lb) const
+int KNListBoxItem::height(const TQListBox *lb) const
{
if(p_m)
return QMAX( p_m->height(), lb->fontMetrics().lineSpacing() + 1 );
@@ -71,7 +71,7 @@ int KNListBoxItem::height(const QListBox *lb) const
}
-int KNListBoxItem::width(const QListBox *lb) const
+int KNListBoxItem::width(const TQListBox *lb) const
{
if(p_m)
return (p_m->width() + lb->fontMetrics().width( text() ) + 6);
@@ -84,8 +84,8 @@ int KNListBoxItem::width(const QListBox *lb) const
// **** listbox for dialogs **************************************************
-KNDialogListBox::KNDialogListBox(bool alwaysIgnore, QWidget * parent, const char * name)
- : QListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
+KNDialogListBox::KNDialogListBox(bool alwaysIgnore, TQWidget * parent, const char * name)
+ : TQListBox(parent, name), a_lwaysIgnore(alwaysIgnore)
{
}
@@ -95,22 +95,22 @@ KNDialogListBox::~KNDialogListBox()
}
-void KNDialogListBox::keyPressEvent(QKeyEvent *e)
+void KNDialogListBox::keyPressEvent(TQKeyEvent *e)
{
if ((a_lwaysIgnore || !(hasFocus()&&isVisible()))&&((e->key()==Key_Enter)||(e->key()==Key_Return)))
e->ignore();
else
- QListBox::keyPressEvent(e);
+ TQListBox::keyPressEvent(e);
}
//====================================================================================
-KNDockWidgetHeaderDrag::KNDockWidgetHeaderDrag(QWidget *focusWidget, KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
+KNDockWidgetHeaderDrag::KNDockWidgetHeaderDrag(TQWidget *focusWidget, KDockWidgetAbstractHeader* parent, KDockWidget* dock, const char* name )
: KDockWidgetHeaderDrag(parent, dock, name), f_ocus(false)
{
- connect(focusWidget, SIGNAL(focusChanged(QFocusEvent*)), SLOT(slotFocusChanged(QFocusEvent*)));
+ connect(focusWidget, TQT_SIGNAL(focusChanged(TQFocusEvent*)), TQT_SLOT(slotFocusChanged(TQFocusEvent*)));
}
@@ -119,7 +119,7 @@ KNDockWidgetHeaderDrag::~KNDockWidgetHeaderDrag()
}
-void KNDockWidgetHeaderDrag::slotFocusChanged(QFocusEvent *e)
+void KNDockWidgetHeaderDrag::slotFocusChanged(TQFocusEvent *e)
{
if(e->gotFocus()) {
f_ocus = true;
@@ -130,18 +130,18 @@ void KNDockWidgetHeaderDrag::slotFocusChanged(QFocusEvent *e)
}
-void KNDockWidgetHeaderDrag::paintEvent(QPaintEvent* ev)
+void KNDockWidgetHeaderDrag::paintEvent(TQPaintEvent* ev)
{
if (!f_ocus) {
KDockWidgetHeaderDrag::paintEvent(ev);
return;
}
- QPixmap drawBuffer(width(), height());
- QPainter paint;
+ TQPixmap drawBuffer(width(), height());
+ TQPainter paint;
paint.begin(&drawBuffer);
- paint.fillRect(drawBuffer.rect(), QBrush(colorGroup().brush(QColorGroup::Background)));
+ paint.fillRect(drawBuffer.rect(), TQBrush(colorGroup().brush(TQColorGroup::Background)));
paint.setPen(palette().active().highlight());
paint.drawLine(1, 2, width(), 2);