summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kaiman/userinterface.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 06:00:15 +0000
commitb1057f437bf65300831a0ccb45b920787c6b318d (patch)
treef8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /noatun/modules/kaiman/userinterface.cpp
parent4ddfca384ced9ad654213aef9dc2c3973720b980 (diff)
downloadtdemultimedia-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/userinterface.cpp')
-rw-r--r--noatun/modules/kaiman/userinterface.cpp102
1 files changed, 51 insertions, 51 deletions
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 );