diff options
author | gregory guy <gregory-tde@laposte.net> | 2020-06-13 16:09:24 +0200 |
---|---|---|
committer | gregory guy <gregory-tde@laposte.net> | 2020-06-13 16:09:24 +0200 |
commit | 2c9bc9b806f533df7b8f5349467d0f4be95314a4 (patch) | |
tree | 15f82ae94dd430374f3d939958912c4fb2855326 /src/app/playDialog.cpp | |
parent | 38eaf7209a322a622e1b898eaa5477568ca9c6b6 (diff) | |
download | codeine-2c9bc9b806f533df7b8f5349467d0f4be95314a4.tar.gz codeine-2c9bc9b806f533df7b8f5349467d0f4be95314a4.zip |
Conversion qt3 -> tqt3
Signed-off-by: gregory guy <gregory-tde@laposte.net>
Diffstat (limited to 'src/app/playDialog.cpp')
-rw-r--r-- | src/app/playDialog.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/app/playDialog.cpp b/src/app/playDialog.cpp index 50a9ca2..36bd29c 100644 --- a/src/app/playDialog.cpp +++ b/src/app/playDialog.cpp @@ -11,53 +11,53 @@ #include <kstdguiitem.h> #include "playDialog.h" #include "mxcl.library.h" -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qsignalmapper.h> +#include <ntqfile.h> +#include <ntqlabel.h> +#include <ntqlayout.h> +#include <ntqsignalmapper.h> -QString i18n( const char *text ); +TQString i18n( const char *text ); namespace Codeine { -PlayDialog::PlayDialog( QWidget *parent, bool be_welcome_dialog ) - : QDialog( parent ) +PlayDialog::PlayDialog( TQWidget *parent, bool be_welcome_dialog ) + : TQDialog( parent ) { setCaption( kapp->makeStdCaption( i18n("Play Media") ) ); - QSignalMapper *mapper = new QSignalMapper( this ); - QWidget *o, *closeButton = new KPushButton( KStdGuiItem::close(), this ); - QBoxLayout *hbox, *vbox = new QVBoxLayout( this, 15, 20 ); + TQSignalMapper *mapper = new TQSignalMapper( this ); + TQWidget *o, *closeButton = new KPushButton( KStdGuiItem::close(), this ); + TQBoxLayout *hbox, *vbox = new TQVBoxLayout( this, 15, 20 ); - vbox->addWidget( new QLabel( i18n( "What media would you like to play?" ), this ) ); + vbox->addWidget( new TQLabel( i18n( "What media would you like to play?" ), this ) ); - QGridLayout *grid = new QGridLayout( vbox, 1, 3, 20 ); + TQGridLayout *grid = new TQGridLayout( vbox, 1, 3, 20 ); //TODO use the kguiItems from the actions mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play File..."), "fileopen" ), this ), FILE ); connect( o, SIGNAL(clicked()), mapper, SLOT(map()) ); - grid->QLayout::add( o ); + grid->TQLayout::add( o ); mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play VCD"), "cdaudio_unmount" ), this ), VCD ); connect( o, SIGNAL(clicked()), mapper, SLOT(map()) ); - grid->QLayout::add( o ); + grid->TQLayout::add( o ); mapper->setMapping( o = new KPushButton( KGuiItem( i18n("Play DVD"), "dvd_unmount" ), this ), DVD ); connect( o, SIGNAL(clicked()), mapper, SLOT(map()) ); - grid->QLayout::add( o ); + grid->TQLayout::add( o ); - mapper->setMapping( closeButton, QDialog::Rejected ); + mapper->setMapping( closeButton, TQDialog::Rejected ); connect( closeButton, SIGNAL(clicked()), mapper, SLOT(map()) ); createRecentFileWidget( vbox ); - hbox = new QHBoxLayout( vbox ); - hbox->addItem( new QSpacerItem( 10, 10, QSizePolicy::Expanding ) ); + hbox = new TQHBoxLayout( vbox ); + hbox->addItem( new TQSpacerItem( 10, 10, TQSizePolicy::Expanding ) ); if( be_welcome_dialog ) { - QWidget *w = new KPushButton( KStdGuiItem::quit(), this ); + TQWidget *w = new KPushButton( KStdGuiItem::quit(), this ); hbox->addWidget( w ); connect( w, SIGNAL(clicked()), kapp, SLOT(quit()) ); } @@ -68,13 +68,13 @@ PlayDialog::PlayDialog( QWidget *parent, bool be_welcome_dialog ) } void -PlayDialog::createRecentFileWidget( QBoxLayout *layout ) +PlayDialog::createRecentFileWidget( TQBoxLayout *layout ) { KListView *lv; lv = new Codeine::ListView( this ); lv->setColumnText( 1, i18n("Recently Played Media") ); - const QStringList list1 = Codeine::config( "General" )->readPathListEntry( "Recent Urls" ); + const TQStringList list1 = Codeine::config( "General" )->readPathListEntry( "Recent Urls" ); KURL::List urls; foreach( list1 ) @@ -84,7 +84,7 @@ PlayDialog::createRecentFileWidget( QBoxLayout *layout ) if( urls.contains( *it ) > 1 ) //remove duplicates it = urls.remove( it ); - else if( (*it).protocol() == "file" && !QFile::exists( (*it).path() ) ) + else if( (*it).protocol() == "file" && !TQFile::exists( (*it).path() ) ) //remove stale entries it = urls.remove( it ); else @@ -92,23 +92,23 @@ PlayDialog::createRecentFileWidget( QBoxLayout *layout ) } for( KURL::List::ConstIterator it = urls.begin(), end = urls.end(); it != end; ++it ) { - const QString fileName = (*it).fileName(); + const TQString fileName = (*it).fileName(); new KListViewItem( lv, 0, (*it).url(), fileName.isEmpty() ? (*it).prettyURL() : fileName ); } if( lv->childCount() ) { layout->addWidget( lv, 1 ); - connect( lv, SIGNAL(executed( QListViewItem* )), SLOT(done( QListViewItem* )) ); + connect( lv, SIGNAL(executed( TQListViewItem* )), SLOT(done( TQListViewItem* )) ); } else delete lv; } void -PlayDialog::done( QListViewItem *item ) +PlayDialog::done( TQListViewItem *item ) { m_url = item->text( 0 ); - QDialog::done( RECENT_FILE ); + TQDialog::done( RECENT_FILE ); } } |