TQt4 convert k9copy

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1233843 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent 4d695ec81f
commit b0e912c8b3

@ -285,7 +285,7 @@ int DVDDiscID( dvd_reader_t *, unsigned char * );
*
* @param dvd A read handle to get the disc ID from
* @param volid The buffer to put the VolumeIdentifier into.
* The VolumeIdentifier is latin-1 encoded (8bit unicode)
* The VolumeIdentifier is latin-1 encoded (8bit tqunicode)
* null terminated and max 32 bytes (including '\0')
* @param volid_size No more than volid_size bytes will be copied to volid.
* If the VolumeIdentifier is truncated because of this

@ -88,7 +88,7 @@ extern void SetAlignHandle(dvd_reader_t *device, void *align);
* this function should be rewritten to use posix_memalign or similar.
* It's just needed for aligning memory for small block reads from
* raw/O_DIRECT devices.
* We assume that 2048 is enough alignment for all systems at the moment.
* We assume that 2048 is enough tqalignment for all systems at the moment.
* Not thread safe. Only use this from one thread.
* Depends on sizeof(unsigned long) being at least as large as sizeof(void *)
*/
@ -498,7 +498,7 @@ static int Unicodedecode( uint8_t *data, int len, char *target )
int p = 1, i = 0;
if( ( data[ 0 ] == 8 ) || ( data[ 0 ] == 16 ) ) do {
if( data[ 0 ] == 16 ) p++; /* Ignore MSB of unicode16 */
if( data[ 0 ] == 16 ) p++; /* Ignore MSB of tqunicode16 */
if( p < len ) {
target[ i++ ] = data[ p++ ];
}
@ -1157,7 +1157,7 @@ static int UDFGetPVD(dvd_reader_t *device, struct pvd_t *pvd)
}
/**
* Gets the Volume Identifier string, in 8bit unicode (latin-1)
* Gets the Volume Identifier string, in 8bit tqunicode (latin-1)
* volid, place to put the string
* volid_size, size of the buffer volid points to
* returns the size of buffer needed for all data

@ -969,7 +969,7 @@ int ifoRead_TT_SRPT(ifo_handle_t *ifofile) {
for(i = 0; i < tt_srpt->nr_of_srpts; i++) {
B2N_16(tt_srpt->title[i].nr_of_ptts);
B2N_16(tt_srpt->title[i].parental_id);
B2N_16(tt_srpt->title[i].tqparental_id);
B2N_32(tt_srpt->title[i].title_set_sector);
}
@ -1778,7 +1778,7 @@ static int ifoRead_PGCIT_internal(ifo_handle_t *ifofile, pgcit_t *pgcit,
for(i = 0; i < pgcit->nr_of_pgci_srp; i++) {
memcpy(&pgcit->pgci_srp[i], ptr, PGCI_SRP_SIZE);
ptr += PGCI_SRP_SIZE;
B2N_16(pgcit->pgci_srp[i].ptl_id_mask);
B2N_16(pgcit->pgci_srp[i].ptl_id_tqmask);
B2N_32(pgcit->pgci_srp[i].pgc_start_byte);
CHECK_VALUE(pgcit->pgci_srp[i].unknown1 == 0);
}

@ -444,7 +444,7 @@ typedef struct {
unsigned int block_type : 2;
unsigned int block_mode : 2;
#endif
uint16_t ptl_id_mask;
uint16_t ptl_id_tqmask;
uint32_t pgc_start_byte;
pgc_t *pgc;
} ATTRIBUTE_PACKED pgci_srp_t;
@ -596,7 +596,7 @@ typedef struct {
playback_type_t pb_ty;
uint8_t nr_of_angles;
uint16_t nr_of_ptts;
uint16_t parental_id;
uint16_t tqparental_id;
uint8_t title_set_nr;
uint8_t vts_ttn;
uint32_t title_set_sector;

@ -63,7 +63,7 @@ void navRead_PCI(pci_t *pci, unsigned char *buffer) {
for(j = 0; j < 2; j++)
B2N_32(pci->hli.btn_colit.btn_coli[i][j]);
/* NOTE: I've had to change the structure from the disk layout to get
/* NOTE: I've had to change the structure from the disk tqlayout to get
* the packing to work with Sun's Forte C compiler. */
/* pci hli btni */

@ -5,7 +5,7 @@
/*
* Copyright (C) 2000, 2001, 2002 H<EFBFBD>kan Hjort <d95hjort@dtek.chalmers.se>
*
* The data structures in this file should represent the layout of the
* The data structures in this file should represent the tqlayout of the
* pci and dsi packets as they are stored in the stream. Information
* found by reading the source to VOBDUMP is the base for the structure
* and names of these data types.
@ -145,7 +145,7 @@ typedef struct {
/**
* Button Information
*
* NOTE: I've had to change the structure from the disk layout to get
* NOTE: I've had to change the structure from the disk tqlayout to get
* the packing to work with Sun's Forte C compiler.
* The 4 and 7 bytes are 'rotated' was: ABC DEF GHIJ is: ABCG DEFH IJ
*/

@ -1,29 +1,29 @@
#include "k9common.h"
#include "k9config.h"
#include <qlayout.h>
#include <qslider.h>
#include <tqlayout.h>
#include <tqslider.h>
#include <kselect.h>
#include "k9mplayer.h"
#include <qcombobox.h>
#include <tqcombobox.h>
#include <kiconloader.h>
#include <kpushbutton.h>
#include "k9dvd.h"
#include "k9dvdtitle.h"
#include <kprocess.h>
#include <qlabel.h>
#include <qtimer.h>
#include <qapplication.h>
#include <qevent.h>
#include <tqlabel.h>
#include <tqtimer.h>
#include <tqapplication.h>
#include <tqevent.h>
#include <klocale.h>
#include <kmessagebox.h>
K9Mplayer::K9Mplayer(QObject *parent,const char *name,const QStringList args):MPlayer((QWidget*)parent) {
K9Mplayer::K9Mplayer(TQObject *tqparent,const char *name,const TQStringList args):MPlayer((TQWidget*)tqparent) {
m_seeking=FALSE;
m_initVol=TRUE;
m_title=0;
m_process=new KProcess(this);
m_process=new KProcess(TQT_TQOBJECT(this));
m_ratio=4.0/3.0;
slider->setRange(0, 100);
@ -31,17 +31,17 @@ K9Mplayer::K9Mplayer(QObject *parent,const char *name,const QStringList args):M
bPlay->setPixmap(SmallIcon("player_play"));
bStop->setPixmap(SmallIcon("player_stop"));
bSwitchAudio->setPixmap(SmallIcon("cycle"));
connect(m_process,SIGNAL(receivedStdout( KProcess*, char*, int )),this,SLOT(receivedStdout( KProcess*, char*, int )));
m_timer=new QTimer(this);
connect(m_process,SIGNAL(wroteStdin( KProcess* )),this,SLOT(wroteStdin( KProcess* )));
connect(m_timer,SIGNAL(timeout()),this,SLOT(timeout()));
m_container=new QWidget(Label);
connect(m_process,TQT_SIGNAL(receivedStdout( KProcess*, char*, int )),this,TQT_SLOT(receivedStdout( KProcess*, char*, int )));
m_timer=new TQTimer(this);
connect(m_process,TQT_SIGNAL(wroteStdin( KProcess* )),this,TQT_SLOT(wroteStdin( KProcess* )));
connect(m_timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(timeout()));
m_container=new TQWidget(Label);
}
K9Mplayer::~K9Mplayer() {}
void K9Mplayer::resizeEvent ( QResizeEvent * _resizeEvent) {
void K9Mplayer::resizeEvent ( TQResizeEvent * _resizeEvent) {
int w,h;
w=Label->width();
h=Label->width() /m_ratio;
@ -64,37 +64,37 @@ void K9Mplayer::timeout() {
}
void K9Mplayer::setDevice(const QString & _device) {
void K9Mplayer::setDevice(const TQString & _device) {
m_device=_device;
}
void K9Mplayer::setTitle( const QString & _numTitle,const QString &_numChapter) {
void K9Mplayer::setTitle( const TQString & _numTitle,const TQString &_numChapter) {
if (m_process->isRunning()) {
sendCmd("quit");
m_process->wait( 1000);
}
k9Config config;
QString vout[]= {"x11","xv","gl2","sdl"};
QString aout[]= {"alsa","oss","sdl"};
QString vo=vout[config.getMplayerVout()];
QString ao=aout[config.getMplayerAout()];
TQString vout[]= {"x11","xv","gl2","sdl"};
TQString aout[]= {"alsa","oss","sdl"};
TQString vo=vout[config.getMplayerVout()];
TQString ao=aout[config.getMplayerAout()];
m_process->clearArguments();
*m_process << "mplayer";
*m_process << "-vo" << vo << "-ao" << ao << "-sws" << "0";
*m_process << "-framedrop";
*m_process << "-wid" << QString::number(m_container->winId()) ;
*m_process << "-wid" << TQString::number(m_container->winId()) ;
*m_process << "-slave" ;
*m_process << "-idle";
*m_process << "-dvd-device" << m_device;
if (_numChapter !="")
*m_process << "-chapter" << _numChapter;
*m_process << QString("dvd://%1").arg(_numTitle);
*m_process << TQString("dvd://%1").tqarg(_numTitle);
if (!m_process->start( KProcess::NotifyOnExit,KProcess::All)) {
KMessageBox::error (qApp->mainWidget(),i18n("Unable to run %1").arg("mplayer") , i18n("Preview"));
KMessageBox::error (tqApp->mainWidget(),i18n("Unable to run %1").tqarg("mplayer") , i18n("Preview"));
}
m_canwrite=TRUE;
@ -108,13 +108,13 @@ void K9Mplayer::setTitle( const QString & _numTitle,const QString &_numChapter)
/*$SPECIALIZATION$*/
void K9Mplayer::receivedStdout (KProcess *proc, char *buffer, int buflen) {
QString buf = QString::fromLatin1(buffer, buflen);
TQString buf = TQString::tqfromLatin1(buffer, buflen);
sscanf(buf.latin1(),"ANS_PERCENT_POSITION=%d",&m_position);
if (!m_seeking && m_position>0) {
slider->setValue(m_position);
}
int audio=0;
if (buf.contains("ANS_switch_audio"))
if (buf.tqcontains("ANS_switch_audio"))
sscanf(buf.latin1(),"ANS_switch_audio=%d",&audio);
if (audio >0) {
for (int i=0;i < m_dvdTitle->getaudioStreamCount();i++) {
@ -128,13 +128,13 @@ void K9Mplayer::receivedStdout (KProcess *proc, char *buffer, int buflen) {
void K9Mplayer::slotLengthChanged() {}
void K9Mplayer::slotNewPosition(int _pos,const QTime & _time) {
void K9Mplayer::slotNewPosition(int _pos,const TQTime & _time) {
slider->setValue(_pos);
}
void K9Mplayer::sliderReleased() {
sendCmd( QString("seek %1 1").arg((int)slider->value()));
sendCmd( TQString("seek %1 1").tqarg((int)slider->value()));
m_seeking=FALSE;
}
@ -146,7 +146,7 @@ void K9Mplayer::sliderPressed() {
}
void K9Mplayer::bPlayClick() {
setTitle(QString::number( m_title),"");
setTitle(TQString::number( m_title),"");
}
void K9Mplayer::bStopClick() {
@ -155,17 +155,17 @@ void K9Mplayer::bStopClick() {
void K9Mplayer::bDownClick() {
sendCmd( QString("volume -1"));
sendCmd( TQString("volume -1"));
}
void K9Mplayer::bSwitchAudioClick() {
sendCmd( QString("switch_audio"));
sendCmd( QString("get_property switch_audio"));
sendCmd( TQString("switch_audio"));
sendCmd( TQString("get_property switch_audio"));
}
void K9Mplayer::bUpClick() {
sendCmd( QString("volume +1"));
sendCmd( TQString("volume +1"));
}
@ -175,12 +175,12 @@ void K9Mplayer::open( k9DVD *_dvd,k9DVDTitle *_title,int chapter) {
cbAudio->clear();
for (int i=0; i< _title->getaudioStreamCount();i++) {
k9DVDAudioStream *aud=_title->getaudioStream(i);
cbAudio->insertItem(NULL,QString("%1-%2").arg(aud->getID()).arg(aud->getlanguage()),-1);
cbAudio->insertItem(NULL,TQString("%1-%2").tqarg(aud->getID()).tqarg(aud->getlanguage()),-1);
}
for (int i=0; i< _title->getsubPictureCount();i++) {
k9DVDSubtitle *sub=_title->getsubtitle(i);
cbSub->insertItem(NULL,QString("%1-%2").arg(sub->getID().first()).arg(sub->getlanguage()),-1);
cbSub->insertItem(NULL,TQString("%1-%2").tqarg(sub->getID().first()).tqarg(sub->getlanguage()),-1);
}
if(_title->getaspectRatio()=="16:9")
@ -192,7 +192,7 @@ void K9Mplayer::open( k9DVD *_dvd,k9DVDTitle *_title,int chapter) {
setDevice( _dvd->getDevice());
m_dvdTitle=_title;
m_title=_title->getnumTitle();
setTitle( QString::number(m_title),QString::number(chapter));
setTitle( TQString::number(m_title),TQString::number(chapter));
if (_title->getaudioStreamCount() >0)
cbAudioActivated( 0);
if (_title->getsubPictureCount() >0)
@ -207,19 +207,19 @@ void K9Mplayer::titleChanged() {}
void K9Mplayer::cbAudioActivated( int _value) {
if (m_dvdTitle) {
int value=m_dvdTitle->getaudioStream( _value)->getStreamId();
sendCmd(QString( "switch_audio %1").arg(value));
sendCmd(TQString( "switch_audio %1").tqarg(value));
}
}
void K9Mplayer::cbSubActivated( int _value) {
sendCmd(QString("sub_select %1").arg(_value));
sendCmd(TQString("sub_select %1").tqarg(_value));
}
void K9Mplayer::sendCmd( QString _cmd) {
void K9Mplayer::sendCmd( TQString _cmd) {
while (!m_canwrite) {
qApp->processEvents();
tqApp->processEvents();
if ( !m_process->isRunning())
return;
}

@ -9,34 +9,35 @@
class k9DVD;
class k9DVDTitle;
class KProcess;
class QTimer;
class QResizeEvent;
class TQTimer;
class TQResizeEvent;
class K9Mplayer : public MPlayer
{
Q_OBJECT
TQ_OBJECT
private:
KProcess *m_process;
bool m_seeking,m_initVol;
int m_title;
k9DVDTitle *m_dvdTitle;
QString m_device;
QTimer *m_timer;
void sendCmd(QString _cmd);
TQString m_device;
TQTimer *m_timer;
void sendCmd(TQString _cmd);
int m_position;
bool m_canwrite;
QWidget *m_container;
TQWidget *m_container;
float m_ratio;
public:
//K9Mplayer(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
K9Mplayer(QObject *parent=0,const char *name=0,const QStringList args=0);
//K9Mplayer(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
K9Mplayer(TQObject *tqparent=0,const char *name=0,const TQStringList args=0);
~K9Mplayer();
/*$PUBLIC_FUNCTIONS$*/
void setDevice(const QString & _device);
void setTitle(const QString & _numTitle,const QString &_numChapter);
void setDevice(const TQString & _device);
void setTitle(const TQString & _numTitle,const TQString &_numChapter);
private slots:
void slotLengthChanged();
void slotNewPosition(int _pos,const QTime & _time);
void slotNewPosition(int _pos,const TQTime & _time);
void receivedStdout (KProcess *proc, char *buffer, int buflen);
void wroteStdin(KProcess *_process);
void timeout();
@ -56,7 +57,7 @@ public slots:
virtual void bSwitchAudioClick();
protected:
/*$PROTECTED_FUNCTIONS$*/
void resizeEvent ( QResizeEvent * _resiseEvent);
void resizeEvent ( TQResizeEvent * _resiseEvent);
protected slots:
/*$PROTECTED_SLOTS$*/

@ -9,18 +9,18 @@
#include "mplayer.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qcombobox.h>
#include <tqvariant.h>
#include <tqpushbutton.h>
#include <tqlabel.h>
#include <tqcombobox.h>
#include <kpushbutton.h>
#include <qslider.h>
#include <qframe.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>
#include <tqslider.h>
#include <tqframe.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include <tqimage.h>
#include <tqpixmap.h>
#include "kicondialog.h"
#include "kpushbutton.h"
@ -444,13 +444,13 @@ static const unsigned char img3_mplayer[] = {
/*
* Constructs a MPlayer as a child of 'parent', with the
* Constructs a MPlayer as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
MPlayer::MPlayer( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
MPlayer::MPlayer( TQWidget* tqparent, const char* name, WFlags fl )
: TQWidget( tqparent, name, fl )
{
QImage img;
TQImage img;
img.loadFromData( img0_mplayer, sizeof( img0_mplayer ), "PNG" );
image0 = img;
img.loadFromData( img1_mplayer, sizeof( img1_mplayer ), "PNG" );
@ -463,118 +463,118 @@ MPlayer::MPlayer( QWidget* parent, const char* name, WFlags fl )
setName( "MPlayer" );
setEnabled( TRUE );
setIcon( image0 );
MPlayerLayout = new QGridLayout( this, 1, 1, 3, 3, "MPlayerLayout");
MPlayerLayout = new TQGridLayout( this, 1, 1, 3, 3, "MPlayerLayout");
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1 = new TQLabel( this, "textLabel1" );
MPlayerLayout->addWidget( textLabel1, 0, 0 );
cbAudio = new QComboBox( FALSE, this, "cbAudio" );
cbAudio = new TQComboBox( FALSE, this, "cbAudio" );
MPlayerLayout->addWidget( cbAudio, 0, 1 );
spacer1 = new QSpacerItem( 190, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
spacer1 = new TQSpacerItem( 190, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
MPlayerLayout->addItem( spacer1, 0, 5 );
cbSub = new QComboBox( FALSE, this, "cbSub" );
cbSub = new TQComboBox( FALSE, this, "cbSub" );
MPlayerLayout->addWidget( cbSub, 0, 4 );
textLabel1_2 = new QLabel( this, "textLabel1_2" );
textLabel1_2 = new TQLabel( this, "textLabel1_2" );
MPlayerLayout->addWidget( textLabel1_2, 0, 3 );
bSwitchAudio = new KPushButton( this, "bSwitchAudio" );
bSwitchAudio->setMaximumSize( QSize( 22, 22 ) );
bSwitchAudio->setMaximumSize( TQSize( 22, 22 ) );
bSwitchAudio->setFlat( TRUE );
MPlayerLayout->addWidget( bSwitchAudio, 0, 2 );
layout6 = new QHBoxLayout( 0, 0, 6, "layout6");
tqlayout6 = new TQHBoxLayout( 0, 0, 6, "tqlayout6");
bStop = new KPushButton( this, "bStop" );
bStop->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bStop->sizePolicy().hasHeightForWidth() ) );
bStop->setMinimumSize( QSize( 30, 30 ) );
bStop->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bStop->sizePolicy().hasHeightForWidth() ) );
bStop->setMinimumSize( TQSize( 30, 30 ) );
bStop->setPixmap( image1 );
bStop->setFlat( TRUE );
layout6->addWidget( bStop );
tqlayout6->addWidget( bStop );
bPlay = new KPushButton( this, "bPlay" );
bPlay->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bPlay->sizePolicy().hasHeightForWidth() ) );
bPlay->setMinimumSize( QSize( 30, 30 ) );
bPlay->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bPlay->sizePolicy().hasHeightForWidth() ) );
bPlay->setMinimumSize( TQSize( 30, 30 ) );
bPlay->setPixmap( image2 );
bPlay->setFlat( TRUE );
layout6->addWidget( bPlay );
tqlayout6->addWidget( bPlay );
slider = new QSlider( this, "slider" );
slider->setOrientation( QSlider::Horizontal );
layout6->addWidget( slider );
slider = new TQSlider( this, "slider" );
slider->setOrientation( Qt::Horizontal );
tqlayout6->addWidget( slider );
layout5 = new QHBoxLayout( 0, 0, 6, "layout5");
tqlayout5 = new TQHBoxLayout( 0, 0, 6, "tqlayout5");
bDown = new KPushButton( this, "bDown" );
bDown->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, bDown->sizePolicy().hasHeightForWidth() ) );
bDown->setMinimumSize( QSize( 22, 22 ) );
bDown->setMaximumSize( QSize( 22, 22 ) );
QFont bDown_font( bDown->font() );
bDown->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, bDown->sizePolicy().hasHeightForWidth() ) );
bDown->setMinimumSize( TQSize( 22, 22 ) );
bDown->setMaximumSize( TQSize( 22, 22 ) );
TQFont bDown_font( bDown->font() );
bDown_font.setBold( TRUE );
bDown->setFont( bDown_font );
bDown->setFlat( TRUE );
layout5->addWidget( bDown );
tqlayout5->addWidget( bDown );
pixmapLabel1 = new QLabel( this, "pixmapLabel1" );
pixmapLabel1->setMaximumSize( QSize( 22, 22 ) );
pixmapLabel1 = new TQLabel( this, "pixmapLabel1" );
pixmapLabel1->setMaximumSize( TQSize( 22, 22 ) );
pixmapLabel1->setPixmap( image3 );
pixmapLabel1->setScaledContents( TRUE );
layout5->addWidget( pixmapLabel1 );
tqlayout5->addWidget( pixmapLabel1 );
bUp = new KPushButton( this, "bUp" );
bUp->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, bUp->sizePolicy().hasHeightForWidth() ) );
bUp->setMinimumSize( QSize( 22, 22 ) );
bUp->setMaximumSize( QSize( 22, 22 ) );
QFont bUp_font( bUp->font() );
bUp->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, bUp->sizePolicy().hasHeightForWidth() ) );
bUp->setMinimumSize( TQSize( 22, 22 ) );
bUp->setMaximumSize( TQSize( 22, 22 ) );
TQFont bUp_font( bUp->font() );
bUp_font.setBold( TRUE );
bUp->setFont( bUp_font );
bUp->setFlat( TRUE );
layout5->addWidget( bUp );
layout6->addLayout( layout5 );
tqlayout5->addWidget( bUp );
tqlayout6->addLayout( tqlayout5 );
MPlayerLayout->addMultiCellLayout( layout6, 4, 4, 0, 5 );
MPlayerLayout->addMultiCellLayout( tqlayout6, 4, 4, 0, 5 );
frame4 = new QFrame( this, "frame4" );
frame4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, frame4->sizePolicy().hasHeightForWidth() ) );
frame4->setFrameShape( QFrame::HLine );
frame4->setFrameShadow( QFrame::Raised );
frame4 = new TQFrame( this, "frame4" );
frame4->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, frame4->sizePolicy().hasHeightForWidth() ) );
frame4->setFrameShape( TQFrame::HLine );
frame4->setFrameShadow( TQFrame::Raised );
MPlayerLayout->addMultiCellWidget( frame4, 1, 1, 0, 5 );
Label = new QLabel( this, "Label" );
Label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, Label->sizePolicy().hasHeightForWidth() ) );
Label->setPaletteBackgroundColor( QColor( 0, 0, 0 ) );
Label->setAlignment( int( QLabel::AlignCenter ) );
Label = new TQLabel( this, "Label" );
Label->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, Label->sizePolicy().hasHeightForWidth() ) );
Label->setPaletteBackgroundColor( TQColor( 0, 0, 0 ) );
Label->tqsetAlignment( int( TQLabel::AlignCenter ) );
MPlayerLayout->addMultiCellWidget( Label, 2, 2, 0, 5 );
frame3 = new QFrame( this, "frame3" );
frame3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, frame3->sizePolicy().hasHeightForWidth() ) );
frame3->setFrameShape( QFrame::HLine );
frame3->setFrameShadow( QFrame::Raised );
frame3 = new TQFrame( this, "frame3" );
frame3->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, frame3->sizePolicy().hasHeightForWidth() ) );
frame3->setFrameShape( TQFrame::HLine );
frame3->setFrameShadow( TQFrame::Raised );
MPlayerLayout->addMultiCellWidget( frame3, 3, 3, 0, 5 );
languageChange();
resize( QSize(559, 458).expandedTo(minimumSizeHint()) );
resize( TQSize(559, 458).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( bStop, SIGNAL( clicked() ), this, SLOT( bStopClick() ) );
connect( bPlay, SIGNAL( clicked() ), this, SLOT( bPlayClick() ) );
connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
connect( slider, SIGNAL( valueChanged(int) ), this, SLOT( sliderChanged(int) ) );
connect( cbAudio, SIGNAL( activated(int) ), this, SLOT( cbAudioActivated(int) ) );
connect( cbSub, SIGNAL( activated(int) ), this, SLOT( cbSubActivated(int) ) );
connect( bDown, SIGNAL( clicked() ), this, SLOT( bDownClick() ) );
connect( bUp, SIGNAL( clicked() ), this, SLOT( bUpClick() ) );
connect( bSwitchAudio, SIGNAL( clicked() ), this, SLOT( bSwitchAudioClick() ) );
connect( bStop, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bStopClick() ) );
connect( bPlay, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bPlayClick() ) );
connect( slider, TQT_SIGNAL( sliderReleased() ), this, TQT_SLOT( sliderReleased() ) );
connect( slider, TQT_SIGNAL( sliderPressed() ), this, TQT_SLOT( sliderPressed() ) );
connect( slider, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( sliderChanged(int) ) );
connect( cbAudio, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbAudioActivated(int) ) );
connect( cbSub, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbSubActivated(int) ) );
connect( bDown, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bDownClick() ) );
connect( bUp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bUpClick() ) );
connect( bSwitchAudio, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bSwitchAudioClick() ) );
}
/*
@ -582,7 +582,7 @@ MPlayer::MPlayer( QWidget* parent, const char* name, WFlags fl )
*/
MPlayer::~MPlayer()
{
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, TQt does it all for us
}
/*
@ -594,15 +594,15 @@ void MPlayer::languageChange()
setCaption( tr2i18n( "Preview" ) );
textLabel1->setText( tr2i18n( "Audio" ) );
textLabel1_2->setText( tr2i18n( "Subpicture" ) );
bSwitchAudio->setText( QString::null );
bStop->setText( QString::null );
bPlay->setText( QString::null );
bPlay->setAccel( QKeySequence( QString::null ) );
bSwitchAudio->setText( TQString() );
bStop->setText( TQString() );
bPlay->setText( TQString() );
bPlay->setAccel( TQKeySequence( TQString() ) );
bDown->setText( tr2i18n( "-" ) );
bDown->setAccel( QKeySequence( QString::null ) );
bDown->setAccel( TQKeySequence( TQString() ) );
bUp->setText( tr2i18n( "+" ) );
bUp->setAccel( QKeySequence( QString::null ) );
Label->setText( QString::null );
bUp->setAccel( TQKeySequence( TQString() ) );
Label->setText( TQString() );
}
void MPlayer::bStopClick()

@ -1,13 +1,13 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>MPlayer</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>MPlayer</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -31,7 +31,7 @@
<property name="spacing">
<number>3</number>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -39,7 +39,7 @@
<string>Audio</string>
</property>
</widget>
<widget class="QComboBox" row="0" column="1">
<widget class="TQComboBox" row="0" column="1">
<property name="name">
<cstring>cbAudio</cstring>
</property>
@ -54,19 +54,19 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>190</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QComboBox" row="0" column="4">
<widget class="TQComboBox" row="0" column="4">
<property name="name">
<cstring>cbSub</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="3">
<widget class="TQLabel" row="0" column="3">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@ -78,7 +78,7 @@
<property name="name">
<cstring>bSwitchAudio</cstring>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>22</width>
<height>22</height>
@ -91,9 +91,9 @@
<bool>true</bool>
</property>
</widget>
<widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="6">
<widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
@ -111,7 +111,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
@ -139,7 +139,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>30</width>
<height>30</height>
@ -158,7 +158,7 @@
<bool>true</bool>
</property>
</widget>
<widget class="QSlider">
<widget class="TQSlider">
<property name="name">
<cstring>slider</cstring>
</property>
@ -166,9 +166,9 @@
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
<cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@ -186,13 +186,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>22</width>
<height>22</height>
@ -213,11 +213,11 @@
<bool>true</bool>
</property>
</widget>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>pixmapLabel1</cstring>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>22</width>
<height>22</height>
@ -242,13 +242,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>22</width>
<height>22</height>
@ -273,7 +273,7 @@
</widget>
</hbox>
</widget>
<widget class="QFrame" row="1" column="0" rowspan="1" colspan="6">
<widget class="TQFrame" row="1" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>frame4</cstring>
</property>
@ -292,7 +292,7 @@
<enum>Raised</enum>
</property>
</widget>
<widget class="QLabel" row="2" column="0" rowspan="1" colspan="6">
<widget class="TQLabel" row="2" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>Label</cstring>
</property>
@ -314,11 +314,11 @@
<property name="text">
<string></string>
</property>
<property name="alignment">
<property name="tqalignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="QFrame" row="3" column="0" rowspan="1" colspan="6">
<widget class="TQFrame" row="3" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>frame3</cstring>
</property>
@ -415,7 +415,7 @@
<slot>bSwitchAudioClick()</slot>
</connection>
</connections>
<slots>
<Q_SLOTS>
<slot>bStopClick()</slot>
<slot>cbAudioActivated(int)</slot>
<slot>slider_sliderReleased()</slot>
@ -427,8 +427,8 @@
<slot>bUpClick()</slot>
<slot>bDownClick()</slot>
<slot>bSwitchAudioClick()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kicondialog.h</includehint>
<includehint>kpushbutton.h</includehint>

@ -9,126 +9,126 @@
#include "chapterEdit.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <tqvariant.h>
#include <tqpushbutton.h>
#include <ktimewidget.h>
#include <qlabel.h>
#include <tqlabel.h>
#include <kurlrequester.h>
#include <kpushbutton.h>
#include <qcheckbox.h>
#include <qslider.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <tqcheckbox.h>
#include <tqslider.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "ktimewidget.h"
#include "kurlrequester.h"
#include "klineedit.h"
#include "kpushbutton.h"
/*
* Constructs a chapterEdit as a child of 'parent', with the
* Constructs a chapterEdit as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
chapterEdit::chapterEdit( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
chapterEdit::chapterEdit( TQWidget* tqparent, const char* name, WFlags fl )
: TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "chapterEdit" );
setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
chapterEditLayout = new QGridLayout( this, 1, 1, 11, 6, "chapterEditLayout");
tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
chapterEditLayout = new TQGridLayout( this, 1, 1, 11, 6, "chapterEditLayout");
twstart = new KTimeWidget( this, "twstart" );
twstart->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, twstart->sizePolicy().hasHeightForWidth() ) );
twstart->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, twstart->sizePolicy().hasHeightForWidth() ) );
chapterEditLayout->addWidget( twstart, 1, 2 );
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1 = new TQLabel( this, "textLabel1" );
chapterEditLayout->addWidget( textLabel1, 1, 1 );
textLabel3 = new QLabel( this, "textLabel3" );
textLabel3 = new TQLabel( this, "textLabel3" );
chapterEditLayout->addWidget( textLabel3, 0, 1 );
urFile = new KURLRequester( this, "urFile" );
urFile->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, urFile->sizePolicy().hasHeightForWidth() ) );
urFile->setMinimumSize( QSize( 200, 0 ) );
urFile->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, urFile->sizePolicy().hasHeightForWidth() ) );
urFile->setMinimumSize( TQSize( 200, 0 ) );
chapterEditLayout->addMultiCellWidget( urFile, 0, 0, 2, 4 );
bStart = new KPushButton( this, "bStart" );
bStart->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bStart->sizePolicy().hasHeightForWidth() ) );
bStart->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bStart->sizePolicy().hasHeightForWidth() ) );
chapterEditLayout->addWidget( bStart, 1, 3 );
spacer2 = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
spacer2 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
chapterEditLayout->addMultiCell( spacer2, 1, 2, 4, 4 );
ckBreakStart = new QCheckBox( this, "ckBreakStart" );
ckBreakStart = new TQCheckBox( this, "ckBreakStart" );
chapterEditLayout->addMultiCellWidget( ckBreakStart, 2, 2, 2, 3 );
spacer1 = new QSpacerItem( 21, 60, QSizePolicy::Minimum, QSizePolicy::Expanding );
spacer1 = new TQSpacerItem( 21, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
chapterEditLayout->addItem( spacer1, 6, 2 );
textLabel2 = new QLabel( this, "textLabel2" );
textLabel2 = new TQLabel( this, "textLabel2" );
chapterEditLayout->addWidget( textLabel2, 4, 1 );
ckBreakEnd = new QCheckBox( this, "ckBreakEnd" );
ckBreakEnd = new TQCheckBox( this, "ckBreakEnd" );
chapterEditLayout->addMultiCellWidget( ckBreakEnd, 5, 5, 2, 3 );
twend = new KTimeWidget( this, "twend" );
twend->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, twend->sizePolicy().hasHeightForWidth() ) );
twend->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, twend->sizePolicy().hasHeightForWidth() ) );
chapterEditLayout->addWidget( twend, 4, 2 );
spacer3 = new QSpacerItem( 20, 31, QSizePolicy::Minimum, QSizePolicy::Fixed );
spacer3 = new TQSpacerItem( 20, 31, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
chapterEditLayout->addItem( spacer3, 3, 2 );
layout3 = new QGridLayout( 0, 1, 1, 0, 6, "layout3");
tqlayout3 = new TQGridLayout( 0, 1, 1, 0, 6, "tqlayout3");
lPosition = new QLabel( this, "lPosition" );
lPosition->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, lPosition->sizePolicy().hasHeightForWidth() ) );
lPosition = new TQLabel( this, "lPosition" );
lPosition->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, lPosition->sizePolicy().hasHeightForWidth() ) );
layout3->addWidget( lPosition, 1, 1 );
tqlayout3->addWidget( lPosition, 1, 1 );
slider = new QSlider( this, "slider" );
slider->setOrientation( QSlider::Horizontal );
slider = new TQSlider( this, "slider" );
slider->setOrientation( Qt::Horizontal );
layout3->addWidget( slider, 1, 0 );
tqlayout3->addWidget( slider, 1, 0 );
image = new QLabel( this, "image" );
image->setMinimumSize( QSize( 320, 200 ) );
image->setPaletteBackgroundColor( QColor( 0, 0, 0 ) );
image = new TQLabel( this, "image" );
image->setMinimumSize( TQSize( 320, 200 ) );
image->setPaletteBackgroundColor( TQColor( 0, 0, 0 ) );
image->setScaledContents( TRUE );
layout3->addMultiCellWidget( image, 0, 0, 0, 1 );
tqlayout3->addMultiCellWidget( image, 0, 0, 0, 1 );
chapterEditLayout->addMultiCellLayout( layout3, 0, 6, 0, 0 );
chapterEditLayout->addMultiCellLayout( tqlayout3, 0, 6, 0, 0 );
bEnd = new KPushButton( this, "bEnd" );
bEnd->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bEnd->sizePolicy().hasHeightForWidth() ) );
bEnd->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bEnd->sizePolicy().hasHeightForWidth() ) );
chapterEditLayout->addWidget( bEnd, 4, 3 );
bTitleButton = new QPushButton( this, "bTitleButton" );
bTitleButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bTitleButton->sizePolicy().hasHeightForWidth() ) );
bTitleButton = new TQPushButton( this, "bTitleButton" );
bTitleButton->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bTitleButton->sizePolicy().hasHeightForWidth() ) );
chapterEditLayout->addWidget( bTitleButton, 7, 0 );
languageChange();
resize( QSize(627, 300).expandedTo(minimumSizeHint()) );
resize( TQSize(627, 300).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( urFile, SIGNAL( urlSelected(const QString&) ), this, SLOT( urlSelected(const QString&) ) );
connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
connect( slider, SIGNAL( valueChanged(int) ), this, SLOT( sliderChanged() ) );
connect( bStart, SIGNAL( clicked() ), this, SLOT( bStartClick() ) );
connect( bEnd, SIGNAL( clicked() ), this, SLOT( bEndClick() ) );
connect( twstart, SIGNAL( valueChanged(const QTime&) ), this, SLOT( startChanged(const QTime&) ) );
connect( twend, SIGNAL( valueChanged(const QTime&) ), this, SLOT( endChanged(const QTime&) ) );
connect( ckBreakEnd, SIGNAL( clicked() ), this, SLOT( ckBreakEndClick() ) );
connect( ckBreakStart, SIGNAL( clicked() ), this, SLOT( ckBreakStartClick() ) );
connect( bTitleButton, SIGNAL( clicked() ), this, SLOT( bTitleButtonClick() ) );
connect( urFile, TQT_SIGNAL( urlSelected(const TQString&) ), this, TQT_SLOT( urlSelected(const TQString&) ) );
connect( slider, TQT_SIGNAL( sliderReleased() ), this, TQT_SLOT( sliderReleased() ) );
connect( slider, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( sliderChanged() ) );
connect( bStart, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bStartClick() ) );
connect( bEnd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bEndClick() ) );
connect( twstart, TQT_SIGNAL( valueChanged(const TQTime&) ), this, TQT_SLOT( startChanged(const TQTime&) ) );
connect( twend, TQT_SIGNAL( valueChanged(const TQTime&) ), this, TQT_SLOT( endChanged(const TQTime&) ) );
connect( ckBreakEnd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( ckBreakEndClick() ) );
connect( ckBreakStart, TQT_SIGNAL( clicked() ), this, TQT_SLOT( ckBreakStartClick() ) );
connect( bTitleButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bTitleButtonClick() ) );
}
/*
@ -136,7 +136,7 @@ chapterEdit::chapterEdit( QWidget* parent, const char* name, WFlags fl )
*/
chapterEdit::~chapterEdit()
{
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, TQt does it all for us
}
/*
@ -159,9 +159,9 @@ void chapterEdit::languageChange()
bTitleButton->setText( tr2i18n( "set Title button" ) );
}
void chapterEdit::urlSelected(const QString&)
void chapterEdit::urlSelected(const TQString&)
{
qWarning( "chapterEdit::urlSelected(const QString&): Not implemented yet" );
qWarning( "chapterEdit::urlSelected(const TQString&): Not implemented yet" );
}
void chapterEdit::sliderReleased()
@ -179,14 +179,14 @@ void chapterEdit::bStartClick()
qWarning( "chapterEdit::bStartClick(): Not implemented yet" );
}
void chapterEdit::startChanged(const QTime&)
void chapterEdit::startChanged(const TQTime&)
{
qWarning( "chapterEdit::startChanged(const QTime&): Not implemented yet" );
qWarning( "chapterEdit::startChanged(const TQTime&): Not implemented yet" );
}
void chapterEdit::endChanged(const QTime&)
void chapterEdit::endChanged(const TQTime&)
{
qWarning( "chapterEdit::endChanged(const QTime&): Not implemented yet" );
qWarning( "chapterEdit::endChanged(const TQTime&): Not implemented yet" );
}
void chapterEdit::bEndClick()

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>chapterEdit</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>chapterEdit</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -40,7 +40,7 @@
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="1" column="1">
<widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -48,7 +48,7 @@
<string>start</string>
</property>
</widget>
<widget class="QLabel" row="0" column="1">
<widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@ -68,7 +68,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>200</width>
<height>0</height>
@ -105,14 +105,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QCheckBox" row="2" column="2" rowspan="1" colspan="2">
<widget class="TQCheckBox" row="2" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>ckBreakStart</cstring>
</property>
@ -130,14 +130,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>21</width>
<height>60</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="4" column="1">
<widget class="TQLabel" row="4" column="1">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@ -145,7 +145,7 @@
<string>end</string>
</property>
</widget>
<widget class="QCheckBox" row="5" column="2" rowspan="1" colspan="2">
<widget class="TQCheckBox" row="5" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>ckBreakEnd</cstring>
</property>
@ -176,22 +176,22 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>31</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="0" column="0" rowspan="7" colspan="1">
<widget class="TQLayoutWidget" row="0" column="0" rowspan="7" colspan="1">
<property name="name">
<cstring>layout3</cstring>
<cstring>tqlayout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="1" column="1">
<widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>lPosition</cstring>
</property>
@ -207,7 +207,7 @@
<string>--:--:--</string>
</property>
</widget>
<widget class="QSlider" row="1" column="0">
<widget class="TQSlider" row="1" column="0">
<property name="name">
<cstring>slider</cstring>
</property>
@ -215,11 +215,11 @@
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
<widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>image</cstring>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>320</width>
<height>200</height>
@ -254,7 +254,7 @@
<string>set Current Frame</string>
</property>
</widget>
<widget class="QPushButton" row="7" column="0">
<widget class="TQPushButton" row="7" column="0">
<property name="name">
<cstring>bTitleButton</cstring>
</property>
@ -275,9 +275,9 @@
<connections>
<connection>
<sender>urFile</sender>
<signal>urlSelected(const QString&amp;)</signal>
<signal>urlSelected(const TQString&amp;)</signal>
<receiver>chapterEdit</receiver>
<slot>urlSelected(const QString&amp;)</slot>
<slot>urlSelected(const TQString&amp;)</slot>
</connection>
<connection>
<sender>slider</sender>
@ -305,15 +305,15 @@
</connection>
<connection>
<sender>twstart</sender>
<signal>valueChanged(const QTime&amp;)</signal>
<signal>valueChanged(const TQTime&amp;)</signal>
<receiver>chapterEdit</receiver>
<slot>startChanged(const QTime&amp;)</slot>
<slot>startChanged(const TQTime&amp;)</slot>
</connection>
<connection>
<sender>twend</sender>
<signal>valueChanged(const QTime&amp;)</signal>
<signal>valueChanged(const TQTime&amp;)</signal>
<receiver>chapterEdit</receiver>
<slot>endChanged(const QTime&amp;)</slot>
<slot>endChanged(const TQTime&amp;)</slot>
</connection>
<connection>
<sender>ckBreakEnd</sender>
@ -334,19 +334,19 @@
<slot>bTitleButtonClick()</slot>
</connection>
</connections>
<slots>
<slot>urlSelected( const QString &amp;)</slot>
<Q_SLOTS>
<slot>urlSelected( const TQString &amp;)</slot>
<slot>sliderReleased()</slot>
<slot>sliderChanged()</slot>
<slot>bStartClick()</slot>
<slot>startChanged(const QTime &amp;)</slot>
<slot>endChanged(const QTime &amp;)</slot>
<slot>startChanged(const TQTime &amp;)</slot>
<slot>endChanged(const TQTime &amp;)</slot>
<slot>bEndClick()</slot>
<slot>ckBreakStartClick()</slot>
<slot>ckBreakEndClick()</slot>
<slot>bTitleButtonClick()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>ktimewidget.h</includehint>
<includehint>kurlrequester.h</includehint>

@ -9,83 +9,83 @@
#include "import.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qheader.h>
#include <qlistview.h>
#include <tqvariant.h>
#include <tqpushbutton.h>
#include <tqlabel.h>
#include <tqheader.h>
#include <tqlistview.h>
#include <kcombobox.h>
#include <qcombobox.h>
#include <tqcombobox.h>
#include <kselect.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "kcombobox.h"
#include "kselect.h"
/*
* Constructs a import as a child of 'parent', with the
* Constructs a import as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
import::import( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
import::import( TQWidget* tqparent, const char* name, WFlags fl )
: TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "import" );
importLayout = new QGridLayout( this, 1, 1, 11, 6, "importLayout");
importLayout = new TQGridLayout( this, 1, 1, 11, 6, "importLayout");
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
textLabel1 = new TQLabel( this, "textLabel1" );
textLabel1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
importLayout->addWidget( textLabel1, 0, 0 );
layout2 = new QGridLayout( 0, 1, 1, 0, 6, "layout2");
tqlayout2 = new TQGridLayout( 0, 1, 1, 0, 6, "tqlayout2");
lvDVD = new QListView( this, "lvDVD" );
lvDVD = new TQListView( this, "lvDVD" );
lvDVD->addColumn( tr2i18n( "Video files" ) );
lvDVD->header()->setClickEnabled( FALSE, lvDVD->header()->count() - 1 );
lvDVD->addColumn( tr2i18n( "..." ) );
lvDVD->header()->setClickEnabled( FALSE, lvDVD->header()->count() - 1 );
lvDVD->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, lvDVD->sizePolicy().hasHeightForWidth() ) );
lvDVD->setMinimumSize( QSize( 0, 200 ) );
lvDVD->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, lvDVD->sizePolicy().hasHeightForWidth() ) );
lvDVD->setMinimumSize( TQSize( 0, 200 ) );
lvDVD->setRootIsDecorated( FALSE );
lvDVD->setResizeMode( QListView::AllColumns );
lvDVD->setResizeMode( TQListView::AllColumns );
layout2->addMultiCellWidget( lvDVD, 0, 1, 0, 0 );
tqlayout2->addMultiCellWidget( lvDVD, 0, 1, 0, 0 );
importLayout->addMultiCellLayout( layout2, 1, 1, 0, 3 );
importLayout->addMultiCellLayout( tqlayout2, 1, 1, 0, 3 );
cbOutputDev = new KComboBox( FALSE, this, "cbOutputDev" );
importLayout->addWidget( cbOutputDev, 0, 1 );
cbFormat = new QComboBox( FALSE, this, "cbFormat" );
cbFormat->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, cbFormat->sizePolicy().hasHeightForWidth() ) );
cbFormat = new TQComboBox( FALSE, this, "cbFormat" );
cbFormat->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, cbFormat->sizePolicy().hasHeightForWidth() ) );
importLayout->addWidget( cbFormat, 0, 2 );
lTotal = new QLabel( this, "lTotal" );
lTotal->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, lTotal->sizePolicy().hasHeightForWidth() ) );
lTotal = new TQLabel( this, "lTotal" );
lTotal->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, lTotal->sizePolicy().hasHeightForWidth() ) );
importLayout->addWidget( lTotal, 2, 3 );
gsTotal = new KGradientSelector( this, "gsTotal" );
gsTotal->setEnabled( FALSE );
gsTotal->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, gsTotal->sizePolicy().hasHeightForWidth() ) );
gsTotal->setMaximumSize( QSize( 32767, 13 ) );
gsTotal->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, gsTotal->sizePolicy().hasHeightForWidth() ) );
gsTotal->setMaximumSize( TQSize( 32767, 13 ) );
gsTotal->setValue( 0 );
gsTotal->setMaxValue( 180 );
gsTotal->setFirstColor( QColor( 255, 77, 6 ) );
gsTotal->setSecondColor( QColor( 85, 255, 0 ) );
gsTotal->setFirstColor( TQColor( 255, 77, 6 ) );
gsTotal->setSecondColor( TQColor( 85, 255, 0 ) );
importLayout->addMultiCellWidget( gsTotal, 2, 2, 0, 2 );
languageChange();
resize( QSize(524, 416).expandedTo(minimumSizeHint()) );
resize( TQSize(524, 416).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( lvDVD, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( lvDVDItemSelected(QListViewItem*) ) );
connect( cbFormat, SIGNAL( activated(const QString&) ), this, SLOT( cbFormatActivated(const QString&) ) );
connect( lvDVD, TQT_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQT_SLOT( lvDVDItemSelected(TQListViewItem*) ) );
connect( cbFormat, TQT_SIGNAL( activated(const TQString&) ), this, TQT_SLOT( cbFormatActivated(const TQString&) ) );
}
/*
@ -93,7 +93,7 @@ import::import( QWidget* parent, const char* name, WFlags fl )
*/
import::~import()
{
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, TQt does it all for us
}
/*
@ -112,9 +112,9 @@ void import::languageChange()
lTotal->setText( tr2i18n( "--:--:--" ) );
}
void import::lvDVDItemSelected(QListViewItem*)
void import::lvDVDItemSelected(TQListViewItem*)
{
qWarning( "import::lvDVDItemSelected(QListViewItem*): Not implemented yet" );
qWarning( "import::lvDVDItemSelected(TQListViewItem*): Not implemented yet" );
}
void import::bAddClick()
@ -122,9 +122,9 @@ void import::bAddClick()
qWarning( "import::bAddClick(): Not implemented yet" );
}
void import::cbFormatActivated(const QString&)
void import::cbFormatActivated(const TQString&)
{
qWarning( "import::cbFormatActivated(const QString&): Not implemented yet" );
qWarning( "import::cbFormatActivated(const TQString&): Not implemented yet" );
}
#include "import.moc"

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>import</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>import</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -35,15 +35,15 @@
<string>Output</string>
</property>
</widget>
<widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="4">
<widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>layout2</cstring>
<cstring>tqlayout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QListView" row="0" column="0" rowspan="2" colspan="1">
<widget class="TQListView" row="0" column="0" rowspan="2" colspan="1">
<column>
<property name="text">
<string>Video files</string>
@ -77,7 +77,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>0</width>
<height>200</height>
@ -97,7 +97,7 @@
<cstring>cbOutputDev</cstring>
</property>
</widget>
<widget class="QComboBox" row="0" column="2">
<widget class="TQComboBox" row="0" column="2">
<item>
<property name="text">
<string>PAL</string>
@ -120,7 +120,7 @@
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="2" column="3">
<widget class="TQLabel" row="2" column="3">
<property name="name">
<cstring>lTotal</cstring>
</property>
@ -151,7 +151,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>32767</width>
<height>13</height>
@ -183,23 +183,23 @@
<connections>
<connection>
<sender>lvDVD</sender>
<signal>selectionChanged(QListViewItem*)</signal>
<signal>selectionChanged(TQListViewItem*)</signal>
<receiver>import</receiver>
<slot>lvDVDItemSelected(QListViewItem*)</slot>
<slot>lvDVDItemSelected(TQListViewItem*)</slot>
</connection>
<connection>
<sender>cbFormat</sender>
<signal>activated(const QString&amp;)</signal>
<signal>activated(const TQString&amp;)</signal>
<receiver>import</receiver>
<slot>cbFormatActivated(const QString&amp;)</slot>
<slot>cbFormatActivated(const TQString&amp;)</slot>
</connection>
</connections>
<slots>
<slot>lvDVDItemSelected(QListViewItem *)</slot>
<Q_SLOTS>
<slot>lvDVDItemSelected(TQListViewItem *)</slot>
<slot>bAddClick()</slot>
<slot>cbFormatActivated(const QString &amp;)</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
<slot>cbFormatActivated(const TQString &amp;)</slot>
</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>kselect.h</includehint>

@ -19,7 +19,7 @@
#include <libavformat/avformat.h>
#endif
#include <qimage.h>
#include <tqimage.h>
#include <dlfcn.h>
#include <klocale.h>
#include <cstdlib>
@ -41,18 +41,18 @@ void av_free_packet(AVPacket *pkt)
#endif
#endif
k9AviDecode::k9AviDecode(QObject *parent, const char *name)
: QObject(parent, name) {
k9AviDecode::k9AviDecode(TQObject *tqparent, const char *name)
: TQObject(tqparent, name) {
if (glibref==0) {
CodecHandle=dlopen("libavcodec.so",RTLD_LAZY | RTLD_GLOBAL);
FormatHandle=dlopen("libavformat.so",RTLD_LAZY | RTLD_GLOBAL);
}
if (!CodecHandle) {
m_error =i18n("Cannot open then library %1").arg("libavcodec");
m_error =i18n("Cannot open then library %1").tqarg("libavcodec");
return;
}
if (!FormatHandle) {
m_error =i18n("Cannot open then library %1").arg("libavformat");
m_error =i18n("Cannot open then library %1").tqarg("libavformat");
return;
}
m_error="";
@ -98,14 +98,14 @@ k9AviDecode::~k9AviDecode() {
#include "k9avidecode.moc"
bool k9AviDecode::open(const QString & _fileName) {
bool k9AviDecode::open(const TQString & _fileName) {
m_error="";
if (m_opened)
close();
// Open video file
if (av_open_input_file(&m_FormatCtx, _fileName.utf8(), NULL, 0, NULL)!=0) {
m_error=i18n("Couldn't open the file %1").arg(_fileName);
m_error=i18n("Couldn't open the file %1").tqarg(_fileName);
return false; // Couldn't open file}
}
// Retrieve stream information
@ -211,7 +211,7 @@ void k9AviDecode::readFrame(double _seconds) {
(AVPicture*)m_Frame, m_CodecCtx->pix_fmt,
m_CodecCtx->width, m_CodecCtx->height);
// convert frame to QImage
// convert frame to TQImage
SaveFrame(m_FrameRGB, m_CodecCtx->width,
m_CodecCtx->height);
}
@ -225,7 +225,7 @@ void k9AviDecode::readFrame(double _seconds) {
}
void k9AviDecode::SaveFrame(AVFrame *pFrame, int width, int height) {
QImage pix;
TQImage pix;
int len =(int) (3*width*height);
char c[255];
// Write header
@ -268,11 +268,11 @@ bool k9AviDecode::opened() const {
}
QString k9AviDecode::getFileName() const {
TQString k9AviDecode::getFileName() const {
return m_fileName;
}
QString k9AviDecode::getError() const {
TQString k9AviDecode::getError() const {
return m_error;
}

@ -13,7 +13,7 @@
#define K9AVIDECODE_H
#include "k9common.h"
#include <qobject.h>
#include <tqobject.h>
#ifdef OLD_FFMPEG
#include <ffmpeg/avformat.h>
#endif
@ -22,7 +22,7 @@
#endif
#include <qimage.h>
#include <tqimage.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
@ -54,23 +54,24 @@ typedef void (*avcodec_flush_buffers_t)(AVCodecContext *);
class k9AviDecode : public QObject
class k9AviDecode : public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
k9AviDecode(QObject *parent = 0, const char *name = 0);
k9AviDecode(TQObject *tqparent = 0, const char *name = 0);
~k9AviDecode();
bool open(const QString & _fileName);
bool open(const TQString & _fileName);
void readFrame(double _seconds);
void seek(double _seconds);
void close();
double getDuration() const;
bool opened() const;
QString getFileName() const;
TQString getFileName() const;
QString getError() const;
TQString getError() const;
private:
av_register_all_t av_register_all;
@ -102,11 +103,11 @@ private:
int m_videoStream;
bool m_opened;
double m_duration;
QString m_fileName;
QString m_error;
TQString m_fileName;
TQString m_error;
void SaveFrame(AVFrame *pFrame, int width, int height);
signals:
void drawFrame(QImage*);
void drawFrame(TQImage*);
};
#endif

@ -13,11 +13,11 @@
#include "k9avifile.h"
#include "k9title.h"
k9AviFile::k9AviFile(k9Title *parent, const char *name)
: QObject(parent, name)
k9AviFile::k9AviFile(k9Title *tqparent, const char *name)
: TQObject(tqparent, name)
{
m_num=parent->getFiles()->count();
setTitle(parent);
m_num=tqparent->getFiles()->count();
setTitle(tqparent);
m_previous=NULL;
m_next=NULL;
m_breakNext=false;
@ -33,52 +33,52 @@ k9AviFile::~k9AviFile()
#include "k9avifile.moc"
QString k9AviFile::getFileName() const
TQString k9AviFile::getFileName() const
{
return m_fileName;
}
void k9AviFile::setFileName ( const QString& _value )
void k9AviFile::setFileName ( const TQString& _value )
{
m_fileName = _value;
emit aviFileUpdated (this);
}
QTime k9AviFile::getStart() const
TQTime k9AviFile::getStart() const
{
return m_start;
}
void k9AviFile::setStart ( const QTime& _value )
void k9AviFile::setStart ( const TQTime& _value )
{
m_start = _value;
emit aviFileUpdated (this);
}
QTime k9AviFile::getEnd() const
TQTime k9AviFile::getEnd() const
{
return m_end;
}
void k9AviFile::setEnd ( const QTime& _value )
void k9AviFile::setEnd ( const TQTime& _value )
{
m_end = _value;
emit aviFileUpdated (this);
}
QString k9AviFile::getLabel() const
TQString k9AviFile::getLabel() const
{
return m_label;
}
void k9AviFile::setLabel ( const QString& _value )
void k9AviFile::setLabel ( const TQString& _value )
{
m_label = _value;
emit aviFileUpdated (this);
@ -173,12 +173,12 @@ bool k9AviFile::getBreakNext() {
QImage k9AviFile::getImage() const {
TQImage k9AviFile::getImage() const {
return m_image;
}
void k9AviFile::setImage(const QImage& _value) {
void k9AviFile::setImage(const TQImage& _value) {
m_image = _value;
emit aviFileUpdated (this);
emit imageChanged(_value);

@ -12,33 +12,34 @@
#ifndef K9AVIFILE_H
#define K9AVIFILE_H
#include <qobject.h>
#include <qdatetime.h>
#include <qimage.h>
#include <tqobject.h>
#include <tqdatetime.h>
#include <tqimage.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9Title;
class k9AviFile : public QObject
class k9AviFile : public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
k9AviFile(k9Title *parent = 0, const char *name = 0);
k9AviFile(k9Title *tqparent = 0, const char *name = 0);
~k9AviFile();
void setFileName ( const QString& _value );
QString getFileName() const;
void setFileName ( const TQString& _value );
TQString getFileName() const;
void setStart ( const QTime& _value );
QTime getStart() const;
void setStart ( const TQTime& _value );
TQTime getStart() const;
void setEnd ( const QTime& _value );
QTime getEnd() const;
void setEnd ( const TQTime& _value );
TQTime getEnd() const;
void setLabel ( const QString& _value );
QString getLabel() const;
void setLabel ( const TQString& _value );
TQString getLabel() const;
k9Title* getTitle() const;
@ -56,17 +57,17 @@ public:
void setBreakNext(bool _state);
bool getBreakNext();
void setImage(const QImage& _value);
QImage getImage() const;
void setImage(const TQImage& _value);
TQImage getImage() const;
private:
QString m_fileName;
QTime m_start;
QString m_label;
QTime m_end;
TQString m_fileName;
TQTime m_start;
TQString m_label;
TQTime m_end;
k9Title *m_title;
QImage m_image;
TQImage m_image;
int m_num;
bool m_breakNext,m_breakPrevious;
k9AviFile *m_previous;
@ -74,7 +75,7 @@ private:
void setTitle ( k9Title* _value );
signals:
void aviFileUpdated(k9AviFile *_aviFile);
void imageChanged(const QImage &);
void imageChanged(const TQImage &);
};
#endif

@ -12,7 +12,7 @@
#include "k9canvasselection.h"
#include "k9menubutton.h"
k9CanvasSelectionRedim::k9CanvasSelectionRedim (ePosition _position,int _x,int _y,int _w,int _h,QCanvas *canvas,k9CanvasSelection *selection):QCanvasRectangle(_x,_y,_w,_h,canvas) {
k9CanvasSelectionRedim::k9CanvasSelectionRedim (ePosition _position,int _x,int _y,int _w,int _h,TQCanvas *canvas,k9CanvasSelection *selection):TQCanvasRectangle(_x,_y,_w,_h,canvas) {
m_position=_position;
m_selection=selection;
}
@ -20,7 +20,7 @@ k9CanvasSelectionRedim::k9CanvasSelectionRedim (ePosition _position,int _x,int _
void k9CanvasSelectionRedim::moveBy(double _x,double _y) {
m_offsetX=_x;
m_offsetY=_y;
QCanvasRectangle::moveBy(_x,_y);
TQCanvasRectangle::moveBy(_x,_y);
}
void k9CanvasSelectionRedim::updateSelection() {
@ -98,7 +98,7 @@ void k9CanvasSelectionRedim::updateSelection() {
k9CanvasSelection::k9CanvasSelection(k9MenuEditor *_editor)
: QObject(_editor) {
: TQObject(_editor) {
m_rect=NULL;
m_editor=_editor;
}
@ -106,45 +106,45 @@ k9CanvasSelection::k9CanvasSelection(k9MenuEditor *_editor)
k9CanvasSelection::~k9CanvasSelection() {}
void k9CanvasSelection::setPosition(QPoint _p) {
void k9CanvasSelection::setPosition(TQPoint _p) {
if (m_rect==NULL) {
QCanvas *m_canvas=m_editor->canvas();
m_rect=new QCanvasRectangle(m_editor->canvas());
QBrush brush(Qt::green);
TQCanvas *m_canvas=m_editor->canvas();
m_rect=new TQCanvasRectangle(m_editor->canvas());
TQBrush brush(TQt::green);
m_rm=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimMiddleRight,0,0,10,10,m_canvas,this);
m_rm->setPen(Qt::black);
m_rm->setPen(TQt::black);
m_rm->setBrush(brush);
m_lt=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimTopLeft,0,0,10,10,m_canvas,this);
m_lt->setPen(Qt::black);
m_lt->setPen(TQt::black);
m_lt->setBrush(brush);
m_mt=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimTopMiddle,0,0,10,10,m_canvas,this);
m_mt->setPen(Qt::black);
m_mt->setPen(TQt::black);
m_mt->setBrush(brush);
m_mt=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimTopMiddle,0,0,10,10,m_canvas,this);
m_mt->setPen(Qt::black);
m_mt->setPen(TQt::black);
m_mt->setBrush(brush);
m_rt=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimTopRight,0,0,10,10,m_canvas,this);
m_rt->setPen(Qt::black);
m_rt->setPen(TQt::black);
m_rt->setBrush(brush);
m_lm=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimMiddleLeft,0,0,10,10,m_canvas,this);
m_lm->setPen(Qt::black);
m_lm->setPen(TQt::black);
m_lm->setBrush(brush);
m_lb=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimBottomLeft,0,0,10,10,m_canvas,this);
m_lb->setPen(Qt::black);
m_lb->setPen(TQt::black);
m_lb->setBrush(brush);
m_mb=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimBottomMiddle,0,0,10,10,m_canvas,this);
m_mb->setPen(Qt::black);
m_mb->setPen(TQt::black);
m_mb->setBrush(brush);
m_rb=new k9CanvasSelectionRedim(k9CanvasSelectionRedim::RedimBottomRight,0,0,10,10,m_canvas,this);
m_rb->setPen(Qt::black);
m_rb->setPen(TQt::black);
m_rb->setBrush(brush);
} else {
m_rect->setCanvas(m_editor->canvas());
@ -158,7 +158,7 @@ void k9CanvasSelection::setPosition(QPoint _p) {
m_rb->setCanvas(m_editor->canvas());
;
}
m_rect->setPen(QPen(Qt::red));
m_rect->setPen(TQPen(TQt::red));
m_rect->setX(_p.x());
m_rect->setY(_p.y());
m_rect->setSize(0,0);
@ -179,13 +179,13 @@ void k9CanvasSelection::release() {
void k9CanvasSelection::drawSelection() {
int left=720,top=576,right=0,bottom=0;
QPtrList <k9MenuButton> *selection=m_editor->getSelection();
TQPtrList <k9MenuButton> *selection=m_editor->getSelection();
for (k9MenuButton *b=selection->first();b;b=selection->next()) {
left=QMIN(left,b->getLeft());
top=QMIN(top,b->getTop());
right=QMAX(right,b->getWidth()+b->getLeft());
bottom=QMAX(bottom,b->getTop()+b->getHeight());
left=TQMIN(left,b->getLeft());
top=TQMIN(top,b->getTop());
right=TQMAX(right,b->getWidth()+b->getLeft());
bottom=TQMAX(bottom,b->getTop()+b->getHeight());
}
m_rect->setX(left-2);
m_rect->setY(top-2);
@ -227,9 +227,9 @@ void k9CanvasSelection::update() {
m_rect->setZ(count--);
QCanvasItemList l=m_editor->canvas()->allItems();
for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
QCanvasItem *item=*it;
TQCanvasItemList l=m_editor->canvas()->allItems();
for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
TQCanvasItem *item=*it;
if (item != m_rect && item !=m_lt && item !=m_rt && item != m_mt && item !=m_lm && item != m_rm && item != m_lb && item != m_mb && item !=m_rb)
item->setZ(count--);
}
@ -239,7 +239,7 @@ void k9CanvasSelection::update() {
}
void k9CanvasSelection::scale(int _x,int _y,int _w, int _h) {
QPtrList <k9MenuButton> *buttons=m_editor->getSelection();
TQPtrList <k9MenuButton> *buttons=m_editor->getSelection();
for (k9MenuButton *b=buttons->first();b;b=buttons->next()) {
b->moveBy(_x,_y,false);
if (b->getWidth() + _w >10)
@ -251,7 +251,7 @@ void k9CanvasSelection::scale(int _x,int _y,int _w, int _h) {
}
bool k9CanvasSelection::canScale(int _w, int _h) {
QPtrList <k9MenuButton> *buttons=m_editor->getSelection();
TQPtrList <k9MenuButton> *buttons=m_editor->getSelection();
for (k9MenuButton *b=buttons->first();b;b=buttons->next()) {
if (b->getWidth() + _w <10)
return false;
@ -298,7 +298,7 @@ void k9CanvasSelection::setSize(int _w,int _h) {
m_rect->setSize(_w,_h);
}
QRect k9CanvasSelection::getRect() {
TQRect k9CanvasSelection::getRect() {
return m_rect->rect();
}

@ -13,16 +13,16 @@
#define K9CANVASSELECTION_H
#include "k9menueditor.h"
#include <qcanvas.h>
#include <tqcanvas.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9CanvasSelection;
class k9CanvasSelectionRedim : public QCanvasRectangle {
class k9CanvasSelectionRedim : public TQCanvasRectangle {
public:
enum ePosition { RedimTopLeft=2002,RedimTopMiddle=2003,RedimTopRight=2004,RedimMiddleLeft=2005,RedimBottomLeft=2006,RedimBottomMiddle=2007,RedimBottomRight=2008,RedimMiddleRight=2009} ;
k9CanvasSelectionRedim (ePosition _position,int _x,int _y,int _w,int _h,QCanvas *canvas,k9CanvasSelection *selection);
k9CanvasSelectionRedim (ePosition _position,int _x,int _y,int _w,int _h,TQCanvas *canvas,k9CanvasSelection *selection);
void updateSelection();
virtual int rtti() const {
return m_position;
@ -35,21 +35,22 @@ private:
};
class k9CanvasSelection : public QObject
class k9CanvasSelection : public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
k9CanvasSelection(k9MenuEditor *_editor);
~k9CanvasSelection();
void setPosition (QPoint _p);
void setPosition (TQPoint _p);
void release();
void hide();
void hideRedim();
void showRedim();
void show();
void setSize(int _w,int _h);
QRect getRect();
TQRect getRect();
void moveBy(int _x,int _y);
int getWidth();
void setWidth(int _w);
@ -64,7 +65,7 @@ public:
private:
k9MenuEditor *m_editor;
QCanvasRectangle *m_rect;
TQCanvasRectangle *m_rect;
k9CanvasSelectionRedim *m_lt,*m_mt,*m_rt,*m_lm,*m_rm,*m_lb,*m_mb,*m_rb;
};

@ -14,24 +14,24 @@
#include "k9chapteredit.h"
#include "k9drawimage.h"
#include <ktimewidget.h>
#include <qlabel.h>
#include <qpixmap.h>
#include <qslider.h>
#include <qlayout.h>
#include <tqlabel.h>
#include <tqpixmap.h>
#include <tqslider.h>
#include <tqlayout.h>
#include <kurlrequester.h>
#include <qcheckbox.h>
#include <tqcheckbox.h>
#include "k9title.h"
#include <kpushbutton.h>
#include <kiconloader.h>
k9ChapterEdit::k9ChapterEdit(QWidget* parent, const char* name, WFlags fl)
: chapterEdit(parent,name,fl)
k9ChapterEdit::k9ChapterEdit(TQWidget* tqparent, const char* name, WFlags fl)
: chapterEdit(tqparent,name,fl)
{
m_wimage=new k9DrawImage(image,0);
QGridLayout *l=new QGridLayout(image,1,1);
TQGridLayout *l=new TQGridLayout(image,1,1);
l->addWidget(m_wimage,0,0);
m_wimage->setPaletteBackgroundColor(Qt::black);
connect(&m_aviDecode,SIGNAL(drawFrame(QImage*)),this,SLOT(drawImage(QImage*)));
m_wimage->setPaletteBackgroundColor(TQt::black);
connect(&m_aviDecode,TQT_SIGNAL(drawFrame(TQImage*)),this,TQT_SLOT(drawImage(TQImage*)));
bTitleButton->setIconSet (SmallIcon("frame_image"));
}
@ -50,14 +50,14 @@ void k9ChapterEdit::sliderChanged() {
if (m_aviDecode.opened()) {
//m_aviDecode.seek((double)slider->value() / 100);
m_aviDecode.readFrame((double)slider->value() / 1000);
QTime t;
TQTime t;
t=t.addMSecs((double)slider->value());
lPosition->setText(t.toString("hh:mm:ss"));
}
}
void k9ChapterEdit::urlSelected(const QString& _fileName) {
void k9ChapterEdit::urlSelected(const TQString& _fileName) {
m_aviDecode.open(_fileName);
if (!m_noUpdate) {
if (_fileName !=m_aviFile->getFileName()) {
@ -69,7 +69,7 @@ void k9ChapterEdit::urlSelected(const QString& _fileName) {
m_aviFile->setFileName(_fileName);
}
QTime t;
TQTime t;
int sec=t.msecsTo(m_aviFile->getStart());
slider->setMaxValue((int)(m_aviDecode.getDuration()*1000));
@ -77,22 +77,22 @@ void k9ChapterEdit::urlSelected(const QString& _fileName) {
}
void k9ChapterEdit::drawImage(QImage * _image) {
//QPixmap p(*_image);
void k9ChapterEdit::drawImage(TQImage * _image) {
//TQPixmap p(*_image);
//image->setPixmap(p);
m_wimage->setImage(*_image);
m_image=*_image;
}
void k9ChapterEdit::bStartClick() {
QTime t;
TQTime t;
int secs=slider->value()/1000;
t=t.addSecs(secs);
twstart->setTime(t);
}
void k9ChapterEdit::bEndClick() {
QTime t;
TQTime t;
int secs=slider->value()/1000;
t=t.addSecs(secs);
twend->setTime(t);
@ -138,9 +138,9 @@ void k9ChapterEdit::setAviFile(k9AviFile *_aviFile) {
}
void k9ChapterEdit::startChanged(const QTime& _time) {
void k9ChapterEdit::startChanged(const TQTime& _time) {
if (!m_noUpdate) {
QTime t=_time;
TQTime t=_time;
if (t > m_maxTime )
t=m_maxTime;
else if (t < m_minTime)
@ -153,15 +153,15 @@ void k9ChapterEdit::startChanged(const QTime& _time) {
if (!m_aviFile->getBreakPrevious() && m_aviFile->getPrevious()!=NULL) {
m_aviFile->getPrevious()->setEnd(t);
}
QTime t2;
TQTime t2;
slider->setValue(t2.msecsTo(t));
m_aviFile->setImage(m_image);
}
}
void k9ChapterEdit::endChanged(const QTime& _time) {
void k9ChapterEdit::endChanged(const TQTime& _time) {
if (!m_noUpdate) {
QTime t=_time;
TQTime t=_time;
if (t > m_maxTime )
t=m_maxTime;
else if (t < m_minTime)
@ -171,9 +171,9 @@ void k9ChapterEdit::endChanged(const QTime& _time) {
if (t!=_time)
twend->setTime(t);
m_aviFile->setEnd(t);
QTime t2;
TQTime t2;
if (!m_aviFile->getBreakNext() && m_aviFile->getNext()!=NULL) {
QImage i=m_image;
TQImage i=m_image;
m_aviDecode.readFrame((double)t2.msecsTo(t)/1000.0);
m_aviFile->getNext()->setImage(m_image);
m_image=i;

@ -22,9 +22,10 @@ class k9DrawImage;
class k9ChapterEdit : public chapterEdit
{
Q_OBJECT
TQ_OBJECT
public:
k9ChapterEdit(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
k9ChapterEdit(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~k9ChapterEdit();
/*$PUBLIC_FUNCTIONS$*/
@ -34,9 +35,9 @@ private:
k9AviDecode m_aviDecode;
k9DrawImage *m_wimage;
k9AviFile *m_aviFile;
QTime m_minTime,m_maxTime;
TQTime m_minTime,m_maxTime;
bool m_noUpdate;
QImage m_image;
TQImage m_image;
protected:
/*$PROTECTED_FUNCTIONS$*/
virtual void sliderReleased();
@ -45,13 +46,13 @@ protected:
virtual void bEndClick();
virtual void ckBreakStartClick();
virtual void ckBreakEndClick();
virtual void urlSelected(const QString&);
virtual void startChanged(const QTime&);
virtual void endChanged(const QTime&);
virtual void urlSelected(const TQString&);
virtual void startChanged(const TQTime&);
virtual void endChanged(const TQTime&);
virtual void bTitleButtonClick();
protected slots:
/*$PROTECTED_SLOTS$*/
void drawImage(QImage *);
void drawImage(TQImage *);
public slots:
void setAviFile(k9AviFile *_aviFile);
};

@ -20,19 +20,19 @@
#include "k9haldevice.h"
#include "k9config.h"
#include "k9burndvd.h"
#include <qdir.h>
#include <tqdir.h>
#include <kfiledialog.h>
#include <kcombobox.h>
#include <kiconloader.h>
#include <kselect.h>
#include "k9processlist.h"
k9Import::k9Import(QWidget* parent, const char* name,k9CdDrives *_drives)
: import(parent,name) {
m_parent=(k9Copy*) parent;
k9Import::k9Import(TQWidget* tqparent, const char* name,k9CdDrives *_drives)
: import(tqparent,name) {
m_parent=(k9Copy*) tqparent;
drives=_drives;
connect(&m_newDVD,SIGNAL(sigAddTitle()),this,SLOT(titleAdded()));
connect(&m_newDVD,TQT_SIGNAL(sigAddTitle()),this,TQT_SLOT(titleAdded()));
}
k9Import::~k9Import() {}
@ -42,13 +42,13 @@ k9Import::~k9Import() {}
/*$SPECIALIZATION$*/
void k9Import::init() {
m_root=new QListViewItem(lvDVD,i18n("Root Menu"));
m_root=new TQListViewItem(lvDVD,i18n("Root Menu"));
m_root->setOpen(true);
m_root->setPixmap(0,SmallIcon("dvd_unmount"));
emit aviFileSelected(NULL);
connect(drives,SIGNAL(deviceAdded( k9CdDrive*)),this,SLOT(deviceAdded( k9CdDrive* )));
connect(drives,SIGNAL(deviceRemoved( k9CdDrive*)),this,SLOT(deviceRemoved( k9CdDrive* )));
connect(drives,TQT_SIGNAL(deviceAdded( k9CdDrive*)),this,TQT_SLOT(deviceAdded( k9CdDrive* )));
connect(drives,TQT_SIGNAL(deviceRemoved( k9CdDrive*)),this,TQT_SLOT(deviceRemoved( k9CdDrive* )));
readDrives();
m_root->setSelected(true);
@ -73,7 +73,7 @@ void k9Import::deviceAdded(k9CdDrive *_drive) {
void k9Import::deviceRemoved(k9CdDrive *_drive) {
int i=recorderList.find(_drive);
int i=recorderList.tqfind(_drive);
recorderList.remove( i);
cbOutputDev->removeItem(i+2);
@ -83,7 +83,7 @@ void k9Import::addDrive(k9CdDrive *drive) {
#ifdef HAVE_HAL
if (drive->getDevice()!=NULL) {
k9HalDevice *dev=drive->getDevice();
connect(dev,SIGNAL(volumeChanged( const QString &,const QString &)),this,SLOT(volumeChanged(const QString&,const QString&)));
connect(dev,TQT_SIGNAL(volumeChanged( const TQString &,const TQString &)),this,TQT_SLOT(volumeChanged(const TQString&,const TQString&)));
}
#endif
if (drive->canWriteDVD) {
@ -93,14 +93,14 @@ void k9Import::addDrive(k9CdDrive *drive) {
}
void k9Import::volumeChanged(const QString &device,const QString &volumeName) {}
void k9Import::volumeChanged(const TQString &device,const TQString &volumeName) {}
#include "k9import.moc"
QListViewItem* k9Import::getRoot() const {
TQListViewItem* k9Import::getRoot() const {
return m_root;
}
@ -112,7 +112,7 @@ void k9Import::aviFileUpdated(k9AviFile *_aviFile) {
while (itemChapter) {
if (itemChapter->getAviFile()==_aviFile) {
itemChapter->setText(1,_aviFile->getStart().toString("hh:mm:ss") +" - "+_aviFile->getEnd().toString("hh:mm:ss"));
itemChapter->setPixmap(0,QPixmap(_aviFile->getImage().smoothScale(50,40)));
itemChapter->setPixmap(0,TQPixmap(_aviFile->getImage().smoothScale(50,40)));
}
itemChapter=(k9LvItemImport*)itemChapter->nextSibling();
}
@ -121,12 +121,12 @@ void k9Import::aviFileUpdated(k9AviFile *_aviFile) {
updateTotalTime();
}
void k9Import::buttonUpdated(k9MenuButton *_button, const QImage &_image) {
void k9Import::buttonUpdated(k9MenuButton *_button, const TQImage &_image) {
k9LvItemImport *itemTitle = (k9LvItemImport*)m_root->firstChild();
while (itemTitle) {
if (itemTitle->getTitle()->getButton()==_button) {
QImage img=_image.smoothScale(50,40,QImage::ScaleFree);
QPixmap pix(img);
TQImage img=_image.smoothScale(50,40,TQ_ScaleFree);
TQPixmap pix(img);
itemTitle->setPixmap(0,pix);
}
itemTitle=(k9LvItemImport*)itemTitle->nextSibling();
@ -135,7 +135,7 @@ void k9Import::buttonUpdated(k9MenuButton *_button, const QImage &_image) {
void k9Import::lvDVDItemSelected (QListViewItem *_item) {
void k9Import::lvDVDItemSelected (TQListViewItem *_item) {
k9LvItemImport *item=(k9LvItemImport*)_item;
switch (_item->rtti()) {
@ -152,7 +152,7 @@ void k9Import::lvDVDItemSelected (QListViewItem *_item) {
}
}
void k9Import::setProgressWindow(QWidget *_widget) {
void k9Import::setProgressWindow(TQWidget *_widget) {
m_toolView=m_parent->setToolWindow(_widget,KDockWidget::DockRight,i18n("processing"),i18n("processing"));
m_dockWidget = m_parent->getVisibleDock();
m_parent->setActions( false);
@ -171,15 +171,15 @@ void k9Import::removeProgressWindow() {
}
void k9Import::execute() {
QString filename;
TQString filename;
k9Config config;
QString outputDir=config.getPrefOutput();
TQString outputDir=config.getPrefOutput();
if (cbOutputDev->currentItem() ==0) {
filename=KFileDialog::getSaveFileName (QDir::homeDirPath(),"*.iso", 0,i18n("Save image to disk"));
filename=KFileDialog::getSaveFileName (TQDir::homeDirPath(),"*.iso", 0,i18n("Save image to disk"));
if (filename =="")
return;
} else if (cbOutputDev->currentItem()==1) {
outputDir= KFileDialog::getExistingDirectory(QDir::homeDirPath());
outputDir= KFileDialog::getExistingDirectory(TQDir::homeDirPath());
if (outputDir=="")
return;
}
@ -218,7 +218,7 @@ void k9Import::execute() {
}
void k9Import::cbFormatActivated(const QString &_format) {
void k9Import::cbFormatActivated(const TQString &_format) {
if (_format == "PAL") {
m_newDVD.setFormat(k9NewDVD::PAL);
m_menuEdit->setFormat(k9MenuEdit::PAL);
@ -244,7 +244,7 @@ void k9Import::titleAdded() {
void k9Import::updateTotalTime() {
int total=m_newDVD.getTotalTime();
gsTotal->setValue(total/60);
QTime t(0,0,0);
TQTime t(0,0,0);
t=t.addSecs(total);
lTotal->setText(t.toString("hh:mm:ss"));
}

@ -14,7 +14,7 @@
#define K9IMPORT_H
#include "k9common.h"
#include <qlistview.h>
#include <tqlistview.h>
#include "k9copy.h"
#include "../k9author/import.h"
#include "../k9author/k9newdvd.h"
@ -25,23 +25,24 @@ class k9MenuButton;
class k9MenuEdit;
class k9Import : public import {
Q_OBJECT
TQ_OBJECT
private:
QListViewItem *m_root;
TQListViewItem *m_root;
k9NewDVD m_newDVD;
KMdiToolViewAccessor *m_toolView;
KDockWidget *m_dockWidget;
k9Copy *m_parent;
QPtrList <k9CdDrive> recorderList;
TQPtrList <k9CdDrive> recorderList;
k9CdDrives *drives;
k9MenuEdit *m_menuEdit;
public:
k9Import(QWidget* parent = 0, const char* name = 0,k9CdDrives *_drives=0 );
k9Import(TQWidget* tqparent = 0, const char* name = 0,k9CdDrives *_drives=0 );
~k9Import();
/*$PUBLIC_FUNCTIONS$*/
void init();
void execute();
QListViewItem* getRoot() const;
TQListViewItem* getRoot() const;
k9NewDVD *getNewDVD() {
return &m_newDVD;
}
@ -49,25 +50,25 @@ public:
public slots:
/*$PUBLIC_SLOTS$*/
void aviFileUpdated(k9AviFile *_aviFile);
void buttonUpdated(k9MenuButton *_button, const QImage &_image);
void buttonUpdated(k9MenuButton *_button, const TQImage &_image);
void setMenuEdit(k9MenuEdit* _value);
void setEnableCreate(bool _state);
void updateTotalTime();
void titleAdded();
protected:
/*$PROTECTED_FUNCTIONS$*/
void setProgressWindow(QWidget *_widget);
void setProgressWindow(TQWidget *_widget);
void removeProgressWindow();
void readDrives();
void addDrive (k9CdDrive *_drive);
protected slots:
/*$PROTECTED_SLOTS$*/
void lvDVDItemSelected (QListViewItem *);
void cbFormatActivated(const QString &_format);
void lvDVDItemSelected (TQListViewItem *);
void cbFormatActivated(const TQString &_format);
virtual void deviceAdded(k9CdDrive *_drive);
virtual void deviceRemoved(k9CdDrive *_drive);
virtual void volumeChanged(const QString &device,const QString &volumeName);
virtual void volumeChanged(const TQString &device,const TQString &volumeName);
signals:
void aviFileSelected(k9AviFile *_aviFile);

@ -18,8 +18,8 @@
#include "k9avifile.h"
#include "k9menuedit.h"
k9ImportFiles::k9ImportFiles(QWidget *parent, const char *name)
: KMdiMainFrm( parent, name ,KMdi::IDEAlMode )
k9ImportFiles::k9ImportFiles(TQWidget *tqparent, const char *name)
: KMdiMainFrm( tqparent, name ,KMdi::IDEAlMode )
{
this->setCaption(kapp->makeStdCaption(i18n("Create new DVD"),true));
m_k9Import=new k9Import(this);
@ -33,7 +33,7 @@ k9ImportFiles::k9ImportFiles(QWidget *parent, const char *name)
k9ChapterEdit *ch=new k9ChapterEdit(this);
addToolWindow(ch, KDockWidget::DockBottom, getMainDockWidget(),0,i18n("Chapter properties"),i18n("Chapter properties"));
connect(m_k9Import,SIGNAL(aviFileSelected(k9AviFile*)),ch,SLOT(setAviFile(k9AviFile*)));
connect(m_k9Import,TQT_SIGNAL(aviFileSelected(k9AviFile*)),ch,TQT_SLOT(setAviFile(k9AviFile*)));
m_k9NewTitle=new k9NewTitle(this);
m_k9NewTitle->setK9Import(m_k9Import);

@ -14,7 +14,7 @@
#include "k9common.h"
#include <qobject.h>
#include <tqobject.h>
#include <kmdidefines.h>
#include <kmdichildarea.h>
#include <kmdimainfrm.h>
@ -28,8 +28,9 @@ class k9NewTitle;
class k9ImportFiles : public KMdiMainFrm
{
Q_OBJECT
TQ_OBJECT
public:
k9ImportFiles(QWidget *parent = 0, const char *name = 0);
k9ImportFiles(TQWidget *tqparent = 0, const char *name = 0);
~k9ImportFiles();
private:

@ -12,8 +12,8 @@
#include "k9lvitemimport.h"
k9LvItemImport::k9LvItemImport( QListViewItem *parent,eObjectType _objectType)
: QListViewItem( parent) {
k9LvItemImport::k9LvItemImport( TQListViewItem *tqparent,eObjectType _objectType)
: TQListViewItem( tqparent) {
m_objectType=_objectType;
m_title=NULL;
m_aviFile=NULL;
@ -30,7 +30,7 @@ int k9LvItemImport::rtti () const {
}
}
int k9LvItemImport::compare(QListViewItem *i,int col,bool ascending) const {
int k9LvItemImport::compare(TQListViewItem *i,int col,bool ascending) const {
int res;
if (i->rtti()== 1001) {
k9LvItemImport *item2=(k9LvItemImport*)i;
@ -40,13 +40,13 @@ int k9LvItemImport::compare(QListViewItem *i,int col,bool ascending) const {
k9LvItemImport *item2=(k9LvItemImport*)i;
return this->getAviFile()->getNum() - item2->getAviFile()->getNum() ;
}
return QListViewItem::compare(i,col,ascending);
return TQListViewItem::compare(i,col,ascending);
}
void k9LvItemImport::setTitle(k9Title* _value) {
m_title = _value;
QPixmap pix(m_title->getButton()->getImage());
TQPixmap pix(m_title->getButton()->getImage());
setPixmap(0,pix);
}

@ -13,17 +13,17 @@
#define K9LVITEMIMPORT_H
#include "k9common.h"
#include <qlistview.h>
#include <tqlistview.h>
#include "k9avifile.h"
#include "k9title.h"
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9LvItemImport: public QListViewItem {
class k9LvItemImport: public TQListViewItem {
public:
enum eObjectType {ROOT,TITLE,CHAPTER};
k9LvItemImport( QListViewItem *parent,eObjectType _objectType);
k9LvItemImport( TQListViewItem *tqparent,eObjectType _objectType);
~k9LvItemImport();
virtual int rtti () const;
eObjectType getObjectType() { return m_objectType;};
@ -33,7 +33,7 @@ public:
void setTitle(k9Title* _value);
k9Title* getTitle() const { return m_title;}
virtual int compare (QListViewItem *i,int col,bool ascending) const;
virtual int compare (TQListViewItem *i,int col,bool ascending) const;
private:
eObjectType m_objectType;
k9AviFile *m_aviFile;

@ -12,20 +12,20 @@
#include "k9menu.h"
#include "k9menubutton.h"
#include "k9process.h"
#include <qpainter.h>
#include <qbitmap.h>
#include <tqpainter.h>
#include <tqbitmap.h>
#include <kapplication.h>
#include <qfile.h>
#include <qdom.h>
#include <tqfile.h>
#include <tqdom.h>
#include "k9tools.h"
k9Menu::k9Menu(QObject *parent, const char *name)
: QObject(parent, name),m_format(PAL) {
k9Menu::k9Menu(TQObject *tqparent, const char *name)
: TQObject(tqparent, name),m_format(PAL) {
m_buttons.setAutoDelete(false);
m_canvas=new QCanvas(this);
QPixmap pix(720,576);
pix.fill(Qt::black);
m_canvas->setBackgroundPixmap(pix);
m_canvas=new TQCanvas(this);
TQPixmap pix(720,576);
pix.fill(TQt::black);
m_canvas->tqsetBackgroundPixmap(pix);
m_startScript=m_startScript2=m_endScript="";
}
@ -46,48 +46,48 @@ k9MenuButton *k9Menu::addButton() {
void k9Menu::createMenus(QDomElement *_rootNode) {
void k9Menu::createMenus(TQDomElement *_rootNode) {
m_config=new k9Config();
int height=m_format==PAL?576:480;
QImage img;
TQImage img;
//create menu image
QCanvasItemList l=m_canvas->allItems();
for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
if ( (*it)->rtti() > 1001 || (*it)->rtti()==QCanvasItem::Rtti_Rectangle )
TQCanvasItemList l=m_canvas->allItems();
for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
if ( (*it)->rtti() > 1001 || (*it)->rtti()==TQCanvasItem::Rtti_Rectangle )
(*it)->hide();
}
QPixmap pixbg(720,height);
QPainter pbg(&pixbg);
TQPixmap pixbg(720,height);
TQPainter pbg(&pixbg);
m_canvas->resize(720,height);
m_canvas->update();
m_canvas->drawArea(QRect(0,0,720,height),&pbg);
m_canvas->drawArea(TQRect(0,0,720,height),&pbg);
//create the hilite picture
int lineWidth=2;
img.create(720,height,8,3,QImage::IgnoreEndian);
QPixmap pixhi;
img.create(720,height,8,3,TQImage::IgnoreEndian);
TQPixmap pixhi;
pixhi.convertFromImage(img,0);
pixhi.fill(Qt::white);
QPainter phi(&pixhi);
QPen penhi;
pixhi.fill(TQt::white);
TQPainter phi(&pixhi);
TQPen penhi;
penhi.setColor(m_config->getPrefButtonHiliteColor());
penhi.setWidth(lineWidth*2);
phi.setPen(penhi);
phi.setBrush(Qt::NoBrush);
//create the hilite mask
QBitmap mask(720,height);
mask.fill(Qt::color0);
QPainter pmk(&mask);
QPen penmk;
penmk.setColor(Qt::color1);
phi.setBrush(TQt::NoBrush);
//create the hilite tqmask
TQBitmap tqmask(720,height);
tqmask.fill(TQt::color0);
TQPainter pmk(&tqmask);
TQPen penmk;
penmk.setColor(TQt::color1);
penmk.setWidth(lineWidth*2);
pmk.setPen(penmk);
pmk.setBrush(Qt::NoBrush);
pmk.setBrush(TQt::NoBrush);
//draw buttons
for (k9MenuButton *button=m_buttons.first();button;button=m_buttons.next()) {
@ -99,14 +99,14 @@ void k9Menu::createMenus(QDomElement *_rootNode) {
pbg.end();
phi.end();
pmk.end();
pixhi.setMask(mask);
pixhi.setMask(tqmask);
//save menu image
QString bgFileName=m_workDir+KApplication::randomString(8)+".jpg";
QString hiFileName=m_workDir+KApplication::randomString(8)+".png";
QString m2vFileName= m_workDir+KApplication::randomString(8)+".m2v";
QString mpaFileName= m_workDir+KApplication::randomString(8)+".m2v";
QString mpgFileName= m_workDir+KApplication::randomString(8)+".mpg";
TQString bgFileName=m_workDir+KApplication::randomString(8)+".jpg";
TQString hiFileName=m_workDir+KApplication::randomString(8)+".png";
TQString m2vFileName= m_workDir+KApplication::randomString(8)+".m2v";
TQString mpaFileName= m_workDir+KApplication::randomString(8)+".m2v";
TQString mpgFileName= m_workDir+KApplication::randomString(8)+".mpg";
pixbg.save(bgFileName,"JPEG",-1);
pixhi.save(hiFileName,"PNG",-1);
@ -117,17 +117,17 @@ void k9Menu::createMenus(QDomElement *_rootNode) {
spumux(hiFileName,mpgFileName);
appendMenu(_rootNode);
// mask.save(m_workDir+"/mask.bmp","BMP",-1);
// tqmask.save(m_workDir+"/tqmask.bmp","BMP",-1);
QFile::remove(bgFileName);
QFile::remove(m2vFileName);
QFile::remove(mpaFileName);
QFile::remove(mpgFileName);
QFile::remove(hiFileName);
TQFile::remove(bgFileName);
TQFile::remove(m2vFileName);
TQFile::remove(mpaFileName);
TQFile::remove(mpgFileName);
TQFile::remove(hiFileName);
delete m_config;
}
void k9Menu::convertJpegToMpeg(const QString &_imageJpg,const QString &_imageMpg) {
void k9Menu::convertJpegToMpeg(const TQString &_imageJpg,const TQString &_imageMpg) {
k9Process *process=new k9Process(0,0);
process->setWorkingDirectory(m_workDir);
process->setUseShell(true);
@ -146,7 +146,7 @@ void k9Menu::convertJpegToMpeg(const QString &_imageJpg,const QString &_imageMpg
qDebug(process->debug().latin1());
}
void k9Menu::createAudio(const QString & _audioFile) {
void k9Menu::createAudio(const TQString & _audioFile) {
k9Process *process=new k9Process(0,0);
process->setWorkingDirectory(m_workDir);
process->setUseShell(true);
@ -161,7 +161,7 @@ void k9Menu::createAudio(const QString & _audioFile) {
qDebug("error creating audio stream");
}
}
void k9Menu::multiplex(const QString &_audio, const QString &_video, const QString _result) {
void k9Menu::multiplex(const TQString &_audio, const TQString &_video, const TQString _result) {
k9Process *process=new k9Process(0,0);
process->setWorkingDirectory(m_workDir);
process->setUseShell(true);
@ -173,12 +173,12 @@ void k9Menu::multiplex(const QString &_audio, const QString &_video, const QStri
}
}
void k9Menu::spumux(const QString &_hiFileName,const QString &_mpgFileName) {
QDomElement stream,spu;
void k9Menu::spumux(const TQString &_hiFileName,const TQString &_mpgFileName) {
TQDomElement stream,spu;
QDomDocument xml;
TQDomDocument xml;
QDomElement root = xml.createElement( "subpictures" );
TQDomElement root = xml.createElement( "subpictures" );
xml.appendChild( root );
stream=xml.createElement("stream");
@ -200,20 +200,20 @@ void k9Menu::spumux(const QString &_hiFileName,const QString &_mpgFileName) {
int i=1;
for (k9MenuButton *button=m_buttons.first();button;button=m_buttons.next()) {
QDomElement eButton = xml.createElement("button");
TQDomElement eButton = xml.createElement("button");
spu.appendChild(eButton);
eButton.setAttribute("name",QString("button%1").arg(i));
eButton.setAttribute("x0", QString::number(button->getLeft()));
eButton.setAttribute("y0",QString::number(button->getTop()));
eButton.setAttribute("x1",QString::number(button->getLeft()+button->getWidth()));
eButton.setAttribute("y1",QString::number(button->getTop()+button->getHeight()));
eButton.setAttribute("name",TQString("button%1").tqarg(i));
eButton.setAttribute("x0", TQString::number(button->getLeft()));
eButton.setAttribute("y0",TQString::number(button->getTop()));
eButton.setAttribute("x1",TQString::number(button->getLeft()+button->getWidth()));
eButton.setAttribute("y1",TQString::number(button->getTop()+button->getHeight()));
i++;
}
QString spuFileName(m_workDir + KApplication::randomString(8)+ ".xml");
QFile file( spuFileName );
TQString spuFileName(m_workDir + KApplication::randomString(8)+ ".xml");
TQFile file( spuFileName );
if ( file.open( IO_WriteOnly ) ) {
QTextStream stream( &file );
TQTextStream stream( &file );
xml.save(stream,1);
file.close();
}
@ -233,10 +233,10 @@ void k9Menu::spumux(const QString &_hiFileName,const QString &_mpgFileName) {
file.remove();
}
void k9Menu::appendMenu(QDomElement *_rootNode) {
QDomDocument doc=_rootNode->ownerDocument();
QDomNodeList l=_rootNode->elementsByTagName("menus");
QDomNode menus;
void k9Menu::appendMenu(TQDomElement *_rootNode) {
TQDomDocument doc=_rootNode->ownerDocument();
TQDomNodeList l=_rootNode->elementsByTagName("menus");
TQDomNode menus;
if (l.count()==0) {
menus=doc.createElement("menus");
_rootNode->appendChild(menus);
@ -244,36 +244,36 @@ void k9Menu::appendMenu(QDomElement *_rootNode) {
menus=l.item(0);
}
QDomElement pgc=doc.createElement("pgc");
TQDomElement pgc=doc.createElement("pgc");
menus.appendChild(pgc);
QDomElement pre=doc.createElement("pre");
TQDomElement pre=doc.createElement("pre");
pgc.appendChild(pre);
QDomText txt=doc.createTextNode(m_startScript +m_startScript2);
TQDomText txt=doc.createTextNode(m_startScript +m_startScript2);
pre.appendChild(txt);
QDomElement vob=doc.createElement("vob");
TQDomElement vob=doc.createElement("vob");
pgc.appendChild(vob);
vob.setAttribute("file",m_menuFileName);
vob.setAttribute("pause","inf");
int i=1;
for (k9MenuButton *button=m_buttons.first();button;button=m_buttons.next()) {
QDomElement eButton = doc.createElement("button");
TQDomElement eButton = doc.createElement("button");
pgc.appendChild(eButton);
QDomText eButtonTxt=doc.createTextNode(button->getScript());
TQDomText eButtonTxt=doc.createTextNode(button->getScript());
eButton.appendChild(eButtonTxt);
eButton.setAttribute("name",QString("button%1").arg(i));
eButton.setAttribute("name",TQString("button%1").tqarg(i));
i++;
}
}
QString k9Menu::getWorkDir() const {
TQString k9Menu::getWorkDir() const {
return m_workDir;
}
void k9Menu::setWorkDir(const QString& _value) {
void k9Menu::setWorkDir(const TQString& _value) {
m_workDir = _value;
}
@ -283,51 +283,51 @@ void k9Menu::setFormat(const eFormat& _value) {
}
QString k9Menu::getMenuFileName() const {
TQString k9Menu::getMenuFileName() const {
return m_menuFileName;
}
void k9Menu::setMenuFileName(const QString& _value) {
void k9Menu::setMenuFileName(const TQString& _value) {
m_menuFileName = _value;
}
QCanvas* k9Menu::getCanvas() const {
TQCanvas* k9Menu::getCanvas() const {
return m_canvas;
}
void k9Menu::setCanvas(QCanvas* _value) {
void k9Menu::setCanvas(TQCanvas* _value) {
m_canvas = _value;
}
void k9Menu::setStartScript(const QString &_value) {
void k9Menu::setStartScript(const TQString &_value) {
m_startScript=_value;
}
QString k9Menu::getStartScript() const {
TQString k9Menu::getStartScript() const {
return m_startScript;
}
void k9Menu::setStartScript2(const QString &_value) {
void k9Menu::setStartScript2(const TQString &_value) {
m_startScript2=_value;
}
QString k9Menu::getStartScript2() const {
TQString k9Menu::getStartScript2() const {
return m_startScript2;
}
QString k9Menu::getEndScript() const {
TQString k9Menu::getEndScript() const {
return m_endScript;
}
void k9Menu::setEndScript(const QString& _value) {
void k9Menu::setEndScript(const TQString& _value) {
m_endScript = _value;
}

@ -14,58 +14,59 @@
#include "k9common.h"
#include "k9config.h"
#include <qobject.h>
#include <qptrlist.h>
#include <qimage.h>
#include <qfont.h>
#include <qdom.h>
#include <qcanvas.h>
#include <tqobject.h>
#include <tqptrlist.h>
#include <tqimage.h>
#include <tqfont.h>
#include <tqdom.h>
#include <tqcanvas.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9MenuButton;
class k9Menu : public QObject {
class k9Menu : public TQObject {
Q_OBJECT
TQ_OBJECT
public slots:
void setStartScript(const QString &);
void setStartScript2(const QString &);
void setEndScript(const QString& _value);
void setStartScript(const TQString &);
void setStartScript2(const TQString &);
void setEndScript(const TQString& _value);
public:
enum eFormat {
PAL=1,NTSC=2
};
k9Menu(QObject *parent = 0, const char *name = 0);
k9Menu(TQObject *tqparent = 0, const char *name = 0);
~k9Menu();
k9MenuButton *addButton();
void createMenus(QDomElement *_rootNode);
void setWorkDir(const QString& _value);
QString getWorkDir() const;
void createMenus(TQDomElement *_rootNode);
void setWorkDir(const TQString& _value);
TQString getWorkDir() const;
void setFormat(const eFormat& _value);
void setMenuFileName(const QString& _value);
QString getMenuFileName() const;
void setMenuFileName(const TQString& _value);
TQString getMenuFileName() const;
void setCanvas(QCanvas* _value);
QCanvas* getCanvas() const;
void setCanvas(TQCanvas* _value);
TQCanvas* getCanvas() const;
QString getStartScript() const;
QString getEndScript() const;
QString getStartScript2() const;
TQString getStartScript() const;
TQString getEndScript() const;
TQString getStartScript2() const;
private:
QPtrList <k9MenuButton> m_buttons;
QString m_workDir;
QString m_menuFileName;
TQPtrList <k9MenuButton> m_buttons;
TQString m_workDir;
TQString m_menuFileName;
eFormat m_format;
QCanvas *m_canvas;
QString m_startScript;
QString m_startScript2;
QString m_endScript;
TQCanvas *m_canvas;
TQString m_startScript;
TQString m_startScript2;
TQString m_endScript;
k9Config *m_config;
void convertJpegToMpeg(const QString &_imageJpg,const QString &_imageMpg) ;
void createAudio(const QString & _audioFile);
void multiplex(const QString &_audio, const QString &_video, const QString _result);
void spumux(const QString &_hiFileName,const QString &_mpgFileName);
void appendMenu(QDomElement *_rootNode);
void convertJpegToMpeg(const TQString &_imageJpg,const TQString &_imageMpg) ;
void createAudio(const TQString & _audioFile);
void multiplex(const TQString &_audio, const TQString &_video, const TQString _result);
void spumux(const TQString &_hiFileName,const TQString &_mpgFileName);
void appendMenu(TQDomElement *_rootNode);
};
#endif

@ -10,11 +10,11 @@
//
//
#include "k9menubutton.h"
#include <qpainter.h>
#include <qwmatrix.h>
#include <qbitmap.h>
#include <tqpainter.h>
#include <tqwmatrix.h>
#include <tqbitmap.h>
k9CanvasSprite::k9CanvasSprite (QCanvasPixmapArray *a,QCanvas *canvas,k9MenuButton *button) : QCanvasSprite(a,canvas) {
k9CanvasSprite::k9CanvasSprite (TQCanvasPixmapArray *a,TQCanvas *canvas,k9MenuButton *button) : TQCanvasSprite(a,canvas) {
m_button=button;
}
@ -99,14 +99,14 @@ void k9MenuButton::update() {
emit sigsetHeight(getHeight());
}
k9MenuButton::k9MenuButton(QCanvas *parent, const char *name)
: QObject(parent, name),m_width(0),m_height(0)
k9MenuButton::k9MenuButton(TQCanvas *tqparent, const char *name)
: TQObject(tqparent, name),m_width(0),m_height(0)
{
m_canvas=parent;
m_canvas=tqparent;
m_sprite=NULL;
m_pixmap=NULL;
m_text=new QCanvasText("",m_canvas);
m_text->setColor(Qt::yellow);
m_text=new TQCanvasText("",m_canvas);
m_text->setColor(TQt::yellow);
}
@ -115,31 +115,31 @@ k9MenuButton::~k9MenuButton()
{
}
void k9MenuButton::setImage(const QImage &_image) {
void k9MenuButton::setImage(const TQImage &_image) {
m_image=_image;
emit sigsetImage(this,_image);
loadImage();
}
void k9MenuButton::setImage(const QString &_fileName){
void k9MenuButton::setImage(const TQString &_fileName){
m_image.load(_fileName);
emit sigsetImage(this,m_image);
loadImage();
}
void k9MenuButton::loadImage() {
QImage tmp=m_image.smoothScale(m_width,m_height);
TQImage tmp=m_image.smoothScale(m_width,m_height);
int x=0,y=0;
if (m_sprite) {
x=m_sprite->x();
y=m_sprite->y();
delete m_sprite;
}
QPixmap pix;
TQPixmap pix;
pix.convertFromImage(tmp);
m_pixmap=new QCanvasPixmap(pix,QPoint(0,0));
m_pixmap=new TQCanvasPixmap(pix,TQPoint(0,0));
m_pixmapArray.setImage(0,m_pixmap);
@ -194,35 +194,35 @@ int k9MenuButton::getLeft() {
return m_sprite->x();
}
void k9MenuButton::setFont(QFont _font) {
void k9MenuButton::setFont(TQFont _font) {
m_text->setFont(_font);
update();
m_canvas->update();
emit sigsetFont(_font);
}
QFont k9MenuButton::getFont() {
TQFont k9MenuButton::getFont() {
return m_text->font();
}
void k9MenuButton::setColor(QColor _color) {
void k9MenuButton::setColor(TQColor _color) {
m_text->setColor(_color);
m_canvas->update();
emit sigsetColor(_color);
}
QColor k9MenuButton::getColor() {
TQColor k9MenuButton::getColor() {
return m_text->color();
}
void k9MenuButton::setText(QString _text) {
void k9MenuButton::setText(TQString _text) {
m_text->setText(_text);
update();
m_canvas->update();
emit sigsetText(_text);
}
QString k9MenuButton::getText() {
TQString k9MenuButton::getText() {
return m_text->text();
}
@ -256,17 +256,17 @@ void k9MenuButton::setTextPosition(const eTextPosition& _value) {
}
QImage k9MenuButton::getImage() const {
TQImage k9MenuButton::getImage() const {
return m_image;
}
QString k9MenuButton::getScript() const {
TQString k9MenuButton::getScript() const {
return m_script;
}
void k9MenuButton::setScript(const QString& _value) {
void k9MenuButton::setScript(const TQString& _value) {
m_script = _value;
}

@ -12,18 +12,18 @@
#ifndef K9MENUBUTTON_H
#define K9MENUBUTTON_H
#include <qobject.h>
#include <qpixmap.h>
#include <qimage.h>
#include <qcanvas.h>
#include <tqobject.h>
#include <tqpixmap.h>
#include <tqimage.h>
#include <tqcanvas.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9MenuButton;
class k9CanvasSprite : public QCanvasSprite {
class k9CanvasSprite : public TQCanvasSprite {
public:
k9CanvasSprite (QCanvasPixmapArray *a,QCanvas *canvas,k9MenuButton *button);
k9CanvasSprite (TQCanvasPixmapArray *a,TQCanvas *canvas,k9MenuButton *button);
virtual int rtti() const {
return 1000;
}
@ -36,12 +36,13 @@ private:
};
class k9MenuButton : public QObject {
class k9MenuButton : public TQObject {
Q_OBJECT
TQ_OBJECT
public:
enum eTextPosition {BOTTOM=1,RIGHT=2};
k9MenuButton(QCanvas *parent = 0, const char *name = 0);
k9MenuButton(TQCanvas *tqparent = 0, const char *name = 0);
~k9MenuButton();
void setWidth(int _value,bool _reload=true);
@ -50,12 +51,12 @@ public:
int getHeight();
void setTop(int _value,bool _reload=true);
void setLeft(int _value,bool _reload=true);
void setFont(QFont _font);
QFont getFont();
void setColor(QColor _color);
QColor getColor();
void setText(QString _text);
QString getText();
void setFont(TQFont _font);
TQFont getFont();
void setColor(TQColor _color);
TQColor getColor();
void setText(TQString _text);
TQString getText();
void select(bool);
int getTop();
int getLeft();
@ -63,16 +64,16 @@ public:
void moveBy(int x,int y,bool _reload=true);
void update();
public slots:
void setImage(const QImage &_image);
void setImage(const QString &_fileName);
void setImage(const TQImage &_image);
void setImage(const TQString &_fileName);
void setTextPosition(const eTextPosition& _value);
eTextPosition getTextPosition() const;
QImage getImage() const;
TQImage getImage() const;
void setScript(const QString& _value);
QString getScript() const;
void setScript(const TQString& _value);
TQString getScript() const;
void setAngle(int _value);
int getAngle() const;
@ -87,18 +88,18 @@ public slots:
private:
QCanvas *m_canvas;
QCanvasPixmapArray m_pixmapArray;
QCanvasPixmap *m_pixmap;
TQCanvas *m_canvas;
TQCanvasPixmapArray m_pixmapArray;
TQCanvasPixmap *m_pixmap;
k9CanvasSprite *m_sprite;
int m_num;
QCanvasText *m_text;
QImage m_image;
TQCanvasText *m_text;
TQImage m_image;
int m_width;
int m_height;
int m_angle;
eTextPosition m_textPosition;
QString m_script;
TQString m_script;
void loadImage();
signals:
void sigsetTop(int);
@ -106,10 +107,10 @@ signals:
void sigsetWidth(int);
void sigsetHeight(int);
void sigsetFont(const QFont &);
void sigsetColor(const QColor &);
void sigsetImage(k9MenuButton *,const QImage &);
void sigsetText(const QString &);
void sigsetFont(const TQFont &);
void sigsetColor(const TQColor &);
void sigsetImage(k9MenuButton *,const TQImage &);
void sigsetText(const TQString &);
void sigsetTextPosition(int);
};

@ -16,37 +16,37 @@
#include "k9menu.h"
#include "k9title.h"
#include "k9newdvd.h"
#include <qwmatrix.h>
#include <qlayout.h>
#include <tqwmatrix.h>
#include <tqlayout.h>
#include <kfontdialog.h>
#include "k9menubutton.h"
#include <kurlrequester.h>
#include <kcolorbutton.h>
#include <qcombobox.h>
#include <tqcombobox.h>
#include <klocale.h>
#include <qlabel.h>
#include <tqlabel.h>
#include <kiconloader.h>
k9MenuEdit::k9MenuEdit(QWidget* parent, const char* name,QCanvas *_canvas)
: menuEdit(parent,name) {
k9MenuEdit::k9MenuEdit(TQWidget* tqparent, const char* name,TQCanvas *_canvas)
: menuEdit(tqparent,name) {
bAddText->setPixmap (SmallIcon("add"));
m_noUpdate=false;
m_canvas=_canvas;
m_format=PAL;
m_imageHeight=576;
QGridLayout *grid=new QGridLayout(frame,1,1);
TQGridLayout *grid=new TQGridLayout(frame,1,1);
m_menuEditor=new k9MenuEditor(*m_canvas,frame);
grid->addWidget(m_menuEditor,0,0);
m_canvas->resize(720,m_imageHeight);
m_text=NULL;
m_menuEditor->setMenu(this);
connect(m_menuEditor,SIGNAL(itemSelected()),this,SLOT(itemSelected()));
connect(m_menuEditor,TQT_SIGNAL(itemSelected()),this,TQT_SLOT(itemSelected()));
cbPosTitle->setEnabled(false);
}
void k9MenuEdit::updateTextPos(const QPoint &_point) {
void k9MenuEdit::updateTextPos(const TQPoint &_point) {
emit updatePos(_point);
}
@ -64,8 +64,8 @@ void k9MenuEdit::itemSelected() {
urBackground->setEnabled(true);
m_canvas->update();
} else if (m_menuEditor->getMoving()) {
if (m_menuEditor->getMoving()->rtti()==QCanvasItem::Rtti_Text) {
m_text=(QCanvasText*)m_menuEditor->getMoving();
if (m_menuEditor->getMoving()->rtti()==TQCanvasItem::Rtti_Text) {
m_text=(TQCanvasText*)m_menuEditor->getMoving();
leTitle->setText(m_text->text());
cbColor->setColor(m_text->color());
cbPosTitle->setEnabled(false);
@ -90,17 +90,17 @@ k9MenuEdit::~k9MenuEdit() {}
void k9MenuEdit::bFontClick() {
if (m_menuEditor->getSelected()) {
k9MenuButton *b=m_menuEditor->getSelected();
QFont myFont(b->getFont());
TQFont myFont(b->getFont());
int result = KFontDialog::getFont( myFont );
if ( result == KFontDialog::Accepted && m_menuEditor->getSelected() ) {
QPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
TQPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
for (b=l->first();b;b=l->next()) {
b->setFont(myFont);
}
}
} else {
if (m_text) {
QFont myFont(m_text->font());
TQFont myFont(m_text->font());
int result = KFontDialog::getFont( myFont );
if ( result == KFontDialog::Accepted )
setFont(myFont);
@ -109,27 +109,27 @@ void k9MenuEdit::bFontClick() {
}
}
void k9MenuEdit::urBackgroundSelected(const QString &_fileName) {
void k9MenuEdit::urBackgroundSelected(const TQString &_fileName) {
if ( m_menuEditor->getSelected() ) {
//If a button is selected, set the button image ...
k9MenuButton *b=(k9MenuButton*)m_menuEditor->getSelected();
QImage img;
TQImage img;
img.load(_fileName);
b->setImage(img);
} else {
//...otherwise, set the menu background image
QImage img;
TQImage img;
img.load(_fileName);
img=img.smoothScale(720,m_imageHeight,QImage::ScaleMax);
img=img.smoothScale(720,m_imageHeight,TQ_ScaleMax);
setBackgroundImage(img);
}
}
void k9MenuEdit::cbColorChanged(const QColor &_color) {
void k9MenuEdit::cbColorChanged(const TQColor &_color) {
if (m_noUpdate)
return;
if ( m_menuEditor->getSelected() ) {
QPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
TQPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
for (k9MenuButton *b=l->first();b;b=l->next()) {
b->setColor(_color);
}
@ -144,27 +144,27 @@ void k9MenuEdit::cbPosTitleActivated(int _value) {
if (m_noUpdate)
return;
if ( m_menuEditor->getSelected() ) {
QPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
TQPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
for (k9MenuButton *b=l->first();b;b=l->next()) {
b->setTextPosition((k9MenuButton::eTextPosition)(_value+1));
}
}
}
void k9MenuEdit::setBackgroundImage(const QImage &_image) {
void k9MenuEdit::setBackgroundImage(const TQImage &_image) {
m_background=_image;
m_canvas->setBackgroundPixmap(QPixmap(_image));
m_canvas->tqsetBackgroundPixmap(TQPixmap(_image));
emit backgroundImageChanged(_image);
}
void k9MenuEdit::leTitleChanged(const QString &_value) {
void k9MenuEdit::leTitleChanged(const TQString &_value) {
if (m_noUpdate)
return;
if ( m_menuEditor->getSelected() ) {
QPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
TQPtrList <k9MenuButton> *l=m_menuEditor->getSelection();
for (k9MenuButton *b=l->first();b;b=l->next()) {
QString c=_value;
b->setText(c.replace("%n",QString::number(b->getNum())));
TQString c=_value;
b->setText(c.tqreplace("%n",TQString::number(b->getNum())));
}
//m_menuEditor->getSelected()->setText(_value);
} else {
@ -178,28 +178,28 @@ void k9MenuEdit::leTitleChanged(const QString &_value) {
void k9MenuEdit::setText(const QString &_value) {
void k9MenuEdit::setText(const TQString &_value) {
if (m_text)
m_text->setText(_value);
m_canvas->update();
emit textChanged(_value);
}
void k9MenuEdit::setFont(const QFont &_value) {
void k9MenuEdit::setFont(const TQFont &_value) {
if (m_text)
m_text->setFont(_value);
m_canvas->update();
emit textFontChanged(_value);
}
void k9MenuEdit::setColor(const QColor &_value) {
void k9MenuEdit::setColor(const TQColor &_value) {
if (m_text)
m_text->setColor(_value);
m_canvas->update();
emit textColorChanged(_value);
}
QCanvasText* k9MenuEdit::getText() const {
TQCanvasText* k9MenuEdit::getText() const {
return m_text;
}
@ -215,20 +215,20 @@ void k9MenuEdit::setFormat(const eFormat& _value) {
m_imageHeight=480;
else
m_imageHeight=576;
QPixmap pix=m_canvas->backgroundPixmap();
QImage img=pix.convertToImage().smoothScale(720,m_imageHeight);
TQPixmap pix=m_canvas->backgroundPixmap();
TQImage img=pix.convertToImage().smoothScale(720,m_imageHeight);
m_canvas->resize(720,m_imageHeight);
m_menuEditor->setMaximumSize(QSize(724,m_imageHeight+4));
m_canvas->setBackgroundPixmap(QPixmap(img));
m_menuEditor->setMaximumSize(TQSize(724,m_imageHeight+4));
m_canvas->tqsetBackgroundPixmap(TQPixmap(img));
}
QCanvas *k9MenuEdit::getCanvas() {
TQCanvas *k9MenuEdit::getCanvas() {
return m_canvas;
}
void k9MenuEdit::setCanvas(QCanvas* _value) {
void k9MenuEdit::setCanvas(TQCanvas* _value) {
m_canvas = _value;
m_text=NULL;
m_menuEditor->setCanvas(_value);
@ -238,11 +238,11 @@ void k9MenuEdit::setCanvas(QCanvas* _value) {
}
void k9MenuEdit::titleSelected(k9Title *_title) {
disconnect (this,SIGNAL(startScriptChanged(const QString&)),0,0);
disconnect (this,SIGNAL(endScriptChanged(const QString&)),0,0);
disconnect (this,TQT_SIGNAL(startScriptChanged(const TQString&)),0,0);
disconnect (this,TQT_SIGNAL(endScriptChanged(const TQString&)),0,0);
cbEnd->setEnabled(true);
m_menuEditor->clearSelection();
lTitle->setText(i18n("Title %1 Menu").arg(_title->getNum()+1));
lTitle->setText(i18n("Title %1 Menu").tqarg(_title->getNum()+1));
setCanvas(_title->getMenu()->getCanvas());
m_menuType=TITLEMENU;
cbStart->clear();
@ -257,30 +257,30 @@ void k9MenuEdit::titleSelected(k9Title *_title) {
m_startScripts << "if (g1==0) {g1=1; jump title 1 chapter 1;}";
if (_title->getMenu()->getStartScript() !="")
cbStart->setCurrentItem(cbStart->count()-1);
connect (this,SIGNAL(startScriptChanged(const QString&)),_title->getMenu(),SLOT(setStartScript(const QString&)));
connect (this,TQT_SIGNAL(startScriptChanged(const TQString&)),_title->getMenu(),TQT_SLOT(setStartScript(const TQString&)));
cbEnd->insertItem(i18n("Play Root Menu"));
m_endScripts << "g6=0; call vmgm menu;";
cbEnd->insertItem(i18n("Play Title Menu"));
m_endScripts << "call menu;";
k9NewDVD *newDVD=(k9NewDVD*)_title->parent() ;
k9NewDVD *newDVD=(k9NewDVD*)_title->tqparent() ;
k9NewDVDItems *items=newDVD->getTitles();
for (k9Title *title=items->first();title;title=items->next()) {
cbEnd->insertItem(i18n("Play Title %1").arg(title->getNum()+1));
QString script=QString("g6=%1; call vmgm menu;" ).arg(title->getNum()+1);
cbEnd->insertItem(i18n("Play Title %1").tqarg(title->getNum()+1));
TQString script=TQString("g6=%1; call vmgm menu;" ).tqarg(title->getNum()+1);
m_endScripts << script;
}
for (int i=0;i<m_endScripts.count();i++ ){
if (_title->getMenu()->getEndScript()== *(m_endScripts.at(i)))
cbEnd->setCurrentItem(i);
}
connect (this,SIGNAL(endScriptChanged(const QString&)),_title->getMenu(),SLOT(setEndScript(const QString&)));
connect (this,TQT_SIGNAL(endScriptChanged(const TQString&)),_title->getMenu(),TQT_SLOT(setEndScript(const TQString&)));
}
void k9MenuEdit::rootSelected(k9NewDVD *_newDVD) {
disconnect (this,SIGNAL(startScriptChanged(const QString&)),0,0);
disconnect (this,SIGNAL(endScriptChanged(const QString&)),0,0);
disconnect (this,TQT_SIGNAL(startScriptChanged(const TQString&)),0,0);
disconnect (this,TQT_SIGNAL(endScriptChanged(const TQString&)),0,0);
cbEnd->setEnabled(false);
m_menuEditor->clearSelection();
lTitle->setText(i18n("Root Menu"));
@ -292,18 +292,18 @@ void k9MenuEdit::rootSelected(k9NewDVD *_newDVD) {
m_startScripts << "";
k9NewDVDItems *items=_newDVD->getTitles();
for (k9Title *title=items->first();title;title=items->next()) {
cbStart->insertItem(i18n("Play Title %1").arg(title->getNum()+1));
// QString script=QString("if (g5==0) {g5=1; jump title %1;}" ).arg(title->getNum()+1);
QString script=QString("g6=%1;" ).arg(title->getNum()+1);
cbStart->insertItem(i18n("Play Title %1").tqarg(title->getNum()+1));
// TQString script=TQString("if (g5==0) {g5=1; jump title %1;}" ).tqarg(title->getNum()+1);
TQString script=TQString("g6=%1;" ).tqarg(title->getNum()+1);
m_startScripts << script;
if (script==_newDVD->getRootMenu()->getStartScript())
cbStart->setCurrentItem(cbStart->count()-1);
}
connect (this,SIGNAL(startScriptChanged(const QString&)),_newDVD->getRootMenu(),SLOT(setStartScript(const QString&)));
connect (this,TQT_SIGNAL(startScriptChanged(const TQString&)),_newDVD->getRootMenu(),TQT_SLOT(setStartScript(const TQString&)));
}
void k9MenuEdit::bAddTextClick() {
m_text=new QCanvasText(m_canvas);
m_text=new TQCanvasText(m_canvas);
m_text->show();
m_menuEditor->setMoving(m_text);
setText(leTitle->text());

@ -14,8 +14,8 @@
#define K9MENUEDIT_H
#include "../k9author/menuEdit.h"
#include <qcanvas.h>
#include <qimage.h>
#include <tqcanvas.h>
#include <tqimage.h>
class k9MenuButton;
class k9MenuEdit;
@ -26,59 +26,60 @@ class k9MenuEditor;
class k9MenuEdit : public menuEdit {
Q_OBJECT
TQ_OBJECT
public:
enum eFormat {PAL=1,NTSC=2};
enum eMenuType {ROOTMENU,TITLEMENU};
k9MenuEdit(QWidget* parent = 0, const char* name = 0,QCanvas *_canvas=0);
k9MenuEdit(TQWidget* tqparent = 0, const char* name = 0,TQCanvas *_canvas=0);
~k9MenuEdit();
/*$PUBLIC_FUNCTIONS$*/
void setBackgroundImage(const QImage &_image);
void setText(const QString &_value);
void setFont(const QFont &_value);
void setColor(const QColor &_value);
void updateTextPos(const QPoint &_point);
void setBackgroundImage(const TQImage &_image);
void setText(const TQString &_value);
void setFont(const TQFont &_value);
void setColor(const TQColor &_value);
void updateTextPos(const TQPoint &_point);
public slots:
/*$PUBLIC_SLOTS$*/
void itemSelected();
QCanvasText* getText() const;
TQCanvasText* getText() const;
void setFormat(const eFormat& _value);
k9MenuEdit::eFormat getFormat() const;
QCanvas *getCanvas();
void setCanvas(QCanvas* _value);
TQCanvas *getCanvas();
void setCanvas(TQCanvas* _value);
void titleSelected(k9Title *);
void rootSelected(k9NewDVD *);
protected:
/*$PROTECTED_FUNCTIONS$*/
virtual void bFontClick();
virtual void urBackgroundSelected(const QString &_fileName);
virtual void cbColorChanged(const QColor &_color);
virtual void leTitleChanged(const QString &_value);
virtual void urBackgroundSelected(const TQString &_fileName);
virtual void cbColorChanged(const TQColor &_color);
virtual void leTitleChanged(const TQString &_value);
virtual void cbPosTitleActivated(int _value);
virtual void bAddTextClick();
virtual void cbStartActivated (int _value);
virtual void cbEndActivated (int _value);
k9MenuEditor *m_menuEditor;
QCanvas *m_canvas;
QImage m_background;
QCanvasText *m_text;
TQCanvas *m_canvas;
TQImage m_background;
TQCanvasText *m_text;
eFormat m_format;
int m_imageHeight;
eMenuType m_menuType;
QStringList m_startScripts;
QStringList m_endScripts;
TQStringList m_startScripts;
TQStringList m_endScripts;
bool m_noUpdate;
protected slots:
/*$PROTECTED_SLOTS$*/
signals:
void backgroundImageChanged(const QImage &);
void textChanged(const QString&);
void startScriptChanged(const QString&);
void endScriptChanged(const QString&);
void textColorChanged(const QColor &);
void textFontChanged(const QFont&);
void updatePos(const QPoint &);
void backgroundImageChanged(const TQImage &);
void textChanged(const TQString&);
void startScriptChanged(const TQString&);
void endScriptChanged(const TQString&);
void textColorChanged(const TQColor &);
void textFontChanged(const TQFont&);
void updatePos(const TQPoint &);
};
#endif

@ -13,34 +13,34 @@
#include "k9menubutton.h"
#include "k9menuedit.h"
#include "k9canvasselection.h"
#include <qwmatrix.h>
#include <qcursor.h>
#include <tqwmatrix.h>
#include <tqcursor.h>
#include <kcursor.h>
k9MenuEditor::k9MenuEditor(
QCanvas& c, QWidget* parent,
TQCanvas& c, TQWidget* tqparent,
const char* name, WFlags f) :
QCanvasView(&c,parent,name,f) {
this->setMaximumSize(QSize(724,580));
TQCanvasView(&c,tqparent,name,f) {
this->setMaximumSize(TQSize(724,580));
moving=NULL;
m_canvasSelection=new k9CanvasSelection(this);
viewport()->setMouseTracking(true);
}
void k9MenuEditor::contentsMouseReleaseEvent(QMouseEvent* e) {
void k9MenuEditor::contentsMouseReleaseEvent(TQMouseEvent* e) {
m_canvasSelection->release();
emit itemSelected();
}
void k9MenuEditor::contentsMousePressEvent(QMouseEvent* e) {
QPoint p = inverseWorldMatrix().map(e->pos());
void k9MenuEditor::contentsMousePressEvent(TQMouseEvent* e) {
TQPoint p = inverseWorldMatrix().map(e->pos());
moving_start = p;
QCanvasItemList l=canvas()->collisions(p);
TQCanvasItemList l=canvas()->collisions(p);
moving=0;
for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
QCanvasItem *item=*it;
if (item->rtti()==QCanvasItem::Rtti_Rectangle)
for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
TQCanvasItem *item=*it;
if (item->rtti()==TQCanvasItem::Rtti_Rectangle)
moving = item;
if (item->rtti()>2000) {
moving=item;
@ -49,12 +49,12 @@ void k9MenuEditor::contentsMousePressEvent(QMouseEvent* e) {
}
if (moving)
return;
for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
// if ((*it)->rtti()==QCanvasItem::Rtti_Rectangle)
for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
// if ((*it)->rtti()==TQCanvasItem::Rtti_Rectangle)
// continue;
moving = *it;
if (moving->rtti()==1000) {
if (e->state() & QMouseEvent::ControlButton)
if (e->state() & TQt::ControlButton)
addSelection(moving);
else {
if (!isSelected(moving)) {
@ -75,8 +75,8 @@ void k9MenuEditor::contentsMousePressEvent(QMouseEvent* e) {
}
void k9MenuEditor::clear() {
QCanvasItemList list = canvas()->allItems();
QCanvasItemList::Iterator it = list.begin();
TQCanvasItemList list = canvas()->allItems();
TQCanvasItemList::Iterator it = list.begin();
for (; it != list.end(); ++it) {
if ( *it )
delete *it;
@ -89,19 +89,19 @@ void k9MenuEditor::clearSelection() {
m_selection.clear();
}
bool k9MenuEditor::isSelected(QCanvasItem *_item) {
bool k9MenuEditor::isSelected(TQCanvasItem *_item) {
k9CanvasSprite *s=(k9CanvasSprite *)_item;
k9MenuButton *button=s->getButton();
if (m_selection.find(button) !=-1)
if (m_selection.tqfind(button) !=-1)
return true;
else
return false;
}
void k9MenuEditor::addSelection(QCanvasItem *_item) {
void k9MenuEditor::addSelection(TQCanvasItem *_item) {
k9CanvasSprite *s=(k9CanvasSprite *)_item;
k9MenuButton *button=s->getButton();
if (m_selection.find(button) !=-1) {
if (m_selection.tqfind(button) !=-1) {
button->select(false);
m_selection.remove(button);
} else {
@ -110,13 +110,13 @@ void k9MenuEditor::addSelection(QCanvasItem *_item) {
}
}
void k9MenuEditor::updateCursor(QMouseEvent *e) {
QPoint p = inverseWorldMatrix().map(e->pos());
QCanvasItemList l=canvas()->collisions(p);
for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
QCanvasItem *item=*it;
void k9MenuEditor::updateCursor(TQMouseEvent *e) {
TQPoint p = inverseWorldMatrix().map(e->pos());
TQCanvasItemList l=canvas()->collisions(p);
for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
TQCanvasItem *item=*it;
switch (item->rtti()) {
case QCanvasItem::Rtti_Rectangle :
case TQCanvasItem::Rtti_Rectangle :
setCursor(KCursor::sizeAllCursor());
return;
case 2002 :
@ -142,15 +142,15 @@ void k9MenuEditor::updateCursor(QMouseEvent *e) {
setCursor(KCursor::arrowCursor());
}
void k9MenuEditor::contentsMouseMoveEvent(QMouseEvent* e) {
void k9MenuEditor::contentsMouseMoveEvent(TQMouseEvent* e) {
updateCursor(e);
if ( moving && (e->state() & Qt::LeftButton ==Qt::LeftButton) ) {
if (moving->rtti() !=QCanvasItem::Rtti_Text || moving==m_menu->getText()) {
QPoint p = inverseWorldMatrix().map(e->pos());
if (moving->rtti() !=TQCanvasItem::Rtti_Text || moving==m_menu->getText()) {
TQPoint p = inverseWorldMatrix().map(e->pos());
int offsetX=p.x() - moving_start.x();
int offsetY=p.y() - moving_start.y();
moving_start = p;
if (moving->rtti()==1000 || moving->rtti() == QCanvasItem::Rtti_Rectangle) {
if (moving->rtti()==1000 || moving->rtti() == TQCanvasItem::Rtti_Rectangle) {
for (k9MenuButton *b=m_selection.first();b;b=m_selection.next()) {
k9CanvasSprite*spr=b->getSprite();
spr->moveBy(offsetX,offsetY);
@ -163,29 +163,29 @@ void k9MenuEditor::contentsMouseMoveEvent(QMouseEvent* e) {
if (moving->rtti() >2001 && moving->rtti() <2010) {
k9CanvasSelectionRedim *ssr=(k9CanvasSelectionRedim*)moving;
ssr->updateSelection();
} else if (moving->rtti() != QCanvasItem::Rtti_Text ){
} else if (moving->rtti() != TQCanvasItem::Rtti_Text ){
//if selection not resized, move the selection
m_canvasSelection->moveBy(offsetX,offsetY);
m_canvasSelection->update();
}
if (moving==m_menu->getText())
emit m_menu->updateTextPos(QPoint(moving->x(),moving->y()));
emit m_menu->updateTextPos(TQPoint(moving->x(),moving->y()));
canvas()->update();
}
} else if ((e->state() & Qt::LeftButton) ==Qt::LeftButton ) {
m_canvasSelection->hide();
canvas()->update();
QPoint p = inverseWorldMatrix().map(e->pos());
TQPoint p = inverseWorldMatrix().map(e->pos());
int offsetX=p.x() - moving_start.x();
int offsetY=p.y() - moving_start.y();
m_canvasSelection->setSize(offsetX,offsetY);
m_canvasSelection->show();
canvas()->update();
clearSelection();
QCanvasItemList l=canvas()->collisions(m_canvasSelection->getRect());
for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
QCanvasItem *item = *it;
TQCanvasItemList l=canvas()->collisions(m_canvasSelection->getRect());
for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) {
TQCanvasItem *item = *it;
if (item->rtti()==1000) {
addSelection(item);
}
@ -193,11 +193,11 @@ void k9MenuEditor::contentsMouseMoveEvent(QMouseEvent* e) {
}
}
void k9MenuEditor::resizeEvent ( QResizeEvent * e ) {
QWMatrix m;
void k9MenuEditor::resizeEvent ( TQResizeEvent * e ) {
TQWMatrix m;
double scalex=(e->size().width()-4.0)/720.0;
double scaley=(e->size().height()-4.0)/576.0;
m.scale(QMIN(scalex,scaley),QMIN(scalex,scaley));
m.scale(TQMIN(scalex,scaley),TQMIN(scalex,scaley));
this->setWorldMatrix(m);
}
@ -215,18 +215,18 @@ k9MenuButton * k9MenuEditor::getSelected() {
return NULL;
}
QCanvasItem* k9MenuEditor::getMoving() const {
TQCanvasItem* k9MenuEditor::getMoving() const {
return moving;
}
void k9MenuEditor::setMoving(QCanvasItem* _value) {
void k9MenuEditor::setMoving(TQCanvasItem* _value) {
moving = _value;
}
QPtrList< k9MenuButton > *k9MenuEditor::getSelection() {
TQPtrList< k9MenuButton > *k9MenuEditor::getSelection() {
return &m_selection;
}

@ -12,7 +12,7 @@
#ifndef K9MENUEDITOR_H
#define K9MENUEDITOR_H
#include <qcanvas.h>
#include <tqcanvas.h>
/**
@author Jean-Michel PETIT <k9copy@free.fr>
@ -21,11 +21,12 @@
class k9MenuButton;
class k9MenuEdit;
class k9CanvasSelection;
class k9MenuEditor : public QCanvasView {
class k9MenuEditor : public TQCanvasView {
Q_OBJECT
TQ_OBJECT
public:
k9MenuEditor(QCanvas&, QWidget* parent=0, const char* name=0, WFlags f=0);
k9MenuEditor(TQCanvas&, TQWidget* tqparent=0, const char* name=0, WFlags f=0);
void clear();
k9MenuButton* getSelected() ;
@ -33,31 +34,31 @@ public:
m_menu=_menu;
}
QCanvasItem* getMoving() const;
TQCanvasItem* getMoving() const;
void setMoving(QCanvasItem* _value);
QPtrList< k9MenuButton > *getSelection() ;
void setMoving(TQCanvasItem* _value);
TQPtrList< k9MenuButton > *getSelection() ;
void clearSelection();
void hideSelection();
protected:
void contentsMousePressEvent(QMouseEvent*);
void contentsMouseMoveEvent(QMouseEvent*);
void contentsMouseReleaseEvent(QMouseEvent* e);
void updateCursor(QMouseEvent *e);
virtual void resizeEvent ( QResizeEvent * e );
void addSelection(QCanvasItem *_item);
bool isSelected(QCanvasItem *_item);
void contentsMousePressEvent(TQMouseEvent*);
void contentsMouseMoveEvent(TQMouseEvent*);
void contentsMouseReleaseEvent(TQMouseEvent* e);
void updateCursor(TQMouseEvent *e);
virtual void resizeEvent ( TQResizeEvent * e );
void addSelection(TQCanvasItem *_item);
bool isSelected(TQCanvasItem *_item);
void drawSelection();
signals:
void status(const QString&);
void status(const TQString&);
void itemSelected();
private:
QCanvasItem* moving;
QCanvasRectangle *m_rect;
QPoint moving_start;
TQCanvasItem* moving;
TQCanvasRectangle *m_rect;
TQPoint moving_start;
k9MenuEdit *m_menu;
QPtrList <k9MenuButton> m_selection;
TQPtrList <k9MenuButton> m_selection;
k9CanvasSelection *m_canvasSelection;
};

@ -12,24 +12,24 @@
#include "k9newdvd.h"
#include "k9title.h"
#include "k9tools.h"
#include <qfile.h>
#include <tqfile.h>
#include <stdio.h>
#include <qtextstream.h>
#include <tqtextstream.h>
#include <kstandarddirs.h>
#include <qapplication.h>
#include <tqapplication.h>
#include <ktempfile.h>
#include <kapplication.h>
#include <klocale.h>
#include <qimage.h>
#include <tqimage.h>
#include <kmessagebox.h>
#include "k9menu.h"
#include "k9menubutton.h"
#include "k9processlist.h"
#include <qthread.h>
#include <qfileinfo.h>
#include <tqthread.h>
#include <tqfileinfo.h>
k9NewDVD::k9NewDVD(QObject *parent, const char *name)
: QObject(parent, name) {
k9NewDVD::k9NewDVD(TQObject *tqparent, const char *name)
: TQObject(tqparent, name) {
m_workDir=locateLocal("tmp", "k9copy/" ) ;
m_rootMenu=new k9Menu(this);
m_format=PAL;
@ -38,7 +38,7 @@ k9NewDVD::k9NewDVD(QObject *parent, const char *name)
k9NewDVD::~k9NewDVD() {}
int k9NewDVDItems::compareItems(QPtrCollection::Item item1,QPtrCollection::Item item2) {
int k9NewDVDItems::compareItems(TQPtrCollection::Item item1,TQPtrCollection::Item item2) {
k9Title *_i1=(k9Title*) item1;
k9Title *_i2=(k9Title*) item2;
@ -51,19 +51,19 @@ void k9NewDVD::execute() {
m_cancel=false;
m_error="";
m_config=new k9Config();
// connect(m_process, SIGNAL(receivedStderr(KProcess *, char *, int)),this, SLOT(getStderr(KProcess *, char *, int) ));
// connect(m_process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),this, TQT_SLOT(getStderr(KProcess *, char *, int) ));
connect(&m_aviDecode,SIGNAL(drawFrame(QImage*)),this,SLOT(drawImage(QImage*)));
connect(&m_aviDecode,TQT_SIGNAL(drawFrame(TQImage*)),this,TQT_SLOT(drawImage(TQImage*)));
k9Tools::clearOutput(m_workDir+"dvd");
createXML();
disconnect(&m_aviDecode,SIGNAL(drawFrame(QImage*)),this,SLOT(drawImage(QImage*)));
disconnect(&m_aviDecode,TQT_SIGNAL(drawFrame(TQImage*)),this,TQT_SLOT(drawImage(TQImage*)));
delete m_config;
}
#include "k9newdvd.moc"
void k9NewDVD::drawImage(QImage * _image) {
void k9NewDVD::drawImage(TQImage * _image) {
// m_progress->setImage(*_image);
}
@ -80,16 +80,16 @@ void k9NewDVD::createXML() {
m_rootMenu->setWorkDir(m_workDir);
QString menuFileName=m_workDir+KApplication::randomString(8)+".mpg";
TQString menuFileName=m_workDir+KApplication::randomString(8)+".mpg";
m_rootMenu->setMenuFileName(menuFileName);
m_xml=new QDomDocument();
QDomElement root = m_xml->createElement( "dvdauthor" );
m_xml=new TQDomDocument();
TQDomElement root = m_xml->createElement( "dvdauthor" );
root.setAttribute ("dest",m_workDir+"dvd");
m_xml->appendChild( root );
// Create vmgm menu
QDomElement vmgm = m_xml->createElement("vmgm");
TQDomElement vmgm = m_xml->createElement("vmgm");
root.appendChild(vmgm);
m_processList->addProgress(i18n("Creating root menu"));
m_rootMenu->createMenus(&vmgm);
@ -99,10 +99,10 @@ void k9NewDVD::createXML() {
m_totalEncodedSize=0;
m_offset=0;
m_lastvalue=0;
for ( QStringList::Iterator it = m_tmpFiles.begin(); it != m_tmpFiles.end(); ++it ) {
QString file= *it;
for ( TQStringList::Iterator it = m_tmpFiles.begin(); it != m_tmpFiles.end(); ++it ) {
TQString file= *it;
if (file.endsWith(".mpeg")) {
QFileInfo f(file);
TQFileInfo f(file);
m_totalEncodedSize+=f.size();
}
}
@ -110,17 +110,17 @@ void k9NewDVD::createXML() {
m_cancel=m_processList->getCancel();
bool error=false;
if (!m_cancel) {
QString dvdAuthor(m_workDir+"/"+KApplication::randomString(8)+".xml");
QFile file( dvdAuthor);
TQString dvdAuthor(m_workDir+"/"+KApplication::randomString(8)+".xml");
TQFile file( dvdAuthor);
file.open(IO_WriteOnly);
QTextStream stream( &file );
TQTextStream stream( &file );
m_xml->save(stream,1);
file.close();
m_processList->clear();
k9Process *process=m_processList->addProcess(i18n("authoring"));
connect(process, SIGNAL(receivedStderr(KProcess *, char *, int)),this, SLOT(getStderr(KProcess *, char *, int) ));
connect(process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),this, TQT_SLOT(getStderr(KProcess *, char *, int) ));
*process << "dvdauthor" << "-x" << dvdAuthor;
m_processList->execute();
m_cancel=m_processList->getCancel();
@ -134,9 +134,9 @@ void k9NewDVD::createXML() {
m_error=i18n("The dvd authoring was canceled");
else if (error)
m_error=i18n("An error occured while running DVDAuthor:\n")+ m_stdout;
QFile::remove(menuFileName);
for ( QStringList::Iterator it = m_tmpFiles.begin(); it != m_tmpFiles.end(); ++it ) {
QFile::remove(*it);
TQFile::remove(menuFileName);
for ( TQStringList::Iterator it = m_tmpFiles.begin(); it != m_tmpFiles.end(); ++it ) {
TQFile::remove(*it);
}
m_tmpFiles.clear();
if (m_error !="") {
@ -146,23 +146,23 @@ void k9NewDVD::createXML() {
}
void k9NewDVD::addTitles (QDomElement &_root) {
void k9NewDVD::addTitles (TQDomElement &_root) {
calcVideoBitrate();
for (k9Title *title=m_titles.first();title && !m_cancel;title=m_titles.next()) {
QDomElement titleSet = m_xml->createElement("titleset");
TQDomElement titleSet = m_xml->createElement("titleset");
_root.appendChild(titleSet);
QDomElement pgc;
TQDomElement pgc;
k9Menu *menu=title->getMenu();
menu->setWorkDir(m_workDir);
QString menuFileName=m_workDir+KApplication::randomString(8)+".mpg";
TQString menuFileName=m_workDir+KApplication::randomString(8)+".mpg";
m_tmpFiles << menuFileName,
menu->setMenuFileName(menuFileName);
m_processList->addProgress(i18n("Creating menu for title %1").arg(title->getNum()+1));
m_processList->addProgress(i18n("Creating menu for title %1").tqarg(title->getNum()+1));
menu->createMenus(&titleSet);
QDomElement eTitle=m_xml->createElement("titles");
TQDomElement eTitle=m_xml->createElement("titles");
titleSet.appendChild(eTitle);
QDomElement e=m_xml->createElement("video");
TQDomElement e=m_xml->createElement("video");
e.setAttribute("aspect","16:9");
e.setAttribute("format",m_format==PAL?"PAL":"NTSC");
// if (l_track->getaspectRatio()!="4:3") {
@ -177,15 +177,15 @@ void k9NewDVD::addTitles (QDomElement &_root) {
pgc=m_xml->createElement("pgc");
eTitle.appendChild(pgc);
QDomElement post=m_xml->createElement("post");
TQDomElement post=m_xml->createElement("post");
pgc.appendChild(post);
QDomText txt=m_xml->createTextNode(title->getMenu()->getEndScript());
TQDomText txt=m_xml->createTextNode(title->getMenu()->getEndScript());
post.appendChild(txt);
QPtrList <k9AviFile > *l=title->getFiles();
TQPtrList <k9AviFile > *l=title->getFiles();
for (k9AviFile *aviFile= l->first();aviFile && !m_cancel;aviFile=l->next()) {
if ( aviFile->getPrevious()==NULL || aviFile->getBreakPrevious()) {
QString cmd="",chapters="";
TQString cmd="",chapters="";
createMencoderCmd(cmd,chapters,aviFile);
e=m_xml->createElement("vob");
e.setAttribute("file",cmd);
@ -198,18 +198,18 @@ void k9NewDVD::addTitles (QDomElement &_root) {
}
void k9NewDVD::setWorkDir ( const QString& _value ) {
void k9NewDVD::setWorkDir ( const TQString& _value ) {
m_workDir = _value;
if (!m_workDir.endsWith("/"))
m_workDir +="/";
}
void k9NewDVD::createMencoderCmd(QString &_cmd,QString &_chapters, k9AviFile *_aviFile) {
void k9NewDVD::createMencoderCmd(TQString &_cmd,TQString &_chapters, k9AviFile *_aviFile) {
// m_aviDecode.open(_aviFile->getFileName());
m_timer.start();
m_timer2.start();
m_timer3.start();
QTime end;
TQTime end;
k9AviFile *file=_aviFile;
bool bEnd;
_chapters="0";
@ -219,20 +219,20 @@ void k9NewDVD::createMencoderCmd(QString &_cmd,QString &_chapters, k9AviFile *_a
file=file->getNext();
if (!bEnd) {
int lt=_aviFile->getStart().msecsTo(end);
QTime t;
TQTime t;
t=t.addMSecs(lt);
_chapters +="," + t.toString("hh:mm:ss");
}
} while (!bEnd);
QString fileName= m_workDir + KApplication::randomString(8)+".mpeg";
QString t1=_aviFile->getStart().toString("hh:mm:ss.zzz");
TQString fileName= m_workDir + KApplication::randomString(8)+".mpeg";
TQString t1=_aviFile->getStart().toString("hh:mm:ss.zzz");
int length=_aviFile->getStart().msecsTo(end);
QTime l;
TQTime l;
l=l.addMSecs(length);
QString t2=l.toString("hh:mm:ss.zzz");
QString scale;
QString fps;
TQString t2=l.toString("hh:mm:ss.zzz");
TQString scale;
TQString fps;
switch (m_format) {
case PAL:
scale="720:576";
@ -244,18 +244,18 @@ void k9NewDVD::createMencoderCmd(QString &_cmd,QString &_chapters, k9AviFile *_a
break;
}
k9Process *process=m_processList->addProcess(i18n("Encoding %1").arg(_aviFile->getFileName()));
k9Process *process=m_processList->addProcess(i18n("Encoding %1").tqarg(_aviFile->getFileName()));
m_processList->setFileName(process,_aviFile->getFileName());
QTime t(0,0);
TQTime t(0,0);
t.start();
m_timers[process]=t;
connect(process, SIGNAL(receivedStdout(KProcess *, char *, int)),this, SLOT(getStdout(KProcess *, char *, int) ));
connect(process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),this, TQT_SLOT(getStdout(KProcess *, char *, int) ));
//m_progress->setTitle(i18n("Encoding file"));
//m_process->clearArguments();
*process << "mencoder" << "-oac" << "lavc" << "-ovc" << "lavc" << "-of" << "mpeg" <<"-afm" <<"libmad";
*process << "-mpegopts" << "format=dvd" << "-vf" << "scale="+scale+",harddup" << "-srate" << "48000" << "-af" << "lavcresample=48000";
*process << "-lavcopts" << QString("vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=%1:keyint=15:acodec=%3:abitrate=%2:aspect=16/9").arg(m_videoBitrate).arg(m_config->getPrefAudioBitrate()).arg(m_config->getPrefAudioFormat().lower());
*process << "-lavcopts" << TQString("vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=%1:keyint=15:acodec=%3:abitrate=%2:aspect=16/9").tqarg(m_videoBitrate).tqarg(m_config->getPrefAudioBitrate()).tqarg(m_config->getPrefAudioFormat().lower());
*process << "-ofps" << fps << "-o" << fileName << "-ss" << t1 << "-endpos" << t2 << _aviFile->getFileName();
qDebug(process->debug());
/*
@ -273,16 +273,16 @@ void k9NewDVD::createMencoderCmd(QString &_cmd,QString &_chapters, k9AviFile *_a
}
void k9NewDVD::getStderr(KProcess *_process, char *_buffer, int _length) {
QCString tmp(_buffer,_length);
TQCString tmp(_buffer,_length);
m_stdout=tmp;
int pos;
if (tmp.contains("STAT:")) {
pos=tmp.find("fixing VOBU");
if (tmp.tqcontains("STAT:")) {
pos=tmp.tqfind("fixing VOBU");
if (pos!=-1) {
QString tmp2=tmp;
TQString tmp2=tmp;
// m_progress->setTitle(i18n("Authoring"));
// m_progress->setLabelText(i18n("Fixing VOBUS"));
int end=tmp2.find("%");
int end=tmp2.tqfind("%");
if (end!=-1) {
pos =end -2;
tmp2=tmp2.mid(pos,end-pos);
@ -290,9 +290,9 @@ void k9NewDVD::getStderr(KProcess *_process, char *_buffer, int _length) {
// m_progress->setProgress(tmp2.toInt(),100);
}
} else {
pos=tmp.find("STAT: VOBU ");
pos=tmp.tqfind("STAT: VOBU ");
if (pos !=-1) {
QCString tmp2(_buffer+pos,_length-pos);
TQCString tmp2(_buffer+pos,_length-pos);
int vobu,mb;
sscanf(tmp2.data(),"STAT: VOBU %d at %dMB",&vobu,&mb);
if (mb <m_lastvalue)
@ -311,12 +311,12 @@ void k9NewDVD::getStderr(KProcess *_process, char *_buffer, int _length) {
void k9NewDVD::getStdout(KProcess *_process, char *_buffer, int _length) {
k9Process *process=(k9Process*) _process;
if (m_timers[process].elapsed() >500) {
QCString tmp(_buffer,_length);
int pos=tmp.find("Pos:");
TQCString tmp(_buffer,_length);
int pos=tmp.tqfind("Pos:");
if (pos!=-1) {
QString tmp2=tmp.mid(pos);
tmp2=tmp2.replace(":",": ").replace("(","").replace(")","").simplifyWhiteSpace();
QStringList sl=QStringList::split(" ",tmp2);
TQString tmp2=tmp.mid(pos);
tmp2=tmp2.tqreplace(":",": ").tqreplace("(","").tqreplace(")","").simplifyWhiteSpace();
TQStringList sl=TQStringList::split(" ",tmp2);
float position;
sscanf(sl[1].latin1(),"%fs",&position);
int frame;
@ -331,17 +331,17 @@ void k9NewDVD::getStdout(KProcess *_process, char *_buffer, int _length) {
// if (percent>0 &&m_timer3.elapsed() >1000 ) {
if (percent>0 ) {
int elapsed=process->getElapsed();
QTime time2(0,0);
TQTime time2(0,0);
time2=time2.addMSecs(elapsed);
QTime time3(0,0);
TQTime time3(0,0);
float fprc=percent/100.0;
time3=time3.addMSecs((uint32_t)(elapsed*(1.0/fprc)));
m_processList->setText(process,time2.toString("hh:mm:ss") +" / " + time3.toString("hh:mm:ss"),1);
m_timer3.restart();
}
QString text;//=i18n("filename") + " : " + m_aviDecode.getFileName();
text=i18n("fps")+ " : "+QString::number(fps);
TQString text;//=i18n("filename") + " : " + m_aviDecode.getFileName();
text=i18n("fps")+ " : "+TQString::number(fps);
m_processList->setText(process,text,2);
/*
m_progress->setLabelText(text);
@ -365,9 +365,9 @@ void k9NewDVD::appendTitle(k9Title *_title) {
k9MenuButton *btn=m_rootMenu->addButton();
_title->setButton(btn);
btn->setNum(_title->getNum()+1);
QPixmap px(m_config->getPrefButtonWidth(),m_config->getPrefButtonHeight());
px.fill(Qt::black);
QImage img=px.convertToImage();
TQPixmap px(m_config->getPrefButtonWidth(),m_config->getPrefButtonHeight());
px.fill(TQt::black);
TQImage img=px.convertToImage();
btn->setImage(img);
int nbColumn=(720-50)/(m_config->getPrefButtonWidth()+50);
int top=(int) _title->getNum()/nbColumn ;
@ -376,15 +376,15 @@ void k9NewDVD::appendTitle(k9Title *_title) {
btn->setLeft(left*(m_config->getPrefButtonWidth()+50) +50);
btn->setWidth(m_config->getPrefButtonWidth());
btn->setHeight(m_config->getPrefButtonHeight());
btn->setScript(QString("g1=0;jump titleset %1 menu;").arg(_title->getNum()+1));
btn->setScript(TQString("g1=0;jump titleset %1 menu;").tqarg(_title->getNum()+1));
btn->setTextPosition(k9MenuButton::RIGHT);
btn->setText(i18n("title %1").arg(_title->getNum()+1));
btn->setText(i18n("title %1").tqarg(_title->getNum()+1));
btn->setColor(m_config->getPrefButtonTextColor());
btn->setFont(m_config->getPrefButtonFont());
QString script="\n";
TQString script="\n";
for (k9Title *t = m_titles.first();t;t=m_titles.next()) {
script +=QString("if (g6== %1) { g6=0; jump titleset %2 menu;}\n").arg(t->getNum()+1).arg(t->getNum()+1);
script +=TQString("if (g6== %1) { g6=0; jump titleset %2 menu;}\n").tqarg(t->getNum()+1).tqarg(t->getNum()+1);
}
m_rootMenu->setStartScript2(script);
emit sigAddTitle();
@ -420,7 +420,7 @@ void k9NewDVD::calcVideoBitrate() {
double sec=(double)length/1000.0;
// m_videoBitrate=(int)( (size * 8388.608)/sec - 192);
m_videoBitrate=8*((size*1024 - (m_config->getPrefAudioBitrate() * sec/8))/sec);
m_videoBitrate=QMIN(m_videoBitrate,9800);
m_videoBitrate=TQMIN(m_videoBitrate,9800);
}
int k9NewDVD::getTotalTime() {
@ -434,6 +434,6 @@ int k9NewDVD::getTotalTime() {
return total;
}
QString k9NewDVD::getError() const {
TQString k9NewDVD::getError() const {
return m_error;
}

@ -13,10 +13,10 @@
#define K9NEWDVD_H
#include "k9common.h"
#include <qobject.h>
#include <qptrlist.h>
#include <qdom.h>
#include <qdatetime.h>
#include <tqobject.h>
#include <tqptrlist.h>
#include <tqdom.h>
#include <tqdatetime.h>
#include "k9process.h"
#include "k9progress.h"
#include "k9avidecode.h"
@ -30,16 +30,17 @@ class k9Title;
class k9AviFile;
class k9Menu;
class k9ProcessList;
class k9NewDVDItems : public QPtrList<k9Title> {
class k9NewDVDItems : public TQPtrList<k9Title> {
protected:
virtual int compareItems ( QPtrCollection::Item item1,QPtrCollection::Item item2 );
virtual int compareItems ( TQPtrCollection::Item item1,TQPtrCollection::Item item2 );
};
class k9NewDVD : public QObject {
class k9NewDVD : public TQObject {
Q_OBJECT
TQ_OBJECT
public:
enum eFormat {NTSC=2,PAL=1};
k9NewDVD ( QObject *parent = 0, const char *name = 0 );
k9NewDVD ( TQObject *tqparent = 0, const char *name = 0 );
~k9NewDVD();
k9NewDVDItems* getTitles() {
return &m_titles;
@ -48,10 +49,10 @@ public:
void execute();
void createXML();
void addTitles ( QDomElement &_root );
void addTitles ( TQDomElement &_root );
void setFormat ( const eFormat& _value );
void setWorkDir ( const QString& _value );
void setWorkDir ( const TQString& _value );
void appendTitle ( k9Title *_title );
void setProcessList(k9ProcessList *_value);
@ -60,34 +61,34 @@ public:
int getTotalTime();
k9Menu* getRootMenu() const;
QString getError() const;
TQString getError() const;
private:
k9NewDVDItems m_titles;
QStringList m_tmpFiles;
QDomDocument *m_xml;
QString m_workDir;
TQStringList m_tmpFiles;
TQDomDocument *m_xml;
TQString m_workDir;
k9ProcessList *m_processList;
QTime m_timer;
QTime m_timer2;
QTime m_timer3;
TQTime m_timer;
TQTime m_timer2;
TQTime m_timer3;
k9Menu *m_rootMenu;
bool m_cancel;
QString m_error;
QString m_stdout;
TQString m_error;
TQString m_stdout;
int m_videoBitrate;
k9AviDecode m_aviDecode;
int m_totalEncodedSize;
int m_offset;
int m_lastvalue;
QMap <k9Process*,QTime> m_timers;
TQMap <k9Process*,TQTime> m_timers;
void calcVideoBitrate();
void createMencoderCmd ( QString &_cmd,QString &_chapters, k9AviFile *_aviFile );
void createMencoderCmd ( TQString &_cmd,TQString &_chapters, k9AviFile *_aviFile );
k9Config *m_config;
protected slots:
void getStdout ( KProcess *, char *, int );
void getStderr ( KProcess *, char *, int );
void drawImage ( QImage * _image );
void drawImage ( TQImage * _image );
signals:
void sigAddTitle();
};

@ -13,7 +13,7 @@
#include "k9newtitle.h"
#include "k9import.h"
#include <qradiobutton.h>
#include <tqradiobutton.h>
#include <knuminput.h>
#include <ktimewidget.h>
#include <k9avidecode.h>
@ -23,8 +23,8 @@
#include "kpushbutton.h"
#include <kmessagebox.h>
#include <kcursor.h>
k9NewTitle::k9NewTitle(QWidget* parent, const char* name, WFlags fl)
: newTitle(parent,name,fl) {
k9NewTitle::k9NewTitle(TQWidget* tqparent, const char* name, WFlags fl)
: newTitle(tqparent,name,fl) {
m_fileName="";
}
@ -32,19 +32,19 @@ k9NewTitle::~k9NewTitle() {}
/*$SPECIALIZATION$*/
void k9NewTitle::fileSelected(const QString &_fileName) {
void k9NewTitle::fileSelected(const TQString &_fileName) {
m_fileName=_fileName;
k9AviDecode fileInfo(0,0);
fileInfo.open(m_fileName);
double duration=fileInfo.getDuration();
fileInfo.close();
QTime t(0,0,0);
TQTime t(0,0,0);
t=t.addSecs(duration);
lTotalTime->setText(t.toString("hh:mm:ss"));
bAdd->setEnabled(true);
}
void k9NewTitle::drawImage (QImage *_image) {
void k9NewTitle::drawImage (TQImage *_image) {
m_image=*_image;
}
@ -60,24 +60,24 @@ void k9NewTitle::bAddClicked() {
k9LvItemImport * item=new k9LvItemImport(m_k9Import->getRoot(),k9LvItemImport::TITLE);
item->setOpen(true);
k9Title *title=new k9Title( m_k9Import->getNewDVD());
item->setText(0,i18n("title %1").arg(title->getNum() +1));
item->setText(0,i18n("title %1").tqarg(title->getNum() +1));
connect( title->getButton(),SIGNAL(sigsetImage(k9MenuButton*, const QImage&)),m_k9Import,SLOT(buttonUpdated(k9MenuButton*, const QImage&)));
connect( title->getButton(),TQT_SIGNAL(sigsetImage(k9MenuButton*, const TQImage&)),m_k9Import,TQT_SLOT(buttonUpdated(k9MenuButton*, const TQImage&)));
item->setTitle(title);
connect(&fileInfo,SIGNAL(drawFrame(QImage*)),this,SLOT(drawImage(QImage*)));
connect(&fileInfo,TQT_SIGNAL(drawFrame(TQImage*)),this,TQT_SLOT(drawImage(TQImage*)));
QTime t;
m_k9Import->getRoot()->listView()->setColumnWidthMode(0,QListView::Maximum);
TQTime t;
m_k9Import->getRoot()->listView()->setColumnWidthMode(0,TQListView::Maximum);
item->setText(1,t.addSecs(fileInfo.getDuration()).toString("hh:mm:ss"));
double increment;
int maxCh;
if (rbLength->isOn()) {
QTime t;
TQTime t;
increment=t.secsTo(twLength->time());
maxCh=999;
}
@ -112,14 +112,14 @@ void k9NewTitle::bAddClicked() {
file->setFileName(m_fileName);
file->setStart(t.addMSecs(pos*1000));
pos+=increment;
file->setEnd(t.addMSecs(QMIN(pos,fileInfo.getDuration()) *1000));
file->setEnd(t.addMSecs(TQMIN(pos,fileInfo.getDuration()) *1000));
k9LvItemImport * itemch=new k9LvItemImport(item,k9LvItemImport::CHAPTER);
itemch->setText(0,i18n("chapter %1").arg(i+1));
itemch->setText(0,i18n("chapter %1").tqarg(i+1));
itemch->setText(1,file->getStart().toString("hh:mm:ss") +" - "+file->getEnd().toString("hh:mm:ss") );
itemch->setAviFile(file);
itemch->setTitle(title);
itemch->setPixmap(0,QPixmap(m_image.smoothScale(50,40)));
connect(file,SIGNAL(aviFileUpdated(k9AviFile*)),m_k9Import,SLOT(aviFileUpdated(k9AviFile*)));
itemch->setPixmap(0,TQPixmap(m_image.smoothScale(50,40)));
connect(file,TQT_SIGNAL(aviFileUpdated(k9AviFile*)),m_k9Import,TQT_SLOT(aviFileUpdated(k9AviFile*)));
k9MenuButton *btn=title->getMenu()->addButton();
btn->setNum(i+1);
@ -134,12 +134,12 @@ void k9NewTitle::bAddClicked() {
btn->setLeft(left);
btn->setWidth(width);
btn->setHeight(height);
btn->setScript(QString("jump title 1 chapter %1 ;").arg(i+1));
btn->setScript(TQString("jump title 1 chapter %1 ;").tqarg(i+1));
btn->setTextPosition(k9MenuButton::BOTTOM);
btn->setText(i18n("chapter %1").arg(i+1));
btn->setText(i18n("chapter %1").tqarg(i+1));
btn->setColor(config.getPrefButtonTextColor());
btn->setFont(config.getPrefButtonFont());
connect(file,SIGNAL(imageChanged(const QImage&)),btn,SLOT(setImage(const QImage&)));
connect(file,TQT_SIGNAL(imageChanged(const TQImage&)),btn,TQT_SLOT(setImage(const TQImage&)));
}
title->getMenu()->setEndScript("call vmgm menu;");

@ -16,18 +16,19 @@
#include "k9common.h"
#include "../k9author/newTitle.h"
#include "k9lvitemimport.h"
#include <qstring.h>
#include <tqstring.h>
class k9Import;
class k9NewTitle : public newTitle
{
Q_OBJECT
TQ_OBJECT
private:
k9Import *m_k9Import;
QString m_fileName;
QImage m_image;
TQString m_fileName;
TQImage m_image;
public:
k9NewTitle(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
k9NewTitle(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~k9NewTitle();
void setK9Import ( k9Import* _value );
@ -41,11 +42,11 @@ protected:
protected slots:
/*$PROTECTED_SLOTS$*/
virtual void fileSelected(const QString &);
virtual void fileSelected(const TQString &);
virtual void bAddClicked();
virtual void rbNumberClicked();
virtual void rbLengthClicked();
virtual void drawImage (QImage *_image);
virtual void drawImage (TQImage *_image);
};
#endif

@ -13,13 +13,13 @@
#include "k9newdvd.h"
#include "k9menu.h"
k9Title::k9Title(k9NewDVD *parent, const char *name)
: QObject(parent, name)
k9Title::k9Title(k9NewDVD *tqparent, const char *name)
: TQObject(tqparent, name)
{
m_num=parent->getTitles()->count();
parent->appendTitle(this);
m_num=tqparent->getTitles()->count();
tqparent->appendTitle(this);
m_menu=new k9Menu(this,0);
m_menu->setFormat((k9Menu::eFormat)parent->getFormat());
m_menu->setFormat((k9Menu::eFormat)tqparent->getFormat());
}
@ -27,7 +27,7 @@ k9Title::~k9Title()
{
}
int k9TitleItems::compareItems(QPtrCollection::Item item1,QPtrCollection::Item item2) {
int k9TitleItems::compareItems(TQPtrCollection::Item item1,TQPtrCollection::Item item2) {
k9AviFile *i1,*i2;
i1=(k9AviFile*) item1;
i2=(k9AviFile*) item2;

@ -13,8 +13,8 @@
#define K9TITLE_H
#include "k9common.h"
#include <qobject.h>
#include <qptrlist.h>
#include <tqobject.h>
#include <tqptrlist.h>
#include "k9avifile.h"
#include "k9menubutton.h"
/**
@ -23,15 +23,16 @@
class k9NewDVD;
class k9Menu;
class k9TitleItems : public QPtrList<k9AviFile> {
class k9TitleItems : public TQPtrList<k9AviFile> {
protected:
virtual int compareItems(QPtrCollection::Item item1,QPtrCollection::Item item2);
virtual int compareItems(TQPtrCollection::Item item1,TQPtrCollection::Item item2);
};
class k9Title : public QObject {
class k9Title : public TQObject {
Q_OBJECT
TQ_OBJECT
public:
k9Title(k9NewDVD *parent = 0, const char *name = 0);
k9Title(k9NewDVD *tqparent = 0, const char *name = 0);
~k9Title();
k9TitleItems *getFiles();

@ -9,40 +9,40 @@
#include "menuEdit.h"
#include <qvariant.h>
#include <qlabel.h>
#include <tqvariant.h>
#include <tqlabel.h>
#include <kurlrequester.h>
#include <kcolorbutton.h>
#include <kpushbutton.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qframe.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <tqcombobox.h>
#include <tqlineedit.h>
#include <tqframe.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "kurlrequester.h"
#include "klineedit.h"
#include "kpushbutton.h"
#include "kcolorbutton.h"
/*
* Constructs a menuEdit as a child of 'parent', with the
* Constructs a menuEdit as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
menuEdit::menuEdit( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
menuEdit::menuEdit( TQWidget* tqparent, const char* name, WFlags fl )
: TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "menuEdit" );
menuEditLayout = new QGridLayout( this, 1, 1, 2, 6, "menuEditLayout");
menuEditLayout = new TQGridLayout( this, 1, 1, 2, 6, "menuEditLayout");
textLabel2 = new QLabel( this, "textLabel2" );
textLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
textLabel2 = new TQLabel( this, "textLabel2" );
textLabel2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addMultiCellWidget( textLabel2, 5, 6, 0, 0 );
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
textLabel1 = new TQLabel( this, "textLabel1" );
textLabel1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( textLabel1, 4, 0 );
@ -51,76 +51,76 @@ menuEdit::menuEdit( QWidget* parent, const char* name, WFlags fl )
menuEditLayout->addMultiCellWidget( urBackground, 4, 4, 1, 5 );
cbColor = new KColorButton( this, "cbColor" );
cbColor->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, cbColor->sizePolicy().hasHeightForWidth() ) );
cbColor->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, cbColor->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( cbColor, 6, 1 );
bFont = new KPushButton( this, "bFont" );
bFont->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bFont->sizePolicy().hasHeightForWidth() ) );
bFont->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bFont->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( bFont, 6, 2 );
cbPosTitle = new QComboBox( FALSE, this, "cbPosTitle" );
cbPosTitle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, cbPosTitle->sizePolicy().hasHeightForWidth() ) );
cbPosTitle = new TQComboBox( FALSE, this, "cbPosTitle" );
cbPosTitle->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, cbPosTitle->sizePolicy().hasHeightForWidth() ) );
menuEditLayout->addWidget( cbPosTitle, 6, 3 );
spacer1 = new QSpacerItem( 51, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
spacer1 = new TQSpacerItem( 51, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
menuEditLayout->addMultiCell( spacer1, 6, 6, 4, 5 );
leTitle = new QLineEdit( this, "leTitle" );
leTitle = new TQLineEdit( this, "leTitle" );
menuEditLayout->addMultiCellWidget( leTitle, 5, 5, 1, 4 );
bAddText = new KPushButton( this, "bAddText" );
bAddText->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)4, 0, 0, bAddText->sizePolicy().hasHeightForWidth() ) );
bAddText->setMinimumSize( QSize( 24, 24 ) );
bAddText->setMaximumSize( QSize( 24, 24 ) );
bAddText->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)4, 0, 0, bAddText->sizePolicy().hasHeightForWidth() ) );
bAddText->setMinimumSize( TQSize( 24, 24 ) );
bAddText->setMaximumSize( TQSize( 24, 24 ) );
menuEditLayout->addWidget( bAddText, 5, 5 );
lTitle = new QLabel( this, "lTitle" );
lTitle->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, lTitle->sizePolicy().hasHeightForWidth() ) );
QFont lTitle_font( lTitle->font() );
lTitle = new TQLabel( this, "lTitle" );
lTitle->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, lTitle->sizePolicy().hasHeightForWidth() ) );
TQFont lTitle_font( lTitle->font() );
lTitle_font.setBold( TRUE );
lTitle->setFont( lTitle_font );
menuEditLayout->addMultiCellWidget( lTitle, 0, 0, 0, 5 );
textLabel1_2 = new QLabel( this, "textLabel1_2" );
textLabel1_2 = new TQLabel( this, "textLabel1_2" );
menuEditLayout->addWidget( textLabel1_2, 2, 0 );
cbStart = new QComboBox( FALSE, this, "cbStart" );
cbStart = new TQComboBox( FALSE, this, "cbStart" );
menuEditLayout->addMultiCellWidget( cbStart, 2, 2, 1, 5 );
textLabel1_2_2 = new QLabel( this, "textLabel1_2_2" );
textLabel1_2_2 = new TQLabel( this, "textLabel1_2_2" );
menuEditLayout->addWidget( textLabel1_2_2, 3, 0 );
cbEnd = new QComboBox( FALSE, this, "cbEnd" );
cbEnd = new TQComboBox( FALSE, this, "cbEnd" );
menuEditLayout->addMultiCellWidget( cbEnd, 3, 3, 1, 5 );
frame = new QFrame( this, "frame" );
frame->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, frame->sizePolicy().hasHeightForWidth() ) );
frame->setFrameShape( QFrame::StyledPanel );
frame->setFrameShadow( QFrame::Raised );
frame = new TQFrame( this, "frame" );
frame->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, frame->sizePolicy().hasHeightForWidth() ) );
frame->setFrameShape( TQFrame::StyledPanel );
frame->setFrameShadow( TQFrame::Raised );
menuEditLayout->addMultiCellWidget( frame, 1, 1, 0, 5 );
languageChange();
resize( QSize(576, 682).expandedTo(minimumSizeHint()) );
resize( TQSize(576, 682).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( bFont, SIGNAL( clicked() ), this, SLOT( bFontClick() ) );
connect( urBackground, SIGNAL( urlSelected(const QString&) ), this, SLOT( urBackgroundSelected(const QString&) ) );
connect( cbColor, SIGNAL( changed(const QColor&) ), this, SLOT( cbColorChanged(const QColor&) ) );
connect( leTitle, SIGNAL( textChanged(const QString&) ), this, SLOT( leTitleChanged(const QString&) ) );
connect( cbPosTitle, SIGNAL( activated(int) ), this, SLOT( cbPosTitleActivated(int) ) );
connect( bAddText, SIGNAL( clicked() ), this, SLOT( bAddTextClick() ) );
connect( cbStart, SIGNAL( activated(int) ), this, SLOT( cbStartActivated(int) ) );
connect( cbEnd, SIGNAL( activated(int) ), this, SLOT( cbEndActivated(int) ) );
connect( bFont, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bFontClick() ) );
connect( urBackground, TQT_SIGNAL( urlSelected(const TQString&) ), this, TQT_SLOT( urBackgroundSelected(const TQString&) ) );
connect( cbColor, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( cbColorChanged(const TQColor&) ) );
connect( leTitle, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( leTitleChanged(const TQString&) ) );
connect( cbPosTitle, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbPosTitleActivated(int) ) );
connect( bAddText, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bAddTextClick() ) );
connect( cbStart, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbStartActivated(int) ) );
connect( cbEnd, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbEndActivated(int) ) );
// tab order
setTabOrder( cbStart, cbEnd );
@ -137,7 +137,7 @@ menuEdit::menuEdit( QWidget* parent, const char* name, WFlags fl )
*/
menuEdit::~menuEdit()
{
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, TQt does it all for us
}
/*
@ -149,13 +149,13 @@ void menuEdit::languageChange()
setCaption( tr2i18n( "Edit Menu" ) );
textLabel2->setText( tr2i18n( "Text" ) );
textLabel1->setText( tr2i18n( "Background picture" ) );
cbColor->setText( QString::null );
cbColor->setText( TQString() );
bFont->setText( tr2i18n( "Font" ) );
cbPosTitle->clear();
cbPosTitle->insertItem( tr2i18n( "Bottom" ) );
cbPosTitle->insertItem( tr2i18n( "Right" ) );
bAddText->setText( QString::null );
bAddText->setAccel( QKeySequence( QString::null ) );
bAddText->setText( TQString() );
bAddText->setAccel( TQKeySequence( TQString() ) );
lTitle->setText( tr2i18n( "Root Menu" ) );
textLabel1_2->setText( tr2i18n( "At start" ) );
cbStart->clear();
@ -173,19 +173,19 @@ void menuEdit::bFontClick()
qWarning( "menuEdit::bFontClick(): Not implemented yet" );
}
void menuEdit::urBackgroundSelected(const QString&)
void menuEdit::urBackgroundSelected(const TQString&)
{
qWarning( "menuEdit::urBackgroundSelected(const QString&): Not implemented yet" );
qWarning( "menuEdit::urBackgroundSelected(const TQString&): Not implemented yet" );
}
void menuEdit::cbColorChanged(const QColor&)
void menuEdit::cbColorChanged(const TQColor&)
{
qWarning( "menuEdit::cbColorChanged(const QColor&): Not implemented yet" );
qWarning( "menuEdit::cbColorChanged(const TQColor&): Not implemented yet" );
}
void menuEdit::leTitleChanged(const QString&)
void menuEdit::leTitleChanged(const TQString&)
{
qWarning( "menuEdit::leTitleChanged(const QString&): Not implemented yet" );
qWarning( "menuEdit::leTitleChanged(const TQString&): Not implemented yet" );
}
void menuEdit::cbPosTitleActivated(int)

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>menuEdit</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>menuEdit</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -22,7 +22,7 @@
<property name="margin">
<number>2</number>
</property>
<widget class="QLabel" row="5" column="0" rowspan="2" colspan="1">
<widget class="TQLabel" row="5" column="0" rowspan="2" colspan="1">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@ -38,7 +38,7 @@
<string>Text</string>
</property>
</widget>
<widget class="QLabel" row="4" column="0">
<widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -91,7 +91,7 @@
<string>Font</string>
</property>
</widget>
<widget class="QComboBox" row="6" column="3">
<widget class="TQComboBox" row="6" column="3">
<item>
<property name="text">
<string>Bottom</string>
@ -124,14 +124,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>51</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLineEdit" row="5" column="1" rowspan="1" colspan="4">
<widget class="TQLineEdit" row="5" column="1" rowspan="1" colspan="4">
<property name="name">
<cstring>leTitle</cstring>
</property>
@ -148,13 +148,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>24</width>
<height>24</height>
@ -167,7 +167,7 @@
<string></string>
</property>
</widget>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="6">
<widget class="TQLabel" row="0" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>lTitle</cstring>
</property>
@ -188,7 +188,7 @@
<string>Root Menu</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@ -196,7 +196,7 @@
<string>At start</string>
</property>
</widget>
<widget class="QComboBox" row="2" column="1" rowspan="1" colspan="5">
<widget class="TQComboBox" row="2" column="1" rowspan="1" colspan="5">
<item>
<property name="text">
<string>Play menu</string>
@ -211,7 +211,7 @@
<cstring>cbStart</cstring>
</property>
</widget>
<widget class="QLabel" row="3" column="0">
<widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel1_2_2</cstring>
</property>
@ -219,7 +219,7 @@
<string>At End</string>
</property>
</widget>
<widget class="QComboBox" row="3" column="1" rowspan="1" colspan="5">
<widget class="TQComboBox" row="3" column="1" rowspan="1" colspan="5">
<item>
<property name="text">
<string>Play root menu</string>
@ -239,7 +239,7 @@
<cstring>cbEnd</cstring>
</property>
</widget>
<widget class="QFrame" row="1" column="0" rowspan="1" colspan="6">
<widget class="TQFrame" row="1" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>frame</cstring>
</property>
@ -269,21 +269,21 @@
</connection>
<connection>
<sender>urBackground</sender>
<signal>urlSelected(const QString&amp;)</signal>
<signal>urlSelected(const TQString&amp;)</signal>
<receiver>menuEdit</receiver>
<slot>urBackgroundSelected(const QString&amp;)</slot>
<slot>urBackgroundSelected(const TQString&amp;)</slot>
</connection>
<connection>
<sender>cbColor</sender>
<signal>changed(const QColor&amp;)</signal>
<signal>changed(const TQColor&amp;)</signal>
<receiver>menuEdit</receiver>
<slot>cbColorChanged(const QColor&amp;)</slot>
<slot>cbColorChanged(const TQColor&amp;)</slot>
</connection>
<connection>
<sender>leTitle</sender>
<signal>textChanged(const QString&amp;)</signal>
<signal>textChanged(const TQString&amp;)</signal>
<receiver>menuEdit</receiver>
<slot>leTitleChanged(const QString&amp;)</slot>
<slot>leTitleChanged(const TQString&amp;)</slot>
</connection>
<connection>
<sender>cbPosTitle</sender>
@ -320,17 +320,17 @@
<tabstop>bFont</tabstop>
<tabstop>cbPosTitle</tabstop>
</tabstops>
<slots>
<Q_SLOTS>
<slot>bFontClick()</slot>
<slot>urBackgroundSelected(const QString &amp;)</slot>
<slot>cbColorChanged(const QColor&amp;)</slot>
<slot>leTitleChanged(const QString &amp;)</slot>
<slot>urBackgroundSelected(const TQString &amp;)</slot>
<slot>cbColorChanged(const TQColor&amp;)</slot>
<slot>leTitleChanged(const TQString &amp;)</slot>
<slot>cbPosTitleActivated(int)</slot>
<slot>bAddTextClick()</slot>
<slot>cbStartActivated(int)</slot>
<slot>cbEndActivated(int)</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>

@ -9,18 +9,18 @@
#include "newTitle.h"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <tqvariant.h>
#include <tqpushbutton.h>
#include <tqbuttongroup.h>
#include <knuminput.h>
#include <ktimewidget.h>
#include <qradiobutton.h>
#include <tqradiobutton.h>
#include <kpushbutton.h>
#include <qlabel.h>
#include <tqlabel.h>
#include <kurlrequester.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "knuminput.h"
#include "ktimewidget.h"
#include "kpushbutton.h"
@ -28,26 +28,26 @@
#include "klineedit.h"
/*
* Constructs a newTitle as a child of 'parent', with the
* Constructs a newTitle as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
newTitle::newTitle( QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl )
newTitle::newTitle( TQWidget* tqparent, const char* name, WFlags fl )
: TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "newTitle" );
newTitleLayout = new QGridLayout( this, 1, 1, 11, 6, "newTitleLayout");
newTitleLayout = new TQGridLayout( this, 1, 1, 11, 6, "newTitleLayout");
buttonGroup1 = new QButtonGroup( this, "buttonGroup1" );
buttonGroup1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) );
buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
buttonGroup1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, buttonGroup1->sizePolicy().hasHeightForWidth() ) );
buttonGroup1->setColumnLayout(0, Qt::Vertical );
buttonGroup1->layout()->setSpacing( 6 );
buttonGroup1->layout()->setMargin( 11 );
buttonGroup1Layout = new QGridLayout( buttonGroup1->layout() );
buttonGroup1Layout->setAlignment( Qt::AlignTop );
buttonGroup1->tqlayout()->setSpacing( 6 );
buttonGroup1->tqlayout()->setMargin( 11 );
buttonGroup1Layout = new TQGridLayout( buttonGroup1->tqlayout() );
buttonGroup1Layout->tqsetAlignment( TQt::AlignTop );
nbChapters = new KIntNumInput( buttonGroup1, "nbChapters" );
nbChapters->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, nbChapters->sizePolicy().hasHeightForWidth() ) );
nbChapters->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, nbChapters->sizePolicy().hasHeightForWidth() ) );
nbChapters->setMinValue( 1 );
nbChapters->setMaxValue( 99 );
@ -55,60 +55,60 @@ newTitle::newTitle( QWidget* parent, const char* name, WFlags fl )
twLength = new KTimeWidget( buttonGroup1, "twLength" );
twLength->setEnabled( FALSE );
twLength->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, twLength->sizePolicy().hasHeightForWidth() ) );
twLength->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, twLength->sizePolicy().hasHeightForWidth() ) );
buttonGroup1Layout->addWidget( twLength, 1, 1 );
rbNumber = new QRadioButton( buttonGroup1, "rbNumber" );
rbNumber = new TQRadioButton( buttonGroup1, "rbNumber" );
rbNumber->setChecked( TRUE );
buttonGroup1Layout->addWidget( rbNumber, 0, 0 );
rbLength = new QRadioButton( buttonGroup1, "rbLength" );
rbLength = new TQRadioButton( buttonGroup1, "rbLength" );
buttonGroup1Layout->addWidget( rbLength, 1, 0 );
spacer1 = new QSpacerItem( 131, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
spacer1 = new TQSpacerItem( 131, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
buttonGroup1Layout->addMultiCell( spacer1, 0, 1, 2, 2 );
newTitleLayout->addMultiCellWidget( buttonGroup1, 1, 1, 0, 1 );
spacer3 = new QSpacerItem( 21, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
spacer3 = new TQSpacerItem( 21, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
newTitleLayout->addItem( spacer3, 3, 0 );
spacer4 = new QSpacerItem( 16, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
spacer4 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
newTitleLayout->addItem( spacer4, 1, 2 );
bAdd = new KPushButton( this, "bAdd" );
bAdd->setEnabled( FALSE );
bAdd->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, bAdd->sizePolicy().hasHeightForWidth() ) );
bAdd->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bAdd->sizePolicy().hasHeightForWidth() ) );
bAdd->setProperty( "stdItem", 27 );
newTitleLayout->addWidget( bAdd, 2, 1 );
spacer2 = new QSpacerItem( 470, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
spacer2 = new TQSpacerItem( 470, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
newTitleLayout->addItem( spacer2, 2, 0 );
layout1 = new QHBoxLayout( 0, 0, 6, "layout1");
tqlayout1 = new TQHBoxLayout( 0, 0, 6, "tqlayout1");
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
layout1->addWidget( textLabel1 );
textLabel1 = new TQLabel( this, "textLabel1" );
textLabel1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
tqlayout1->addWidget( textLabel1 );
urFile = new KURLRequester( this, "urFile" );
urFile->setMode( 25 );
layout1->addWidget( urFile );
tqlayout1->addWidget( urFile );
lTotalTime = new QLabel( this, "lTotalTime" );
lTotalTime->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, lTotalTime->sizePolicy().hasHeightForWidth() ) );
layout1->addWidget( lTotalTime );
lTotalTime = new TQLabel( this, "lTotalTime" );
lTotalTime->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, lTotalTime->sizePolicy().hasHeightForWidth() ) );
tqlayout1->addWidget( lTotalTime );
newTitleLayout->addMultiCellLayout( layout1, 0, 0, 0, 1 );
newTitleLayout->addMultiCellLayout( tqlayout1, 0, 0, 0, 1 );
languageChange();
resize( QSize(605, 171).expandedTo(minimumSizeHint()) );
resize( TQSize(605, 171).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( urFile, SIGNAL( urlSelected(const QString&) ), this, SLOT( fileSelected(const QString&) ) );
connect( rbNumber, SIGNAL( clicked() ), this, SLOT( rbNumberClicked() ) );
connect( rbLength, SIGNAL( clicked() ), this, SLOT( rbLengthClicked() ) );
connect( bAdd, SIGNAL( clicked() ), this, SLOT( bAddClicked() ) );
connect( urFile, TQT_SIGNAL( urlSelected(const TQString&) ), this, TQT_SLOT( fileSelected(const TQString&) ) );
connect( rbNumber, TQT_SIGNAL( clicked() ), this, TQT_SLOT( rbNumberClicked() ) );
connect( rbLength, TQT_SIGNAL( clicked() ), this, TQT_SLOT( rbLengthClicked() ) );
connect( bAdd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bAddClicked() ) );
}
/*
@ -116,7 +116,7 @@ newTitle::newTitle( QWidget* parent, const char* name, WFlags fl )
*/
newTitle::~newTitle()
{
// no need to delete child widgets, Qt does it all for us
// no need to delete child widgets, TQt does it all for us
}
/*
@ -126,18 +126,18 @@ newTitle::~newTitle()
void newTitle::languageChange()
{
setCaption( tr2i18n( "Add title" ) );
buttonGroup1->setTitle( QString::null );
buttonGroup1->setTitle( TQString() );
rbNumber->setText( tr2i18n( "number of chapters" ) );
rbLength->setText( tr2i18n( "chapter length" ) );
bAdd->setText( tr2i18n( "Add" ) );
bAdd->setAccel( QKeySequence( QString::null ) );
bAdd->setAccel( TQKeySequence( TQString() ) );
textLabel1->setText( tr2i18n( "Video file" ) );
lTotalTime->setText( tr2i18n( "--:--:--" ) );
}
void newTitle::fileSelected(const QString&)
void newTitle::fileSelected(const TQString&)
{
qWarning( "newTitle::fileSelected(const QString&): Not implemented yet" );
qWarning( "newTitle::fileSelected(const TQString&): Not implemented yet" );
}
void newTitle::rbNumberClicked()

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>newTitle</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>newTitle</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2">
<widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@ -73,7 +73,7 @@
</sizepolicy>
</property>
</widget>
<widget class="QRadioButton" row="0" column="0">
<widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>rbNumber</cstring>
</property>
@ -84,7 +84,7 @@
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" row="1" column="0">
<widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>rbLength</cstring>
</property>
@ -102,7 +102,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>131</width>
<height>21</height>
@ -121,7 +121,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>21</width>
<height>16</height>
@ -138,7 +138,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@ -180,22 +180,22 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>470</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
<widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>layout1</cstring>
<cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -219,7 +219,7 @@
<number>25</number>
</property>
</widget>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>lTotalTime</cstring>
</property>
@ -242,9 +242,9 @@
<connections>
<connection>
<sender>urFile</sender>
<signal>urlSelected(const QString&amp;)</signal>
<signal>urlSelected(const TQString&amp;)</signal>
<receiver>newTitle</receiver>
<slot>fileSelected(const QString&amp;)</slot>
<slot>fileSelected(const TQString&amp;)</slot>
</connection>
<connection>
<sender>rbNumber</sender>
@ -265,13 +265,13 @@
<slot>bAddClicked()</slot>
</connection>
</connections>
<slots>
<slot>fileSelected(const QString&amp;)</slot>
<Q_SLOTS>
<slot>fileSelected(const TQString&amp;)</slot>
<slot>rbNumberClicked()</slot>
<slot>rbLengthClicked()</slot>
<slot>bAddClicked()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>

@ -197,7 +197,7 @@ static inline uint32_t arch_accel (void)
{
uint64_t no_mvi;
asm volatile ("amask %1, %0"
asm volatile ("atqmask %1, %0"
: "=r" (no_mvi)
: "rI" (256)); /* AMASK_MVI */
return no_mvi ? MPEG2_ACCEL_ALPHA : (MPEG2_ACCEL_ALPHA |

@ -33,9 +33,9 @@
#include "attributes.h"
#include "mpeg2_internal.h"
#define SEQ_EXT 2
#define SEQ_DISPLAY_EXT 4
#define QUANT_MATRIX_EXT 8
#define SETQ_EXT 2
#define SETQ_DISPLAY_EXT 4
#define TQUANT_MATRIX_EXT 8
#define COPYRIGHT_EXT 0x10
#define PIC_DISPLAY_EXT 0x80
#define PIC_CODING_EXT 0x100
@ -156,8 +156,8 @@ int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec)
sequence->chroma_width = sequence->width >> 1;
sequence->chroma_height = sequence->height >> 1;
sequence->flags = (SEQ_FLAG_PROGRESSIVE_SEQUENCE |
SEQ_VIDEO_FORMAT_UNSPECIFIED);
sequence->flags = (SETQ_FLAG_PROGRESSIVE_SEQUENCE |
SETQ_VIDEO_FORMAT_UNSPECIFIED);
sequence->pixel_width = buffer[3] >> 4; /* aspect ratio */
sequence->frame_period = frame_period[buffer[3] & 15];
@ -167,7 +167,7 @@ int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec)
sequence->vbv_buffer_size = ((buffer[6]<<16)|(buffer[7]<<8))&0x1ff800;
if (buffer[7] & 4)
sequence->flags |= SEQ_FLAG_CONSTRAINED_PARAMETERS;
sequence->flags |= SETQ_FLAG_CONSTRAINED_PARAMETERS;
mpeg2dec->copy_matrix = 3;
if (buffer[7] & 2) {
@ -192,7 +192,7 @@ int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec)
sequence->transfer_characteristics = 0;
sequence->matrix_coefficients = 0;
mpeg2dec->ext_state = SEQ_EXT;
mpeg2dec->ext_state = SETQ_EXT;
mpeg2dec->state = STATE_SEQUENCE;
mpeg2dec->display_offset_x = mpeg2dec->display_offset_y = 0;
@ -216,13 +216,13 @@ static int sequence_ext (mpeg2dec_t * mpeg2dec)
(buffer[2] << 7) & 0x3000;
sequence->width = (sequence->picture_width + 15) & ~15;
sequence->height = (sequence->picture_height + 15) & ~15;
flags = sequence->flags | SEQ_FLAG_MPEG2;
flags = sequence->flags | SETQ_FLAG_MPEG2;
if (!(buffer[1] & 8)) {
flags &= ~SEQ_FLAG_PROGRESSIVE_SEQUENCE;
flags &= ~SETQ_FLAG_PROGRESSIVE_SEQUENCE;
sequence->height = (sequence->height + 31) & ~31;
}
if (buffer[5] & 0x80)
flags |= SEQ_FLAG_LOW_DELAY;
flags |= SETQ_FLAG_LOW_DELAY;
sequence->flags = flags;
sequence->chroma_width = sequence->width;
sequence->chroma_height = sequence->height;
@ -242,7 +242,7 @@ static int sequence_ext (mpeg2dec_t * mpeg2dec)
sequence->frame_period =
sequence->frame_period * ((buffer[5]&31)+1) / (((buffer[5]>>2)&3)+1);
mpeg2dec->ext_state = SEQ_DISPLAY_EXT;
mpeg2dec->ext_state = SETQ_DISPLAY_EXT;
return 0;
}
@ -253,10 +253,10 @@ static int sequence_display_ext (mpeg2dec_t * mpeg2dec)
mpeg2_sequence_t * sequence = &(mpeg2dec->new_sequence);
uint32_t flags;
flags = ((sequence->flags & ~SEQ_MASK_VIDEO_FORMAT) |
((buffer[0]<<4) & SEQ_MASK_VIDEO_FORMAT));
flags = ((sequence->flags & ~SETQ_MASK_VIDEO_FORMAT) |
((buffer[0]<<4) & SETQ_MASK_VIDEO_FORMAT));
if (buffer[0] & 1) {
flags |= SEQ_FLAG_COLOUR_DESCRIPTION;
flags |= SETQ_FLAG_COLOUR_DESCRIPTION;
sequence->colour_primaries = buffer[1];
sequence->transfer_characteristics = buffer[2];
sequence->matrix_coefficients = buffer[3];
@ -280,7 +280,7 @@ static inline void finalize_sequence (mpeg2_sequence_t * sequence)
sequence->byte_rate *= 50;
if (sequence->flags & SEQ_FLAG_MPEG2) {
if (sequence->flags & SETQ_FLAG_MPEG2) {
switch (sequence->pixel_width) {
case 1: /* square pixels */
sequence->pixel_width = sequence->pixel_height = 1; return;
@ -376,7 +376,7 @@ void mpeg2_header_sequence_finalize (mpeg2dec_t * mpeg2dec)
finalize_sequence (sequence);
finalize_matrix (mpeg2dec);
decoder->mpeg1 = !(sequence->flags & SEQ_FLAG_MPEG2);
decoder->mpeg1 = !(sequence->flags & SETQ_FLAG_MPEG2);
decoder->width = sequence->width;
decoder->height = sequence->height;
decoder->vertical_position_extension = (sequence->picture_height > 2800);
@ -451,7 +451,7 @@ void mpeg2_set_fbuf (mpeg2dec_t * mpeg2dec, int b_type)
mpeg2dec->fbuf[2] != &mpeg2dec->fbuf_alloc[i].fbuf) {
mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[i].fbuf;
mpeg2dec->info.current_fbuf = mpeg2dec->fbuf[0];
if (b_type || (mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY)) {
if (b_type || (mpeg2dec->sequence.flags & SETQ_FLAG_LOW_DELAY)) {
if (b_type || mpeg2dec->convert)
mpeg2dec->info.discard_fbuf = mpeg2dec->fbuf[0];
mpeg2dec->info.display_fbuf = mpeg2dec->fbuf[0];
@ -549,7 +549,7 @@ static int picture_coding_ext (mpeg2dec_t * mpeg2dec)
picture->nb_fields = 1;
break;
case FRAME_PICTURE:
if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
if (!(mpeg2dec->sequence.flags & SETQ_FLAG_PROGRESSIVE_SEQUENCE)) {
picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
flags |= (buffer[3] & 128) ? PIC_FLAG_TOP_FIELD_FIRST : 0;
} else
@ -570,7 +570,7 @@ static int picture_coding_ext (mpeg2dec_t * mpeg2dec)
PIC_MASK_COMPOSITE_DISPLAY) | PIC_FLAG_COMPOSITE_DISPLAY;
picture->flags = flags;
mpeg2dec->ext_state = PIC_DISPLAY_EXT | COPYRIGHT_EXT | QUANT_MATRIX_EXT;
mpeg2dec->ext_state = PIC_DISPLAY_EXT | COPYRIGHT_EXT | TQUANT_MATRIX_EXT;
return 0;
}
@ -582,7 +582,7 @@ static int picture_display_ext (mpeg2dec_t * mpeg2dec)
int i, nb_pos;
nb_pos = picture->nb_fields;
if (mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)
if (mpeg2dec->sequence.flags & SETQ_FLAG_PROGRESSIVE_SEQUENCE)
nb_pos >>= 1;
for (i = 0; i < nb_pos; i++) {
@ -608,7 +608,7 @@ void mpeg2_header_picture_finalize (mpeg2dec_t * mpeg2dec, uint32_t accels)
{
mpeg2_decoder_t * decoder = &(mpeg2dec->decoder);
int old_type_b = (decoder->coding_type == B_TYPE);
int low_delay = mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY;
int low_delay = mpeg2dec->sequence.flags & SETQ_FLAG_LOW_DELAY;
finalize_matrix (mpeg2dec);
decoder->coding_type = mpeg2dec->new_picture.flags & PIC_MASK_CODING_TYPE;
@ -878,7 +878,7 @@ mpeg2_state_t mpeg2_header_end (mpeg2dec_t * mpeg2dec)
picture = mpeg2dec->pictures + 2;
mpeg2_reset_info (&(mpeg2dec->info));
if (!(mpeg2dec->sequence.flags & SEQ_FLAG_LOW_DELAY)) {
if (!(mpeg2dec->sequence.flags & SETQ_FLAG_LOW_DELAY)) {
mpeg2dec->info.display_picture = picture;
if (picture->nb_fields == 1)
mpeg2dec->info.display_picture_2nd = picture + 1;

@ -158,7 +158,7 @@ static void inline idct_col (int16_t * const block)
void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride)
{
uint64_t clampmask;
uint64_t clamptqmask;
int i;
for (i = 0; i < 8; i++)
@ -167,18 +167,18 @@ void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride)
for (i = 0; i < 8; i++)
idct_col (block + i);
clampmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */
clamptqmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */
do {
uint64_t shorts0, shorts1;
shorts0 = ldq (block);
shorts0 = maxsw4 (shorts0, 0);
shorts0 = minsw4 (shorts0, clampmask);
shorts0 = minsw4 (shorts0, clamptqmask);
stl (pkwb (shorts0), dest);
shorts1 = ldq (block + 4);
shorts1 = maxsw4 (shorts1, 0);
shorts1 = minsw4 (shorts1, clampmask);
shorts1 = minsw4 (shorts1, clamptqmask);
stl (pkwb (shorts1), dest + 4);
stq (0, block);
@ -192,8 +192,8 @@ void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, const int stride)
void mpeg2_idct_add_mvi (const int last, int16_t * block,
uint8_t * dest, const int stride)
{
uint64_t clampmask;
uint64_t signmask;
uint64_t clamptqmask;
uint64_t signtqmask;
int i;
if (last != 129 || (block[0] & (7 << 4)) == (4 << 4)) {
@ -201,9 +201,9 @@ void mpeg2_idct_add_mvi (const int last, int16_t * block,
idct_row (block + 8 * i);
for (i = 0; i < 8; i++)
idct_col (block + i);
clampmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */
signmask = zap (-1, 0x33);
signmask ^= signmask >> 1; /* 0x8000800080008000 */
clamptqmask = zap (-1, 0xaa); /* 0x00ff00ff00ff00ff */
signtqmask = zap (-1, 0x33);
signtqmask ^= signtqmask >> 1; /* 0x8000800080008000 */
do {
uint64_t shorts0, pix0, signs0;
@ -214,22 +214,22 @@ void mpeg2_idct_add_mvi (const int last, int16_t * block,
pix0 = unpkbw (ldl (dest));
/* signed subword add (MMX paddw). */
signs0 = shorts0 & signmask;
shorts0 &= ~signmask;
signs0 = shorts0 & signtqmask;
shorts0 &= ~signtqmask;
shorts0 += pix0;
shorts0 ^= signs0;
/* clamp. */
shorts0 = maxsw4 (shorts0, 0);
shorts0 = minsw4 (shorts0, clampmask);
shorts0 = minsw4 (shorts0, clamptqmask);
/* next 4. */
pix1 = unpkbw (ldl (dest + 4));
signs1 = shorts1 & signmask;
shorts1 &= ~signmask;
signs1 = shorts1 & signtqmask;
shorts1 &= ~signtqmask;
shorts1 += pix1;
shorts1 ^= signs1;
shorts1 = maxsw4 (shorts1, 0);
shorts1 = minsw4 (shorts1, clampmask);
shorts1 = minsw4 (shorts1, clamptqmask);
stl (pkwb (shorts0), dest);
stl (pkwb (shorts1), dest + 4);

@ -14,22 +14,22 @@
#include "k9common.h"
#include "k9vamps.h"
#include <qthread.h>
#include <qobject.h>
#include <qwaitcondition.h>
#include <tqthread.h>
#include <tqobject.h>
#include <tqwaitcondition.h>
#include "kdecmpeg2.h"
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9DecodeThread : public QThread
class k9DecodeThread : public TQThread
{
private:
kDecMPEG2 *m_decoder;
k9fifo m_fifo;
QWaitCondition wDataRead;
QWaitCondition wDataReady;
TQWaitCondition wDataRead;
TQWaitCondition wDataReady;
bool noData;
public:

@ -14,7 +14,7 @@
#include "dvdnav.h"
#include <klocale.h>
#include <qapplication.h>
#include <tqapplication.h>
k9PlayMPEG2::k9PlayMPEG2()
{
@ -55,7 +55,7 @@ void k9PlayMPEG2::playTitle() {
/* set read ahead cache usage */
if (dvdnav_set_readahead_flag(dvdnav, DVD_READ_CACHE) != DVDNAV_STATUS_OK) {
setError(QString("ERR:Error on dvdnav_set_readahead_flag: %1\n").arg(dvdnav_err_to_string(dvdnav)));
setError(TQString("ERR:Error on dvdnav_set_readahead_flag: %1\n").tqarg(dvdnav_err_to_string(dvdnav)));
return;
}
@ -63,14 +63,14 @@ void k9PlayMPEG2::playTitle() {
if (dvdnav_menu_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK ||
dvdnav_audio_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK ||
dvdnav_spu_language_select(dvdnav, DVD_LANGUAGE) != DVDNAV_STATUS_OK) {
setError(QString("ERR:Error on setting languages: %1\n").arg(dvdnav_err_to_string(dvdnav)));
setError(TQString("ERR:Error on setting languages: %1\n").tqarg(dvdnav_err_to_string(dvdnav)));
return ;
}
/* set the PGC positioning flag to have position information relatively to the
* whole feature instead of just relatively to the current chapter */
if (dvdnav_set_PGC_positioning_flag(dvdnav, 1) != DVDNAV_STATUS_OK) {
setError(QString("ERR:Error on dvdnav_set_PGC_positioning_flag: %1\n").arg(dvdnav_err_to_string(dvdnav)));
setError(TQString("ERR:Error on dvdnav_set_PGC_positioning_flag: %1\n").tqarg(dvdnav_err_to_string(dvdnav)));
return ;
}
@ -84,7 +84,7 @@ void k9PlayMPEG2::playTitle() {
/* the read loop which regularly calls dvdnav_get_next_block
* and handles the returned events */
while (!finished && !m_stopped && qApp!=NULL) {
while (!finished && !m_stopped && tqApp!=NULL) {
int result, event, len;
uint8_t *buf = mem;
@ -105,7 +105,7 @@ void k9PlayMPEG2::playTitle() {
if (result == DVDNAV_STATUS_ERR) {
setError(QString("ERR:Error getting next block: %1\n").arg(dvdnav_err_to_string(dvdnav)));
setError(TQString("ERR:Error getting next block: %1\n").tqarg(dvdnav_err_to_string(dvdnav)));
return;
}
@ -121,9 +121,9 @@ void k9PlayMPEG2::playTitle() {
if (finished==0 && buf[17]==0xE0) {
m_decoder.addData( buf,len);
}
if (qApp->tryLock()) {
if (tqApp->tryLock()) {
emit setPosition( pos);
qApp->unlock();
tqApp->unlock();
}
@ -237,12 +237,12 @@ kDecMPEG2 *k9PlayMPEG2::getDecoder() {
return m_decoder.getDecoder() ;
}
void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * title,int chapter=0) {
void k9PlayMPEG2::open (dvd_reader_t *dvd,const TQString & device,k9DVDTitle * title,int chapter=0) {
m_dvd=dvd;
m_chapter=chapter;
int ret = 0;
struct stat dvd_stat;
QString c;
TQString c;
m_idxLect=0xFFFFFFFF;
stop();
@ -254,7 +254,7 @@ void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * ti
m_lastSector=0;
ret = stat(device.utf8(), &dvd_stat);
/* if ( ret < 0 ) {
c=i18n("Can't find device %1\n").arg(device.latin1());
c=i18n("Can't find device %1\n").tqarg(device.latin1());
setError(c);
return;
}
@ -268,7 +268,7 @@ void k9PlayMPEG2::open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * ti
emit setMax( m_lastSector);
emit setMin( m_startSector);
m_decoder.start(QThread::LowPriority);
m_decoder.start(TQThread::LowPriority);
start();
}

@ -16,32 +16,33 @@
#include "k9dvdtitle.h"
#include <qthread.h>
#include <qobject.h>
#include <qmutex.h>
#include <qwidget.h>
#include <tqthread.h>
#include <tqobject.h>
#include <tqmutex.h>
#include <tqwidget.h>
#include "k9decodethread.h"
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9PlayMPEG2 : public QObject,public QThread
class k9PlayMPEG2 : public TQObject,public TQThread
{
Q_OBJECT
TQ_OBJECT
private:
k9DVDTitle *m_title;
QString m_device;
TQString m_device;
k9DecodeThread m_decoder;
uint32_t m_idxLect;
uint32_t m_startSector;
uint32_t m_lastSector;
bool m_stopped;
dvd_file_t *dvdfile;
QMutex mutex;
TQMutex mutex;
dvd_reader_t *m_dvd;
int m_chapter;
public:
k9PlayMPEG2();
void open (dvd_reader_t *dvd,const QString & device,k9DVDTitle * title,int chapter);
void open (dvd_reader_t *dvd,const TQString & device,k9DVDTitle * title,int chapter);
kDecMPEG2 *getDecoder();
void setDvd(dvd_reader_t* _value) { m_dvd = _value;}
dvd_reader_t* getDvd() const {return m_dvd;}
@ -59,7 +60,7 @@ signals:
void setMin(uint32_t _sector);
void setMax(uint32_t _sector);
void setError(const QString & err);
void setError(const TQString & err);
};

@ -21,14 +21,14 @@
#include "kdecmpeg2.h"
#include "mpeg2.h"
#include "mpeg2convert.h"
#include <qpixmap.h>
#include <qpainter.h>
#include <qlabel.h>
#include <qapplication.h>
#include <qcstring.h>
#include <tqpixmap.h>
#include <tqpainter.h>
#include <tqlabel.h>
#include <tqapplication.h>
#include <tqcstring.h>
#include "k9decodethread.h"
void k9DisplayThread::setImage( QImage _image) {
void k9DisplayThread::setImage( TQImage _image) {
if (m_mutex.tryLock()) {
m_image=_image;
m_raw=FALSE;
@ -50,7 +50,7 @@ void k9DisplayThread::setRawImage(uchar *_buffer,int _width,int _height,int size
}
void k9DisplayThread::run() {
if (qApp==NULL)
if (tqApp==NULL)
return;
if (m_raw) {
m_dec->drawRaw( m_buffer,m_width,m_height,m_size);

@ -24,31 +24,31 @@
#include "mpeg2.h"
#include <stdio.h>
#include <stdlib.h>
#include <qimage.h>
#include <tqimage.h>
#include "ac.h"
#include <qmutex.h>
#include <qwidget.h>
#include <qobject.h>
#include <qthread.h>
#include <qdatetime.h>
#include <tqmutex.h>
#include <tqwidget.h>
#include <tqobject.h>
#include <tqthread.h>
#include <tqdatetime.h>
/**
*@author
*/
class kDecMPEG2;
class k9DisplayThread:public QThread {
class k9DisplayThread:public TQThread {
public:
k9DisplayThread(kDecMPEG2 *_dec) {m_dec=_dec;}
void setImage(QImage _image);
void setImage(TQImage _image);
void setRawImage(uchar *_buffer,int _width,int _height,int size);
protected:
kDecMPEG2 *m_dec;
uchar *m_buffer;
int m_size,m_width,m_height;
QImage m_image;
QMutex m_mutex;
TQImage m_image;
TQMutex m_mutex;
bool m_raw;
void run();
@ -57,8 +57,9 @@ protected:
class k9DecodeThread;
class kDecMPEG2 : public QObject {
class kDecMPEG2 : public TQObject {
Q_OBJECT
TQ_OBJECT
public:
kDecMPEG2(k9DecodeThread *_thread);
kDecMPEG2();
@ -68,7 +69,7 @@ public:
void start();
void stop();
void pause();
void draw(QImage *image) {emit pixmapReady(image);}
void draw(TQImage *image) {emit pixmapReady(image);}
void drawRaw(uchar *_buffer,int width,int height,int size) {emit ppmReady (_buffer,width,height,size);}
void setUseGL(bool _value) {m_useGL = _value;}
@ -77,12 +78,12 @@ private:
bool m_useGL;
bool m_pause;
k9DecodeThread *m_thread;
QImage pix;
QTime m_timer;
TQImage pix;
TQTime m_timer;
bool m_opened;
int demux_pid;
int demux_track;
QMutex mutex;
TQMutex mutex;
mpeg2dec_t * decoder;
k9DisplayThread *m_display;
int demux (uint8_t * buf, uint8_t * end, int flags);
@ -92,7 +93,7 @@ private:
void sync();
signals: // Signals
/** No descriptions */
void pixmapReady(QImage *image);
void pixmapReady(TQImage *image);
void ppmReady(uchar *buffer,int width,int height,int size);
};

@ -218,7 +218,7 @@ typedef union {
: "m" (mem))
#define maskmovq(regs,maskreg) mmx_r2ri (maskmovq, regs, maskreg)
#define tqmaskmovq(regs,tqmaskreg) mmx_r2ri (tqmaskmovq, regs, tqmaskreg)
#define movntq_r2m(mmreg,var) mmx_r2m (movntq, mmreg, var)

@ -52,7 +52,7 @@
*/
/* some rounding constants */
static mmx_t mask1 = {0xfefefefefefefefeLL};
static mmx_t tqmask1 = {0xfefefefefefefefeLL};
static mmx_t round4 = {0x0002000200020002LL};
/*
@ -81,7 +81,7 @@ static inline void mmx_average_2_U8 (uint8_t * dest, const uint8_t * src1,
movq_r2r (mm3, mm4); /* copy 8 src2 bytes */
pxor_r2r (mm1, mm3); /* xor src1 and src2 */
pand_m2r (mask1, mm3); /* mask lower bits */
pand_m2r (tqmask1, mm3); /* tqmask lower bits */
psrlq_i2r (1, mm3); /* /2 */
por_r2r (mm2, mm4); /* or src1 and src2 */
psubb_r2r (mm3, mm4); /* subtract subresults */
@ -104,14 +104,14 @@ static inline void mmx_interp_average_2_U8 (uint8_t * dest,
movq_r2r (mm5, mm6); /* copy 8 src2 bytes */
pxor_r2r (mm3, mm5); /* xor src1 and src2 */
pand_m2r (mask1, mm5); /* mask lower bits */
pand_m2r (tqmask1, mm5); /* tqmask lower bits */
psrlq_i2r (1, mm5); /* /2 */
por_r2r (mm4, mm6); /* or src1 and src2 */
psubb_r2r (mm5, mm6); /* subtract subresults */
movq_r2r (mm6, mm5); /* copy subresult */
pxor_r2r (mm1, mm5); /* xor srcavg and dest */
pand_m2r (mask1, mm5); /* mask lower bits */
pand_m2r (tqmask1, mm5); /* tqmask lower bits */
psrlq_i2r (1, mm5); /* /2 */
por_r2r (mm2, mm6); /* or srcavg and dest */
psubb_r2r (mm5, mm6); /* subtract subresults */
@ -228,7 +228,7 @@ static inline void mmx_interp_average_4_U8 (uint8_t * dest,
movq_r2r (mm1,mm2); /* copy subresult */
pxor_r2r (mm1, mm3); /* xor srcavg and dest */
pand_m2r (mask1, mm3); /* mask lower bits */
pand_m2r (tqmask1, mm3); /* tqmask lower bits */
psrlq_i2r (1, mm3); /* /2 */
por_r2r (mm2, mm4); /* or srcavg and dest */
psubb_r2r (mm3, mm4); /* subtract subresults */
@ -636,7 +636,7 @@ static inline void MC_avg2_16 (int height, uint8_t * dest, const uint8_t * ref,
} while (--height);
}
static mmx_t mask_one = {0x0101010101010101LL};
static mmx_t tqmask_one = {0x0101010101010101LL};
static inline void MC_put4_8 (int height, uint8_t * dest, const uint8_t * ref,
const int stride, const int cpu)
@ -664,7 +664,7 @@ static inline void MC_put4_8 (int height, uint8_t * dest, const uint8_t * ref,
pand_r2r (mm5, mm7);
pavg_r2r (mm2, mm0);
pand_m2r (mask_one, mm7);
pand_m2r (tqmask_one, mm7);
psubusb_r2r (mm7, mm0);
@ -695,7 +695,7 @@ static inline void MC_put4_16 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
pand_m2r (mask_one, mm7);
pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
movq_r2m (mm0, *dest);
@ -714,7 +714,7 @@ static inline void MC_put4_16 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
pand_m2r (mask_one, mm7);
pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
ref += stride;
@ -741,7 +741,7 @@ static inline void MC_avg4_8 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
pand_m2r (mask_one, mm7);
pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
movq_m2r (*dest, mm1);
@ -770,7 +770,7 @@ static inline void MC_avg4_16 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
pand_m2r (mask_one, mm7);
pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
movq_m2r (*dest, mm1);
@ -791,7 +791,7 @@ static inline void MC_avg4_16 (int height, uint8_t * dest, const uint8_t * ref,
movq_r2r (mm0, mm6);
pxor_r2r (mm2, mm6);
pand_r2r (mm6, mm7);
pand_m2r (mask_one, mm7);
pand_m2r (tqmask_one, mm7);
pavg_r2r (mm2, mm0);
psubusb_r2r (mm7, mm0);
movq_m2r (*(dest+8), mm1);

@ -37,10 +37,10 @@
* (x+y+1)>>1 == (x|y)-((x^y)>>1)
*
* This allows us to average 8 bytes at a time in a 64-bit FPU reg.
* We avoid overflows by masking before we do the shift, and we
* We avoid overflows by tqmasking before we do the shift, and we
* implement the shift by multiplying by 1/2 using mul8x16. So in
* VIS this is (assume 'x' is in f0, 'y' is in f2, a repeating mask
* of '0xfe' is in f4, a repeating mask of '0x7f' is in f6, and
* VIS this is (assume 'x' is in f0, 'y' is in f2, a repeating tqmask
* of '0xfe' is in f4, a repeating tqmask of '0x7f' is in f6, and
* the value 0x80808080 is in f8):
*
* fxor f0, f2, f10

@ -27,19 +27,19 @@
#define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c))
#define MPEG2_RELEASE MPEG2_VERSION (0, 4, 0) /* 0.4.0 */
#define SEQ_FLAG_MPEG2 1
#define SEQ_FLAG_CONSTRAINED_PARAMETERS 2
#define SEQ_FLAG_PROGRESSIVE_SEQUENCE 4
#define SEQ_FLAG_LOW_DELAY 8
#define SEQ_FLAG_COLOUR_DESCRIPTION 16
#define SEQ_MASK_VIDEO_FORMAT 0xe0
#define SEQ_VIDEO_FORMAT_COMPONENT 0
#define SEQ_VIDEO_FORMAT_PAL 0x20
#define SEQ_VIDEO_FORMAT_NTSC 0x40
#define SEQ_VIDEO_FORMAT_SECAM 0x60
#define SEQ_VIDEO_FORMAT_MAC 0x80
#define SEQ_VIDEO_FORMAT_UNSPECIFIED 0xa0
#define SETQ_FLAG_MPEG2 1
#define SETQ_FLAG_CONSTRAINED_PARAMETERS 2
#define SETQ_FLAG_PROGRESSIVE_SEQUENCE 4
#define SETQ_FLAG_LOW_DELAY 8
#define SETQ_FLAG_COLOUR_DESCRIPTION 16
#define SETQ_MASK_VIDEO_FORMAT 0xe0
#define SETQ_VIDEO_FORMAT_COMPONENT 0
#define SETQ_VIDEO_FORMAT_PAL 0x20
#define SETQ_VIDEO_FORMAT_NTSC 0x40
#define SETQ_VIDEO_FORMAT_SECAM 0x60
#define SETQ_VIDEO_FORMAT_MAC 0x80
#define SETQ_VIDEO_FORMAT_UNSPECIFIED 0xa0
typedef struct mpeg2_sequence_s {
unsigned int width, height;

@ -26,7 +26,7 @@
#define MACROBLOCK_PATTERN 2
#define MACROBLOCK_MOTION_BACKWARD 4
#define MACROBLOCK_MOTION_FORWARD 8
#define MACROBLOCK_QUANT 16
#define MACROBLOCK_TQUANT 16
#define DCT_TYPE_INTERLACED 32
/* motion_type */
#define MOTION_TYPE_SHIFT 6

@ -127,9 +127,9 @@ static inline void mmx_yuv2rgb (uint8_t * py, uint8_t * pu, uint8_t * pv)
static inline void mmx_unpack_16rgb (uint8_t * image, const int cpu)
{
static mmx_t mmx_bluemask = {0xf8f8f8f8f8f8f8f8LL};
static mmx_t mmx_greenmask = {0xfcfcfcfcfcfcfcfcLL};
static mmx_t mmx_redmask = {0xf8f8f8f8f8f8f8f8LL};
static mmx_t mmx_bluetqmask = {0xf8f8f8f8f8f8f8f8LL};
static mmx_t mmx_greentqmask = {0xfcfcfcfcfcfcfcfcLL};
static mmx_t mmx_redtqmask = {0xf8f8f8f8f8f8f8f8LL};
/*
* convert RGB plane to RGB 16 bits
@ -138,9 +138,9 @@ static inline void mmx_unpack_16rgb (uint8_t * image, const int cpu)
* mm6 -> GB, mm7 -> AR pixel 0-3
*/
pand_m2r (mmx_bluemask, mm0); /* mm0 = b7b6b5b4b3______ */
pand_m2r (mmx_greenmask, mm2); /* mm2 = g7g6g5g4g3g2____ */
pand_m2r (mmx_redmask, mm1); /* mm1 = r7r6r5r4r3______ */
pand_m2r (mmx_bluetqmask, mm0); /* mm0 = b7b6b5b4b3______ */
pand_m2r (mmx_greentqmask, mm2); /* mm2 = g7g6g5g4g3g2____ */
pand_m2r (mmx_redtqmask, mm1); /* mm1 = r7r6r5r4r3______ */
psrlq_i2r (3, mm0); /* mm0 = ______b7b6b5b4b3 */
pxor_r2r (mm4, mm4); /* mm4 = 0 */
movq_r2r (mm0, mm5); /* mm5 = ______b7b6b5b4b3 */

@ -1797,8 +1797,8 @@ void mpeg2_slice (mpeg2_decoder_t * const decoder, const int code,
macroblock_modes = get_macroblock_modes (decoder);
/* maybe integrate MACROBLOCK_QUANT test into get_macroblock_modes ? */
if (macroblock_modes & MACROBLOCK_QUANT)
/* maybe integrate MACROBLOCK_TQUANT test into get_macroblock_modes ? */
if (macroblock_modes & MACROBLOCK_TQUANT)
get_quantizer_scale (decoder);
if (macroblock_modes & MACROBLOCK_INTRA) {

@ -96,17 +96,17 @@ typedef struct {
#define INTRA MACROBLOCK_INTRA
#define QUANT MACROBLOCK_QUANT
#define TQUANT MACROBLOCK_TQUANT
static const MBtab MB_I [] = {
{INTRA|QUANT, 2}, {INTRA, 1}
{INTRA|TQUANT, 2}, {INTRA, 1}
};
#define MC MACROBLOCK_MOTION_FORWARD
#define CODED MACROBLOCK_PATTERN
static const MBtab MB_P [] = {
{INTRA|QUANT, 6}, {CODED|QUANT, 5}, {MC|CODED|QUANT, 5}, {INTRA, 5},
{INTRA|TQUANT, 6}, {CODED|TQUANT, 5}, {MC|CODED|TQUANT, 5}, {INTRA, 5},
{MC, 3}, {MC, 3}, {MC, 3}, {MC, 3},
{CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
{CODED, 2}, {CODED, 2}, {CODED, 2}, {CODED, 2},
@ -121,9 +121,9 @@ static const MBtab MB_P [] = {
#define INTER MACROBLOCK_MOTION_FORWARD|MACROBLOCK_MOTION_BACKWARD
static const MBtab MB_B [] = {
{0, 0}, {INTRA|QUANT, 6},
{BWD|CODED|QUANT, 6}, {FWD|CODED|QUANT, 6},
{INTER|CODED|QUANT, 5}, {INTER|CODED|QUANT, 5},
{0, 0}, {INTRA|TQUANT, 6},
{BWD|CODED|TQUANT, 6}, {FWD|CODED|TQUANT, 6},
{INTER|CODED|TQUANT, 5}, {INTER|CODED|TQUANT, 5},
{INTRA, 5}, {INTRA, 5},
{FWD, 4}, {FWD, 4}, {FWD, 4}, {FWD, 4},
{FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4}, {FWD|CODED, 4},
@ -142,7 +142,7 @@ static const MBtab MB_B [] = {
};
#undef INTRA
#undef QUANT
#undef TQUANT
#undef MC
#undef CODED
#undef FWD

@ -35,12 +35,12 @@ k9CdDrive::k9CdDrive() {
}
k9CdDrive::~k9CdDrive() {}
k9CdDrives::k9CdDrives():QObject( 0,0) {
k9CdDrives::k9CdDrives():TQObject( 0,0) {
drives.setAutoDelete(true);
#ifdef HAVE_HAL
m_connection=k9HalConnection::getInstance();
connect(m_connection,SIGNAL(deviceAdded( k9HalDevice* )),this,SLOT(deviceAdded( k9HalDevice* )));
connect(m_connection,SIGNAL(deviceRemoved( k9HalDevice* )),this,SLOT(deviceRemoved( k9HalDevice*)));
connect(m_connection,TQT_SIGNAL(deviceAdded( k9HalDevice* )),this,TQT_SLOT(deviceAdded( k9HalDevice* )));
connect(m_connection,TQT_SIGNAL(deviceRemoved( k9HalDevice* )),this,TQT_SLOT(deviceRemoved( k9HalDevice*)));
#else
m_devMgr=new K3bDevice::DeviceManager(this);
@ -81,7 +81,7 @@ void k9CdDrives::addDrive(k9HalDevice *_device) {
drive->canWriteCDR=_device->getCanBurnCd();
drive->device=_device->getDeviceName();
drive->name=_device->getModel();
QValueList <int> writeSpeeds;
TQValueList <int> writeSpeeds;
for (int i=2;i <=_device->getMaxWriteSpeed()/1385;i+=2)
writeSpeeds.append( i);
drive->setWriteSpeeds(writeSpeeds);
@ -96,7 +96,7 @@ void k9CdDrives::scanDrives() {
drives.clear();
#ifdef HAVE_HAL
QPtrList <k9HalDevice> list=m_connection->getDevices();
TQPtrList <k9HalDevice> list=m_connection->getDevices();
for (k9HalDevice *hdrive=list.first();hdrive;hdrive=list.next()) {
addDrive(hdrive);
@ -104,7 +104,7 @@ void k9CdDrives::scanDrives() {
#else
m_devMgr->scanBus();
int row=0;
QPtrList <K3bDevice::Device> lDev=m_devMgr->allDevices();
TQPtrList <K3bDevice::Device> lDev=m_devMgr->allDevices();
for (K3bDevice::Device *dev=lDev.first();dev;dev=lDev.next()) {
k9CdDrive *drive=new k9CdDrive;
drive->device=dev->blockDeviceName();
@ -112,7 +112,7 @@ void k9CdDrives::scanDrives() {
drive->canReadDVD=dev->readsDvd();
drive->canWriteCDR=dev->writesCd();
drive->canWriteDVD=dev->writesDvd();
QValueList <int> writeSpeeds;
TQValueList <int> writeSpeeds;
for (int i=2;i <=dev->determineMaximalWriteSpeed()/1385;i+=2)
writeSpeeds.append( i);
drive->setWriteSpeeds(writeSpeeds);
@ -127,7 +127,7 @@ void k9CdDrives::scanDrives() {
readConfig();
}
void k9CdDrives::eject(const QString & device) {
void k9CdDrives::eject(const TQString & device) {
KProcess *process =new KProcess();
if (k9Tools::checkProgram("kdeeject"))
*process <<"kdeeject" << device;
@ -141,26 +141,26 @@ void k9CdDrives::eject(const QString & device) {
/** reads devices that was entered manually **/
void k9CdDrives::readConfig() {
QStringList ldev;
QStringList llabels;
QStringList lIO;
TQStringList ldev;
TQStringList llabels;
TQStringList lIO;
k9Config config;
ldev=config.getDevices();
llabels=config.getDevicesLabels();
lIO=config.getDevicesIO();
int row=count();
int i=0;
for ( QStringList::Iterator it = ldev.begin(); it != ldev.end(); ++it ) {
for ( TQStringList::Iterator it = ldev.begin(); it != ldev.end(); ++it ) {
k9CdDrive *drive=new k9CdDrive;
drive->device=(*it);
QStringList::Iterator it2=llabels.at(i);
QStringList::Iterator it3=lIO.at(i);
TQStringList::Iterator it2=llabels.at(i);
TQStringList::Iterator it3=lIO.at(i);
drive->name=(*it2);
QString c=(*it3);
if (c.contains("I")) {
TQString c=(*it3);
if (c.tqcontains("I")) {
drive->canReadDVD=true;
}
if (c.contains("O")) {
if (c.tqcontains("O")) {
drive->canWriteCDR=true;
drive->canWriteDVD=true;
}
@ -185,12 +185,12 @@ k9CdDrive * k9CdDrives::getDrive(int num) {
}
QValueList< int > k9CdDrive::getWriteSpeeds() const {
TQValueList< int > k9CdDrive::getWriteSpeeds() const {
return writeSpeeds;
}
void k9CdDrive::setWriteSpeeds(const QValueList< int >& _value) {
void k9CdDrive::setWriteSpeeds(const TQValueList< int >& _value) {
writeSpeeds = _value;
}

@ -13,11 +13,11 @@
#define K9CDDRIVE_H
#include "k9common.h"
#include <qobject.h>
#include <tqobject.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qvaluelist.h>
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqvaluelist.h>
#ifndef HAVE_HAL
#include <k3bdevice.h>
#include <k3bdevicemanager.h>
@ -30,20 +30,21 @@
class k9HalDevice;
class k9HalConnection;
class k9CdDrive : public QObject {
class k9CdDrive : public TQObject {
Q_OBJECT
TQ_OBJECT
public:
k9CdDrive();
~k9CdDrive();
int num;
QString name;
QString device;
TQString name;
TQString device;
bool canWriteCDR;
bool canReadDVD;
bool canWriteDVD;
void setWriteSpeeds(const QValueList< int >& _value);
QValueList< int > getWriteSpeeds() const;
void setWriteSpeeds(const TQValueList< int >& _value);
TQValueList< int > getWriteSpeeds() const;
#ifdef HAVE_HAL
void setDevice(k9HalDevice* _value) { m_Device = _value;}
@ -51,14 +52,15 @@ public:
k9HalDevice* getDevice() { return m_Device;}
#endif
private:
QValueList <int> writeSpeeds;
TQValueList <int> writeSpeeds;
#ifdef HAVE_HAL
k9HalDevice *m_Device;
#endif
};
class k9CdDrives : public QObject {
class k9CdDrives : public TQObject {
Q_OBJECT
TQ_OBJECT
public:
k9CdDrives();
~k9CdDrives();
@ -66,7 +68,7 @@ public:
int count();
/** No descriptions */
k9CdDrive * getDrive(int num);
void eject(const QString & device);
void eject(const TQString & device);
void scanDrives();
public slots:
void deviceAdded(k9HalDevice *device);
@ -82,6 +84,6 @@ private: // Private methods
K3bDevice::DeviceManager *m_devMgr;
#endif
void readConfig();
QPtrList <k9CdDrive> drives;
TQPtrList <k9CdDrive> drives;
};
#endif

@ -29,20 +29,20 @@ static dbus_bool_t qDBusAddWatch(DBusWatch *watch, void *data)
bool enabled = dbus_watch_get_enabled(watch);
//qDebug("addReadWatch %d %s", fd, (enabled ? "enabled" : "disabled"));
watcher.watch = watch;
watcher.read = new QSocketNotifier(fd, QSocketNotifier::Read, d);
watcher.read = new TQSocketNotifier(fd, TQSocketNotifier::Read, d);
if (!enabled) watcher.read->setEnabled(false);
d->connect(watcher.read, SIGNAL(activated(int)), SLOT(socketRead(int)));
d->connect(watcher.read, TQT_SIGNAL(activated(int)), TQT_SLOT(socketRead(int)));
}
if (flags & DBUS_WATCH_WRITABLE) {
bool enabled = dbus_watch_get_enabled(watch);
//qDebug("addWriteWatch %d %s", fd, (enabled ? "enabled" : "disabled"));
watcher.watch = watch;
watcher.write = new QSocketNotifier(fd, QSocketNotifier::Write, d);
watcher.write = new TQSocketNotifier(fd, TQSocketNotifier::Write, d);