diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-27 23:37:00 +0000 |
commit | b0e912c8b3d02a518fedda28c3180eb4794a7520 (patch) | |
tree | 07d344862562fab58cbe2df39d13d16f2e4d2bea /k9author | |
parent | 4d695ec81fe4d4335ee82c7a9346ad9c9e144ecc (diff) | |
download | k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.tar.gz k9copy-b0e912c8b3d02a518fedda28c3180eb4794a7520.zip |
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
Diffstat (limited to 'k9author')
36 files changed, 918 insertions, 905 deletions
diff --git a/k9author/chapterEdit.cpp b/k9author/chapterEdit.cpp index d344b5e..a219b64 100644 --- a/k9author/chapterEdit.cpp +++ b/k9author/chapterEdit.cpp @@ -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() diff --git a/k9author/chapterEdit.ui b/k9author/chapterEdit.ui index d61622b..8940ff3 100644 --- a/k9author/chapterEdit.ui +++ b/k9author/chapterEdit.ui @@ -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&)</signal> + <signal>urlSelected(const TQString&)</signal> <receiver>chapterEdit</receiver> - <slot>urlSelected(const QString&)</slot> + <slot>urlSelected(const TQString&)</slot> </connection> <connection> <sender>slider</sender> @@ -305,15 +305,15 @@ </connection> <connection> <sender>twstart</sender> - <signal>valueChanged(const QTime&)</signal> + <signal>valueChanged(const TQTime&)</signal> <receiver>chapterEdit</receiver> - <slot>startChanged(const QTime&)</slot> + <slot>startChanged(const TQTime&)</slot> </connection> <connection> <sender>twend</sender> - <signal>valueChanged(const QTime&)</signal> + <signal>valueChanged(const TQTime&)</signal> <receiver>chapterEdit</receiver> - <slot>endChanged(const QTime&)</slot> + <slot>endChanged(const TQTime&)</slot> </connection> <connection> <sender>ckBreakEnd</sender> @@ -334,19 +334,19 @@ <slot>bTitleButtonClick()</slot> </connection> </connections> -<slots> - <slot>urlSelected( const QString &)</slot> +<Q_SLOTS> + <slot>urlSelected( const TQString &)</slot> <slot>sliderReleased()</slot> <slot>sliderChanged()</slot> <slot>bStartClick()</slot> - <slot>startChanged(const QTime &)</slot> - <slot>endChanged(const QTime &)</slot> + <slot>startChanged(const TQTime &)</slot> + <slot>endChanged(const TQTime &)</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> diff --git a/k9author/import.cpp b/k9author/import.cpp index b81705a..48593bd 100644 --- a/k9author/import.cpp +++ b/k9author/import.cpp @@ -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" diff --git a/k9author/import.ui b/k9author/import.ui index fc42a9e..f9123bd 100644 --- a/k9author/import.ui +++ b/k9author/import.ui @@ -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&)</signal> + <signal>activated(const TQString&)</signal> <receiver>import</receiver> - <slot>cbFormatActivated(const QString&)</slot> + <slot>cbFormatActivated(const TQString&)</slot> </connection> </connections> -<slots> - <slot>lvDVDItemSelected(QListViewItem *)</slot> +<Q_SLOTS> + <slot>lvDVDItemSelected(TQListViewItem *)</slot> <slot>bAddClick()</slot> - <slot>cbFormatActivated(const QString &)</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> + <slot>cbFormatActivated(const TQString &)</slot> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcombobox.h</includehint> <includehint>kselect.h</includehint> diff --git a/k9author/k9avidecode.cpp b/k9author/k9avidecode.cpp index b89acc1..22019b4 100644 --- a/k9author/k9avidecode.cpp +++ b/k9author/k9avidecode.cpp @@ -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; } diff --git a/k9author/k9avidecode.h b/k9author/k9avidecode.h index 53f6029..67614a3 100644 --- a/k9author/k9avidecode.h +++ b/k9author/k9avidecode.h @@ -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 diff --git a/k9author/k9avifile.cpp b/k9author/k9avifile.cpp index 1ace5f6..0e9bf76 100644 --- a/k9author/k9avifile.cpp +++ b/k9author/k9avifile.cpp @@ -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); diff --git a/k9author/k9avifile.h b/k9author/k9avifile.h index 83a6f17..21f1e6a 100644 --- a/k9author/k9avifile.h +++ b/k9author/k9avifile.h @@ -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 diff --git a/k9author/k9canvasselection.cpp b/k9author/k9canvasselection.cpp index 8b9d72f..8405917 100644 --- a/k9author/k9canvasselection.cpp +++ b/k9author/k9canvasselection.cpp @@ -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(); } diff --git a/k9author/k9canvasselection.h b/k9author/k9canvasselection.h index e5ff0fb..35d0179 100644 --- a/k9author/k9canvasselection.h +++ b/k9author/k9canvasselection.h @@ -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; }; diff --git a/k9author/k9chapteredit.cpp b/k9author/k9chapteredit.cpp index e199477..ff22b8d 100644 --- a/k9author/k9chapteredit.cpp +++ b/k9author/k9chapteredit.cpp @@ -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; diff --git a/k9author/k9chapteredit.h b/k9author/k9chapteredit.h index 87be4f8..29a919b 100644 --- a/k9author/k9chapteredit.h +++ b/k9author/k9chapteredit.h @@ -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); }; diff --git a/k9author/k9import.cpp b/k9author/k9import.cpp index 774bc8e..993f2d1 100644 --- a/k9author/k9import.cpp +++ b/k9author/k9import.cpp @@ -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")); } diff --git a/k9author/k9import.h b/k9author/k9import.h index e883bed..9a46704 100644 --- a/k9author/k9import.h +++ b/k9author/k9import.h @@ -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); diff --git a/k9author/k9importfiles.cpp b/k9author/k9importfiles.cpp index 2cb6138..c3ed6c4 100644 --- a/k9author/k9importfiles.cpp +++ b/k9author/k9importfiles.cpp @@ -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); diff --git a/k9author/k9importfiles.h b/k9author/k9importfiles.h index 136c131..d7fd672 100644 --- a/k9author/k9importfiles.h +++ b/k9author/k9importfiles.h @@ -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: diff --git a/k9author/k9lvitemimport.cpp b/k9author/k9lvitemimport.cpp index e946c8a..38b1855 100644 --- a/k9author/k9lvitemimport.cpp +++ b/k9author/k9lvitemimport.cpp @@ -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); } diff --git a/k9author/k9lvitemimport.h b/k9author/k9lvitemimport.h index 22aa3a2..2b882f1 100644 --- a/k9author/k9lvitemimport.h +++ b/k9author/k9lvitemimport.h @@ -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; diff --git a/k9author/k9menu.cpp b/k9author/k9menu.cpp index b219ba3..a911e97 100644 --- a/k9author/k9menu.cpp +++ b/k9author/k9menu.cpp @@ -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; } diff --git a/k9author/k9menu.h b/k9author/k9menu.h index 91e8a20..c6d783f 100644 --- a/k9author/k9menu.h +++ b/k9author/k9menu.h @@ -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 diff --git a/k9author/k9menubutton.cpp b/k9author/k9menubutton.cpp index 73908e9..5256983 100644 --- a/k9author/k9menubutton.cpp +++ b/k9author/k9menubutton.cpp @@ -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; } diff --git a/k9author/k9menubutton.h b/k9author/k9menubutton.h index 135340e..06b58c2 100644 --- a/k9author/k9menubutton.h +++ b/k9author/k9menubutton.h @@ -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); }; diff --git a/k9author/k9menuedit.cpp b/k9author/k9menuedit.cpp index 8ab0bc5..1cd5a81 100644 --- a/k9author/k9menuedit.cpp +++ b/k9author/k9menuedit.cpp @@ -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()); diff --git a/k9author/k9menuedit.h b/k9author/k9menuedit.h index f11a6b7..c5a1cd3 100644 --- a/k9author/k9menuedit.h +++ b/k9author/k9menuedit.h @@ -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 diff --git a/k9author/k9menueditor.cpp b/k9author/k9menueditor.cpp index 1af07a1..fa227d0 100644 --- a/k9author/k9menueditor.cpp +++ b/k9author/k9menueditor.cpp @@ -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; } diff --git a/k9author/k9menueditor.h b/k9author/k9menueditor.h index 53c1921..d4332dd 100644 --- a/k9author/k9menueditor.h +++ b/k9author/k9menueditor.h @@ -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; }; diff --git a/k9author/k9newdvd.cpp b/k9author/k9newdvd.cpp index 7cc73bd..3fa8c5b 100644 --- a/k9author/k9newdvd.cpp +++ b/k9author/k9newdvd.cpp @@ -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; } diff --git a/k9author/k9newdvd.h b/k9author/k9newdvd.h index bc56b95..ce7e729 100644 --- a/k9author/k9newdvd.h +++ b/k9author/k9newdvd.h @@ -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(); }; diff --git a/k9author/k9newtitle.cpp b/k9author/k9newtitle.cpp index a229812..81faf3a 100644 --- a/k9author/k9newtitle.cpp +++ b/k9author/k9newtitle.cpp @@ -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;"); diff --git a/k9author/k9newtitle.h b/k9author/k9newtitle.h index 8df44f3..2b24d02 100644 --- a/k9author/k9newtitle.h +++ b/k9author/k9newtitle.h @@ -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 diff --git a/k9author/k9title.cpp b/k9author/k9title.cpp index d2603e5..47d4563 100644 --- a/k9author/k9title.cpp +++ b/k9author/k9title.cpp @@ -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; diff --git a/k9author/k9title.h b/k9author/k9title.h index 8828a7d..f28677f 100644 --- a/k9author/k9title.h +++ b/k9author/k9title.h @@ -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(); diff --git a/k9author/menuEdit.cpp b/k9author/menuEdit.cpp index db313d2..d9a74c4 100644 --- a/k9author/menuEdit.cpp +++ b/k9author/menuEdit.cpp @@ -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) diff --git a/k9author/menuEdit.ui b/k9author/menuEdit.ui index 02c0776..f844871 100644 --- a/k9author/menuEdit.ui +++ b/k9author/menuEdit.ui @@ -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&)</signal> + <signal>urlSelected(const TQString&)</signal> <receiver>menuEdit</receiver> - <slot>urBackgroundSelected(const QString&)</slot> + <slot>urBackgroundSelected(const TQString&)</slot> </connection> <connection> <sender>cbColor</sender> - <signal>changed(const QColor&)</signal> + <signal>changed(const TQColor&)</signal> <receiver>menuEdit</receiver> - <slot>cbColorChanged(const QColor&)</slot> + <slot>cbColorChanged(const TQColor&)</slot> </connection> <connection> <sender>leTitle</sender> - <signal>textChanged(const QString&)</signal> + <signal>textChanged(const TQString&)</signal> <receiver>menuEdit</receiver> - <slot>leTitleChanged(const QString&)</slot> + <slot>leTitleChanged(const TQString&)</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 &)</slot> - <slot>cbColorChanged(const QColor&)</slot> - <slot>leTitleChanged(const QString &)</slot> + <slot>urBackgroundSelected(const TQString &)</slot> + <slot>cbColorChanged(const TQColor&)</slot> + <slot>leTitleChanged(const TQString &)</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> diff --git a/k9author/newTitle.cpp b/k9author/newTitle.cpp index 25786de..e838b01 100644 --- a/k9author/newTitle.cpp +++ b/k9author/newTitle.cpp @@ -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() diff --git a/k9author/newTitle.ui b/k9author/newTitle.ui index c68ab88..3787513 100644 --- a/k9author/newTitle.ui +++ b/k9author/newTitle.ui @@ -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&)</signal> + <signal>urlSelected(const TQString&)</signal> <receiver>newTitle</receiver> - <slot>fileSelected(const QString&)</slot> + <slot>fileSelected(const TQString&)</slot> </connection> <connection> <sender>rbNumber</sender> @@ -265,13 +265,13 @@ <slot>bAddClicked()</slot> </connection> </connections> -<slots> - <slot>fileSelected(const QString&)</slot> +<Q_SLOTS> + <slot>fileSelected(const TQString&)</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> |