diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:43:15 +0000 |
commit | e654398e46e37abf457b2b1122ab898d2c51c49f (patch) | |
tree | d39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/modules/simple | |
parent | e4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff) | |
download | tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/simple')
-rw-r--r-- | noatun/modules/simple/propertiesdialog.ui.h | 14 | ||||
-rw-r--r-- | noatun/modules/simple/userinterface.cpp | 152 | ||||
-rw-r--r-- | noatun/modules/simple/userinterface.h | 32 |
3 files changed, 99 insertions, 99 deletions
diff --git a/noatun/modules/simple/propertiesdialog.ui.h b/noatun/modules/simple/propertiesdialog.ui.h index a712d776..ef6f14f9 100644 --- a/noatun/modules/simple/propertiesdialog.ui.h +++ b/noatun/modules/simple/propertiesdialog.ui.h @@ -16,22 +16,22 @@ void PropertiesDialog::setPlayObject( PlaylistItem pi, Arts::PlayObject po ) if (!po.isNull()) { Arts::poCapabilities ncaps = po.capabilities(); - QCheckListItem *item; + TQCheckListItem *item; descriptionLabel->setText( po.description().c_str() ); // Determine capabilities - if (!(item = (QCheckListItem *)capsList->findItem( "capSeek", 0 ))) + if (!(item = (TQCheckListItem *)capsList->findItem( "capSeek", 0 ))) { - item = new QCheckListItem( capsList, "capSeek", - QCheckListItem::CheckBox ); + item = new TQCheckListItem( capsList, "capSeek", + TQCheckListItem::CheckBox ); } item->setOn( (ncaps & Arts::capSeek) ); - if (!(item = (QCheckListItem *)capsList->findItem( "capPause", 0 ))) + if (!(item = (TQCheckListItem *)capsList->findItem( "capPause", 0 ))) { - item = new QCheckListItem( capsList, "capPause", - QCheckListItem::CheckBox ); + item = new TQCheckListItem( capsList, "capPause", + TQCheckListItem::CheckBox ); } item->setOn( (ncaps & Arts::capPause) ); diff --git a/noatun/modules/simple/userinterface.cpp b/noatun/modules/simple/userinterface.cpp index 6e7b486f..685b2467 100644 --- a/noatun/modules/simple/userinterface.cpp +++ b/noatun/modules/simple/userinterface.cpp @@ -30,14 +30,14 @@ #include <kstdguiitem.h> #include <kurl.h> -#include <qaccel.h> -#include <qdragobject.h> -#include <qhbox.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qstrlist.h> -#include <qtooltip.h> -#include <qvbox.h> +#include <tqaccel.h> +#include <tqdragobject.h> +#include <tqhbox.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqstrlist.h> +#include <tqtooltip.h> +#include <tqvbox.h> #include "userinterface.h" @@ -63,14 +63,14 @@ SimpleUI::SimpleUI() setupGUI( StatusBar|Create, "simpleui.rc" ); - connect( napp->player(), SIGNAL(playing()), SLOT(slotPlaying()) ); - connect( napp->player(), SIGNAL(stopped()), SLOT(slotStopped()) ); - connect( napp->player(), SIGNAL(paused()), SLOT(slotPaused()) ); - connect( napp->player(), SIGNAL(timeout()), SLOT(slotTimeout()) ); - connect( napp->player(), SIGNAL(newSong()), SLOT(slotChanged()) ); - connect( napp->player(), SIGNAL(volumeChanged(int)), SLOT(slotVolumeChanged(int)) ); - connect( napp, SIGNAL(hideYourself()), SLOT(hide()) ); - connect( napp, SIGNAL(showYourself()), SLOT(show()) ); + connect( napp->player(), TQT_SIGNAL(playing()), TQT_SLOT(slotPlaying()) ); + connect( napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(slotStopped()) ); + connect( napp->player(), TQT_SIGNAL(paused()), TQT_SLOT(slotPaused()) ); + connect( napp->player(), TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()) ); + connect( napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(slotChanged()) ); + connect( napp->player(), TQT_SIGNAL(volumeChanged(int)), TQT_SLOT(slotVolumeChanged(int)) ); + connect( napp, TQT_SIGNAL(hideYourself()), TQT_SLOT(hide()) ); + connect( napp, TQT_SIGNAL(showYourself()), TQT_SLOT(show()) ); napp->player()->handleButtons(); @@ -85,7 +85,7 @@ SimpleUI::SimpleUI() // Load configuration KConfig &config = *KGlobal::config(); config.setGroup( "Simple" ); - QString str = config.readEntry( "View", "NormalSize" ); + TQString str = config.readEntry( "View", "NormalSize" ); if (str == "HalfSize") video->setHalfSize(); @@ -107,7 +107,7 @@ SimpleUI::~SimpleUI() KConfig &config = *KGlobal::config(); saveMainWindowSettings( &config, "Simple" ); config.setGroup( "Simple" ); - QString str; + TQString str; if (video->isHalfSize()) str = "HalfSize"; @@ -126,10 +126,10 @@ SimpleUI::~SimpleUI() void SimpleUI::setupActions() { - KStdAction::open( napp, SLOT(fileOpen()), actionCollection(), "_file_open" ); - new KAction( i18n("&Properties"), 0, propertiesDialog, SLOT(show()), + KStdAction::open( napp, TQT_SLOT(fileOpen()), actionCollection(), "_file_open" ); + new KAction( i18n("&Properties"), 0, propertiesDialog, TQT_SLOT(show()), actionCollection(), "_file_properties" ); - KStdAction::quit( napp, SLOT(quit()), actionCollection(), "_file_quit"); + KStdAction::quit( napp, TQT_SLOT(quit()), actionCollection(), "_file_quit"); NoatunStdAction::playlist( actionCollection(), "view_playlist" ); actionCollection()->insert(video->action( "half_size" )); @@ -139,14 +139,14 @@ void SimpleUI::setupActions() actionCollection()->insert(napp->pluginActionMenu()); - menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), + menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection()); - statusbarAction = KStdAction::showStatusbar(this, SLOT(showStatusbar()), + statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(showStatusbar()), actionCollection()); NoatunStdAction::effects( actionCollection(), "effects" ); NoatunStdAction::equalizer( actionCollection(), "equalizer" ); NoatunStdAction::loop( actionCollection(), "loop_style" ); - KStdAction::preferences( napp, SLOT(preferences()), actionCollection() ); + KStdAction::preferences( napp, TQT_SLOT(preferences()), actionCollection() ); } void SimpleUI::showMenubar() @@ -168,89 +168,89 @@ void SimpleUI::showStatusbar() void SimpleUI::setupCentralWidget() { - QVBox *npWidget = new QVBox( this ); + TQVBox *npWidget = new TQVBox( this ); npWidget->setMargin( 0 ); npWidget->setSpacing( 0 ); - positionLabel = new QLabel( statusBar() ); + positionLabel = new TQLabel( statusBar() ); positionLabel->setAlignment( AlignVCenter | AlignCenter ); positionLabel->setFixedSize( fontMetrics().size( 0, " 00:00/00:00 " ) ); statusBar()->addWidget( positionLabel, 0, true ); video = new VideoFrame( npWidget ); - connect( video, SIGNAL(adaptSize(int,int)), - SLOT(slotAdaptSize(int,int)) ); - connect( video, SIGNAL(rightButtonPressed(const QPoint &)), - SLOT(slotContextMenu(const QPoint &)) ); + connect( video, TQT_SIGNAL(adaptSize(int,int)), + TQT_SLOT(slotAdaptSize(int,int)) ); + connect( video, TQT_SIGNAL(rightButtonPressed(const TQPoint &)), + TQT_SLOT(slotContextMenu(const TQPoint &)) ); - QHBox *ctlFrame = new QHBox( npWidget ); + TQHBox *ctlFrame = new TQHBox( npWidget ); ctlFrame->setFixedHeight( 38 ); - ctlFrame->setFrameShape( QFrame::StyledPanel ); - ctlFrame->setFrameShadow( QFrame::Raised ); + ctlFrame->setFrameShape( TQFrame::StyledPanel ); + ctlFrame->setFrameShadow( TQFrame::Raised ); ctlFrame->setMargin( 6 ); ctlFrame->setSpacing( 6 ); - QPushButton *backButton = new QPushButton( ctlFrame ); + TQPushButton *backButton = new TQPushButton( ctlFrame ); backButton->setFixedSize( 24, 24 ); - backButton->setPixmap( QPixmap( back_xpm ) ); - QToolTip::add( backButton, i18n("Back") ); - connect( backButton, SIGNAL(clicked()), napp->player(), SLOT(back()) ); + backButton->setPixmap( TQPixmap( back_xpm ) ); + TQToolTip::add( backButton, i18n("Back") ); + connect( backButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(back()) ); - stopButton = new QPushButton( ctlFrame ); + stopButton = new TQPushButton( ctlFrame ); stopButton->setFixedSize( 24, 24 ); - stopButton->setPixmap( QPixmap( stop_xpm ) ); - QToolTip::add( stopButton, i18n("Stop") ); - connect( stopButton, SIGNAL(clicked()), napp->player(), SLOT(stop()) ); + stopButton->setPixmap( TQPixmap( stop_xpm ) ); + TQToolTip::add( stopButton, i18n("Stop") ); + connect( stopButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(stop()) ); - playButton = new QPushButton( ctlFrame ); + playButton = new TQPushButton( ctlFrame ); playButton->setFixedSize( 24, 24 ); - playButton->setPixmap( QPixmap( play_xpm ) ); - QToolTip::add( playButton, i18n("Play / Pause") ); - connect( playButton, SIGNAL(clicked()), napp->player(), SLOT(playpause()) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); + TQToolTip::add( playButton, i18n("Play / Pause") ); + connect( playButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(playpause()) ); - QPushButton *forwButton = new QPushButton( ctlFrame ); + TQPushButton *forwButton = new TQPushButton( ctlFrame ); forwButton->setFixedSize( 24, 24 ); - forwButton->setPixmap( QPixmap( forward_xpm ) ); - QToolTip::add( forwButton, i18n("Forward") ); - connect( forwButton, SIGNAL(clicked()), napp->player(), SLOT(forward()) ); + forwButton->setPixmap( TQPixmap( forward_xpm ) ); + TQToolTip::add( forwButton, i18n("Forward") ); + connect( forwButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(forward()) ); slider = new L33tSlider( 0, 1000, 10, 0, L33tSlider::Horizontal, ctlFrame ); slider->setFixedHeight( 24 ); slider->setMinimumWidth( 100 ); - slider->setTickmarks( QSlider::NoMarks ); - connect( slider, SIGNAL(userChanged(int)), SLOT(slotSkipTo(int)) ); - connect( slider, SIGNAL(sliderMoved(int)), SLOT(slotSliderMoved(int)) ); + slider->setTickmarks( TQSlider::NoMarks ); + connect( slider, TQT_SIGNAL(userChanged(int)), TQT_SLOT(slotSkipTo(int)) ); + connect( slider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(slotSliderMoved(int)) ); - QPushButton *playlistButton = new QPushButton( ctlFrame ); + TQPushButton *playlistButton = new TQPushButton( ctlFrame ); playlistButton->setFixedSize( 24, 24 ); - playlistButton->setPixmap( QPixmap( playlist_xpm ) ); - QToolTip::add( playlistButton, i18n("Playlist") ); - connect( playlistButton, SIGNAL(clicked()), napp->player(), SLOT(toggleListView()) ); + playlistButton->setPixmap( TQPixmap( playlist_xpm ) ); + TQToolTip::add( playlistButton, i18n("Playlist") ); + connect( playlistButton, TQT_SIGNAL(clicked()), napp->player(), TQT_SLOT(toggleListView()) ); - volumeButton = new QPushButton( ctlFrame ); + volumeButton = new TQPushButton( ctlFrame ); volumeButton->setFixedSize( 24, 24 ); - volumeButton->setPixmap( QPixmap( volume_xpm ) ); - QToolTip::add( volumeButton, i18n("Volume") ); + volumeButton->setPixmap( TQPixmap( volume_xpm ) ); + TQToolTip::add( volumeButton, i18n("Volume") ); - volumeFrame = new QVBox( this, "Volume", WStyle_Customize | WType_Popup ); - volumeFrame->setFrameStyle( QFrame::PopupPanel ); + volumeFrame = new TQVBox( this, "Volume", WStyle_Customize | WType_Popup ); + volumeFrame->setFrameStyle( TQFrame::PopupPanel ); volumeFrame->setMargin( 4 ); - volumeLabel = new QLabel( volumeFrame ); + volumeLabel = new TQLabel( volumeFrame ); volumeLabel->setText( "100%" ); volumeLabel->setAlignment( AlignCenter ); volumeLabel->setFixedSize( volumeLabel->sizeHint() ); - QHBox *volumeSubFrame = new QHBox( volumeFrame ); + TQHBox *volumeSubFrame = new TQHBox( volumeFrame ); volumeSlider = new L33tSlider( 0, 100, 10, 0, Vertical, volumeSubFrame ); volumeSlider->setValue( 100 - napp->player()->volume() ); volumeSlider->setFixedSize( volumeSlider->sizeHint() ); volumeFrame->resize( volumeFrame->sizeHint() ); - connect( volumeSlider, SIGNAL(sliderMoved(int)), SLOT(slotVolumeSliderMoved(int)) ); - connect( volumeSlider, SIGNAL(userChanged(int)), SLOT(slotVolumeSliderMoved(int)) ); - connect( volumeButton, SIGNAL(clicked()), SLOT(slotVolumeFrame()) ); + connect( volumeSlider, TQT_SIGNAL(sliderMoved(int)), TQT_SLOT(slotVolumeSliderMoved(int)) ); + connect( volumeSlider, TQT_SIGNAL(userChanged(int)), TQT_SLOT(slotVolumeSliderMoved(int)) ); + connect( volumeButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotVolumeFrame()) ); setCentralWidget( npWidget ); @@ -261,17 +261,17 @@ void SimpleUI::setupCentralWidget() propertiesDialog->resize( 375, 285 ); } -void SimpleUI::closeEvent( QCloseEvent * ) +void SimpleUI::closeEvent( TQCloseEvent * ) { unload(); } -void SimpleUI::dragEnterEvent( QDragEnterEvent *event ) +void SimpleUI::dragEnterEvent( TQDragEnterEvent *event ) { event->accept( KURLDrag::canDecode( event ) ); } -void SimpleUI::dropEvent( QDropEvent *event ) +void SimpleUI::dropEvent( TQDropEvent *event ) { KURL::List uri; if (KURLDrag::decode( event, uri )) @@ -285,7 +285,7 @@ void SimpleUI::slotAdaptSize( int width, int height ) void SimpleUI::slotPlaying() { - playButton->setPixmap( QPixmap( pause_xpm ) ); + playButton->setPixmap( TQPixmap( pause_xpm ) ); stopButton->setEnabled( true ); slider->setEnabled( true ); @@ -295,7 +295,7 @@ void SimpleUI::slotPlaying() void SimpleUI::slotStopped() { - playButton->setPixmap( QPixmap( play_xpm ) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); stopButton->setEnabled( false ); slider->setEnabled( false ); slider->setValue( 0 ); @@ -305,7 +305,7 @@ void SimpleUI::slotStopped() void SimpleUI::slotPaused() { - playButton->setPixmap( QPixmap( play_xpm ) ); + playButton->setPixmap( TQPixmap( play_xpm ) ); slider->setEnabled( true ); } @@ -330,7 +330,7 @@ void SimpleUI::slotChanged() napp->player()->engine()->playObject() ); } -void SimpleUI::slotContextMenu( const QPoint &pos ) +void SimpleUI::slotContextMenu( const TQPoint &pos ) { contextMenu->exec( pos ); } @@ -343,7 +343,7 @@ void SimpleUI::slotSliderMoved( int sec ) void SimpleUI::slotVolumeChanged( int volume ) { - volumeLabel->setText( QString::number( volume ) + "%" ); + volumeLabel->setText( TQString::number( volume ) + "%" ); volumeSlider->setValue( 100 - volume ); } @@ -358,8 +358,8 @@ void SimpleUI::slotVolumeFrame() int x = (volumeButton->width() - volumeFrame->width()) / 2; int y = -(volumeFrame->height() + 5); - QPoint point( volumeButton->mapToGlobal( QPoint( x, y ) ) ); - QRect deskRect = KGlobalSettings::desktopGeometry( point ); + TQPoint point( volumeButton->mapToGlobal( TQPoint( x, y ) ) ); + TQRect deskRect = KGlobalSettings::desktopGeometry( point ); bool bottom = (point.y() + volumeFrame->height()) > (deskRect.y() + deskRect.height()); bool right = (point.x() + volumeFrame->width()) > (deskRect.x() + deskRect.width()); diff --git a/noatun/modules/simple/userinterface.h b/noatun/modules/simple/userinterface.h index c545fd2c..e3a84f84 100644 --- a/noatun/modules/simple/userinterface.h +++ b/noatun/modules/simple/userinterface.h @@ -17,11 +17,11 @@ #include <kaction.h> #include <kmainwindow.h> #include <kmedia2.h> -#include <qevent.h> -#include <qlabel.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qvbox.h> +#include <tqevent.h> +#include <tqlabel.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqvbox.h> #include "propertiesdialog.h" @@ -37,9 +37,9 @@ protected: void setupActions(); void setupCentralWidget(); - virtual void closeEvent( QCloseEvent * ); - virtual void dragEnterEvent( QDragEnterEvent *event ); - virtual void dropEvent( QDropEvent *event ); + virtual void closeEvent( TQCloseEvent * ); + virtual void dragEnterEvent( TQDragEnterEvent *event ); + virtual void dropEvent( TQDropEvent *event ); public slots: void slotAdaptSize( int width, int height ); @@ -49,7 +49,7 @@ public slots: void slotTimeout(); void slotSkipTo( int sec ); void slotChanged(); - void slotContextMenu( const QPoint &pos ); + void slotContextMenu( const TQPoint &pos ); private slots: void slotSliderMoved( int sec ); @@ -61,13 +61,13 @@ private slots: private: PropertiesDialog *propertiesDialog; - QPopupMenu *contextMenu; - QPushButton *stopButton; - QPushButton *playButton; - QPushButton *volumeButton; - QVBox *volumeFrame; - QLabel *volumeLabel; - QLabel *positionLabel; + TQPopupMenu *contextMenu; + TQPushButton *stopButton; + TQPushButton *playButton; + TQPushButton *volumeButton; + TQVBox *volumeFrame; + TQLabel *volumeLabel; + TQLabel *positionLabel; VideoFrame *video; L33tSlider *volumeSlider; L33tSlider *slider; |