diff options
Diffstat (limited to 'noatun/modules/kaiman/style.cpp')
-rw-r--r-- | noatun/modules/kaiman/style.cpp | 106 |
1 files changed, 53 insertions, 53 deletions
diff --git a/noatun/modules/kaiman/style.cpp b/noatun/modules/kaiman/style.cpp index 6b700230..621b0240 100644 --- a/noatun/modules/kaiman/style.cpp +++ b/noatun/modules/kaiman/style.cpp @@ -42,8 +42,8 @@ const bool KaimanStyleSlider::optionVertical = 1; const bool KaimanStyleSlider::optionReversed = 2; const bool KaimanStyleText::optionExtended = 1; -KaimanStyleElement::KaimanStyleElement(TQWidget *parent, const char *name) - : TQWidget(parent, name) +KaimanStyleElement::KaimanStyleElement(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { // Initialize everything to default values filename = ""; @@ -118,15 +118,15 @@ void KaimanStyleElement::loadPixmaps(TQString &val_s_filename) int w = (x==0) ? firstWidth : width; TQPixmap *part = new TQPixmap(w,h,pixmap.depth()); - part->fill(Qt::black); + part->fill(TQt::black); bitBlt(part,0,0,&pixmap,sourcex,sourcey,w,h); pixmaps.insert(i,part); - if(pixmap.mask()) + if(pixmap.tqmask()) { - TQBitmap maskpart(w,h); - bitBlt(&maskpart,0,0,pixmap.mask(),sourcex,sourcey,w,h); - part->setMask(maskpart); + TQBitmap tqmaskpart(w,h); + bitBlt(&tqmaskpart,0,0,pixmap.tqmask(),sourcex,sourcey,w,h); + part->setMask(tqmaskpart); } i++; @@ -142,7 +142,7 @@ void KaimanStyleElement::loadPixmaps(TQString &val_s_filename) for ( int i=0; i<pixmapNum; i++ ) { TQPixmap *pm = new TQPixmap(10, 10); - pm->fill(Qt::black); + pm->fill(TQt::black); pixmaps.insert( i, pm ); } } @@ -160,7 +160,7 @@ void KaimanStyleElement::setPixmap( int num ) if ( num<0 ) num = 0; _currentPixmap = num; - repaint( FALSE ); + tqrepaint( FALSE ); } } @@ -186,14 +186,14 @@ void KaimanStyleElement::dragEnterEvent( TQDragEnterEvent *event ) void KaimanStyleElement::dropEvent( TQDropEvent *event ) { - ((Kaiman*)(parentWidget()->parentWidget()))->doDropEvent(event); + ((Kaiman*)(tqparentWidget()->tqparentWidget()))->doDropEvent(event); } /***************************************************************************/ -KaimanStyleButton::KaimanStyleButton(TQWidget *parent, const char *name) - : KaimanStyleMasked(parent, name) +KaimanStyleButton::KaimanStyleButton(TQWidget *tqparent, const char *name) + : KaimanStyleMasked(tqparent, name) { i_b_lit = i_b_prelit = i_b_down = false; i_i_currentState = NormalUp; @@ -321,14 +321,14 @@ void KaimanStyleButton::updateButtonState() { } setPixmap( *I_pmIndex[i_i_currentState] ); - repaint(); + tqrepaint(); } /***********************************************************************/ -KaimanStyleSlider::KaimanStyleSlider(int min, int max, TQWidget *parent, const char *name) - : KaimanStyleMasked( parent, name ) +KaimanStyleSlider::KaimanStyleSlider(int min, int max, TQWidget *tqparent, const char *name) + : KaimanStyleMasked( tqparent, name ) { _min = min; _max = max; @@ -349,7 +349,7 @@ void KaimanStyleSlider::setValue( int value ) if (value>_max) value=_max; if (value<_min) value=_min; _value = value; - repaint(); + tqrepaint(); } @@ -359,7 +359,7 @@ void KaimanStyleSlider::setValue( int value, int min, int max ) _min = min; _max = max; setValue( value ); - repaint(); + tqrepaint(); } } @@ -413,7 +413,7 @@ void KaimanStyleSlider::mouseReleaseEvent(TQMouseEvent *qme) { _down = false; releaseMouse(); - repaint(); + tqrepaint(); setValue( pos2value(qme->x(), qme->y()) ); emit newValue( value() ); @@ -465,7 +465,7 @@ void KaimanStyleSlider::enterEvent ( TQEvent * e ) if ( !_lit && optionPrelight ) { _lit = true; - repaint(); + tqrepaint(); } KaimanStyleMasked::enterEvent( e ); @@ -476,7 +476,7 @@ void KaimanStyleSlider::leaveEvent ( TQEvent * e ) if ( _lit ) { _lit = false; - repaint(); + tqrepaint(); } KaimanStyleMasked::leaveEvent( e ); @@ -486,8 +486,8 @@ void KaimanStyleSlider::leaveEvent ( TQEvent * e ) /***********************************************************************/ -KaimanStyleBackground::KaimanStyleBackground(TQWidget *parent, const char *name) - : KaimanStyleMasked( parent, name ) +KaimanStyleBackground::KaimanStyleBackground(TQWidget *tqparent, const char *name) + : KaimanStyleMasked( tqparent, name ) { i_b_move = false; } @@ -511,8 +511,8 @@ void KaimanStyleBackground::mouseMoveEvent(TQMouseEvent *qme) } if ( i_b_move ) { - TQWidget *p = parentWidget()->parentWidget(); - if ( !p ) p = parentWidget(); + TQWidget *p = tqparentWidget()->tqparentWidget(); + if ( !p ) p = tqparentWidget(); p->move( qme->globalPos() - i_point_dragStart ); } @@ -522,7 +522,7 @@ void KaimanStyleBackground::mouseMoveEvent(TQMouseEvent *qme) void KaimanStyleBackground::mousePressEvent(TQMouseEvent *qme) { - // On the background we move the shaped toplevel around + // On the background we move the tqshaped toplevel around if (!i_b_move) { i_point_dragStart = qme->pos(); i_point_lastPos = qme->globalPos(); @@ -533,8 +533,8 @@ void KaimanStyleBackground::mousePressEvent(TQMouseEvent *qme) /***********************************************************************/ -KaimanStyleValue::KaimanStyleValue(int min, int max, TQWidget *parent, const char *name) - : KaimanStyleMasked( parent, name ) +KaimanStyleValue::KaimanStyleValue(int min, int max, TQWidget *tqparent, const char *name) + : KaimanStyleMasked( tqparent, name ) { _min = min; _max = max; @@ -571,8 +571,8 @@ void KaimanStyleValue::setValue( int value, int min, int max ) /***********************************************************************/ -KaimanStyleNumber::KaimanStyleNumber(TQWidget *parent, const char *name) - : KaimanStyleElement( parent, name ) +KaimanStyleNumber::KaimanStyleNumber(TQWidget *tqparent, const char *name) + : KaimanStyleElement( tqparent, name ) { //kdDebug(66666) << k_funcinfo << "name = '" << name << "'" << endl; _value = 0; @@ -599,7 +599,7 @@ void KaimanStyleNumber::setValue( int value ) if ( _value!=value ) { _value = value; - repaint(); + tqrepaint(); } } @@ -640,8 +640,8 @@ void KaimanStyleNumber::paintEvent(TQPaintEvent */*qpe*/) /***********************************************************************/ -KaimanStyleText::KaimanStyleText(TQWidget *parent, const char *name) - : KaimanStyleElement( parent, name ) +KaimanStyleText::KaimanStyleText(TQWidget *tqparent, const char *name) + : KaimanStyleElement( tqparent, name ) { _pos = 0; _timer = new TQTimer( this ); @@ -667,7 +667,7 @@ void KaimanStyleText::setValue( TQString value ) _pos = 0; _direction = 1; _value = value; - repaint(); + tqrepaint(); } } @@ -698,7 +698,7 @@ void KaimanStyleText::timeout() // check new position if ( _pos+_direction>=0 && (int)_value.length()-(_pos+_direction)>=digits ) { _pos += _direction; - repaint(); + tqrepaint(); } _timer->start( _delay, TRUE ); @@ -735,8 +735,8 @@ void KaimanStyleText::paintEvent(TQPaintEvent */*qpe*/) /***********************************************************************/ -KaimanStyleAnimation::KaimanStyleAnimation(int delay, TQWidget *parent, const char *name) - : KaimanStyleMasked( parent, name ) +KaimanStyleAnimation::KaimanStyleAnimation(int delay, TQWidget *tqparent, const char *name) + : KaimanStyleMasked( tqparent, name ) { _delay = delay; _frame = 0; @@ -774,8 +774,8 @@ void KaimanStyleAnimation::timeout() /***********************************************************************/ -KaimanStyleState::KaimanStyleState(TQWidget *parent, const char *name) - : KaimanStyleMasked( parent, name ) +KaimanStyleState::KaimanStyleState(TQWidget *tqparent, const char *name) + : KaimanStyleMasked( tqparent, name ) { _value = 0; } @@ -799,10 +799,10 @@ void KaimanStyleState::mousePressEvent(TQMouseEvent *qme) /***********************************************************************/ -KaimanStyle::KaimanStyle( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) +KaimanStyle::KaimanStyle( TQWidget *tqparent, const char *name ) + : TQWidget( tqparent, name ) { - i_qw_parent = parent; + i_qw_parent = tqparent; i_eventSemaphore = false; } @@ -1098,7 +1098,7 @@ void KaimanStyle::interpretTokens(TQStringList& ref_s_tokens) l_kse_elem->element = l_s_elem; if ( l_s_tokenTypes.left(1) == "V" ) { - // Vertical flag + //Qt::Vertical flag l_vertPixmaps = true; l_s_tokenTypes = l_s_tokenTypes.mid(1); } @@ -1332,7 +1332,7 @@ TQString KaimanStyle::getToken(TQString &val_s_string, char val_c_separator) TQString l_s_token; // Find the first occurrence of the separator - l_i_pos = val_s_string.find(val_c_separator, 0, false); + l_i_pos = val_s_string.tqfind(val_c_separator, 0, false); if ( l_i_pos == -1 ) { // No sparator! Then the whole string is the token l_s_token = val_s_string; @@ -1400,20 +1400,20 @@ bool KaimanStyle::eventFilter( TQObject *o, TQEvent *e ) TQMouseEvent *m = (TQMouseEvent*)e; // handle noatun context menu - if (m->button()==RightButton) { + if (m->button()==Qt::RightButton) { NoatunStdAction::ContextMenu::showContextMenu(); return true; } - TQPoint mousePos( m->x()+static_cast<TQWidget *>(o)->x(), - m->y()+static_cast<TQWidget *>(o)->y() ); + TQPoint mousePos( m->x()+TQT_TQWIDGET(o)->x(), + m->y()+TQT_TQWIDGET(o)->y() ); TQWidget *slider = 0; /* find slider that is under the mouse position */ for ( TQWidget *s = i_sliders.first(); s!=0; s=i_sliders.next() ) { TQRect sliderRect( s->pos(), s->size() ); - if ( sliderRect.contains(mousePos) ) slider = s; + if ( sliderRect.tqcontains(mousePos) ) slider = s; } /* the slider the mouse events instead of the visible widget */ @@ -1445,18 +1445,18 @@ bool KaimanStyle::loadPixmaps() l_kse_elem->loadPixmaps(l_s_tmpName); } - l_kse_elem = this->find("Background"); + l_kse_elem = this->tqfind("Background"); if ( l_kse_elem != 0 ) { l_pixmap_Background = l_kse_elem->pixmaps[0]; } - l_kse_elem = this->find("Mask"); + l_kse_elem = this->tqfind("Mask"); if ( l_kse_elem != 0 ) { l_pixmap_Mask = l_kse_elem->pixmaps[0]; } if ( (l_pixmap_Background != 0) && (l_pixmap_Mask != 0) ) { - // OK, background and mask are defined. So now I can calculate the shape + // OK, background and tqmask are defined. So now I can calculate the tqshape int l_i_width_Mask = l_pixmap_Mask->width(); int l_i_height_Mask = l_pixmap_Mask->height(); @@ -1468,11 +1468,11 @@ bool KaimanStyle::loadPixmaps() l_image_Mask.fill( 0xff ); uchar *l_c_pixel; - uint l_qcol_white = qRgb(255,255,255); + uint l_qcol_white = tqRgb(255,255,255); for (int l_i_x=0; l_i_x<l_i_width_Mask; l_i_x++) { for (int l_i_y=0; l_i_y < l_i_height_Mask; l_i_y++) { - if ( ((*((QRgb*) l_image_MaskOrig.scanLine(l_i_y)+l_i_x) & 0x00ffffff)) != (l_qcol_white & 0x00ffffff) ) { + if ( ((*((TQRgb*) l_image_MaskOrig.scanLine(l_i_y)+l_i_x) & 0x00ffffff)) != (l_qcol_white & 0x00ffffff) ) { l_c_pixel = (uchar *)l_image_Mask.scanLine(l_i_y); *(l_c_pixel + (l_i_x>>3) ) &= ~(1 << (l_i_x & 7)); } @@ -1492,7 +1492,7 @@ TQBitmap* KaimanStyle::Mask() return &i_bitmap_Mask; } -KaimanStyleElement* KaimanStyle::find(const char *val_s_elemName) +KaimanStyleElement* KaimanStyle::tqfind(const char *val_s_elemName) { for (uint i=0; i< I_styleElem.count(); i++) { if ( I_styleElem[i]->element == TQString(val_s_elemName)) { |