summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrSlideTransitionDia.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kpresenter/KPrSlideTransitionDia.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpresenter/KPrSlideTransitionDia.cpp')
-rw-r--r--kpresenter/KPrSlideTransitionDia.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/kpresenter/KPrSlideTransitionDia.cpp b/kpresenter/KPrSlideTransitionDia.cpp
index ba15c4fb..0f95e03b 100644
--- a/kpresenter/KPrSlideTransitionDia.cpp
+++ b/kpresenter/KPrSlideTransitionDia.cpp
@@ -27,11 +27,11 @@
#include <kstandarddirs.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include "KPrBackground.h"
#include "KPrCanvas.h"
@@ -43,8 +43,8 @@
#include "KPrPageEffects.h"
#include "slidetransitionwidget.h"
-KPrSlideTransitionDia::KPrSlideTransitionDia( QWidget *parent, const char *name, KPrView *view )
-: KDialogBase( parent, name, true, i18n( "Slide Transition" ), User1|Ok|Cancel, Ok, true )
+KPrSlideTransitionDia::KPrSlideTransitionDia( TQWidget *tqparent, const char *name, KPrView *view )
+: KDialogBase( tqparent, name, true, i18n( "Slide Transition" ), User1|Ok|Cancel, Ok, true )
, m_dialog( new SlideTransitionWidget( this ) ), m_view( view ), m_soundPlayer(0), m_pageEffect( 0 )
{
int pgnum = m_view->getCurrPgNum() - 1;
@@ -71,30 +71,30 @@ KPrSlideTransitionDia::KPrSlideTransitionDia( QWidget *parent, const char *name,
h = 300;
}
- const QImage img(m_pixmap.convertToImage().smoothScale( w, h ));
+ const TQImage img(m_pixmap.convertToImage().smoothScale( w, h ));
m_pixmap.convertFromImage(img);
m_dialog->previewPixmap->setPixmap( m_pixmap );
m_dialog->previewPixmap->setFixedSize( w, h );
m_target.resize( m_pixmap.size() );
- m_target.fill( Qt::black );
+ m_target.fill( TQt::black );
// fill effect combo
m_dialog->effectCombo->insertItem( i18n( "No Effect" ) );
- m_dialog->effectCombo->insertItem( i18n( "Close Horizontal" ) );
- m_dialog->effectCombo->insertItem( i18n( "Close Vertical" ) );
+ m_dialog->effectCombo->insertItem( i18n( "CloseQt::Horizontal" ) );
+ m_dialog->effectCombo->insertItem( i18n( "CloseQt::Vertical" ) );
m_dialog->effectCombo->insertItem( i18n( "Close From All Directions" ) );
- m_dialog->effectCombo->insertItem( i18n( "Open Horizontal" ) );
- m_dialog->effectCombo->insertItem( i18n( "Open Vertical" ) );
+ m_dialog->effectCombo->insertItem( i18n( "OpenQt::Horizontal" ) );
+ m_dialog->effectCombo->insertItem( i18n( "OpenQt::Vertical" ) );
m_dialog->effectCombo->insertItem( i18n( "Open From All Directions" ) );
- m_dialog->effectCombo->insertItem( i18n( "Interlocking Horizontal 1" ) );
- m_dialog->effectCombo->insertItem( i18n( "Interlocking Horizontal 2" ) );
- m_dialog->effectCombo->insertItem( i18n( "Interlocking Vertical 1" ) );
- m_dialog->effectCombo->insertItem( i18n( "Interlocking Vertical 2" ) );
+ m_dialog->effectCombo->insertItem( i18n( "InterlockingQt::Horizontal 1" ) );
+ m_dialog->effectCombo->insertItem( i18n( "InterlockingQt::Horizontal 2" ) );
+ m_dialog->effectCombo->insertItem( i18n( "InterlockingQt::Vertical 1" ) );
+ m_dialog->effectCombo->insertItem( i18n( "InterlockingQt::Vertical 2" ) );
m_dialog->effectCombo->insertItem( i18n( "Surround 1" ) );
m_dialog->effectCombo->insertItem( i18n( "Fly Away 1" ) );
- m_dialog->effectCombo->insertItem( i18n( "Blinds Horizontal" ) );
- m_dialog->effectCombo->insertItem( i18n( "Blinds Vertical" ) );
+ m_dialog->effectCombo->insertItem( i18n( "BlindsQt::Horizontal" ) );
+ m_dialog->effectCombo->insertItem( i18n( "BlindsQt::Vertical" ) );
m_dialog->effectCombo->insertItem( i18n( "Box In" ) );
m_dialog->effectCombo->insertItem( i18n( "Box Out" ) );
m_dialog->effectCombo->insertItem( i18n( "Checkerboard Across" ) );
@@ -129,7 +129,7 @@ KPrSlideTransitionDia::KPrSlideTransitionDia( QWidget *parent, const char *name,
if( m_effect == PEF_RANDOM )
m_dialog->effectCombo->setCurrentItem( m_dialog->effectCombo->count()-1 );
- connect( m_dialog->effectCombo, SIGNAL( activated( int ) ), this, SLOT( effectChanged( int ) ) );
+ connect( m_dialog->effectCombo, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( effectChanged( int ) ) );
// setup speed combo
m_dialog->speedCombo->insertItem( i18n("Slow") );
@@ -138,7 +138,7 @@ KPrSlideTransitionDia::KPrSlideTransitionDia( QWidget *parent, const char *name,
m_dialog->speedCombo->setCurrentItem( m_effectSpeed );
- connect( m_dialog->speedCombo, SIGNAL( activated( int ) ), this, SLOT( effectChanged( int ) ) );
+ connect( m_dialog->speedCombo, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( effectChanged( int ) ) );
// set up sound
m_dialog->soundCheckBox->setChecked( m_soundEffect );
@@ -146,24 +146,24 @@ KPrSlideTransitionDia::KPrSlideTransitionDia( QWidget *parent, const char *name,
soundEffectChanged();
m_dialog->playButton->setIconSet( SmallIconSet( "player_play" ) );
m_dialog->stopButton->setIconSet( SmallIconSet( "player_stop" ) );
- connect( m_dialog->playButton, SIGNAL( clicked() ), this, SLOT( playSound() ) );
- connect( m_dialog->stopButton, SIGNAL( clicked() ), this, SLOT( stopSound() ) );
+ connect( m_dialog->playButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( playSound() ) );
+ connect( m_dialog->stopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stopSound() ) );
- connect( m_dialog->soundCheckBox, SIGNAL( clicked()), this, SLOT( soundEffectChanged() ) );
- connect( m_dialog->soundRequester, SIGNAL( openFileDialog( KURLRequester * ) ), this, SLOT( slotRequesterClicked( KURLRequester * ) ) );
- connect( m_dialog->soundRequester, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotSoundFileChanged( const QString& ) ) );
+ connect( m_dialog->soundCheckBox, TQT_SIGNAL( clicked()), this, TQT_SLOT( soundEffectChanged() ) );
+ connect( m_dialog->soundRequester, TQT_SIGNAL( openFileDialog( KURLRequester * ) ), this, TQT_SLOT( slotRequesterClicked( KURLRequester * ) ) );
+ connect( m_dialog->soundRequester, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotSoundFileChanged( const TQString& ) ) );
// set up automatic tansition
m_dialog->automaticTransitionInput->setRange( 1, 600, 1 );
m_dialog->automaticTransitionInput->setValue( m_slideTime );
// set up preview button
- connect( m_dialog->previewButton, SIGNAL( clicked() ), this, SLOT( preview() ) );
+ connect( m_dialog->previewButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( preview() ) );
setButtonText(KDialogBase::User1,i18n( "Apply &Global" ));
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
- connect( this, SIGNAL( user1Clicked() ), this, SLOT( slotUser1() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( slotUser1() ) );
setMainWidget( m_dialog );
}
@@ -192,16 +192,16 @@ void KPrSlideTransitionDia::preview()
if ( m_pageEffect )
{
m_pageEffectTimer.stop();
- QObject::disconnect( &m_pageEffectTimer, SIGNAL( timeout() ), this, SLOT( slotDoPageEffect() ) );
+ TQObject::disconnect( &m_pageEffectTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDoPageEffect() ) );
m_pageEffect->finish();
delete m_pageEffect;
m_pageEffect = 0;
- m_dialog->previewPixmap->repaint();
+ m_dialog->previewPixmap->tqrepaint();
}
- m_pageEffect = new KPrPageEffects( m_dialog->previewPixmap, m_target, effect, effectSpeed );
+ m_pageEffect = new KPrPageEffects( TQT_TQPAINTDEVICE(m_dialog->previewPixmap), m_target, effect, effectSpeed );
if ( m_pageEffect->doEffect() )
{
delete m_pageEffect;
@@ -210,7 +210,7 @@ void KPrSlideTransitionDia::preview()
}
else
{
- connect( &m_pageEffectTimer, SIGNAL( timeout() ), SLOT( slotDoPageEffect() ) );
+ connect( &m_pageEffectTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotDoPageEffect() ) );
m_pageEffectTimer.start( 50, true );
}
}
@@ -221,7 +221,7 @@ void KPrSlideTransitionDia::slotDoPageEffect()
if ( m_pageEffect->doEffect() )
{
m_pageEffectTimer.stop();
- QObject::disconnect( &m_pageEffectTimer, SIGNAL( timeout() ), this, SLOT( slotDoPageEffect() ) );
+ TQObject::disconnect( &m_pageEffectTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotDoPageEffect() ) );
delete m_pageEffect;
m_pageEffect = 0;
m_dialog->previewPixmap->update();
@@ -235,16 +235,16 @@ void KPrSlideTransitionDia::slotDoPageEffect()
void KPrSlideTransitionDia::slotRequesterClicked( KURLRequester * )
{
- QString filter( getSoundFileFilter() );
+ TQString filter( getSoundFileFilter() );
m_dialog->soundRequester->fileDialog()->setFilter( filter );
// find the first "sound"-resource that contains files
- QStringList soundDirs = KGlobal::dirs()->resourceDirs( "sound" );
+ TQStringList soundDirs = KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
KURL soundURL;
- QDir dir;
- dir.setFilter( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = soundDirs.begin();
+ TQDir dir;
+ dir.setFilter( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = soundDirs.begin();
while ( it != soundDirs.end() ) {
dir = *it;
if ( dir.isReadable() && dir.count() > 2 ) {
@@ -258,22 +258,22 @@ void KPrSlideTransitionDia::slotRequesterClicked( KURLRequester * )
}
-QString KPrSlideTransitionDia::getSoundFileFilter()
+TQString KPrSlideTransitionDia::getSoundFileFilter()
{
- QStringList fileList;
+ TQStringList fileList;
fileList << "wav" << "au" << "mp3" << "mp1" << "mp2" << "mpg" << "dat"
<< "mpeg" << "ogg" << "cdda" << "cda " << "vcd" << "null";
fileList.sort();
bool comma = false;
- QString full, str;
- for ( QStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it ) {
+ TQString full, str;
+ for ( TQStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it ) {
if ( comma )
str += '\n';
comma = true;
- str += QString( i18n( "*.%1|%2 Files" ) ).arg( *it ).arg( (*it).upper() );
+ str += TQString( i18n( "*.%1|%2 Files" ) ).tqarg( *it ).tqarg( (*it).upper() );
- full += QString( "*.") + (*it) + ' ';
+ full += TQString( "*.") + (*it) + ' ';
}
str = full + '|' + i18n( "All Supported Files" ) + '\n' + str;
@@ -301,7 +301,7 @@ void KPrSlideTransitionDia::soundEffectChanged()
}
-void KPrSlideTransitionDia::slotSoundFileChanged( const QString& text )
+void KPrSlideTransitionDia::slotSoundFileChanged( const TQString& text )
{
m_dialog->playButton->setEnabled( !text.isEmpty() );
m_dialog->stopButton->setEnabled( !text.isEmpty() );
@@ -328,7 +328,7 @@ void KPrSlideTransitionDia::apply( bool global )
EffectSpeed effectSpeed = static_cast<EffectSpeed>( m_dialog->speedCombo->currentItem() );
bool soundEffect = m_dialog->soundCheckBox->isChecked();
- QString soundFileName = m_dialog->soundRequester->url();
+ TQString soundFileName = m_dialog->soundRequester->url();
int slideTime = m_dialog->automaticTransitionInput->value();
if ( effect != m_effect ||
@@ -347,13 +347,13 @@ void KPrSlideTransitionDia::apply( bool global )
newSettings.slideTime = slideTime;
// Collect info about current settings
- QValueVector<KPrTransEffectCmd::PageEffectSettings> oldSettings;
+ TQValueVector<KPrTransEffectCmd::PageEffectSettings> oldSettings;
KPrPage *page = 0;
if ( global )
{
oldSettings.resize( m_view->kPresenterDoc()->getPageList().count() );
int i = 0;
- for( QPtrListIterator<KPrPage> it( m_view->kPresenterDoc()->getPageList() ); *it; ++it, ++i )
+ for( TQPtrListIterator<KPrPage> it( m_view->kPresenterDoc()->getPageList() ); *it; ++it, ++i )
{
oldSettings[i].pageEffect = it.current()->getPageEffect();
oldSettings[i].effectSpeed = it.current()->getPageEffectSpeed();