Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/49/head
Michele Calgaro 1 year ago
parent 99eb89b0e8
commit 25db919b40
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -314,7 +314,7 @@ void AnalyzerContainer::changeAnalyzer()
void
AnalyzerContainer::mousePressEvent( TQMouseEvent *e)
{
if( e->button() == Qt::LeftButton ) {
if( e->button() == TQt::LeftButton ) {
AmarokConfig::setCurrentPlaylistAnalyzer( AmarokConfig::currentPlaylistAnalyzer() + 1 );
changeAnalyzer();
}

@ -28,14 +28,14 @@ BoomAnalyzer::BoomAnalyzer( TQWidget *parent )
v = int(K_barHeight*1000);
new TQLabel( "Bar fall-rate:", box );
o = new TQSlider( 100, 2000, 100, v, Qt::Horizontal, box );
o = new TQSlider( 100, 2000, 100, v, TQt::Horizontal, box );
(m = new TQSpinBox( 100, 2000, 1, box ))->setValue( v );
connect( o, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changeK_barHeight( int )) );
connect( o, TQT_SIGNAL(valueChanged(int)), m, TQT_SLOT(setValue( int )) );
v = int(F_peakSpeed*1000);
new TQLabel( "Peak acceleration: ", box );
o = new TQSlider( 1000, 1300, 50, v, Qt::Horizontal, box );
o = new TQSlider( 1000, 1300, 50, v, TQt::Horizontal, box );
(m = new TQSpinBox( 1000, 1300, 1, box ))->setValue( v );
connect( o, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changeF_peakSpeed( int )) );
connect( o, TQT_SIGNAL(valueChanged(int)), m, TQT_SLOT(setValue( int )) );

@ -3621,7 +3621,7 @@ CollectionView::eventFilter( TQObject* o, TQEvent* e )
{
if( o == header()
&& e->type() == TQEvent::MouseButtonPress
&& TQT_TQMOUSEEVENT( e )->button() == Qt::RightButton
&& TQT_TQMOUSEEVENT( e )->button() == TQt::RightButton
&& m_viewMode == modeFlatView )
{
TDEPopupMenu popup;
@ -3849,7 +3849,7 @@ CollectionView::renderFlatModeView( bool /*=false*/ )
{
TQDateTime time = TQDateTime();
time.setTime_t( (*it).toUInt() );
item->setText( *it_c, time.date().toString( Qt::LocalDate ) );
item->setText( *it_c, time.date().toString( TQt::LocalDate ) );
break;
}
case Playcount:

@ -1834,7 +1834,7 @@ CollectionDB::createDragPixmap( const KURL::List &urls, TQString textOverRide )
// compose image
p.begin( &pmdrag );
p.setBackgroundMode( Qt::TransparentMode );
p.setBackgroundMode( TQt::TransparentMode );
for ( int i = 0; i < covers; i++ )
bitBlt( &pmdrag, i * coverSpacing, i * coverSpacing, &coverPm[i], 0, TQt::CopyROP );

@ -108,8 +108,8 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, TDEC
opt6->setName( "Engine" );
opt6->setSpacing( KDialog::spacingHint() );
TQWidget *groupBox, *aboutEngineButton;
groupBox = new TQGroupBox( 2, Qt::Horizontal, i18n("Sound System"), opt6 );
m_engineConfigFrame = new TQGroupBox( 1, Qt::Horizontal, opt6 );
groupBox = new TQGroupBox( 2, TQt::Horizontal, i18n("Sound System"), opt6 );
m_engineConfigFrame = new TQGroupBox( 1, TQt::Horizontal, opt6 );
m_soundSystem = new TQComboBox( false, groupBox );
aboutEngineButton = new TQPushButton( i18n("About"), groupBox );
@ -152,7 +152,7 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, TDEC
opt9->setSpacing( KDialog::spacingHint() );
TQVBox *topbox = new TQVBox( opt9 );
topbox->setSpacing( KDialog::spacingHint() );
TQGroupBox *mediaBox = new TQGroupBox( 2, Qt::Horizontal, i18n("Media Devices"), topbox );
TQGroupBox *mediaBox = new TQGroupBox( 2, TQt::Horizontal, i18n("Media Devices"), topbox );
mediaBox->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
TQVBox *vbox = new TQVBox( mediaBox );
vbox->setSpacing( KDialog::spacingHint() );

@ -119,7 +119,7 @@ CoverLabel::CoverLabel ( TQWidget * parent, const char * name, WFlags f )
void CoverLabel::mouseReleaseEvent(TQMouseEvent *pEvent) {
if (pEvent->button() == Qt::LeftButton || pEvent->button() == Qt::RightButton)
if (pEvent->button() == TQt::LeftButton || pEvent->button() == TQt::RightButton)
{
Amarok::coverContextMenu( this, pEvent->globalPos(), m_artist, m_album, false );
}

@ -90,7 +90,7 @@ EqualizerSetup::EqualizerSetup()
// END Presets
// BEGIN GroupBox
m_groupBoxSliders = new TQGroupBox( 1, Qt::Vertical, i18n("Enable Equalizer"), vbox );
m_groupBoxSliders = new TQGroupBox( 1, TQt::Vertical, i18n("Enable Equalizer"), vbox );
m_groupBoxSliders->setCheckable( true );
m_groupBoxSliders->setChecked( AmarokConfig::equalizerEnabled() );
m_groupBoxSliders->setInsideMargin( KDialog::marginHint() );
@ -103,7 +103,7 @@ EqualizerSetup::EqualizerSetup()
// END GroupBox
// BEGIN Preamp slider
m_slider_preamp = new Slider( Qt::Vertical, slidersLayoutWidget, 100 );
m_slider_preamp = new Slider( TQt::Vertical, slidersLayoutWidget, 100 );
m_slider_preamp->setMinValue( -100 );
m_slider_preamp->setTickmarks( TQSlider::Right );
m_slider_preamp->setTickInterval( 100 );
@ -126,7 +126,7 @@ EqualizerSetup::EqualizerSetup()
}
for ( int i = 0; i < 10; i++ ) {
Slider *slider = new Slider( Qt::Vertical, slidersLayoutWidget );
Slider *slider = new Slider( TQt::Vertical, slidersLayoutWidget );
TQLabel *label = new TQLabel( bandLabels[i], slidersLayoutWidget );
slider->setMinValue( -100 );
@ -142,7 +142,7 @@ EqualizerSetup::EqualizerSetup()
// END
// BEGIN Equalizer Graph Widget
TQGroupBox* graphGBox = new TQGroupBox( 2, Qt::Horizontal, 0, vbox );
TQGroupBox* graphGBox = new TQGroupBox( 2, TQt::Horizontal, 0, vbox );
graphGBox->setInsideMargin( KDialog::marginHint() );
TQVBox* graphVBox = new TQVBox( graphGBox );

@ -114,7 +114,7 @@ UniversalAmarok::UniversalAmarok(TDEInstance *inst,TQObject *parent,TQWidget *wi
toolBar->insertSeparator();
toolBar->insertButton( "arts", 0, TQT_SIGNAL( clicked() ), this, TQT_SLOT( sendMute() ) );
vol_slider = new TQSlider(0,100,1,0,Qt::Horizontal, toolBar,"volume");
vol_slider = new TQSlider(0,100,1,0,TQt::Horizontal, toolBar,"volume");
vol_slider->setLineStep(2);
connect(vol_slider, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT(volChanged(int ) ) );

@ -950,7 +950,7 @@ WebService::recommend( int type, TQString username, TQString artist, TQString to
TQHttp *http = new TQHttp( "wsdev.audioscrobbler.com", 80, this );
connect( http, TQT_SIGNAL( requestFinished( bool ) ), this, TQT_SLOT( recommendFinished( bool ) ) );
uint currentTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
uint currentTime = TQDateTime::currentDateTime( TQt::UTC ).toTime_t();
TQString challenge = TQString::number( currentTime );
TQCString md5pass = KMD5( KMD5( m_password.utf8() ).hexDigest() + currentTime ).hexDigest();
@ -1096,10 +1096,10 @@ void Bundle::detach() {
LoginDialog::LoginDialog( TQWidget *parent )
: KDialogBase( parent, "LastfmLogin", true, TQString(), Ok|Cancel)
{
makeGridMainWidget( 1, Qt::Horizontal );
makeGridMainWidget( 1, TQt::Horizontal );
new TQLabel( i18n( "To use last.fm with Amarok, you need a last.fm profile." ), mainWidget() );
makeGridMainWidget( 2, Qt::Horizontal );
makeGridMainWidget( 2, TQt::Horizontal );
TQLabel *nameLabel = new TQLabel( i18n("&Username:"), mainWidget() );
m_userLineEdit = new KLineEdit( mainWidget() );
nameLabel->setBuddy( m_userLineEdit );

@ -41,7 +41,7 @@ MagnatuneBrowser::MagnatuneBrowser( const char *name )
DEBUG_BLOCK
initTopPanel( );
TQSplitter *spliter = new TQSplitter( Qt::Vertical, this );
TQSplitter *spliter = new TQSplitter( TQt::Vertical, this );
debug() << "Magnatune browser starting..." << endl;
m_listView = new MagnatuneListView( spliter );

@ -149,7 +149,7 @@ MagnatuneXmlParser::parseAlbum( TQDomElement e )
else if ( sElementName == "launchdate" )
{
TQString dateString = childElement.text();
TQDate date = TQDate::fromString( dateString, Qt::ISODate );
TQDate date = TQDate::fromString( dateString, TQt::ISODate );
m_pCurrentAlbum->setLaunchDate( date );
}

@ -159,7 +159,7 @@ class IpodMediaItem : public MediaItem
if( !rss.isEmpty() || !url.isEmpty() )
{
PodcastEpisodeBundle peb( KURL::fromPathOrURL(url), KURL::fromPathOrURL(rss),
track->title, track->artist, desc, date.toString(Qt::ISODate), TQString() /*type*/,
track->title, track->artist, desc, date.toString(TQt::ISODate), TQString() /*type*/,
bundle->length(), TQString() /*guid*/, track->playcount<=0 );
bundle->setPodcastBundle( peb );
}

@ -54,7 +54,7 @@ MediumPluginManagerDialog::MediumPluginManagerDialog()
vbox->setSpacing( KDialog::spacingHint() );
vbox->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
m_location = new TQGroupBox( 1, Qt::Vertical, i18n( "Devices" ), vbox );
m_location = new TQGroupBox( 1, TQt::Vertical, i18n( "Devices" ), vbox );
m_location->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
m_devicesBox = new TQVBox( m_location );
m_devicesBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );

@ -189,7 +189,7 @@ void MultiTabBarInternal::showTabSelectionMenu(TQPoint pos)
void MultiTabBarInternal::mousePressEvent( TQMouseEvent *ev )
{
if ( ev->button() != Qt::RightButton ){
if ( ev->button() != TQt::RightButton ){
ev->ignore();
return;
}

@ -624,7 +624,7 @@ void OSDPreviewWidget::mousePressEvent( TQMouseEvent *event )
{
m_dragOffset = event->pos();
if( event->button() == Qt::LeftButton && !m_dragging ) {
if( event->button() == TQt::LeftButton && !m_dragging ) {
grabMouse( KCursor::sizeAllCursor() );
m_dragging = true;
}

@ -37,14 +37,14 @@ void PixmapViewer::drawContents( TQPainter * p, int clipx, int clipy, int clipw,
}
void PixmapViewer::contentsMousePressEvent(TQMouseEvent *event) {
if(Qt::LeftButton == event->button()) {
if(TQt::LeftButton == event->button()) {
m_currentPos = event->globalPos();
m_isDragging = true;
}
}
void PixmapViewer::contentsMouseReleaseEvent(TQMouseEvent *event) {
if(Qt::LeftButton == event->button()) {
if(TQt::LeftButton == event->button()) {
m_currentPos = event->globalPos();
m_isDragging = false;
}

@ -150,9 +150,9 @@ PlayerWidget::PlayerWidget( TQWidget *parent, const char *name, bool enablePlayl
} //</NavButtons>
{ //<Sliders>
m_pSlider = new Amarok::PrettySlider( Qt::Horizontal,
m_pSlider = new Amarok::PrettySlider( TQt::Horizontal,
Amarok::PrettySlider::Pretty, this );
m_pVolSlider = new Amarok::PrettySlider( Qt::Vertical,
m_pVolSlider = new Amarok::PrettySlider( TQt::Vertical,
Amarok::PrettySlider::Pretty, this,
Amarok::VOLUME_MAX );
@ -770,7 +770,7 @@ void PlayerWidget::contextMenuEvent( TQMouseEvent *e )
void PlayerWidget::mousePressEvent( TQMouseEvent *e )
{
if ( e->button() == Qt::RightButton )
if ( e->button() == TQt::RightButton )
{
//Amarok::Menu::instance()->exec( e->globalPos() );
}
@ -796,7 +796,7 @@ void PlayerWidget::mousePressEvent( TQMouseEvent *e )
void PlayerWidget::mouseMoveEvent( TQMouseEvent *e )
{
if( e->state() & Qt::LeftButton )
if( e->state() & TQt::LeftButton )
{
const int distance = (e->pos() - m_startDragPos).manhattanLength();

@ -2728,7 +2728,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
#define me TQT_TQMOUSEEVENT(e)
#define ke TQT_TQKEYEVENT(e)
if( o == header() && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::RightButton )
if( o == header() && e->type() == TQEvent::MouseButtonPress && me->button() == TQt::RightButton )
{
enum { HIDE = 1000, SELECT, CUSTOM, SMARTRESIZING };
@ -2794,7 +2794,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
}
// not in slotMouseButtonPressed because we need to disable normal usage.
if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->state() == TQt::ControlButton && me->button() == Qt::RightButton )
if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->state() == TQt::ControlButton && me->button() == TQt::RightButton )
{
PlaylistItem *item = static_cast<PlaylistItem*>( itemAt( me->pos() ) );
@ -2809,7 +2809,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
}
// trigger in-place tag editing
else if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::LeftButton )
else if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->button() == TQt::LeftButton )
{
m_clicktimer->stop();
m_itemToRename = 0;
@ -2820,7 +2820,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
bool edit = item
&& item->isSelected()
&& selectedItems().count()==1
&& (me->state() & ~Qt::LeftButton) == 0
&& (me->state() & ~TQt::LeftButton) == 0
&& item->url().isLocalFile();
if( edit )
{
@ -2832,7 +2832,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
}
}
else if( o == viewport() && e->type() == TQEvent::MouseButtonRelease && me->button() == Qt::LeftButton )
else if( o == viewport() && e->type() == TQEvent::MouseButtonRelease && me->button() == TQt::LeftButton )
{
int col = header()->sectionAt( viewportToContents( me->pos() ).x() );
if( col != PlaylistItem::Rating )
@ -2851,14 +2851,14 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
}
// avoid in-place tag editing upon double-clicks
else if( e->type() == TQEvent::MouseButtonDblClick && me->button() == Qt::LeftButton )
else if( e->type() == TQEvent::MouseButtonDblClick && me->button() == TQt::LeftButton )
{
m_itemToRename = 0;
m_clicktimer->stop();
}
// Toggle play/pause if user middle-clicks on current track
else if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->button() == Qt::MidButton )
else if( o == viewport() && e->type() == TQEvent::MouseButtonPress && me->button() == TQt::MidButton )
{
PlaylistItem *item = static_cast<PlaylistItem*>( itemAt( me->pos() ) );
@ -4194,7 +4194,7 @@ void Playlist::contentsMousePressEvent( TQMouseEvent *e )
/// Conditions on setting the rating of an item
if( item &&
!( e->state() & TQt::ControlButton || e->state() & TQt::ShiftButton ) && // skip if ctrl or shift held
( e->button() & Qt::LeftButton ) && // only on a left click
( e->button() & TQt::LeftButton ) && // only on a left click
( e->pos().x() > beginRatingSection && e->pos().x() < endRatingSection ) ) // mouse over rating column
{
int rating = item->ratingAtPoint( e->pos().x() );
@ -4577,7 +4577,7 @@ Playlist::slotMouseButtonPressed( int button, TQListViewItem *after, const TQPoi
{
switch( button )
{
case Qt::MidButton:
case TQt::MidButton:
{
const TQString path = TQApplication::clipboard()->text( TQClipboard::Selection );
const KURL url = KURL::fromPathOrURL( path );
@ -4588,7 +4588,7 @@ Playlist::slotMouseButtonPressed( int button, TQListViewItem *after, const TQPoi
break;
}
case Qt::RightButton:
case TQt::RightButton:
showContextMenu( after, p, col );
break;
@ -4789,7 +4789,7 @@ Playlist::showTagDialog( TQPtrList<TQListViewItem> items )
lineEdit1 = new TQLineEdit( this, "ColumnName" );
lineEdit2 = new TQLineEdit( this, "Command" );
groupBox1 = new TQGroupBox( 1, Qt::Vertical, i18n( "Examples" ), this );
groupBox1 = new TQGroupBox( 1, TQt::Vertical, i18n( "Examples" ), this );
groupBox1->layout()->setMargin( 11 );
new KActiveLabel( i18n( "file --brief %f\n" "ls -sh %f\n" "basename %f\n" "dirname %f" ), groupBox1 );

@ -191,7 +191,7 @@ PlaylistBrowser::PlaylistBrowser( const char *name )
removeButton->setEnabled( false );
//</Toolbar>
m_splitter = new TQSplitter( Qt::Vertical, browserBox );
m_splitter = new TQSplitter( TQt::Vertical, browserBox );
m_splitter->setChildrenCollapsible( false ); // hiding the InfoPane entirely can only be confusing
m_listview = new PlaylistBrowserView( m_splitter );
@ -2768,7 +2768,7 @@ void PlaylistBrowserView::mousePressed( int button, TQListViewItem *item, const
// this function expande/collapse the playlist if the +/- symbol has been pressed
// and show the save menu if the save icon has been pressed
if( !item || button != Qt::LeftButton ) return;
if( !item || button != TQt::LeftButton ) return;
if( isPlaylist( item ) )
{

@ -1362,7 +1362,7 @@ TQDomElement LastFmEntry::xml() const
StreamEditor::StreamEditor( TQWidget *parent, const TQString &title, const TQString &url, bool readonly )
: KDialogBase( parent, "StreamEditor", true, TQString(), Ok|Cancel)
{
makeGridMainWidget( 2, Qt::Horizontal );
makeGridMainWidget( 2, TQt::Horizontal );
TQLabel *nameLabel = new TQLabel( i18n("&Name:"), mainWidget() );
m_nameLineEdit = new KLineEdit( title, mainWidget() );

@ -20,7 +20,7 @@ rescue LoadError
exit
end
class DatabaseScriptChooser < Qt::Dialog
class DatabaseScriptChooser < TQt::Dialog
attr_reader :m_optionCombo
attr_reader :m_saveText
@ -36,16 +36,16 @@ class DatabaseScriptChooser < Qt::Dialog
setName("Database Script Chooser")
end
@Form1Layout = Qt::GridLayout.new(self, 1, 1, 2, 2, 'Form1Layout')
@Form1Layout = TQt::GridLayout.new(self, 1, 1, 2, 2, 'Form1Layout')
@layout3 = Qt::VBoxLayout.new(nil, 0, 2, 'layout3')
@layout3 = TQt::VBoxLayout.new(nil, 0, 2, 'layout3')
@m_optionCombo = Qt::ComboBox.new(false, self, "m_optionCombo")
@m_optionCombo = TQt::ComboBox.new(false, self, "m_optionCombo")
@layout3.addWidget(@m_optionCombo)
@layout1 = Qt::HBoxLayout.new(nil, 0, 2, 'layout1')
@layout1 = TQt::HBoxLayout.new(nil, 0, 2, 'layout1')
@m_saveText = Qt::Label.new(self, "m_saveText")
@m_saveText = TQt::Label.new(self, "m_saveText")
@layout1.addWidget(@m_saveText)
@m_saveDir = KDE::URLRequester.new(self, "m_saveDir")
@ -54,18 +54,18 @@ class DatabaseScriptChooser < Qt::Dialog
@layout1.addWidget(@m_saveDir)
@layout3.addLayout(@layout1)
@spacer1 = Qt::SpacerItem.new(20, 21, Qt::SizePolicy::Minimum, Qt::SizePolicy::Expanding)
@spacer1 = TQt::SpacerItem.new(20, 21, TQt::SizePolicy::Minimum, TQt::SizePolicy::Expanding)
@layout3.addItem(@spacer1)
@layout2 = Qt::HBoxLayout.new(nil, 0, 2, 'layout2')
@layout2 = TQt::HBoxLayout.new(nil, 0, 2, 'layout2')
@m_cancelButton = Qt::PushButton.new(self, "@m_cancelButton")
@m_cancelButton = TQt::PushButton.new(self, "@m_cancelButton")
@layout2.addWidget(@m_cancelButton)
@spacer2 = Qt::SpacerItem.new(61, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
@spacer2 = TQt::SpacerItem.new(61, 20, TQt::SizePolicy::Expanding, TQt::SizePolicy::Minimum)
@layout2.addItem(@spacer2)
@m_okayButton = Qt::PushButton.new(self, "m_okayButton")
@m_okayButton = TQt::PushButton.new(self, "m_okayButton")
@layout2.addWidget(@m_okayButton)
@layout3.addLayout(@layout2)
@ -79,7 +79,7 @@ class DatabaseScriptChooser < Qt::Dialog
@Form1Layout.addLayout(@layout3, 0, 0)
languageChange()
resize( Qt::Size.new(356, 137).expandedTo(minimumSizeHint()) )
resize( TQt::Size.new(356, 137).expandedTo(minimumSizeHint()) )
clearWState( WState_Polished )
end

@ -18,14 +18,14 @@
# 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. #
############################################################################
class QtIoListener < Qt::Object
class QtIoListener < TQt::Object
Q_SLOTS 'dataRecieved()'
def initialize(app, iostream, lineHandler)
super(app)
@lineHandler = lineHandler
@iostream = iostream
streamListener = Qt::SocketNotifier.new(iostream.fileno, Qt::SocketNotifier.Read, app, 'stdinWatcher')
Qt::Object.connect(streamListener, SIGNAL("activated(int)"), self, SLOT("dataRecieved()") )
streamListener = TQt::SocketNotifier.new(iostream.fileno, TQt::SocketNotifier.Read, app, 'stdinWatcher')
TQt::Object.connect(streamListener, SIGNAL("activated(int)"), self, SLOT("dataRecieved()") )
end
def dataRecieved

@ -59,7 +59,7 @@ class ExampleActions < AmaroKSlots
@app.exit
end
end
a = Qt::Application.new(ARGV)
a = TQt::Application.new(ARGV)
e = ExampleActions.new(a)
AmarokCommunication = AmaroKLib.new(a, e)
a.exec()

@ -270,7 +270,7 @@ SubmitItem::SubmitItem(
m_album = album;
m_title = title;
m_length = length;
m_playStartTime = now ? TQDateTime::currentDateTime( Qt::UTC ).toTime_t() : 0;
m_playStartTime = now ? TQDateTime::currentDateTime( TQt::UTC ).toTime_t() : 0;
}
@ -422,7 +422,7 @@ ScrobblerSubmitter::~ScrobblerSubmitter()
void ScrobblerSubmitter::performHandshake()
{
TQString handshakeUrl = TQString();
uint currentTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
uint currentTime = TQDateTime::currentDateTime( TQt::UTC ).toTime_t();
if ( PROTOCOL_VERSION == "1.1" )
{
@ -665,7 +665,7 @@ void ScrobblerSubmitter::scheduledTimeReached()
*/
void ScrobblerSubmitter::audioScrobblerHandshakeResult( TDEIO::Job* job ) //SLOT
{
m_prevSubmitTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
m_prevSubmitTime = TQDateTime::currentDateTime( TQt::UTC ).toTime_t();
m_inProgress = false;
if ( job->error() ) {
@ -745,7 +745,7 @@ void ScrobblerSubmitter::audioScrobblerHandshakeResult( TDEIO::Job* job ) //SLOT
*/
void ScrobblerSubmitter::audioScrobblerSubmitResult( TDEIO::Job* job ) //SLOT
{
m_prevSubmitTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
m_prevSubmitTime = TQDateTime::currentDateTime( TQt::UTC ).toTime_t();
m_inProgress = false;
if ( job->error() ) {
@ -891,7 +891,7 @@ SubmitItem* ScrobblerSubmitter::dequeueItem()
SubmitItem* item = 0;
if( m_lastSubmissionFinishTime > 0 && !m_holdFakeQueue && m_fakeQueue.getFirst() )
{
uint limit = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
uint limit = TQDateTime::currentDateTime( TQt::UTC ).toTime_t();
if ( m_submitQueue.getFirst() )
if ( m_submitQueue.getFirst()->playStartTime() <= limit )
@ -1047,7 +1047,7 @@ void ScrobblerSubmitter::saveSubmitQueue()
}
if ( m_lastSubmissionFinishTime == 0 )
m_lastSubmissionFinishTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
m_lastSubmissionFinishTime = TQDateTime::currentDateTime( TQt::UTC ).toTime_t();
TQDomDocument newdoc;
TQDomElement submitQueue = newdoc.createElement( "submit" );
@ -1127,7 +1127,7 @@ bool ScrobblerSubmitter::schedule( bool failure )
if ( m_inProgress || !canSubmit() )
return false;
uint when, currentTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
uint when, currentTime = TQDateTime::currentDateTime( TQt::UTC ).toTime_t();
if ( currentTime - m_prevSubmitTime > m_interval )
when = 0;
else

@ -41,7 +41,7 @@
#include <tdepopupmenu.h>
#include <kstandarddirs.h>
Amarok::Slider::Slider( Qt::Orientation orientation, TQWidget *parent, uint max )
Amarok::Slider::Slider( TQt::Orientation orientation, TQWidget *parent, uint max )
: TQSlider( orientation, parent )
, m_sliding( false )
, m_outside( false )
@ -53,7 +53,7 @@ Amarok::Slider::Slider( Qt::Orientation orientation, TQWidget *parent, uint max
void
Amarok::Slider::wheelEvent( TQWheelEvent *e )
{
if( orientation() == Qt::Vertical ) {
if( orientation() == TQt::Vertical ) {
// Will be handled by the parent widget
e->ignore();
return;
@ -78,7 +78,7 @@ Amarok::Slider::mouseMoveEvent( TQMouseEvent *e )
//feels better, but using set value of 20 is bad of course
TQRect rect( -20, -20, width()+40, height()+40 );
if ( orientation() == Qt::Horizontal && !rect.contains( e->pos() ) ) {
if ( orientation() == TQt::Horizontal && !rect.contains( e->pos() ) ) {
if ( !m_outside )
TQSlider::setValue( m_prevValue );
m_outside = true;
@ -94,7 +94,7 @@ Amarok::Slider::mouseMoveEvent( TQMouseEvent *e )
void
Amarok::Slider::slideEvent( TQMouseEvent *e )
{
TQSlider::setValue( orientation() == Qt::Horizontal
TQSlider::setValue( orientation() == TQt::Horizontal
? ((TQApplication::reverseLayout())
? TQRangeControl::valueFromPosition( width() - (e->pos().x() - sliderRect().width()/2), width() + sliderRect().width() )
: TQRangeControl::valueFromPosition( e->pos().x() - sliderRect().width()/2, width() - sliderRect().width() ) )
@ -140,7 +140,7 @@ Amarok::Slider::setValue( int newValue )
#define THICKNESS 7
#define MARGIN 3
Amarok::PrettySlider::PrettySlider( Qt::Orientation orientation, SliderMode mode,
Amarok::PrettySlider::PrettySlider( TQt::Orientation orientation, SliderMode mode,
TQWidget *parent, uint max )
: Amarok::Slider( orientation, parent, max )
, m_mode( mode )
@ -175,7 +175,7 @@ void
Amarok::PrettySlider::slideEvent( TQMouseEvent *e )
{
if( m_mode == Pretty || m_showingMoodbar )
TQSlider::setValue( orientation() == Qt::Horizontal
TQSlider::setValue( orientation() == TQt::Horizontal
? TQRangeControl::valueFromPosition( e->pos().x(), width()-2 )
: TQRangeControl::valueFromPosition( e->pos().y(), height()-2 ) );
else
@ -192,7 +192,7 @@ namespace Amarok {
void
Amarok::PrettySlider::paintEvent( TQPaintEvent *e )
{
const int w = orientation() == Qt::Horizontal ? width() : height();
const int w = orientation() == TQt::Horizontal ? width() : height();
const int pos = int( double( w-2 ) / maxValue() * Slider::value() );
int h = THICKNESS;
@ -203,7 +203,7 @@ Amarok::PrettySlider::paintEvent( TQPaintEvent *e )
if( m_showingMoodbar )
{
if( m_mode == Normal )
h = (orientation() == Qt::Vertical ? width() : height()) - 2*MARGIN;
h = (orientation() == TQt::Vertical ? width() : height()) - 2*MARGIN;
mood = m_bundle.moodbar().draw( w, h );
}
// If we're a Normal PrettySlider and we have no moodbar,
@ -219,7 +219,7 @@ Amarok::PrettySlider::paintEvent( TQPaintEvent *e )
buf.fill( parentWidget()->backgroundColor() );
if ( orientation() == Qt::Vertical )
if ( orientation() == TQt::Vertical )
{
p.translate( 0, height()-1 );
p.rotate( -90 ); //90 degrees clockwise
@ -351,7 +351,7 @@ Amarok::PrettySlider::sizeHint() const
//////////////////////////////////////////////////////////////////////////////////////////
Amarok::VolumeSlider::VolumeSlider( TQWidget *parent, uint max )
: Amarok::Slider( Qt::Horizontal, parent, max )
: Amarok::Slider( TQt::Horizontal, parent, max )
, m_animCount( 0 )
, m_animTimer( new TQTimer( this ) )
, m_pixmapInset( TQPixmap( locate( "data","amarok/images/volumeslider-inset.png" ) ) )
@ -420,7 +420,7 @@ Amarok::VolumeSlider::slotAnimTimer() //SLOT
void
Amarok::VolumeSlider::mousePressEvent( TQMouseEvent *e )
{
if( e->button() != Qt::RightButton ) {
if( e->button() != TQt::RightButton ) {
Amarok::Slider::mousePressEvent( e );
slideEvent( e );
}

@ -41,7 +41,7 @@ namespace Amarok
public:
Slider( Qt::Orientation, TQWidget*, uint max = 0 );
Slider( TQt::Orientation, TQWidget*, uint max = 0 );
virtual void setValue( int );
@ -69,7 +69,7 @@ namespace Amarok
int adjustValue( int v ) const
{
int mp = (minValue() + maxValue()) / 2;
return orientation() == Qt::Vertical ? mp - (v - mp) : v;
return orientation() == TQt::Vertical ? mp - (v - mp) : v;
}
private:
@ -93,7 +93,7 @@ namespace Amarok
Pretty
} SliderMode;
PrettySlider( Qt::Orientation orientation, SliderMode mode,
PrettySlider( TQt::Orientation orientation, SliderMode mode,
TQWidget *parent, uint max = 0 );
virtual void newBundle( const MetaBundle &bundle );

@ -72,7 +72,7 @@ StatusBar::StatusBar( TQWidget *parent, const char *name )
TQWidget *positionBox = new TQWidget( this, "positionBox" );
TQBoxLayout *box = new TQHBoxLayout( positionBox, 1, 3 );
m_slider = new Amarok::PrettySlider( Qt::Horizontal, Amarok::PrettySlider::Normal,
m_slider = new Amarok::PrettySlider( TQt::Horizontal, Amarok::PrettySlider::Normal,
positionBox );
// the two time labels. m_timeLable is the left one,

@ -88,7 +88,7 @@ Amarok::TrayIcon::event( TQEvent *e )
return true;
case TQEvent::MouseButtonPress:
if( TQT_TQMOUSEEVENT(e)->button() == Qt::MidButton )
if( TQT_TQMOUSEEVENT(e)->button() == TQt::MidButton )
{
EngineController::instance()->playPause();

@ -42,7 +42,7 @@ TransferDialog::TransferDialog( MediaDevice *mdev )
TQString transferDir = mdev->getTransferDir();
TQGroupBox *location = new TQGroupBox( 1, Qt::Vertical, i18n( "Music Location" ), vbox );
TQGroupBox *location = new TQGroupBox( 1, TQt::Vertical, i18n( "Music Location" ), vbox );
new TQLabel( i18n( "Your music will be transferred to:\n%1" )
.arg( transferDir ), location );
@ -57,7 +57,7 @@ TransferDialog::TransferDialog( MediaDevice *mdev )
"a variety of ways. Each grouping will create\n"
"directories based upon the specified criteria.\n"), vbox );
TQGroupBox *sorting = new TQGroupBox( 6, Qt::Vertical, i18n( "Groupings" ), vbox );
TQGroupBox *sorting = new TQGroupBox( 6, TQt::Vertical, i18n( "Groupings" ), vbox );
m_label1 = new TQLabel( i18n( "Select first grouping:\n" ), sorting );
m_sort1 = new KComboBox( sorting );
m_label2 = new TQLabel( i18n( "Select second grouping:\n" ), sorting );
@ -98,7 +98,7 @@ TransferDialog::TransferDialog( MediaDevice *mdev )
if( vlayout2 )
vlayout2->addItem( spacer2 );
TQGroupBox *options = new TQGroupBox( 6, Qt::Vertical, i18n( "Options" ), vbox );
TQGroupBox *options = new TQGroupBox( 6, TQt::Vertical, i18n( "Options" ), vbox );
TQCheckBox *convertSpaces = new TQCheckBox( i18n( "Convert spaces to underscores" ), options );
convertSpaces->setChecked( mdev->getSpacesToUnderscores() );

@ -84,7 +84,7 @@ XSPFPlaylist::image()
TQDateTime
XSPFPlaylist::date()
{
return TQDateTime::fromString( documentElement().namedItem( "date" ).firstChild().nodeValue(), Qt::ISODate );
return TQDateTime::fromString( documentElement().namedItem( "date" ).firstChild().nodeValue(), TQt::ISODate );
}
KURL

Loading…
Cancel
Save