diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /noatun/modules/kaiman | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/kaiman')
-rw-r--r-- | noatun/modules/kaiman/SKIN-SPECS | 32 | ||||
-rw-r--r-- | noatun/modules/kaiman/pref.cpp | 12 | ||||
-rw-r--r-- | noatun/modules/kaiman/pref.h | 3 | ||||
-rw-r--r-- | noatun/modules/kaiman/skins/circle/README | 4 | ||||
-rw-r--r-- | noatun/modules/kaiman/skins/circle/skindata | 8 | ||||
-rw-r--r-- | noatun/modules/kaiman/skins/circle/skindata_alt | 8 | ||||
-rw-r--r-- | noatun/modules/kaiman/skins/k9/skindata | 2 | ||||
-rw-r--r-- | noatun/modules/kaiman/style.cpp | 106 | ||||
-rw-r--r-- | noatun/modules/kaiman/style.h | 53 | ||||
-rw-r--r-- | noatun/modules/kaiman/userinterface.cpp | 102 | ||||
-rw-r--r-- | noatun/modules/kaiman/userinterface.h | 3 |
11 files changed, 173 insertions, 160 deletions
diff --git a/noatun/modules/kaiman/SKIN-SPECS b/noatun/modules/kaiman/SKIN-SPECS index bc3533ad..5d30b733 100644 --- a/noatun/modules/kaiman/SKIN-SPECS +++ b/noatun/modules/kaiman/SKIN-SPECS @@ -37,7 +37,7 @@ if the play button was 30 by 20, the resulting image file would be Note that images for buttons and numbers contain the items horizontally, the images for items contain the items vertically, the image for a font -contains 3 rows of 32 items, and the slider contains the background and +tqcontains 3 rows of 32 items, and the slider contains the background and handle horizontally or vertically (depending if a slider is horizontal or verticle, respectivley). @@ -56,7 +56,7 @@ options in the event that options are added to the skin spec in the future. PROPER TRANSPARENCY: The main background image uses a threshold of 1 (out of 256 levels) for the -window shape, the rest is used for partially overwiting the background when +window tqshape, the rest is used for partially overwiting the background when the Transparency option is true. Portions of items, buttons, sliders, numbers, and text that never change and @@ -80,7 +80,7 @@ Background: filename filename The background image file, the window will be the same size as this image. - Add transparency to this image for shaped skins, the cutoff threshold for + Add transparency to this image for tqshaped skins, the cutoff threshold for transparency is 1 on images with muli-level alpha (like in png). Transparency: flag @@ -95,8 +95,8 @@ Mask: filename (this is DEPRECATED!, for transparent skins just add transparency to the Background image, Mask remains merely for backwards compatibility) filename - The mask image file, only needed for skins which are shaped windows (not - rectangular). Contains a transparency mask for the main window. + The tqmask image file, only needed for skins which are tqshaped windows (not + rectangular). Contains a transparency tqmask for the main window. ========================== Text display @@ -125,7 +125,7 @@ Title/Album/Artist/Genre: filename length [extended] x y extended (optional, absence defaults to FALSE) - When TRUE, the image contains 3 additional lines for internation + When TRUE, the image tqcontains 3 additional lines for internation characters. The result is 6 lines of 32 characters each. ========================== @@ -151,9 +151,9 @@ Play/Pause/Stop/Shuffle/Repeat/ clip_filename (optional) When specified, defines an image with transparency to be used as the button's - draw clip mask. The clip mask is placed at location x, y The transparency is used to + draw clip tqmask. The clip tqmask is placed at location x, y The transparency is used to indicate the portions of the button that should be visible (drawn) and respond to - mouse clicks. If the image contains a multiple level alpha channel, the mask is reduced + mouse clicks. If the image contains a multiple level alpha channel, the tqmask is reduced such that levels above 50% are visible and those below 50% are not visible. ========================== @@ -175,9 +175,9 @@ Preset_1_/.../Preset_10_Button: filename prelight x y [clip_filename] clip_filename (optional) When specified, defines an image with transparency to be used as the button's - draw clip mask. The clip mask is placed at location x, y The transparency is used to + draw clip tqmask. The clip tqmask is placed at location x, y The transparency is used to indicate the portions of the button that should be visible (drawn) and respond to - mouse clicks. If the image contains a multiple level alpha channel, the mask is reduced + mouse clicks. If the image contains a multiple level alpha channel, the tqmask is reduced such that levels above 50% are visible and those below 50% are not visible. @@ -185,7 +185,7 @@ Preset_1_/.../Preset_10_Button: filename prelight x y [clip_filename] Items (with fixed number sections) ========================== -Stereo/Shuffle/Repeat/Mpegversion/Mpeglayer/Mpegmode/Status/ +Stereo/Shuffle/Repeat/Mpegversion/Mpeglayer/Mpegmode/tqStatus/ Minus/Total_Item: filename x y filename @@ -247,7 +247,7 @@ Digit_Large/Digit_Small_Default: filename Image file. Contains digits horizontally from 0 to 9, and a blank space. These two digits are a convenience function, if you want to use a digit more than - once it is quicker to load it into on of these two slots. Then when using the digit + once it is quicker to load it into on of these two Q_SLOTS. Then when using the digit in the number item type below, use the words 'Large' or 'Small' in place of the filename. @@ -354,15 +354,15 @@ Position/Volume/Balance_Dial: filename has_press_image has_prelight_image revers x, y, width, height: Marks the clipping region to draw the dial, basically the handle is not drawn - outside this region. (width and height will be ignored if a clip mask image + outside this region. (width and height will be ignored if a clip tqmask image is specified (see next option). clip_filename (optional) When specified, defines an image with transparency to be used as the dial's - draw clip mask. The clip mask is placed at x, y (above) and the image's dimensions + draw clip tqmask. The clip tqmask is placed at x, y (above) and the image's dimensions are used in place of width, height (above). The transparency is used to indicate the portions of the dial that should be visible (drawn) and respond to mouse clicks. - If the image contains a multiple level alpha channel, the mask is reduced such that + If the image contains a multiple level alpha channel, the tqmask is reduced such that levels above 50% are visible and those below 50% are not visible. ============================================================================== @@ -401,7 +401,7 @@ Option line: | # images | Normal | Pressed | Prelit | Items (all item images contained vertically) -------------------------- -Stereo/Shuffle/Repeat/Mpegversion/Mpeglayer/Mpegmode/Status/Minus/Total_Item: filename x y +Stereo/Shuffle/Repeat/Mpegversion/Mpeglayer/Mpegmode/tqStatus/Minus/Total_Item: filename x y Item: | # images | Image 1 | Image 2 | Image 3 | Image 4 | Image 5 | | total | | | | | | diff --git a/noatun/modules/kaiman/pref.cpp b/noatun/modules/kaiman/pref.cpp index 5f241bc0..a318dbb6 100644 --- a/noatun/modules/kaiman/pref.cpp +++ b/noatun/modules/kaiman/pref.cpp @@ -31,8 +31,8 @@ #include "userinterface.h" -KaimanPrefDlg::KaimanPrefDlg(TQObject *parent ) - : CModule(i18n("Kaiman Skins"), i18n("Skin Selection for the Kaiman Plugin"), "style", parent) +KaimanPrefDlg::KaimanPrefDlg(TQObject *tqparent ) + : CModule(i18n("Kaiman Skins"), i18n("Skin Selection for the Kaiman Plugin"), "style", tqparent) { // create widgets TQVBoxLayout *topLayout = new TQVBoxLayout( this, 6, 11 ); @@ -76,7 +76,7 @@ void KaimanPrefDlg::reopen() KConfig *config=KGlobal::config(); config->setGroup("Kaiman"); TQString skin = config->readEntry( "SkinResource", Kaiman::DEFAULT_SKIN ); - TQListBoxItem *item = _skinList->findItem( skin ); + TQListBoxItem *item = _skinList->tqfindItem( skin ); if ( item ) _skinList->setCurrentItem( item ); else @@ -86,7 +86,7 @@ void KaimanPrefDlg::reopen() void KaimanPrefDlg::setSkin( TQString skin ) { - _skinList->setCurrentItem( _skinList->findItem( skin ) ); + _skinList->setCurrentItem( _skinList->tqfindItem( skin ) ); } @@ -104,8 +104,8 @@ void KaimanPrefDlg::readSkinDir( const TQString &dir ) if (!directory.exists()) return; - const QFileInfoList *list = directory.entryInfoList(); - QFileInfoListIterator it(*list); + const TQFileInfoList *list = directory.entryInfoList(); + TQFileInfoListIterator it(*list); while ( it.current() ) { kdDebug() << it.current()->absFilePath() << endl; diff --git a/noatun/modules/kaiman/pref.h b/noatun/modules/kaiman/pref.h index d252e394..dbdf935b 100644 --- a/noatun/modules/kaiman/pref.h +++ b/noatun/modules/kaiman/pref.h @@ -27,8 +27,9 @@ class TQLabel; class KaimanPrefDlg : public CModule { Q_OBJECT + TQ_OBJECT public: - KaimanPrefDlg( TQObject *parent ); + KaimanPrefDlg( TQObject *tqparent ); virtual ~KaimanPrefDlg(); virtual void save(); diff --git a/noatun/modules/kaiman/skins/circle/README b/noatun/modules/kaiman/skins/circle/README index d80082af..f2071dca 100644 --- a/noatun/modules/kaiman/skins/circle/README +++ b/noatun/modules/kaiman/skins/circle/README @@ -3,8 +3,8 @@ Author: Johne Ellis <gqview@geocities.ocm> Released: November 25, 1998 Version: 1.0 URL: http://www.geocities.com/SiliconValley/Haven/5235 -Comments: Skin with a doughnut shape to test shaped windows. - (skins with a shape mask) +Comments: Skin with a doughnut tqshape to test tqshaped windows. + (skins with a tqshape tqmask) Note: For transparency to work, GQmpeg 0.4.2 is required. Previous versions will work, but will be _ugly_. diff --git a/noatun/modules/kaiman/skins/circle/skindata b/noatun/modules/kaiman/skins/circle/skindata index 25268d22..57c07cc6 100644 --- a/noatun/modules/kaiman/skins/circle/skindata +++ b/noatun/modules/kaiman/skins/circle/skindata @@ -6,16 +6,16 @@ #Released: November 25, 1998 #Author: John Ellis <gqview@geocities.com> #URL: http://www.geocities.com/SiliconValley/Haven/5235/ -#Comments: Skin with a doughnut shape to test shaped windows. -# (skins with a shape mask) +#Comments: Skin with a doughnut tqshape to test tqshaped windows. +# (skins with a tqshape tqmask) #run 'gqmpeg -skinhelp' for help with coordinates. #simply comment out items you do not want to display #only Background is required. Background: back.png -#Mask is an image with transparency used to define a shaped window -Mask: back_mask.png +#Mask is an image with transparency used to define a tqshaped window +Mask: back_tqmask.png #Title: filename length x y Title: letters.png 23 32 86 diff --git a/noatun/modules/kaiman/skins/circle/skindata_alt b/noatun/modules/kaiman/skins/circle/skindata_alt index fb3e97f5..0bfda442 100644 --- a/noatun/modules/kaiman/skins/circle/skindata_alt +++ b/noatun/modules/kaiman/skins/circle/skindata_alt @@ -6,16 +6,16 @@ #Released: November 25, 1998 #Author: John Ellis <gqview@geocities.com> #URL: http://www.geocities.com/SiliconValley/Haven/5235/ -#Comments: Skin with a doughnut shape to test shaped windows. -# (skins with a shape mask) +#Comments: Skin with a doughnut tqshape to test tqshaped windows. +# (skins with a tqshape tqmask) #run 'gqmpeg -skinhelp' for help with coordinates. #simply comment out items you do not want to display #only Background is required. Background: back_sm.png -#Mask is an image with transparency used to define a shaped window -Mask: back_sm_mask.png +#Mask is an image with transparency used to define a tqshaped window +Mask: back_sm_tqmask.png #Title: filename length x y Title: letters.png 21 8 4 diff --git a/noatun/modules/kaiman/skins/k9/skindata b/noatun/modules/kaiman/skins/k9/skindata index 1fdc4320..d7d25a56 100644 --- a/noatun/modules/kaiman/skins/k9/skindata +++ b/noatun/modules/kaiman/skins/k9/skindata @@ -10,7 +10,7 @@ ###################################################### Background: knine-normal2.jpg -Mask: mask.png +Mask: tqmask.png Play_Button: play.jpg FALSE FALSE 55 133 89 166 Stop_Button: stop.jpg FALSE FALSE 28 124 52 145 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)) { diff --git a/noatun/modules/kaiman/style.h b/noatun/modules/kaiman/style.h index 1f2bc788..6dd1fd3e 100644 --- a/noatun/modules/kaiman/style.h +++ b/noatun/modules/kaiman/style.h @@ -29,11 +29,12 @@ #include <tqevent.h> #include <tqptrvector.h> -class KaimanStyleElement : public QWidget +class KaimanStyleElement : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KaimanStyleElement(TQWidget *parent, const char *name=0); + KaimanStyleElement(TQWidget *tqparent, const char *name=0); ~KaimanStyleElement(); virtual void loadPixmaps(TQString &val_s_filename); @@ -72,15 +73,16 @@ private: class KaimanStyleMasked : public KaimanStyleElement { Q_OBJECT + TQ_OBJECT public: - KaimanStyleMasked(TQWidget *parent, const char *name=0) - : KaimanStyleElement( parent, name ) {}; + KaimanStyleMasked(TQWidget *tqparent, const char *name=0) + : KaimanStyleElement( tqparent, name ) {}; virtual void loadPixmaps(TQString &val_s_filename) { KaimanStyleElement::loadPixmaps( val_s_filename ); - if(pixmaps[0]->mask()) - setMask(*pixmaps[0]->mask()); + if(pixmaps[0]->tqmask()) + setMask(*pixmaps[0]->tqmask()); }; }; @@ -88,8 +90,9 @@ public: class KaimanStyleButton : public KaimanStyleMasked { Q_OBJECT + TQ_OBJECT public: - KaimanStyleButton(TQWidget *parent, const char *name=0); + KaimanStyleButton(TQWidget *tqparent, const char *name=0); ~KaimanStyleButton(); // Button states. @@ -125,8 +128,9 @@ private: class KaimanStyleSlider : public KaimanStyleMasked { Q_OBJECT + TQ_OBJECT public: - KaimanStyleSlider(int min, int max, TQWidget *parent, const char *name=0); + KaimanStyleSlider(int min, int max, TQWidget *tqparent, const char *name=0); ~KaimanStyleSlider(); int value() { return _value; }; @@ -163,8 +167,9 @@ protected: class KaimanStyleBackground : public KaimanStyleMasked { Q_OBJECT + TQ_OBJECT public: - KaimanStyleBackground(TQWidget *parent, const char *name=0); + KaimanStyleBackground(TQWidget *tqparent, const char *name=0); ~KaimanStyleBackground(); protected: @@ -182,8 +187,9 @@ private: class KaimanStyleValue : public KaimanStyleMasked { Q_OBJECT + TQ_OBJECT public: - KaimanStyleValue(int min, int max, TQWidget *parent, const char *name=0); + KaimanStyleValue(int min, int max, TQWidget *tqparent, const char *name=0); ~KaimanStyleValue(); int value() { return _value; }; @@ -200,8 +206,9 @@ private: class KaimanStyleState : public KaimanStyleMasked { Q_OBJECT + TQ_OBJECT public: - KaimanStyleState(TQWidget *parent, const char *name=0); + KaimanStyleState(TQWidget *tqparent, const char *name=0); ~KaimanStyleState(); int value() { return _value; }; @@ -223,8 +230,9 @@ private: class KaimanStyleNumber : public KaimanStyleElement { Q_OBJECT + TQ_OBJECT public: - KaimanStyleNumber(TQWidget *parent, const char *name=0); + KaimanStyleNumber(TQWidget *tqparent, const char *name=0); ~KaimanStyleNumber(); virtual void loadPixmaps(TQString &val_s_filename); @@ -247,8 +255,9 @@ private: class KaimanStyleText : public KaimanStyleElement { Q_OBJECT + TQ_OBJECT public: - KaimanStyleText(TQWidget *parent, const char *name=0); + KaimanStyleText(TQWidget *tqparent, const char *name=0); ~KaimanStyleText(); virtual void loadPixmaps(TQString &val_s_filename); @@ -281,8 +290,9 @@ private: class KaimanStyleAnimation : public KaimanStyleMasked { Q_OBJECT + TQ_OBJECT public: - KaimanStyleAnimation(int delay, TQWidget *parent, const char *name=0); + KaimanStyleAnimation(int delay, TQWidget *tqparent, const char *name=0); ~KaimanStyleAnimation(); public slots: @@ -298,25 +308,26 @@ private: TQTimer *_timer; }; -class KaimanStyle : public QWidget +class KaimanStyle : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KaimanStyle(TQWidget *parent, const char *name=0); + KaimanStyle(TQWidget *tqparent, const char *name=0); ~KaimanStyle(); - enum { background, mask, play_Button, stop_Button, pause_Button, prev_Button, next_Button, repeat_Button, shuffle_Button, playlist_Button, mixer_Button, exit_Button, Iconify_Button, Config_Button, Alt_Skin_Button, Minute_Number, Second_Number, in_Rate_Number, in_Hz_Number, song_Number, status_Item, cPU_Number, digit_Large, digit_Small_Default, title, volume_Item, volume_Slider, position_Item, position_Slider }; + enum { background, tqmask, play_Button, stop_Button, pause_Button, prev_Button, next_Button, repeat_Button, shuffle_Button, playlist_Button, mixer_Button, exit_Button, Iconify_Button, Config_Button, Alt_Skin_Button, Minute_Number, Second_Number, in_Rate_Number, in_Hz_Number, song_Number, status_Item, cPU_Number, digit_Large, digit_Small_Default, title, volume_Item, volume_Slider, position_Item, position_Slider }; enum { ParsingError=1, FileNotFound }; /// Finds a style element, according to it's name. Returns 0 when element is not available. - KaimanStyleElement* find(const char* val_s_elemName); + KaimanStyleElement* tqfind(const char* val_s_elemName); /// Tries to load the given style and returns success (true) or failure (false) bool loadStyle(const TQString &styleName, const TQString &descFile="skindata" ); TQString skinName() { return i_skinName; }; - /// Returns the mask + /// Returns the tqmask TQBitmap* Mask(); virtual bool eventFilter( TQObject *o, TQEvent *e ); @@ -335,13 +346,13 @@ private: TQString i_s_styleBase; - // The mask of the complete style. Used for doing shaped windows + // The tqmask of the complete style. Used for doing tqshaped windows TQBitmap i_bitmap_Mask; /// All style elements are stored here. TQPtrVector<KaimanStyleElement> I_styleElem; - // The parent window. In other words: The container that holds all the KaimanStyleElement's + // The tqparent window. In other words: The container that holds all the KaimanStyleElement's TQWidget* i_qw_parent; TQPtrList<TQWidget> i_sliders; diff --git a/noatun/modules/kaiman/userinterface.cpp b/noatun/modules/kaiman/userinterface.cpp index b1ae2570..4c3d4e28 100644 --- a/noatun/modules/kaiman/userinterface.cpp +++ b/noatun/modules/kaiman/userinterface.cpp @@ -88,10 +88,10 @@ Kaiman::Kaiman() if ( !changeStyle(skinName, "skindata") ) { - KMessageBox::sorry( this, i18n("Cannot load skin %1. Switching to default skin.").arg(skinName) ); + KMessageBox::sorry( this, i18n("Cannot load skin %1. Switching to default skin.").tqarg(skinName) ); if ( !changeStyle( DEFAULT_SKIN, "skindata" ) ) { - KMessageBox::error( this, i18n("Cannot load default skin %1.").arg(DEFAULT_SKIN) ); + KMessageBox::error( this, i18n("Cannot load default skin %1.").tqarg(DEFAULT_SKIN) ); TQTimer::singleShot( 0, this, TQT_SLOT(close()) ); return; } @@ -112,7 +112,7 @@ Kaiman::Kaiman() if( napp->player()->isPlaying() ) newSong(); - new KaimanPrefDlg(this); + new KaimanPrefDlg(TQT_TQOBJECT(this)); show(); } @@ -159,12 +159,12 @@ bool Kaiman::loadStyle( const TQString &style, const TQString &desc ) if ( _style->Mask() != 0 ) { - // Set the shaped window form + // Set the tqshaped window form XShapeCombineMask( qt_xdisplay(), winId(), ShapeBounding, 0,0, _style->Mask()->handle(), ShapeSet ); } - KaimanStyleElement* item = _style->find("Background"); + KaimanStyleElement* item = _style->tqfind("Background"); setBackgroundMode(TQWidget::NoBackground); if ( item!=0 ) { @@ -173,53 +173,53 @@ bool Kaiman::loadStyle( const TQString &style, const TQString &desc ) setFixedSize( item->width(), item->height()); } - item = _style->find("Playlist_Button"); + item = _style->tqfind("Playlist_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView()) ); - item = _style->find("Play_Button"); + item = _style->tqfind("Play_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); - item = _style->find("Pause_Button"); + item = _style->tqfind("Pause_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); - item = _style->find("Stop_Button"); + item = _style->tqfind("Stop_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop()) ); - item = _style->find("Next_Button"); + item = _style->tqfind("Next_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward()) ); - item = _style->find("Prev_Button"); + item = _style->tqfind("Prev_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back()) ); - item = _style->find("Exit_Button"); + item = _style->tqfind("Exit_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(close()) ); - item = _style->find("Mixer_Button"); + item = _style->tqfind("Mixer_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(execMixer()) ); - item = _style->find("Iconify_Button"); + item = _style->tqfind("Iconify_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMinimized()) ); - item = _style->find("Alt_Skin_Button"); + item = _style->tqfind("Alt_Skin_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleSkin()) ); - item = _style->find("Repeat_Button"); + item = _style->tqfind("Repeat_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleLoop()) ); - item = _style->find("Shuffle_Button"); + item = _style->tqfind("Shuffle_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleShuffle()) ); - item = _style->find("Config_Button"); + item = _style->tqfind("Config_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), napp, TQT_SLOT(preferences()) ); - item = _style->find("Volume_Up_Button"); + item = _style->tqfind("Volume_Up_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this,TQT_SLOT(volumeUp())); - item = _style->find("Volume_Down_Button"); + item = _style->tqfind("Volume_Down_Button"); if( item!=0 ) connect( item, TQT_SIGNAL(clicked()), this,TQT_SLOT(volumeDown())); KaimanStyleSlider* slider = - static_cast<KaimanStyleSlider*>(_style->find("Position_Slider")); + static_cast<KaimanStyleSlider*>(_style->tqfind("Position_Slider")); if( slider!=0 ) { connect( slider, TQT_SIGNAL(newValueDrag(int)), this, TQT_SLOT(seekStart(int)) ); @@ -228,18 +228,18 @@ bool Kaiman::loadStyle( const TQString &style, const TQString &desc ) slider->setValue( 0, 0, 1000 ); } - slider = static_cast<KaimanStyleSlider*>(_style->find("Volume_Slider")); + slider = static_cast<KaimanStyleSlider*>(_style->tqfind("Volume_Slider")); if ( slider!=0 ) { connect(slider, TQT_SIGNAL(newValue(int)), this, TQT_SLOT(setVolume(int))); slider->setValue( napp->player()->volume(), 0, 100 ); } - KaimanStyleValue* volItem = static_cast<KaimanStyleValue*>(_style->find("Volume_Item")); + KaimanStyleValue* volItem = static_cast<KaimanStyleValue*>(_style->tqfind("Volume_Item")); if ( volItem ) volItem->setValue( napp->player()->volume(), 0, 100 ); - KaimanStyleText* titleItem = static_cast<KaimanStyleText*>(_style->find("Title")); + KaimanStyleText* titleItem = static_cast<KaimanStyleText*>(_style->tqfind("Title")); if ( titleItem ) titleItem->startAnimation( 300 ); @@ -291,23 +291,23 @@ void Kaiman::seekDrag( int value ) if ( !_style ) return; KaimanStyleValue* posItem = - static_cast<KaimanStyleValue*>(_style->find("Position_Item")); + static_cast<KaimanStyleValue*>(_style->tqfind("Position_Item")); if ( posItem ) posItem->setValue( value, 0, length ); KaimanStyleSlider* posSlider = - static_cast<KaimanStyleSlider*>(_style->find("Position_Slider")); + static_cast<KaimanStyleSlider*>(_style->tqfind("Position_Slider")); if ( posSlider ) posSlider->setValue( value, 0, length ); // update time KaimanStyleNumber* numItem = - static_cast<KaimanStyleNumber*>(_style->find("Minute_Number")); + static_cast<KaimanStyleNumber*>(_style->tqfind("Minute_Number")); if ( numItem ) numItem->setValue( value/60%60 ); - numItem = static_cast<KaimanStyleNumber*>(_style->find("Second_Number")); + numItem = static_cast<KaimanStyleNumber*>(_style->tqfind("Second_Number")); if ( numItem ) numItem->setValue( value % 60 ); } @@ -335,13 +335,13 @@ void Kaiman::toggleSkin() TQString oldDesc, newDesc; if ( _altSkin ) { - oldDesc = TQString::fromLatin1("skindata"); - newDesc = TQString::fromLatin1("alt_skindata"); + oldDesc = TQString::tqfromLatin1("skindata"); + newDesc = TQString::tqfromLatin1("alt_skindata"); } else { - newDesc = TQString::fromLatin1("skindata"); - oldDesc = TQString::fromLatin1("alt_skindata"); + newDesc = TQString::tqfromLatin1("skindata"); + oldDesc = TQString::tqfromLatin1("alt_skindata"); } if ( !changeStyle(skinName, newDesc) ) @@ -372,7 +372,7 @@ void Kaiman::volumeDown() void Kaiman::execMixer() { - kapp->startServiceByDesktopName ( TQString::fromLatin1("kmix"), TQString::null ); + kapp->startServiceByDesktopName ( TQString::tqfromLatin1("kmix"), TQString() ); } @@ -384,8 +384,8 @@ void Kaiman::timeout() return; // update volume - KaimanStyleSlider* l_elem_volslider = static_cast<KaimanStyleSlider*>(_style->find("Volume_Slider")); - KaimanStyleValue* l_elem_volitem = static_cast<KaimanStyleValue*>(_style->find("Volume_Item")); + KaimanStyleSlider* l_elem_volslider = static_cast<KaimanStyleSlider*>(_style->tqfind("Volume_Slider")); + KaimanStyleValue* l_elem_volitem = static_cast<KaimanStyleValue*>(_style->tqfind("Volume_Item")); if ( l_elem_volslider!=0 ) l_elem_volslider->setValue( napp->player()->volume(), 0, 100 ); if ( l_elem_volitem!=0 ) @@ -399,20 +399,20 @@ void Kaiman::timeout() sec = 0; KaimanStyleValue* posItem = - static_cast<KaimanStyleValue*>(_style->find("Position_Item")); + static_cast<KaimanStyleValue*>(_style->tqfind("Position_Item")); if ( posItem ) posItem->setValue( sec, 0, napp->player()->getLength()/1000 ); KaimanStyleSlider* posSlider = - static_cast<KaimanStyleSlider*>(_style->find("Position_Slider")); + static_cast<KaimanStyleSlider*>(_style->tqfind("Position_Slider")); if ( posSlider ) posSlider->setValue( sec, 0, napp->player()->getLength()/1000 ); // update time KaimanStyleNumber* numItem = - static_cast<KaimanStyleNumber*>(_style->find("Minute_Number")); + static_cast<KaimanStyleNumber*>(_style->tqfind("Minute_Number")); if ( numItem ) numItem->setValue( sec/60%60 ); - numItem = static_cast<KaimanStyleNumber*>(_style->find("Second_Number")); + numItem = static_cast<KaimanStyleNumber*>(_style->tqfind("Second_Number")); if ( numItem ) numItem->setValue( sec%60 ); } @@ -420,14 +420,14 @@ void Kaiman::timeout() const PlaylistItem &item = napp->playlist()->current(); KaimanStyleNumber* numItem = 0; - numItem = static_cast<KaimanStyleNumber*>(_style->find("In_Rate_Number")); + numItem = static_cast<KaimanStyleNumber*>(_style->tqfind("In_Rate_Number")); if ( numItem ) numItem->setValue(item.property("bitrate").toInt()); TQString hzString = item.property("samplerate"); hzString.truncate(2); - numItem = static_cast<KaimanStyleNumber*>(_style->find("In_Hz_Number")); + numItem = static_cast<KaimanStyleNumber*>(_style->tqfind("In_Hz_Number")); if ( numItem ) numItem->setValue(hzString.toInt()); } @@ -438,11 +438,11 @@ void Kaiman::updateMode() if ( !_style ) return; KaimanStyleButton* pause = - static_cast<KaimanStyleButton*>(_style->find("Pause_Button")); + static_cast<KaimanStyleButton*>(_style->tqfind("Pause_Button")); KaimanStyleButton* play = - static_cast<KaimanStyleButton*>(_style->find("Play_Button")); + static_cast<KaimanStyleButton*>(_style->tqfind("Play_Button")); KaimanStyleState* status = - static_cast<KaimanStyleState*>(_style->find("Status_Item")); + static_cast<KaimanStyleState*>(_style->tqfind("Status_Item")); if (napp->player()->isStopped() ) { @@ -469,7 +469,7 @@ void Kaiman::loopTypeChange( int ) { if ( !_style ) return; - KaimanStyleState* rep = static_cast<KaimanStyleState*>(_style->find("Repeat_Item")); + KaimanStyleState* rep = static_cast<KaimanStyleState*>(_style->tqfind("Repeat_Item")); if ( rep ) rep->setValue( napp->player()->loopStyle() ); } @@ -486,19 +486,19 @@ void Kaiman::newSongLen( int, int ) // update time KaimanStyleNumber* numItem = - static_cast<KaimanStyleNumber*>(_style->find("Minute_Total_Number")); + static_cast<KaimanStyleNumber*>(_style->tqfind("Minute_Total_Number")); if ( numItem ) numItem->setValue( len/60%60 ); - numItem = static_cast<KaimanStyleNumber*>(_style->find("Second_Total_Number")); + numItem = static_cast<KaimanStyleNumber*>(_style->tqfind("Second_Total_Number")); if ( numItem ) numItem->setValue( len%60 ); - numItem = static_cast<KaimanStyleNumber*>(_style->find("Song_Minute_Number")); + numItem = static_cast<KaimanStyleNumber*>(_style->tqfind("Song_Minute_Number")); if ( numItem ) numItem->setValue( len/60%60 ); - numItem = static_cast<KaimanStyleNumber*>(_style->find("Second_Minute_Number")); + numItem = static_cast<KaimanStyleNumber*>(_style->tqfind("Second_Minute_Number")); if ( numItem ) numItem->setValue( len%60 ); @@ -510,7 +510,7 @@ void Kaiman::newSong() { if ( !_style ) return; - KaimanStyleText* titleItem = static_cast<KaimanStyleText*>(_style->find("Title")); + KaimanStyleText* titleItem = static_cast<KaimanStyleText*>(_style->tqfind("Title")); if ( titleItem ) { TQString title = i18n("Noatun"); @@ -520,7 +520,7 @@ void Kaiman::newSong() if ( title.isEmpty() ) title = napp->player()->current().file(); - title = i18n("TITLE (LENGTH)", "%1 (%2)").arg(title, + title = i18n("TITLE (LENGTH)", "%1 (%2)").tqarg(title, napp->player()->current().lengthString()); } titleItem->setValue( title ); diff --git a/noatun/modules/kaiman/userinterface.h b/noatun/modules/kaiman/userinterface.h index 63b4133e..e1e2f8c6 100644 --- a/noatun/modules/kaiman/userinterface.h +++ b/noatun/modules/kaiman/userinterface.h @@ -35,11 +35,12 @@ class Player; class Kaiman : public KMainWindow, public UserInterface { Q_OBJECT + TQ_OBJECT public: Kaiman(); virtual ~Kaiman(); - bool changeStyle( const TQString &style, const TQString &desc=TQString::null ); + bool changeStyle( const TQString &style, const TQString &desc=TQString() ); public slots: void dropEvent( TQDropEvent * ); void doDropEvent( TQDropEvent * ); |