Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/11/head
Michele Calgaro 11 months ago
parent 6208d03e3d
commit 1ca6231ff7
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -29,12 +29,12 @@ namespace Codeine
setFrameStyle( TQFrame::Plain | TQFrame::Box ); setFrameStyle( TQFrame::Plain | TQFrame::Box );
m_preferred = new KPushButton( KGuiItem( i18n("Preferred Scale"), "viewmag" ), this ); m_preferred = new KPushButton( KGuiItem( i18n("Preferred Scale"), "viewmag" ), this );
connect( m_preferred, SIGNAL(clicked()), tqApp->mainWidget(), SLOT(adjustSize()) ); connect( m_preferred, TQ_SIGNAL(clicked()), tqApp->mainWidget(), TQ_SLOT(adjustSize()) );
connect( m_preferred, SIGNAL(clicked()), SLOT(deleteLater()) ); connect( m_preferred, TQ_SIGNAL(clicked()), TQ_SLOT(deleteLater()) );
m_oneToOne = new KPushButton( KGuiItem( i18n("Scale 100%"), "viewmag1" ), this ); m_oneToOne = new KPushButton( KGuiItem( i18n("Scale 100%"), "viewmag1" ), this );
connect( m_oneToOne, SIGNAL(clicked()), (TQObject*)videoWindow(), SLOT(resetZoom()) ); connect( m_oneToOne, TQ_SIGNAL(clicked()), (TQObject*)videoWindow(), TQ_SLOT(resetZoom()) );
connect( m_oneToOne, SIGNAL(clicked()), SLOT(deleteLater()) ); connect( m_oneToOne, TQ_SIGNAL(clicked()), TQ_SLOT(deleteLater()) );
TQBoxLayout *hbox = new TQHBoxLayout( this, 8, 6 ); TQBoxLayout *hbox = new TQHBoxLayout( this, 8, 6 );
TQBoxLayout *vbox = new TQVBoxLayout( hbox ); TQBoxLayout *vbox = new TQVBoxLayout( hbox );

@ -40,7 +40,7 @@ Analyzer::Base2D::Base2D( TQWidget *parent, uint timeout )
: Base<TQWidget>( parent, timeout ) : Base<TQWidget>( parent, timeout )
{ {
setWFlags( TQt::WNoAutoErase ); //no flicker setWFlags( TQt::WNoAutoErase ); //no flicker
connect( &m_timer, SIGNAL(timeout()), SLOT(draw()) ); connect( &m_timer, TQ_SIGNAL(timeout()), TQ_SLOT(draw()) );
} }
void void

@ -73,11 +73,11 @@ public:
TQHBox *box = new TQHBox( this ); TQHBox *box = new TQHBox( this );
KPushButton *o = new KPushButton( KStdGuiItem::save(), box ); KPushButton *o = new KPushButton( KStdGuiItem::save(), box );
connect( o, SIGNAL(clicked()), SLOT(accept()) ); connect( o, TQ_SIGNAL(clicked()), TQ_SLOT(accept()) );
o = new KPushButton( KStdGuiItem::cancel(), box ); o = new KPushButton( KStdGuiItem::cancel(), box );
o->setText( i18n("Discard") ); o->setText( i18n("Discard") );
connect( o, SIGNAL(clicked()), SLOT(reject()) ); connect( o, TQ_SIGNAL(clicked()), TQ_SLOT(reject()) );
setCaption( i18n("Capture - %1").arg( time ) ); setCaption( i18n("Capture - %1").arg( time ) );
setFixedSize( sizeHint() ); setFixedSize( sizeHint() );

@ -122,8 +122,8 @@ MainWindow::MainWindow()
#define make_menu( name, text ) \ #define make_menu( name, text ) \
menu = new TQPopupMenu( this, name ); \ menu = new TQPopupMenu( this, name ); \
menu->setCheckable( true ); \ menu->setCheckable( true ); \
connect( menu, SIGNAL(activated( int )), engine(), SLOT(setStreamParameter( int )) ); \ connect( menu, TQ_SIGNAL(activated( int )), engine(), TQ_SLOT(setStreamParameter( int )) ); \
connect( menu, SIGNAL(aboutToShow()), SLOT(aboutToShowMenu()) ); \ connect( menu, TQ_SIGNAL(aboutToShow()), TQ_SLOT(aboutToShowMenu()) ); \
settings->insertItem( text, menu, id, index ); \ settings->insertItem( text, menu, id, index ); \
settings->setItemEnabled( id, false ); \ settings->setItemEnabled( id, false ); \
id++, index++; id++, index++;
@ -159,7 +159,7 @@ MainWindow::MainWindow()
else { else {
//"faster" startup //"faster" startup
//TODO if we have a size stored for this video, do the "faster" route //TODO if we have a size stored for this video, do the "faster" route
TQTimer::singleShot( 0, this, SLOT(init()) ); TQTimer::singleShot( 0, this, TQ_SLOT(init()) );
TQApplication::setOverrideCursor( KCursor::waitCursor() ); } TQApplication::setOverrideCursor( KCursor::waitCursor() ); }
} }
@ -168,11 +168,11 @@ MainWindow::init()
{ {
DEBUG_BLOCK DEBUG_BLOCK
connect( engine(), SIGNAL(statusMessage( const TQString& )), this, SLOT(engineMessage( const TQString& )) ); connect( engine(), TQ_SIGNAL(statusMessage( const TQString& )), this, TQ_SLOT(engineMessage( const TQString& )) );
connect( engine(), SIGNAL(stateChanged( Engine::State )), this, SLOT(engineStateChanged( Engine::State )) ); connect( engine(), TQ_SIGNAL(stateChanged( Engine::State )), this, TQ_SLOT(engineStateChanged( Engine::State )) );
connect( engine(), SIGNAL(channelsChanged( const TQStringList& )), this, SLOT(setChannels( const TQStringList& )) ); connect( engine(), TQ_SIGNAL(channelsChanged( const TQStringList& )), this, TQ_SLOT(setChannels( const TQStringList& )) );
connect( engine(), SIGNAL(titleChanged( const TQString& )), m_titleLabel, SLOT(setText( const TQString& )) ); connect( engine(), TQ_SIGNAL(titleChanged( const TQString& )), m_titleLabel, TQ_SLOT(setText( const TQString& )) );
connect( m_positionSlider, SIGNAL(valueChanged( int )), this, SLOT(showTime( int )) ); connect( m_positionSlider, TQ_SIGNAL(valueChanged( int )), this, TQ_SLOT(showTime( int )) );
if( !engine()->init() ) { if( !engine()->init() ) {
KMessageBox::error( this, i18n( KMessageBox::error( this, i18n(
@ -183,8 +183,8 @@ MainWindow::init()
//would be dangerous for these to65535 happen before the videoWindow() is initialised //would be dangerous for these to65535 happen before the videoWindow() is initialised
setAcceptDrops( true ); setAcceptDrops( true );
connect( m_positionSlider, SIGNAL(sliderReleased( uint )), engine(), SLOT(seek( uint )) ); connect( m_positionSlider, TQ_SIGNAL(sliderReleased( uint )), engine(), TQ_SLOT(seek( uint )) );
connect( statusBar(), SIGNAL(messageChanged( const TQString& )), engine(), SLOT(showOSD( const TQString& )) ); connect( statusBar(), TQ_SIGNAL(messageChanged( const TQString& )), engine(), TQ_SLOT(showOSD( const TQString& )) );
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
@ -246,22 +246,22 @@ MainWindow::setupActions()
TDEActionCollection * const ac = actionCollection(); TDEActionCollection * const ac = actionCollection();
KStdAction::quit( kapp, SLOT(quit()), ac ); KStdAction::quit( kapp, TQ_SLOT(quit()), ac );
KStdAction::open( this, SLOT(playMedia()), ac, "play_media" )->setText( i18n("Play &Media...") ); KStdAction::open( this, TQ_SLOT(playMedia()), ac, "play_media" )->setText( i18n("Play &Media...") );
connect( new FullScreenAction( this, ac ), SIGNAL(toggled( bool )), SLOT(fullScreenToggled( bool )) ); connect( new FullScreenAction( this, ac ), TQ_SIGNAL(toggled( bool )), TQ_SLOT(fullScreenToggled( bool )) );
new PlayAction( this, SLOT(play()), ac ); new PlayAction( this, TQ_SLOT(play()), ac );
new TDEAction( i18n("Stop"), "media-playback-stop", Key_S, engine(), SLOT(stop()), ac, "stop" ); new TDEAction( i18n("Stop"), "media-playback-stop", Key_S, engine(), TQ_SLOT(stop()), ac, "stop" );
new TDEToggleAction( i18n("Record"), "player_record", CTRL + Key_R, engine(), SLOT(record()), ac, "record" ); new TDEToggleAction( i18n("Record"), "player_record", CTRL + Key_R, engine(), TQ_SLOT(record()), ac, "record" );
new TDEAction( i18n("Reset Video Scale"), "viewmag1", Key_Equal, videoWindow(), SLOT(resetZoom()), ac, "reset_zoom" ); new TDEAction( i18n("Reset Video Scale"), "viewmag1", Key_Equal, videoWindow(), TQ_SLOT(resetZoom()), ac, "reset_zoom" );
new TDEAction( i18n("Media Information"), "messagebox_info", Key_I, this, SLOT(streamInformation()), ac, "information" ); new TDEAction( i18n("Media Information"), "messagebox_info", Key_I, this, TQ_SLOT(streamInformation()), ac, "information" );
new TDEAction( i18n("Menu Toggle"), "media-optical-dvd-unmounted", Key_R, engine(), SLOT(toggleDVDMenu()), ac, "media-optical-dvd-unmounted" ); new TDEAction( i18n("Menu Toggle"), "media-optical-dvd-unmounted", Key_R, engine(), TQ_SLOT(toggleDVDMenu()), ac, "media-optical-dvd-unmounted" );
new TDEAction( i18n("&Capture Frame"), "frame_image", Key_C, this, SLOT(captureFrame()), ac, "capture_frame" ); new TDEAction( i18n("&Capture Frame"), "frame_image", Key_C, this, TQ_SLOT(captureFrame()), ac, "capture_frame" );
new TDEAction( i18n("Video Settings..."), "configure", Key_V, this, SLOT(configure()), ac, "video_settings" ); new TDEAction( i18n("Video Settings..."), "configure", Key_V, this, TQ_SLOT(configure()), ac, "video_settings" );
new TDEAction( i18n("Configure xine..."), "configure", 0, this, SLOT(configure()), ac, "xine_settings" ); new TDEAction( i18n("Configure xine..."), "configure", 0, this, TQ_SLOT(configure()), ac, "xine_settings" );
(new KWidgetAction( m_positionSlider, i18n("Position Slider"), 0, 0, 0, ac, "position_slider" ))->setAutoSized( true ); (new KWidgetAction( m_positionSlider, i18n("Position Slider"), 0, 0, 0, ac, "position_slider" ))->setAutoSized( true );

@ -37,19 +37,19 @@ PlayDialog::PlayDialog( TQWidget *parent, bool be_welcome_dialog )
//TODO use the kguiItems from the actions //TODO use the kguiItems from the actions
mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play File..."), "folder" ), this ), FILE ); mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play File..."), "folder" ), this ), FILE );
connect( o, SIGNAL(clicked()), mapper, SLOT(map()) ); connect( o, TQ_SIGNAL(clicked()), mapper, TQ_SLOT(map()) );
grid->TQLayout::add( o ); grid->TQLayout::add( o );
mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play VCD"), "media-optical-cdaudio-unmounted" ), this ), VCD ); mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play VCD"), "media-optical-cdaudio-unmounted" ), this ), VCD );
connect( o, SIGNAL(clicked()), mapper, SLOT(map()) ); connect( o, TQ_SIGNAL(clicked()), mapper, TQ_SLOT(map()) );
grid->TQLayout::add( o ); grid->TQLayout::add( o );
mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play DVD"), "media-optical-dvd-unmounted" ), this ), DVD ); mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play DVD"), "media-optical-dvd-unmounted" ), this ), DVD );
connect( o, SIGNAL(clicked()), mapper, SLOT(map()) ); connect( o, TQ_SIGNAL(clicked()), mapper, TQ_SLOT(map()) );
grid->TQLayout::add( o ); grid->TQLayout::add( o );
mapper->setMapping( closeButton, TQDialog::Rejected ); mapper->setMapping( closeButton, TQDialog::Rejected );
connect( closeButton, SIGNAL(clicked()), mapper, SLOT(map()) ); connect( closeButton, TQ_SIGNAL(clicked()), mapper, TQ_SLOT(map()) );
createRecentFileWidget( vbox ); createRecentFileWidget( vbox );
@ -59,12 +59,12 @@ PlayDialog::PlayDialog( TQWidget *parent, bool be_welcome_dialog )
if( be_welcome_dialog ) { if( be_welcome_dialog ) {
TQWidget *w = new KPushButton( KStdGuiItem::quit(), this ); TQWidget *w = new KPushButton( KStdGuiItem::quit(), this );
hbox->addWidget( w ); hbox->addWidget( w );
connect( w, SIGNAL(clicked()), kapp, SLOT(quit()) ); connect( w, TQ_SIGNAL(clicked()), kapp, TQ_SLOT(quit()) );
} }
hbox->addWidget( closeButton ); hbox->addWidget( closeButton );
connect( mapper, SIGNAL(mapped( int )), SLOT(done( int )) ); connect( mapper, TQ_SIGNAL(mapped( int )), TQ_SLOT(done( int )) );
} }
void void
@ -98,7 +98,7 @@ PlayDialog::createRecentFileWidget( TQBoxLayout *layout )
if( lv->childCount() ) { if( lv->childCount() ) {
layout->addWidget( lv, 1 ); layout->addWidget( lv, 1 );
connect( lv, SIGNAL(executed( TQListViewItem* )), SLOT(done( TQListViewItem* )) ); connect( lv, TQ_SIGNAL(executed( TQListViewItem* )), TQ_SLOT(done( TQListViewItem* )) );
} }
else else
delete lv; delete lv;

@ -37,7 +37,7 @@ public:
setTickmarks( TQSlider::Below ); setTickmarks( TQSlider::Below );
setTickInterval( 65536 / 4 ); setTickInterval( 65536 / 4 );
setMinimumWidth( fontMetrics().width( name ) * 3 ); setMinimumWidth( fontMetrics().width( name ) * 3 );
connect( this, SIGNAL(valueChanged( int )), Codeine::engine(), SLOT(setStreamParameter( int )) ); connect( this, TQ_SIGNAL(valueChanged( int )), Codeine::engine(), TQ_SLOT(setStreamParameter( int )) );
} }
virtual void mousePressEvent( TQMouseEvent *e ) virtual void mousePressEvent( TQMouseEvent *e )

@ -54,7 +54,7 @@ VideoWindow::initVideo()
m_displayRatio = w / h; m_displayRatio = w / h;
} }
connect( &m_timer, SIGNAL(timeout()), SLOT(hideCursor()) ); connect( &m_timer, TQ_SIGNAL(timeout()), TQ_SLOT(hideCursor()) );
XUnlockDisplay( X::d ); XUnlockDisplay( X::d );
} }

@ -53,10 +53,10 @@ VolumeAction::VolumeAction( TDEToolBar *bar, TDEActionCollection *ac )
{ {
m_widget = new VolumeSlider( bar->topLevelWidget() ); m_widget = new VolumeSlider( bar->topLevelWidget() );
connect( this, SIGNAL(toggled( bool )), SLOT(toggled( bool )) ); connect( this, TQ_SIGNAL(toggled( bool )), TQ_SLOT(toggled( bool )) );
connect( m_widget->slider, SIGNAL(sliderMoved( int )), SLOT(sliderMoved( int )) ); connect( m_widget->slider, TQ_SIGNAL(sliderMoved( int )), TQ_SLOT(sliderMoved( int )) );
connect( m_widget->slider, SIGNAL(sliderMoved( int )), Codeine::engine(), SLOT(setStreamParameter( int )) ); connect( m_widget->slider, TQ_SIGNAL(sliderMoved( int )), Codeine::engine(), TQ_SLOT(setStreamParameter( int )) );
connect( m_widget->slider, SIGNAL(sliderReleased()), SLOT(sliderReleased()) ); connect( m_widget->slider, TQ_SIGNAL(sliderReleased()), TQ_SLOT(sliderReleased()) );
} }
int int

@ -218,7 +218,7 @@ XineConfigEntry::XineConfigEntry( TQWidget *parent, TQGridLayout *grid, xine_cfg
{ {
case XINE_CONFIG_TYPE_STRING: { case XINE_CONFIG_TYPE_STRING: {
w = new KLineEdit( m_string, parent ); w = new KLineEdit( m_string, parent );
signal = SIGNAL(textChanged( const TQString& )); signal = TQ_SIGNAL(textChanged( const TQString& ));
break; break;
} }
case XINE_CONFIG_TYPE_ENUM: { case XINE_CONFIG_TYPE_ENUM: {
@ -226,7 +226,7 @@ XineConfigEntry::XineConfigEntry( TQWidget *parent, TQGridLayout *grid, xine_cfg
for( int i = 0; entry->enum_values[i]; ++i ) for( int i = 0; entry->enum_values[i]; ++i )
((KComboBox*)w)->insertItem( TQString::fromUtf8( entry->enum_values[i] ) ); ((KComboBox*)w)->insertItem( TQString::fromUtf8( entry->enum_values[i] ) );
((KComboBox*)w)->setCurrentItem( m_number ); ((KComboBox*)w)->setCurrentItem( m_number );
signal = SIGNAL(activated( int )); signal = TQ_SIGNAL(activated( int ));
break; break;
} }
case XINE_CONFIG_TYPE_RANGE: case XINE_CONFIG_TYPE_RANGE:
@ -236,14 +236,14 @@ XineConfigEntry::XineConfigEntry( TQWidget *parent, TQGridLayout *grid, xine_cfg
TQMAX( m_number, entry->range_max ), // are both 0 even though this is bullshit TQMAX( m_number, entry->range_max ), // are both 0 even though this is bullshit
1, parent ); 1, parent );
((TQSpinBox*)w)->setValue( m_number ); ((TQSpinBox*)w)->setValue( m_number );
signal = SIGNAL(valueChanged( int )); signal = TQ_SIGNAL(valueChanged( int ));
break; break;
} }
case XINE_CONFIG_TYPE_BOOL: { case XINE_CONFIG_TYPE_BOOL: {
w = new TQCheckBox( description_text, parent ); w = new TQCheckBox( description_text, parent );
((TQCheckBox*)w)->setChecked( m_number ); ((TQCheckBox*)w)->setChecked( m_number );
connect( w, SIGNAL(toggled( bool )), XineConfigDialog::instance(), SLOT(slotHelp()) ); connect( w, TQ_SIGNAL(toggled( bool )), XineConfigDialog::instance(), TQ_SLOT(slotHelp()) );
TQToolTip::add( w, "<qt>" + TQString::fromUtf8( entry->help ) ); TQToolTip::add( w, "<qt>" + TQString::fromUtf8( entry->help ) );
grid->addMultiCellWidget( w, row, row, 0, 1 ); grid->addMultiCellWidget( w, row, row, 0, 1 );
return; //no need for a description label return; //no need for a description label
@ -252,7 +252,7 @@ XineConfigEntry::XineConfigEntry( TQWidget *parent, TQGridLayout *grid, xine_cfg
; ;
} }
connect( w, signal, XineConfigDialog::instance(), SLOT(slotHelp()) ); connect( w, signal, XineConfigDialog::instance(), TQ_SLOT(slotHelp()) );
TQLabel *description = new TQLabel( description_text + ':', parent ); TQLabel *description = new TQLabel( description_text + ':', parent );
description->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter ); description->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );

@ -762,7 +762,7 @@ VideoWindow::xineEventListener( void *p, const xine_event_t* xineEvent )
//FIXME this is not the right way, it will have bugs //FIXME this is not the right way, it will have bugs
debug() << "XINE_EVENT_MRL_REFERENCE\n"; debug() << "XINE_EVENT_MRL_REFERENCE\n";
engine->m_url = TQString::fromUtf8( ((xine_mrl_reference_data_ext_t*)xineEvent->data)->mrl ); engine->m_url = TQString::fromUtf8( ((xine_mrl_reference_data_ext_t*)xineEvent->data)->mrl );
TQTimer::singleShot( 0, engine, SLOT(play()) ); TQTimer::singleShot( 0, engine, TQ_SLOT(play()) );
break; break;
} }
case XINE_EVENT_DROPPED_FRAMES: debug() << "XINE_EVENT_DROPPED_FRAMES\n"; break; case XINE_EVENT_DROPPED_FRAMES: debug() << "XINE_EVENT_DROPPED_FRAMES\n"; break;

@ -35,8 +35,8 @@ namespace Codeine
//FIXME this will terminate the host, eg Konqueror //FIXME this will terminate the host, eg Konqueror
Debug::fatal() << "Couldn't init xine!\n"; Debug::fatal() << "Couldn't init xine!\n";
TDEAction *play = new TDEToggleAction( i18n("Play"), "media-playback-start", TQt::Key_Space, videoWindow(), SLOT(togglePlay()), actionCollection(), "play" ); TDEAction *play = new TDEToggleAction( i18n("Play"), "media-playback-start", TQt::Key_Space, videoWindow(), TQ_SLOT(togglePlay()), actionCollection(), "play" );
TDEAction *mute = new TDEToggleAction( i18n("Mute"), "player_mute", TQt::Key_M, videoWindow(), SLOT(toggleMute()), actionCollection(), "mute" ); TDEAction *mute = new TDEToggleAction( i18n("Mute"), "player_mute", TQt::Key_M, videoWindow(), TQ_SLOT(toggleMute()), actionCollection(), "mute" );
TDEToolBar *toolBar = new MouseOverToolBar( widget() ); TDEToolBar *toolBar = new MouseOverToolBar( widget() );
play->plug( toolBar ); play->plug( toolBar );
mute->plug( toolBar ); mute->plug( toolBar );
@ -46,8 +46,8 @@ namespace Codeine
toolBar->addSeparator(); //FIXME ugly toolBar->addSeparator(); //FIXME ugly
TQObject *o = (TQObject*)statusBar(); TQObject *o = (TQObject*)statusBar();
connect( videoWindow(), SIGNAL(statusMessage( const TQString& )), o, SLOT(message( const TQString& )) ); connect( videoWindow(), TQ_SIGNAL(statusMessage( const TQString& )), o, TQ_SLOT(message( const TQString& )) );
connect( videoWindow(), SIGNAL(titleChanged( const TQString& )), o, SLOT(message( const TQString& )) ); //FIXME connect( videoWindow(), TQ_SIGNAL(titleChanged( const TQString& )), o, TQ_SLOT(message( const TQString& )) ); //FIXME
} }
bool bool

@ -71,7 +71,7 @@ VideoWindow::VideoWindow( TQWidget *parent, const char *name )
XUnlockDisplay( X::d ); XUnlockDisplay( X::d );
connect( &m_timer, SIGNAL(timeout()), SLOT(hideCursor()) ); connect( &m_timer, TQ_SIGNAL(timeout()), TQ_SLOT(hideCursor()) );
} }
VideoWindow::~VideoWindow() VideoWindow::~VideoWindow()

Loading…
Cancel
Save