summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/tkcombobox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficeui/tkcombobox.cpp')
-rw-r--r--lib/kofficeui/tkcombobox.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/lib/kofficeui/tkcombobox.cpp b/lib/kofficeui/tkcombobox.cpp
index 525afb44..903f394e 100644
--- a/lib/kofficeui/tkcombobox.cpp
+++ b/lib/kofficeui/tkcombobox.cpp
@@ -19,21 +19,21 @@
*/
#include "tkcombobox.h"
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qdrawutil.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqdrawutil.h>
#include <kapplication.h>
-TKComboBox::TKComboBox(QWidget* parent, const char* name)
-: QComboBox(false,parent,name)
+TKComboBox::TKComboBox(TQWidget* tqparent, const char* name)
+: TQComboBox(false,tqparent,name)
{
}
-TKComboBox::TKComboBox( bool isEditable, QWidget* parent, const char* name )
-: QComboBox(isEditable,parent,name)
+TKComboBox::TKComboBox( bool isEditable, TQWidget* tqparent, const char* name )
+: TQComboBox(isEditable,tqparent,name)
{
}
@@ -41,35 +41,35 @@ TKComboBox::~TKComboBox()
{
}
-void TKComboBox::paintEvent(QPaintEvent*)
+void TKComboBox::paintEvent(TQPaintEvent*)
{
- QRect r;
+ TQRect r;
if (editable()){
#ifdef __GNUC__
#warning "Left out for now, lacking a style expert (Werner)"
#endif
- //r = QRect( style().comboButtonRect( 0, 0, width(), height() ) );
- r = QRect(4, 2, width()-height()-2, height()-4);
+ //r = TQRect( style().comboButtonRect( 0, 0, width(), height() ) );
+ r = TQRect(4, 2, width()-height()-2, height()-4);
} else {
- r = QRect(4, 2, width()-height()-2, height()-4);
+ r = TQRect(4, 2, width()-height()-2, height()-4);
}
int by = 2;
int bx = r.x() + r.width();
int bw = width() - bx - 2;
int bh = height()-4;
- QPainter p( this );
- const QColorGroup& g = colorGroup();
+ TQPainter p( this );
+ const TQColorGroup& g = tqcolorGroup();
- QRect fr(2,2,width()-4,height()-4);
+ TQRect fr(2,2,width()-4,height()-4);
if ( hasFocus()) {
- p.fillRect( fr, g.brush( QColorGroup::Highlight ) );
+ p.fillRect( fr, g.brush( TQColorGroup::Highlight ) );
} else {
- p.fillRect( fr, g.brush( QColorGroup::Base ) );
+ p.fillRect( fr, g.brush( TQColorGroup::Base ) );
}
- QRect r1(1,1,width()-1,height()-1);
+ TQRect r1(1,1,width()-1,height()-1);
qDrawShadePanel( &p, r1, g, true, 1 );
static const char* arrow_down[] = {
@@ -84,14 +84,14 @@ void TKComboBox::paintEvent(QPaintEvent*)
" XXX ",
" X "};
- QPixmap pixmap(arrow_down);
+ TQPixmap pixmap(arrow_down);
- style().drawControl( QStyle::CE_PushButton, &p, this, QRect( bx, by, bw, bh ), colorGroup() );
- style().drawItem( &p, QRect( bx, by, bw, bh), AlignCenter, colorGroup(), isEnabled(), &pixmap, QString::null );
+ tqstyle().tqdrawControl( TQStyle::CE_PushButton, &p, this, TQRect( bx, by, bw, bh ), tqcolorGroup() );
+ tqstyle().drawItem( &p, TQRect( bx, by, bw, bh), AlignCenter, tqcolorGroup(), isEnabled(), &pixmap, TQString() );
if ( hasFocus()) {
- style().drawPrimitive( QStyle::PE_FocusRect, &p, fr, g );
+ tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, fr, g );
}
if (!editable()) {
@@ -100,9 +100,9 @@ void TKComboBox::paintEvent(QPaintEvent*)
p.setBackgroundColor( g.background() );
if ( listBox()->item(currentItem()) ) {
- QListBoxItem * item = listBox()->item(currentItem());
- const QPixmap *pix = item->pixmap();
- QString text = item->text();
+ TQListBoxItem * item = listBox()->item(currentItem());
+ const TQPixmap *pix = item->pixmap();
+ TQString text = item->text();
int x = r.x();
if ( pix ) {
p.drawPixmap( x, r.y() + ( r.height() - pix->height() ) / 2 +1, *pix );