From e654398e46e37abf457b2b1122ab898d2c51c49f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:43:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- krec/krecconfig_files.cpp | 26 ++++----- krec/krecconfig_files.h | 8 +-- krec/krecconfig_fileswidget.cpp | 62 +++++++++++----------- krec/krecconfig_fileswidget.h | 32 +++++------ krec/krecconfigure.cpp | 76 +++++++++++++------------- krec/krecconfigure.h | 26 ++++----- krec/krecexport_template.cpp | 6 +-- krec/krecexport_template.h | 26 ++++----- krec/krecexport_wave.cpp | 18 +++---- krec/krecexport_wave.h | 10 ++-- krec/krecfile.cpp | 106 ++++++++++++++++++------------------- krec/krecfile.h | 90 +++++++++++++++---------------- krec/krecfileview.cpp | 44 +++++++-------- krec/krecfileview.h | 12 ++--- krec/krecfileviewhelpers.cpp | 80 ++++++++++++++-------------- krec/krecfileviewhelpers.h | 52 +++++++++--------- krec/krecfilewidgets.cpp | 104 ++++++++++++++++++------------------ krec/krecfilewidgets.h | 44 +++++++-------- krec/krecglobal.cpp | 26 ++++----- krec/krecglobal.h | 34 ++++++------ krec/krecnewproperties.cpp | 48 ++++++++--------- krec/krecnewproperties.h | 12 ++--- krec/krecord.cpp | 72 ++++++++++++------------- krec/krecord.h | 2 +- krec/krecord_private.h | 16 +++--- krec/main.cpp | 2 +- krec/mp3_export/krecexport_mp3.cpp | 20 +++---- krec/mp3_export/krecexport_mp3.h | 10 ++-- krec/ogg_export/krecexport_ogg.cpp | 22 ++++---- krec/ogg_export/krecexport_ogg.h | 10 ++-- 30 files changed, 548 insertions(+), 548 deletions(-) (limited to 'krec') diff --git a/krec/krecconfig_files.cpp b/krec/krecconfig_files.cpp index a741c8e9..4b62ed9c 100644 --- a/krec/krecconfig_files.cpp +++ b/krec/krecconfig_files.cpp @@ -18,33 +18,33 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -typedef KGenericFactory KRecConfigFilesFactory; +typedef KGenericFactory KRecConfigFilesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_krec_files, KRecConfigFilesFactory( "krec" ) ) -KRecConfigFiles::KRecConfigFiles( QWidget* p, const char*, const QStringList& s ) +KRecConfigFiles::KRecConfigFiles( TQWidget* p, const char*, const TQStringList& s ) : KCModule( KRecConfigFilesFactory::instance(), p, s ) , _layout( 0 ) , _filewidget( 0 ) { - _layout = new QBoxLayout( this, QBoxLayout::TopToBottom ); + _layout = new TQBoxLayout( this, TQBoxLayout::TopToBottom ); _layout->addSpacing( 10 ); _filewidget = new KRecConfigFilesWidget( this ); - connect( _filewidget, SIGNAL( sRateChanged( int ) ), this, SLOT( ratechanged( int ) ) ); - connect( _filewidget, SIGNAL( sChannelsChanged( int ) ), this, SLOT( channelschanged( int ) ) ); - connect( _filewidget, SIGNAL( sBitsChanged( int ) ), this, SLOT( bitschanged( int ) ) ); - connect( _filewidget, SIGNAL( sUseDefaultsChanged( bool ) ), this, SLOT( usedefaultschanged( bool ) ) ); + connect( _filewidget, TQT_SIGNAL( sRateChanged( int ) ), this, TQT_SLOT( ratechanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sChannelsChanged( int ) ), this, TQT_SLOT( channelschanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sBitsChanged( int ) ), this, TQT_SLOT( bitschanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sUseDefaultsChanged( bool ) ), this, TQT_SLOT( usedefaultschanged( bool ) ) ); _layout->addWidget( _filewidget ); _layout->addStretch( 100 ); diff --git a/krec/krecconfig_files.h b/krec/krecconfig_files.h index 0ef74b49..dcf474c7 100644 --- a/krec/krecconfig_files.h +++ b/krec/krecconfig_files.h @@ -15,8 +15,8 @@ #define KREC_CONFIGURE_FILES_H #include -#include -#include +#include +#include class QBoxLayout; class QRadioButton; @@ -30,7 +30,7 @@ class KRecConfigFilesWidget; class KRecConfigFiles : public KCModule { Q_OBJECT public: - KRecConfigFiles( QWidget*, const char* =0, const QStringList& = QStringList() ); + KRecConfigFiles( TQWidget*, const char* =0, const TQStringList& = TQStringList() ); ~KRecConfigFiles(); void load(); @@ -43,7 +43,7 @@ private slots: void usedefaultschanged( bool ); private: - QBoxLayout *_layout; + TQBoxLayout *_layout; KRecConfigFilesWidget *_filewidget; }; diff --git a/krec/krecconfig_fileswidget.cpp b/krec/krecconfig_fileswidget.cpp index 5df6693d..206eda1b 100644 --- a/krec/krecconfig_fileswidget.cpp +++ b/krec/krecconfig_fileswidget.cpp @@ -17,18 +17,18 @@ #include "krecglobal.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include +#include -KRecConfigFilesWidget::KRecConfigFilesWidget( QWidget* p, const char* n ) - : QVBox( p,n ) - , _hbox( new QHBox( this ) ) +KRecConfigFilesWidget::KRecConfigFilesWidget( TQWidget* p, const char* n ) + : TQVBox( p,n ) + , _hbox( new TQHBox( this ) ) , _ratebox( 0 ), _channelsbox( 0 ), _bitsbox( 0 ) , _rate48( 0 ), _rate44( 0 ), _rate22( 0 ), _rate11( 0 ), _rateother( 0 ) , _rateotherbox( 0 ), _rateotherlabel( 0 ), _rateotherline( 0 ) @@ -36,32 +36,32 @@ KRecConfigFilesWidget::KRecConfigFilesWidget( QWidget* p, const char* n ) , _bits16( 0 ), _bits8( 0 ) , _samplingRate( 44100 ), _channels( 2 ), _bits( 16 ) { - _ratebox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Sampling Rate" ), _hbox ); - connect( _ratebox, SIGNAL( clicked( int ) ), this, SLOT( ratechanged( int ) ) ); - _rate48 = new QRadioButton( i18n( "48000 Hz" ), _ratebox ); - _rate44 = new QRadioButton( i18n( "44100 Hz" ), _ratebox ); - _rate22 = new QRadioButton( i18n( "22050 Hz" ), _ratebox ); - _rate11 = new QRadioButton( i18n( "11025 Hz" ), _ratebox ); - _rateother = new QRadioButton( i18n( "Other" ), _ratebox ); - _rateotherbox = new QHBox( _ratebox ); + _ratebox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Sampling Rate" ), _hbox ); + connect( _ratebox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( ratechanged( int ) ) ); + _rate48 = new TQRadioButton( i18n( "48000 Hz" ), _ratebox ); + _rate44 = new TQRadioButton( i18n( "44100 Hz" ), _ratebox ); + _rate22 = new TQRadioButton( i18n( "22050 Hz" ), _ratebox ); + _rate11 = new TQRadioButton( i18n( "11025 Hz" ), _ratebox ); + _rateother = new TQRadioButton( i18n( "Other" ), _ratebox ); + _rateotherbox = new TQHBox( _ratebox ); _rateotherbox->setSpacing( 2 ); - _rateotherlabel = new QLabel( i18n( "Other:" ), _rateotherbox ); - _rateotherline = new QLineEdit( _rateotherbox ); + _rateotherlabel = new TQLabel( i18n( "Other:" ), _rateotherbox ); + _rateotherline = new TQLineEdit( _rateotherbox ); _rateotherline->setMaxLength( 10 ); _rateotherline->setFrame( true ); _rateotherbox->setEnabled( false ); - connect( _rateotherline, SIGNAL( textChanged( const QString& ) ), this, SLOT( rateotherchanged( const QString& ) ) ); - _channelsbox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Channels" ), _hbox ); - connect( _channelsbox, SIGNAL( clicked( int ) ), this, SLOT( channelschanged( int ) ) ); - _channels2 = new QRadioButton( i18n( "Stereo (2 channels)" ), _channelsbox ); - _channels1 = new QRadioButton( i18n( "Mono (1 channel)" ), _channelsbox ); - _bitsbox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Bits" ), _hbox ); - connect( _bitsbox, SIGNAL( clicked( int ) ), this, SLOT( bitschanged( int ) ) ); - _bits16 = new QRadioButton( i18n( "16 bit" ), _bitsbox ); - _bits8 = new QRadioButton( i18n( "8 bit" ), _bitsbox ); + connect( _rateotherline, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( rateotherchanged( const TQString& ) ) ); + _channelsbox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Channels" ), _hbox ); + connect( _channelsbox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( channelschanged( int ) ) ); + _channels2 = new TQRadioButton( i18n( "Stereo (2 channels)" ), _channelsbox ); + _channels1 = new TQRadioButton( i18n( "Mono (1 channel)" ), _channelsbox ); + _bitsbox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Bits" ), _hbox ); + connect( _bitsbox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( bitschanged( int ) ) ); + _bits16 = new TQRadioButton( i18n( "16 bit" ), _bitsbox ); + _bits8 = new TQRadioButton( i18n( "8 bit" ), _bitsbox ); - _usedefaults = new QCheckBox( i18n( "Use defaults for creating new files" ), this ); - connect( _usedefaults, SIGNAL( toggled( bool ) ), this, SLOT( usedefaultschanged( bool ) ) ); + _usedefaults = new TQCheckBox( i18n( "Use defaults for creating new files" ), this ); + connect( _usedefaults, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( usedefaultschanged( bool ) ) ); setSpacing( 5 ); @@ -84,7 +84,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; default: _rateother->setChecked( true ); _rateotherbox->setEnabled( true ); - _rateotherline->setText( QString::number( _samplingRate ) ); + _rateotherline->setText( TQString::number( _samplingRate ) ); break; }; _channels = kapp->config()->readNumEntry( "Channels", 2 ); @@ -127,7 +127,7 @@ void KRecConfigFilesWidget::ratechanged( int index ) { if ( _ratebox->find( index ) == _rate11 ) _samplingRate = 11025; emit sRateChanged( _samplingRate ); } -void KRecConfigFilesWidget::rateotherchanged( const QString& text ) { +void KRecConfigFilesWidget::rateotherchanged( const TQString& text ) { _samplingRate = text.toInt(); emit sRateChanged( _samplingRate ); } diff --git a/krec/krecconfig_fileswidget.h b/krec/krecconfig_fileswidget.h index 2095ce33..2dfb1b36 100644 --- a/krec/krecconfig_fileswidget.h +++ b/krec/krecconfig_fileswidget.h @@ -16,10 +16,10 @@ #ifndef KREC_CONFIGURE_FILESWIDGET_H #define KREC_CONFIGURE_FILESWIDGET_H -#include -#include -#include -#include +#include +#include +#include +#include class QRadioButton; class QCheckBox; @@ -27,10 +27,10 @@ class QButtonGroup; class QLineEdit; class QLabel; -class KRecConfigFilesWidget : public QVBox { +class KRecConfigFilesWidget : public TQVBox { Q_OBJECT public: - KRecConfigFilesWidget( QWidget*, const char* =0 ); + KRecConfigFilesWidget( TQWidget*, const char* =0 ); ~KRecConfigFilesWidget(); void load(); @@ -43,22 +43,22 @@ signals: void sUseDefaultsChanged( bool ); private slots: void ratechanged( int ); - void rateotherchanged( const QString& ); + void rateotherchanged( const TQString& ); void channelschanged( int ); void bitschanged( int ); void usedefaultschanged( bool ); private: - QHBox *_hbox; - QButtonGroup *_ratebox, *_channelsbox, *_bitsbox; - QRadioButton *_rate48, *_rate44, *_rate22, *_rate11, *_rateother; - QHBox *_rateotherbox; - QLabel *_rateotherlabel; - QLineEdit *_rateotherline; - QRadioButton *_channels2, *_channels1; - QRadioButton *_bits16, *_bits8; + TQHBox *_hbox; + TQButtonGroup *_ratebox, *_channelsbox, *_bitsbox; + TQRadioButton *_rate48, *_rate44, *_rate22, *_rate11, *_rateother; + TQHBox *_rateotherbox; + TQLabel *_rateotherlabel; + TQLineEdit *_rateotherline; + TQRadioButton *_channels2, *_channels1; + TQRadioButton *_bits16, *_bits8; - QCheckBox *_usedefaults; + TQCheckBox *_usedefaults; int _samplingRate, _channels, _bits; }; diff --git a/krec/krecconfigure.cpp b/krec/krecconfigure.cpp index 76d949f4..c29d6b4a 100644 --- a/krec/krecconfigure.cpp +++ b/krec/krecconfigure.cpp @@ -18,23 +18,23 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -typedef KGenericFactory KRecConfigGeneralFactory; +typedef KGenericFactory KRecConfigGeneralFactory; K_EXPORT_COMPONENT_FACTORY( kcm_krec, KRecConfigGeneralFactory( "krec" ) ) -KRecConfigGeneral::KRecConfigGeneral( QWidget* p, const char*, const QStringList& s ) +KRecConfigGeneral::KRecConfigGeneral( TQWidget* p, const char*, const TQStringList& s ) : KCModule( KRecConfigGeneralFactory::instance(), p, s ) , _layout( 0 ), _layout_display( 0 ) , _display_title( 0 ) @@ -44,54 +44,54 @@ KRecConfigGeneral::KRecConfigGeneral( QWidget* p, const char*, const QStringList , _framebaseotherbox( 0 ), _framebaseotherlabel( 0 ), _framebaseotherline( 0 ) , _displaymode( 0 ), _framebase( 25 ) { - _layout = new QBoxLayout( this, QBoxLayout::TopToBottom ); + _layout = new TQBoxLayout( this, TQBoxLayout::TopToBottom ); _layout->addSpacing( 10 ); - _display_title = new QLabel( i18n( "Timedisplay Related Settings" ), this ); + _display_title = new TQLabel( i18n( "Timedisplay Related Settings" ), this ); _layout->addWidget( _display_title, -100 ); - _layout_display = new QBoxLayout( _layout, QBoxLayout::LeftToRight ); + _layout_display = new TQBoxLayout( _layout, TQBoxLayout::LeftToRight ); _layout->setStretchFactor( _layout_display, -100 ); - _displaybox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Timedisplay Style" ), this ); + _displaybox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Timedisplay Style" ), this ); _layout_display->addWidget( _displaybox, 100 ); - connect( _displaybox, SIGNAL( clicked( int ) ), this, SLOT( displaychanged( int ) ) ); - _display0 = new QRadioButton( i18n( "Plain samples" ), _displaybox ); - _display1 = new QRadioButton( i18n( "[hours:]mins:secs:samples" ), _displaybox ); - _display2 = new QRadioButton( i18n( "[hours:]mins:secs:frames" ), _displaybox ); - _display3 = new QRadioButton( i18n( "MByte.KByte" ), _displaybox ); - _framebasebox = new QButtonGroup( 1, Qt::Horizontal, i18n( "Framebase" ), this ); + connect( _displaybox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( displaychanged( int ) ) ); + _display0 = new TQRadioButton( i18n( "Plain samples" ), _displaybox ); + _display1 = new TQRadioButton( i18n( "[hours:]mins:secs:samples" ), _displaybox ); + _display2 = new TQRadioButton( i18n( "[hours:]mins:secs:frames" ), _displaybox ); + _display3 = new TQRadioButton( i18n( "MByte.KByte" ), _displaybox ); + _framebasebox = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Framebase" ), this ); _layout_display->addWidget( _framebasebox, 100 ); - connect( _framebasebox, SIGNAL( clicked( int ) ), this, SLOT( framebasechanged( int ) ) ); - _framebase30 = new QRadioButton( i18n( "30 frames per second (American TV)" ), _framebasebox ); - _framebase25 = new QRadioButton( i18n( "25 frames per second (European TV)" ), _framebasebox ); - _framebase75 = new QRadioButton( i18n( "75 frames per second (CD)" ), _framebasebox ); - _framebaseother = new QRadioButton( i18n( "Other" ), _framebasebox ); - _framebaseotherbox = new QHBox( _framebasebox ); + connect( _framebasebox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( framebasechanged( int ) ) ); + _framebase30 = new TQRadioButton( i18n( "30 frames per second (American TV)" ), _framebasebox ); + _framebase25 = new TQRadioButton( i18n( "25 frames per second (European TV)" ), _framebasebox ); + _framebase75 = new TQRadioButton( i18n( "75 frames per second (CD)" ), _framebasebox ); + _framebaseother = new TQRadioButton( i18n( "Other" ), _framebasebox ); + _framebaseotherbox = new TQHBox( _framebasebox ); _framebaseotherbox->setSpacing( 2 ); - _framebaseotherlabel = new QLabel( i18n( "Other" ), _framebaseotherbox ); - _framebaseotherline = new QLineEdit( _framebaseotherbox ); + _framebaseotherlabel = new TQLabel( i18n( "Other" ), _framebaseotherbox ); + _framebaseotherline = new TQLineEdit( _framebaseotherbox ); _framebaseotherline->setMaxLength( 10 ); _framebaseotherbox->setEnabled( false ); - connect( _framebaseotherline, SIGNAL( textChanged( const QString& ) ), this, SLOT( framebaseotherchanged( const QString& ) ) ); + connect( _framebaseotherline, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( framebaseotherchanged( const TQString& ) ) ); _layout->addSpacing( 5 ); - _verboseDisplayMode = new QCheckBox( i18n( "Show verbose times ( XXmins:XXsecs:XXframes instead of XX:XX::XX )" ), this ); - connect( _verboseDisplayMode, SIGNAL( toggled( bool ) ), this, SLOT( verboseDisplayChanged( bool ) ) ); + _verboseDisplayMode = new TQCheckBox( i18n( "Show verbose times ( XXmins:XXsecs:XXframes instead of XX:XX::XX )" ), this ); + connect( _verboseDisplayMode, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( verboseDisplayChanged( bool ) ) ); _layout->addWidget( _verboseDisplayMode ); _layout->addSpacing( 10 ); - _other_title = new QLabel( i18n( "Miscellaneous Settings" ), this ); + _other_title = new TQLabel( i18n( "Miscellaneous Settings" ), this ); _layout->addWidget( _other_title ); - _tipofday = new QCheckBox( i18n( "Show tip of the day at startup" ), this ); - connect( _tipofday, SIGNAL( toggled( bool ) ), this, SLOT( tipofdaychanged( bool ) ) ); + _tipofday = new TQCheckBox( i18n( "Show tip of the day at startup" ), this ); + connect( _tipofday, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( tipofdaychanged( bool ) ) ); _layout->addWidget( _tipofday ); - QBoxLayout* _tmplayout = new QBoxLayout( this, QBoxLayout::LeftToRight ); + TQBoxLayout* _tmplayout = new TQBoxLayout( this, TQBoxLayout::LeftToRight ); _enableAllMessages = new KPushButton( i18n( "Enable All Hidden Messages" ), this ); - connect( _enableAllMessages, SIGNAL( clicked() ), this, SLOT( enableallmessagesclicked() ) ); + connect( _enableAllMessages, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableallmessagesclicked() ) ); _tmplayout->addWidget( _enableAllMessages ); - QLabel* _tmplbl = new QLabel( i18n( "All messages with the \"Don't show this message again\" option are shown again after selecting this button." ), this ); + TQLabel* _tmplbl = new TQLabel( i18n( "All messages with the \"Don't show this message again\" option are shown again after selecting this button." ), this ); _tmplayout->addWidget( _tmplbl ); _layout->addLayout( _tmplayout ); @@ -124,7 +124,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; default: _framebaseother->setChecked( true ); _framebaseotherbox->setEnabled( true ); - _framebaseotherline->setText( QString::number( _framebase ) ); + _framebaseotherline->setText( TQString::number( _framebase ) ); break; }; kapp->config()->setGroup( "TipOfDay" ); @@ -169,7 +169,7 @@ kdDebug(60005) << k_funcinfo << "Framebase=" << _framebase << endl; _framebaseotherbox->setEnabled( false ); emit changed( true ); } -void KRecConfigGeneral::framebaseotherchanged( const QString& text ) { +void KRecConfigGeneral::framebaseotherchanged( const TQString& text ) { _framebase = text.toInt(); kdDebug(60005) << k_funcinfo << "Framebase=" << _framebase << endl; emit changed( true ); diff --git a/krec/krecconfigure.h b/krec/krecconfigure.h index 13416c44..00d1317e 100644 --- a/krec/krecconfigure.h +++ b/krec/krecconfigure.h @@ -15,8 +15,8 @@ #define KREC_CONFIGURE_H #include -#include -#include +#include +#include class QBoxLayout; class QRadioButton; @@ -30,7 +30,7 @@ class KPushButton; class KRecConfigGeneral : public KCModule { Q_OBJECT public: - KRecConfigGeneral( QWidget*, const char* =0, const QStringList& = QStringList() ); + KRecConfigGeneral( TQWidget*, const char* =0, const TQStringList& = TQStringList() ); ~KRecConfigGeneral(); void load(); @@ -40,22 +40,22 @@ private slots: void displaychanged( int ); void framebasechanged( int ); - void framebaseotherchanged( const QString& ); + void framebaseotherchanged( const TQString& ); void verboseDisplayChanged( bool ); void tipofdaychanged( bool ); void enableallmessagesclicked(); private: - QBoxLayout *_layout, *_layout_display; - QLabel *_display_title, *_other_title; - QButtonGroup *_displaybox, *_framebasebox; - QRadioButton *_display0, *_display1, *_display2, *_display3; - QRadioButton *_framebase30, *_framebase25, *_framebase75, *_framebaseother; - QHBox *_framebaseotherbox; - QLabel *_framebaseotherlabel; - QLineEdit *_framebaseotherline; + TQBoxLayout *_layout, *_layout_display; + TQLabel *_display_title, *_other_title; + TQButtonGroup *_displaybox, *_framebasebox; + TQRadioButton *_display0, *_display1, *_display2, *_display3; + TQRadioButton *_framebase30, *_framebase25, *_framebase75, *_framebaseother; + TQHBox *_framebaseotherbox; + TQLabel *_framebaseotherlabel; + TQLineEdit *_framebaseotherline; - QCheckBox *_tipofday, *_verboseDisplayMode; + TQCheckBox *_tipofday, *_verboseDisplayMode; KPushButton *_enableAllMessages; int _displaymode, _framebase; diff --git a/krec/krecexport_template.cpp b/krec/krecexport_template.cpp index 43fa023c..3569268d 100644 --- a/krec/krecexport_template.cpp +++ b/krec/krecexport_template.cpp @@ -16,10 +16,10 @@ #include "krecglobal.h" -#include +#include #include -KRecExportItem::KRecExportItem( QObject* p, const char* n, const QStringList& ) : QObject( p,n ), _running( false ) { +KRecExportItem::KRecExportItem( TQObject* p, const char* n, const TQStringList& ) : TQObject( p,n ), _running( false ) { //kdDebug( 60005 ) << k_funcinfo << endl; } KRecExportItem::~KRecExportItem() { @@ -57,7 +57,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; if ( !running() ) { if ( process() ) { _running = true; - QTimer::singleShot( 0, this, SLOT( process() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( process() ) ); emit running( running() ); } return true; diff --git a/krec/krecexport_template.h b/krec/krecexport_template.h index 8a1c4a03..aac9dac2 100644 --- a/krec/krecexport_template.h +++ b/krec/krecexport_template.h @@ -14,11 +14,11 @@ #ifndef KREC_EXPORT_TEMPLATE_H #define KREC_EXPORT_TEMPLATE_H -#include +#include -#include -#include -#include +#include +#include +#include #include /** @@ -29,14 +29,14 @@ * * @author Arnold Krille */ -class KRecExportItem : public QObject { +class KRecExportItem : public TQObject { Q_OBJECT private: /// Controls wether an export is running, or not... bool _running; int _samplingRate, _bits, _channels; protected: - KRecExportItem( QObject*, const char* =0, const QStringList& =0 ); + KRecExportItem( TQObject*, const char* =0, const TQStringList& =0 ); /** * This registers this class at the KRecGlobal. @@ -60,22 +60,22 @@ public: virtual KRecExportItem* newItem()=0; /// Returns a list with the extensions. - virtual QStringList extensions()=0; + virtual TQStringList extensions()=0; /// Returns the export format. - virtual QString exportFormat()=0; + virtual TQString exportFormat()=0; bool running() const { return _running; } public slots: /** * Initializes the sound-settings. - * Has to be called before the initialize( const QString & ) function. + * Has to be called before the initialize( const TQString & ) function. */ void initialize( int samplingRate, int bits, int channels ); /// Initializes the export. - virtual bool initialize( const QString &filename )=0; + virtual bool initialize( const TQString &filename )=0; /** * Start the real export (including the emission of @see getData() while running=true). - * Best way to do this is to use @see QTimer::singleShot() since then the events are + * Best way to do this is to use @see TQTimer::singleShot() since then the events are * put at the end of the EventLoop not blocking the gui and everything else. */ bool start(); @@ -85,10 +85,10 @@ public slots: void stop(); /// Finish the export. virtual bool finalize()=0; - //virtual void data( QByteArray& ); + //virtual void data( TQByteArray& ); signals: /// Is emitted when this Item wants data to export. - void getData( QByteArray& ); + void getData( TQByteArray& ); void running( bool ); }; diff --git a/krec/krecexport_wave.cpp b/krec/krecexport_wave.cpp index 80ea63d7..6224283e 100644 --- a/krec/krecexport_wave.cpp +++ b/krec/krecexport_wave.cpp @@ -18,15 +18,15 @@ #include #include -#include -#include +#include +#include #include K_EXPORT_COMPONENT_FACTORY( libkrecexport_wave, KGenericFactory ) KRecExport_Wave krecExportWave( 0 ); -KRecExport_Wave::KRecExport_Wave( QObject* p, const char* n, const QStringList& ) +KRecExport_Wave::KRecExport_Wave( TQObject* p, const char* n, const TQStringList& ) : KRecExportItem( p,n ) , _file( 0 ) { @@ -43,17 +43,17 @@ kdDebug( 60005 ) << k_funcinfo << endl; return new KRecExport_Wave( 0 ); } -QStringList KRecExport_Wave::extensions() { +TQStringList KRecExport_Wave::extensions() { //kdDebug( 60005 ) << k_funcinfo << endl; - QStringList tmp; + TQStringList tmp; tmp << "*.wav" << "*.WAV"; return tmp; } -bool KRecExport_Wave::initialize( const QString &filename ) { +bool KRecExport_Wave::initialize( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( !_file ) { - _file = new QFile( filename ); + _file = new TQFile( filename ); if ( _file->open( IO_Raw|IO_WriteOnly ) ) { /// Write an empty Wave-header... for ( int i=0; i<44; i++ ) @@ -66,10 +66,10 @@ bool KRecExport_Wave::process() { //kdDebug( 60005 ) << k_funcinfo << running << endl; if ( _file ) { if ( running() ) { - QByteArray bytearray( 4096 ); + TQByteArray bytearray( 4096 ); emit getData( bytearray ); _file->writeBlock( bytearray ); - QTimer::singleShot( 10, this, SLOT( process() ) ); + TQTimer::singleShot( 10, this, TQT_SLOT( process() ) ); } return true; } else return false; diff --git a/krec/krecexport_wave.h b/krec/krecexport_wave.h index f1336970..664ad35a 100644 --- a/krec/krecexport_wave.h +++ b/krec/krecexport_wave.h @@ -22,20 +22,20 @@ class QFile; class KRecExport_Wave : public KRecExportItem { Q_OBJECT public: - KRecExport_Wave( QObject*, const char* =0, const QStringList& =0 ); + KRecExport_Wave( TQObject*, const char* =0, const TQStringList& =0 ); ~KRecExport_Wave(); KRecExport_Wave* newItem(); - QStringList extensions(); - QString exportFormat() { return QString( "Wave" ); } + TQStringList extensions(); + TQString exportFormat() { return TQString( "Wave" ); } public slots: - bool initialize( const QString & ); + bool initialize( const TQString & ); bool process(); bool finalize(); private: - QFile* _file; + TQFile* _file; }; #endif diff --git a/krec/krecfile.cpp b/krec/krecfile.cpp index 6e4b2b8f..a588d126 100644 --- a/krec/krecfile.cpp +++ b/krec/krecfile.cpp @@ -26,25 +26,25 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include -#include +#include #include void KRecFile::init() { _pos = 0; _size = 0; - _filename = QString::null; + _filename = TQString::null; _currentBuffer = 0; _dir = new KTempDir(); _config = new KSimpleConfig( _dir->name()+"project.rc", false ); } -KRecFile::KRecFile( QObject* p, const char* n ) - : QObject( p,n ) +KRecFile::KRecFile( TQObject* p, const char* n ) + : TQObject( p,n ) , _saved( false ) { init(); @@ -65,8 +65,8 @@ KRecFile::KRecFile( QObject* p, const char* n ) delete dialog; } -KRecFile::KRecFile( const QString &filename, QObject* p, const char* n ) - : QObject( p,n ) +KRecFile::KRecFile( const TQString &filename, TQObject* p, const char* n ) + : TQObject( p,n ) , _saved( true ) { init(); @@ -77,7 +77,7 @@ KRecFile::KRecFile( const QString &filename, QObject* p, const char* n ) KTar *tar = new KTar( _filename, "application/x-gzip" ); tar->open( IO_ReadOnly ); int i=0; while ( _filename.find( '/', i ) != -1 ) i++; // Find last '/' - QString basename = _filename.right( _filename.length()-i ); + TQString basename = _filename.right( _filename.length()-i ); basename = basename.left( basename.length()-5 ); const KArchiveDirectory *dir = dynamic_cast( tar->directory()->entry( basename ) ); @@ -91,7 +91,7 @@ KRecFile::KRecFile( const QString &filename, QObject* p, const char* n ) //kdDebug( 60005 ) << c << " Files to load" << endl; for ( int i=0; isetGroup( "File-" + QString::number( i ) ); + _config->setGroup( "File-" + TQString::number( i ) ); newBuffer( KRecBuffer::fromConfig( _config, _dir->qDir(), this ) ); } KRecGlobal::the()->message( i18n( "\'%1\' loaded." ).arg( filename ) ); @@ -103,7 +103,7 @@ KRecFile::KRecFile( const QString &filename, QObject* p, const char* n ) } KRecFile::~KRecFile() { kdDebug( 60005 ) << k_funcinfo << endl; - QValueList::iterator it; + TQValueList::iterator it; for ( it = _buffers.begin(); it != _buffers.end(); ++it ) delete ( *it ); _buffers.clear(); @@ -112,8 +112,8 @@ KRecFile::~KRecFile() { //kdDebug( 60005 ) << k_funcinfo << "done." << endl; } -QString KRecFile::filename() { return _filename; } -void KRecFile::filename( const QString &n ) { +TQString KRecFile::filename() { return _filename; } +void KRecFile::filename( const TQString &n ) { if ( _filename!=n ) { _filename = n; emit filenameChanged( _filename ); @@ -123,18 +123,18 @@ void KRecFile::filename( const QString &n ) { void KRecFile::writeData( Arts::mcopbyte* /*data*/, uint /*length*/ ) { kdDebug( 60005 ) << k_funcinfo << endl; } -void KRecFile::writeData( QByteArray* data ) { +void KRecFile::writeData( TQByteArray* data ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( _currentBuffer!=-1 ) _buffers[ _currentBuffer ]->writeData( data ); _saved = false; } -void KRecFile::writeData( QByteArray& data ) { +void KRecFile::writeData( TQByteArray& data ) { if ( _currentBuffer!=-1 ) _buffers[ _currentBuffer ]->writeData( data ); _saved = false; } -void KRecFile::save( const QString &fname ) { - QString filetosave = fname; +void KRecFile::save( const TQString &fname ) { + TQString filetosave = fname; //kdDebug( 60005 ) << k_funcinfo << filename << endl; if ( saved() ) { @@ -144,7 +144,7 @@ void KRecFile::save( const QString &fname ) { KRecGlobal::the()->message( i18n( "Saving in progress..." ) ); filename( fname ); - QString tmpname; + TQString tmpname; { KTempFile *tmp = new KTempFile(); tmp->setAutoDelete( true ); @@ -156,7 +156,7 @@ void KRecFile::save( const QString &fname ) { KTar *tar = new KTar( tmpname, "application/x-gzip" ); tar->open( IO_WriteOnly ); int i=0; while ( fname.find( '/', i ) != -1 ) i++; // Find last '/' - QString basename = fname.right( fname.length()-i ); + TQString basename = fname.right( fname.length()-i ); if ( basename.endsWith( ".krec" ) ) basename = basename.left( basename.length()-5 ); else { @@ -172,16 +172,16 @@ void KRecFile::save( const QString &fname ) { _saved = true; } -void KRecFile::exportwave( const QString &filename ) { +void KRecFile::exportwave( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << filename << endl; } -QByteArray* KRecFile::getData( int ) { +TQByteArray* KRecFile::getData( int ) { kdDebug( 60005 ) << k_funcinfo << endl; return 0; } -void KRecFile::getData( QByteArray& data ) { +void KRecFile::getData( TQByteArray& data ) { KRecBuffer* current = getTopBuffer_buffer( _pos ); if ( current ) { //kdDebug( 60005 ) << "_pos=" << _pos << "(" << samplesToOffset( _pos ) << ") current->startpos()=" << current->startpos() << "(" << samplesToOffset( current->startpos() ) << ") that is " << samplesToOffset( _pos - current->startpos() ) << endl; @@ -203,10 +203,10 @@ void KRecFile::newPos( int p ) { emit posChanged( _pos ); } } -void KRecFile::newPos( KRecBuffer* buffer, QIODevice::Offset p ) { +void KRecFile::newPos( KRecBuffer* buffer, TQIODevice::Offset p ) { newPos( buffer->startpos() + offsetToSamples( p ) ); } -void KRecFile::newSize( KRecBuffer* buffer, QIODevice::Offset p ) { +void KRecFile::newSize( KRecBuffer* buffer, TQIODevice::Offset p ) { if ( buffer->startpos() + offsetToSamples( p ) > _size ) { _size = buffer->startpos() + offsetToSamples( p ); } @@ -215,13 +215,13 @@ void KRecFile::newSize( KRecBuffer* buffer, QIODevice::Offset p ) { /// * * * Frames <-> Offset and more * * * -int KRecFile::offsetToSamples( QIODevice::Offset n ) const { +int KRecFile::offsetToSamples( TQIODevice::Offset n ) const { int out = n / channels(); if ( bits() == 16 ) out /= 2; return out; } -QIODevice::Offset KRecFile::samplesToOffset( int n ) const { - QIODevice::Offset out = n * channels(); +TQIODevice::Offset KRecFile::samplesToOffset( int n ) const { + TQIODevice::Offset out = n * channels(); if ( bits() == 16 ) out *= 2; return out; } @@ -237,7 +237,7 @@ void KRecFile::saveProps() { _config->writeEntry( "Files", _buffers.count() ); for ( uint i=0; i<_buffers.count(); i++ ) { //kdDebug( 60005 ) << "Writing config " << i << endl; - _config->setGroup( "File-" + QString::number( i ) ); + _config->setGroup( "File-" + TQString::number( i ) ); _buffers[ i ]->writeConfig( _config ); } _config->sync(); @@ -252,15 +252,15 @@ void KRecFile::loadProps() { /// * * * NewBuffer * * * -void KRecFile::newBuffer( const QString &filename ) { +void KRecFile::newBuffer( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << filename << endl; newBuffer( new KRecBuffer( filename, _pos, true, this ) ); } void KRecFile::newBuffer( KRecBuffer* buffer ) { kdDebug( 60005 ) << k_funcinfo << endl; - connect( buffer, SIGNAL( posChanged( KRecBuffer*, QIODevice::Offset ) ), this, SLOT( newPos( KRecBuffer*, QIODevice::Offset ) ) ); - connect( buffer, SIGNAL( sizeChanged( KRecBuffer*, QIODevice::Offset ) ), this, SLOT( newSize( KRecBuffer*, QIODevice::Offset ) ) ); - connect( buffer, SIGNAL( deleteSelf( KRecBuffer* ) ), this, SLOT( deleteBuffer( KRecBuffer* ) ) ); + connect( buffer, TQT_SIGNAL( posChanged( KRecBuffer*, TQIODevice::Offset ) ), this, TQT_SLOT( newPos( KRecBuffer*, TQIODevice::Offset ) ) ); + connect( buffer, TQT_SIGNAL( sizeChanged( KRecBuffer*, TQIODevice::Offset ) ), this, TQT_SLOT( newSize( KRecBuffer*, TQIODevice::Offset ) ) ); + connect( buffer, TQT_SIGNAL( deleteSelf( KRecBuffer* ) ), this, TQT_SLOT( deleteBuffer( KRecBuffer* ) ) ); _buffers.append( buffer ); newSize( buffer, buffer->size() ); _currentBuffer = _buffers.findIndex( buffer ); @@ -269,7 +269,7 @@ void KRecFile::newBuffer( KRecBuffer* buffer ) { } void KRecFile::newBuffer() { kdDebug( 60005 ) << k_funcinfo << endl; - newBuffer( _dir->name() + "file" + QString::number( _buffers.count() ) + ".raw" ); + newBuffer( _dir->name() + "file" + TQString::number( _buffers.count() ) + ".raw" ); } void KRecFile::deleteBuffer( KRecBuffer* b ) { @@ -285,7 +285,7 @@ void KRecFile::deleteBuffer( KRecBuffer* b ) { /// * * * helper * * * KRecBuffer* KRecFile::getTopBuffer_buffer( int pos ) { //kdDebug( 60005 ) << k_funcinfo << pos << endl; - QValueList::iterator it = _buffers.begin(); + TQValueList::iterator it = _buffers.begin(); KRecBuffer* out = 0; while ( it != _buffers.end() ) { if ( ( *it )->startpos() <= pos && offsetToSamples( ( *it )->size() ) + ( *it )->startpos() > pos && ( *it )->active() ) @@ -300,16 +300,16 @@ int KRecFile::getTopBuffer_int( int pos ) { /// * * * KRecBuffer * * * -KRecBuffer::KRecBuffer( const QString &filename, int startpos, bool a, KRecFile* p, const char* n ) - : QObject( p,n ) +KRecBuffer::KRecBuffer( const TQString &filename, int startpos, bool a, KRecFile* p, const char* n ) + : TQObject( p,n ) , _krecfile( p ) - , _file( new QFile( filename ) ) - , _stream( new QDataStream( _file ) ) - , _fileinfo( new QFileInfo( filename ) ) + , _file( new TQFile( filename ) ) + , _stream( new TQDataStream( _file ) ) + , _fileinfo( new TQFileInfo( filename ) ) , _active( a ) , _pos( 0 ), _start( startpos ) , _title( _fileinfo->fileName() ) - , _comment( QString::null ) + , _comment( TQString::null ) { kdDebug( 60005 ) << k_funcinfo << filename << " " << startpos << endl; _open = _file->open( IO_Raw | IO_ReadWrite ); @@ -336,21 +336,21 @@ void KRecBuffer::writeConfig( KConfig* config ) { config->writeEntry( "Comment", _comment ); } -KRecBuffer* KRecBuffer::fromConfig( KConfig* config, QDir* dir, KRecFile* p, const char* n ) { +KRecBuffer* KRecBuffer::fromConfig( KConfig* config, TQDir* dir, KRecFile* p, const char* n ) { kdDebug( 60005 ) << k_funcinfo << config << endl; KRecBuffer* tmp = new KRecBuffer( dir->path() + "/" + config->readEntry( "Filename" ), config->readNumEntry( "StartPos" ), config->readBoolEntry( "Activated", true ), p, n ); tmp->setTitle( config->readEntry( "Title", tmp->filename() ) ); - tmp->setComment( config->readEntry( "Comment", QString::null ) ); + tmp->setComment( config->readEntry( "Comment", TQString::null ) ); return tmp; } void KRecBuffer::writeData( Arts::mcopbyte* /*data*/, uint /*length*/ ) { kdDebug( 60005 ) << k_funcinfo << endl; } -void KRecBuffer::writeData( QByteArray* data ) { +void KRecBuffer::writeData( TQByteArray* data ) { kdDebug( 60005 ) << k_funcinfo << endl; writeData( *data ); /* if ( _open ) { @@ -360,7 +360,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; emit sizeChanged( this, size() ); }*/ } -void KRecBuffer::writeData( QByteArray& data ) { +void KRecBuffer::writeData( TQByteArray& data ) { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _open ) { _file->at( _pos ); @@ -370,7 +370,7 @@ void KRecBuffer::writeData( QByteArray& data ) { } } -void KRecBuffer::getData( QByteArray& data ) { +void KRecBuffer::getData( TQByteArray& data ) { //kdDebug( 60005 ) << k_funcinfo << "data.size()" << data.size() << " _pos" << _pos << endl; if ( _pos > _file->size() ) kdWarning() << "Trying to access behind file!" << endl; @@ -390,7 +390,7 @@ void KRecBuffer::getData( QByteArray& data ) { } } -void KRecBuffer::setPos( QIODevice::Offset p ) { +void KRecBuffer::setPos( TQIODevice::Offset p ) { if ( p!=_pos ) { _pos = p; emit posChanged( this, _pos ); @@ -399,20 +399,20 @@ void KRecBuffer::setPos( QIODevice::Offset p ) { } int KRecBuffer::startpos() const { return _start; } -QIODevice::Offset KRecBuffer::size() const { return _file->size(); } +TQIODevice::Offset KRecBuffer::size() const { return _file->size(); } -QString KRecBuffer::filename() const { return _fileinfo->fileName(); } -QString KRecBuffer::title() const { return _title; } -QString KRecBuffer::comment() const { return _comment; } +TQString KRecBuffer::filename() const { return _fileinfo->fileName(); } +TQString KRecBuffer::title() const { return _title; } +TQString KRecBuffer::comment() const { return _comment; } -void KRecBuffer::setTitle( const QString &n ) { +void KRecBuffer::setTitle( const TQString &n ) { if ( _title != n ) { _title = n; emit somethingChanged(); } } -void KRecBuffer::setComment( const QString &n ) { +void KRecBuffer::setComment( const TQString &n ) { if ( _comment != n ) { _comment = n; emit somethingChanged(); diff --git a/krec/krecfile.h b/krec/krecfile.h index ba307838..8b030833 100644 --- a/krec/krecfile.h +++ b/krec/krecfile.h @@ -14,9 +14,9 @@ #ifndef KRECFILE_H #define KRECFILE_H -#include -#include -#include +#include +#include +#include #include @@ -26,31 +26,31 @@ class KSimpleConfig; class QFile; class KRecFileViewWidget; -class KRecFile : virtual public QObject { +class KRecFile : virtual public TQObject { Q_OBJECT friend class KRecFileWidget; public: - KRecFile( QObject*, const char* =0 ); - KRecFile( const QString &, QObject*, const char* =0 ); + KRecFile( TQObject*, const char* =0 ); + KRecFile( const TQString &, TQObject*, const char* =0 ); ~KRecFile(); - QString filename(); - void filename( const QString &); + TQString filename(); + void filename( const TQString &); bool saved() const { return _saved; } int samplerate() const { return _samplerate; } int channels() const { return _channels; } int bits() const { return _bits; } - QIODevice::Offset offsetSize() const { return samplesToOffset( _size ); } - QIODevice::Offset offsetPosition() const { return samplesToOffset( _pos ); } + TQIODevice::Offset offsetSize() const { return samplesToOffset( _size ); } + TQIODevice::Offset offsetPosition() const { return samplesToOffset( _pos ); } int size() const { return _size; } int position() const { return _pos; } /// Calculates an offset into a frames-value depending on the files settings (channels and bits) - int offsetToSamples( QIODevice::Offset ) const; - QIODevice::Offset samplesToOffset( int ) const; + int offsetToSamples( TQIODevice::Offset ) const; + TQIODevice::Offset samplesToOffset( int ) const; public slots: /// Creates a new empty buffer and marks it for recording. void newBuffer(); @@ -59,22 +59,22 @@ public slots: void deleteBuffer( KRecBuffer* =0 ); void writeData( Arts::mcopbyte* data, uint length ); - void writeData( QByteArray* ); - void writeData( QByteArray& ); + void writeData( TQByteArray* ); + void writeData( TQByteArray& ); - void save( const QString & ); - void exportwave( const QString & ); + void save( const TQString & ); + void exportwave( const TQString & ); - /// Fills a QByteArray with values from the specified Offset. - QByteArray* getData( int ); + /// Fills a TQByteArray with values from the specified Offset. + TQByteArray* getData( int ); - void getData( QByteArray& ); + void getData( TQByteArray& ); void newPos( int ); private slots: - void newPos( KRecBuffer*, QIODevice::Offset ); - void newSize( KRecBuffer*, QIODevice::Offset ); + void newPos( KRecBuffer*, TQIODevice::Offset ); + void newSize( KRecBuffer*, TQIODevice::Offset ); signals: /// Position signals void posChanged( int ); @@ -86,7 +86,7 @@ signals: void sNewBuffer( KRecBuffer* ); void sDeleteBuffer( KRecBuffer* ); - void filenameChanged( const QString & ); + void filenameChanged( const TQString & ); private: void saveProps(); void loadProps(); @@ -94,7 +94,7 @@ private: Creates a new buffer for a given file @param filename Name of the file */ - void newBuffer( const QString &filename ); + void newBuffer( const TQString &filename ); /** Adds buffer to the buffers. @param buffer The to be added buffer @@ -106,10 +106,10 @@ private: KRecBuffer* getTopBuffer_buffer( int ); bool _saved; - QString _filename; + TQString _filename; int _samplerate, _channels, _bits; int _currentBuffer; - QValueList _buffers; + TQValueList _buffers; KTempDir *_dir; KSimpleConfig *_config; int _pos, _size; @@ -123,16 +123,16 @@ class QFileInfo; class KConfig; class QDataStream; -class KRecBuffer : virtual public QObject { +class KRecBuffer : virtual public TQObject { Q_OBJECT public: - KRecBuffer( const QString &, int, bool, KRecFile*, const char* =0 ); + KRecBuffer( const TQString &, int, bool, KRecFile*, const char* =0 ); ~KRecBuffer(); // After how many samples in the File this Buffer starts... int startpos() const; - QIODevice::Offset size() const; + TQIODevice::Offset size() const; int sizeInSamples() const { return _krecfile->offsetToSamples( size() ); } /** @@ -148,37 +148,37 @@ public: @param config The configuration thats read @param dir The directory where the file is saved */ - static KRecBuffer* fromConfig( KConfig* config, QDir* dir, KRecFile* p, const char* n=0 ); + static KRecBuffer* fromConfig( KConfig* config, TQDir* dir, KRecFile* p, const char* n=0 ); - QString filename() const; + TQString filename() const; bool active() const; - QString title() const; - QString comment() const; + TQString title() const; + TQString comment() const; public slots: /// writes the data into the buffer void writeData( Arts::mcopbyte* data, uint length ); - void writeData( QByteArray* ); - void writeData( QByteArray& ); + void writeData( TQByteArray* ); + void writeData( TQByteArray& ); /// gets the data from the stream - void getData( QByteArray& ); + void getData( TQByteArray& ); - void setPos( QIODevice::Offset ); + void setPos( TQIODevice::Offset ); void setActive( bool ); void deleteBuffer(); - void setTitle( const QString & ); - void setComment( const QString & ); + void setTitle( const TQString & ); + void setComment( const TQString & ); /// Returns the sample at the specified position and channel. float getSample( int pos, int channel ); float* getsamples( int start, int end, int channel ); signals: - void posChanged( KRecBuffer*, QIODevice::Offset ); - void sizeChanged( KRecBuffer*, QIODevice::Offset ); + void posChanged( KRecBuffer*, TQIODevice::Offset ); + void sizeChanged( KRecBuffer*, TQIODevice::Offset ); void activeChanged( bool ); /// Is emitted when something has changed. @@ -187,13 +187,13 @@ signals: void deleteSelf( KRecBuffer* ); private: KRecFile* _krecfile; - QFile* _file; - QDataStream* _stream; - QFileInfo* _fileinfo; + TQFile* _file; + TQDataStream* _stream; + TQFileInfo* _fileinfo; bool _open, _active; - QIODevice::Offset _pos; + TQIODevice::Offset _pos; int _start; - QString _title, _comment; + TQString _title, _comment; }; #endif diff --git a/krec/krecfileview.cpp b/krec/krecfileview.cpp index b3604412..42911620 100644 --- a/krec/krecfileview.cpp +++ b/krec/krecfileview.cpp @@ -21,24 +21,24 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -KRecFileView::KRecFileView( QWidget* p, const char* n ) - : QWidget( p,n ) +KRecFileView::KRecFileView( TQWidget* p, const char* n ) + : TQWidget( p,n ) { kdDebug( 60005 ) << k_funcinfo << endl; - _layout_td = new QBoxLayout( this, QBoxLayout::TopToBottom, 5, 5 ); - _filename = new QLabel( i18n( "" ), this ); + _layout_td = new TQBoxLayout( this, TQBoxLayout::TopToBottom, 5, 5 ); + _filename = new TQLabel( i18n( "" ), this ); _layout_td->addWidget( _filename, 1 ); _fileview = new KRecFileWidget( 0, this ); _layout_td->addWidget( _fileview, 100 ); _timebar = new KRecTimeBar( this ); _layout_td->addWidget( _timebar, 50 ); - _layout_lr = new QBoxLayout( this, QBoxLayout::LeftToRight, 5, 5 ); + _layout_lr = new TQBoxLayout( this, TQBoxLayout::LeftToRight, 5, 5 ); _layout_td->addLayout( _layout_lr, 1 ); _layout_lr->addStretch( 20 ); _timedisplay = new KRecTimeDisplay( this ); @@ -57,15 +57,15 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; if ( _file ) { if ( !_file->filename().isNull() ) setFilename( _file->filename() ); else _filename->setText( i18n( "file with no name" ) ); - connect( _file, SIGNAL( posChanged( int ) ), this, SLOT( setPos( int ) ) ); - connect( _file, SIGNAL( posChanged( int ) ), _timebar, SLOT( newPos( int ) ) ); - connect( _file, SIGNAL( posChanged( int ) ), _timedisplay, SLOT( newPos( int ) ) ); - connect( _file, SIGNAL( sizeChanged( int ) ), this, SLOT( setSize( int ) ) ); - connect( _file, SIGNAL( sizeChanged( int ) ), _timebar, SLOT( newSize( int ) ) ); - connect( _file, SIGNAL( sizeChanged( int ) ), _timedisplay, SLOT( newSize( int ) ) ); - connect( _file, SIGNAL( filenameChanged( const QString &) ), this, SLOT( setFilename( const QString &) ) ); - connect( _file, SIGNAL( filenameChanged( const QString &) ), _timedisplay, SLOT( newFilename( const QString &) ) ); - connect( _timebar, SIGNAL( sNewPos( int ) ), _file, SLOT( newPos( int ) ) ); + connect( _file, TQT_SIGNAL( posChanged( int ) ), this, TQT_SLOT( setPos( int ) ) ); + connect( _file, TQT_SIGNAL( posChanged( int ) ), _timebar, TQT_SLOT( newPos( int ) ) ); + connect( _file, TQT_SIGNAL( posChanged( int ) ), _timedisplay, TQT_SLOT( newPos( int ) ) ); + connect( _file, TQT_SIGNAL( sizeChanged( int ) ), this, TQT_SLOT( setSize( int ) ) ); + connect( _file, TQT_SIGNAL( sizeChanged( int ) ), _timebar, TQT_SLOT( newSize( int ) ) ); + connect( _file, TQT_SIGNAL( sizeChanged( int ) ), _timedisplay, TQT_SLOT( newSize( int ) ) ); + connect( _file, TQT_SIGNAL( filenameChanged( const TQString &) ), this, TQT_SLOT( setFilename( const TQString &) ) ); + connect( _file, TQT_SIGNAL( filenameChanged( const TQString &) ), _timedisplay, TQT_SLOT( newFilename( const TQString &) ) ); + connect( _timebar, TQT_SIGNAL( sNewPos( int ) ), _file, TQT_SLOT( newPos( int ) ) ); _timebar->newPos( _file->position() ); _timebar->newSize( _file->size() ); _timedisplay->newSamplingRate( _file->samplerate() ); @@ -75,9 +75,9 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; _timedisplay->newPos( _file->position() ); _timedisplay->newSize( _file->size() ); } else { - disconnect( this, SLOT( setPos( QIODevice::Offset ) ) ); + disconnect( this, TQT_SLOT( setPos( TQIODevice::Offset ) ) ); _filename->setText( i18n( "" ) ); - _timedisplay->newFilename( QString::null ); + _timedisplay->newFilename( TQString::null ); } } } @@ -85,5 +85,5 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; void KRecFileView::updateGUI() { _fileview->resizeEvent(); } void KRecFileView::setPos( int ) {} void KRecFileView::setSize( int ) {} -void KRecFileView::setFilename( const QString &n ) { _filename->setText( n );} +void KRecFileView::setFilename( const TQString &n ) { _filename->setText( n );} diff --git a/krec/krecfileview.h b/krec/krecfileview.h index a445316f..42cf7c12 100644 --- a/krec/krecfileview.h +++ b/krec/krecfileview.h @@ -14,7 +14,7 @@ #ifndef KRECFILEVIEW_H #define KRECFILEVIEW_H -#include +#include class KRecFile; class KRecBuffer; @@ -27,10 +27,10 @@ class KRecBufferWidget; class KRecTimeBar; class KRecTimeDisplay; -class KRecFileView : virtual public QWidget { +class KRecFileView : virtual public TQWidget { Q_OBJECT public: - KRecFileView( QWidget*, const char* =0 ); + KRecFileView( TQWidget*, const char* =0 ); ~KRecFileView(); void setFile( KRecFile* ); @@ -40,10 +40,10 @@ public slots: private slots: void setPos( int ); void setSize( int ); - void setFilename( const QString & ); + void setFilename( const TQString & ); private: - QBoxLayout *_layout_td, *_layout_lr; - QLabel *_filename; + TQBoxLayout *_layout_td, *_layout_lr; + TQLabel *_filename; KRecFile *_file; KRecFileWidget *_fileview; diff --git a/krec/krecfileviewhelpers.cpp b/krec/krecfileviewhelpers.cpp index 8025f576..a064dfea 100644 --- a/krec/krecfileviewhelpers.cpp +++ b/krec/krecfileviewhelpers.cpp @@ -18,19 +18,19 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -KRecTimeBar::KRecTimeBar( QWidget* p, const char* n ) : QFrame( p,n ) +KRecTimeBar::KRecTimeBar( TQWidget* p, const char* n ) : TQFrame( p,n ) ,_size(10), _pos(0) { //kdDebug( 60005 ) << k_funcinfo << endl; setMinimumSize( 10,10 ); - setFrameStyle( QFrame::Panel|QFrame::Plain ); + setFrameStyle( TQFrame::Panel|TQFrame::Plain ); setLineWidth( 1 ); } @@ -38,24 +38,24 @@ KRecTimeBar::~KRecTimeBar() { //kdDebug( 60005 ) << k_funcinfo << endl; } -void KRecTimeBar::drawContents( QPainter* p ) { +void KRecTimeBar::drawContents( TQPainter* p ) { int w = contentsRect().width(); int h = contentsRect().height(); int t = contentsRect().top(); int l = contentsRect().left(); - p->setPen( QColor( 255,0,0 ) ); + p->setPen( TQColor( 255,0,0 ) ); if ( _pos < _size ) { int x = int( l + w * float( _pos ) / _size ); p->drawLine( x, t, x, int( t+h/2 ) ); } else { - QPointArray tmp; + TQPointArray tmp; tmp.putPoints( 0, 4, l+w-3,t+h/4, l+w-3,t+h/4*3, l+w,t+h/2, l+w-3,t+h/4 ); p->drawPolyline( tmp ); } } -void KRecTimeBar::mouseReleaseEvent( QMouseEvent* qme ) { - QIODevice::Offset pos = 0; +void KRecTimeBar::mouseReleaseEvent( TQMouseEvent* qme ) { + TQIODevice::Offset pos = 0; if ( _size > 0 ) pos = int( float( qme->x() - contentsRect().left() ) / contentsRect().width() * _size ); //kdDebug( 60005 ) << k_funcinfo << "New Position: " << pos << endl; @@ -73,18 +73,18 @@ void KRecTimeBar::newSize( int n ) { } -KRecTimeDisplay::KRecTimeDisplay( QWidget* p, const char* n ) - : QFrame( p,n ) +KRecTimeDisplay::KRecTimeDisplay( TQWidget* p, const char* n ) + : TQFrame( p,n ) , _posmenu( 0 ), _sizemenu( 0 ) , _sizevalue( 0 ), _posvalue( 0 ) , _samplingRate( 44100 ), _bits( 16 ), _channels( 2 ) { _position = new AKLabel( this ); - connect( _position, SIGNAL( showContextMenu( const QPoint & ) ), this, SLOT( timeContextMenu( const QPoint &) ) ); + connect( _position, TQT_SIGNAL( showContextMenu( const TQPoint & ) ), this, TQT_SLOT( timeContextMenu( const TQPoint &) ) ); _size = new AKLabel( this ); - connect( _size, SIGNAL( showContextMenu( const QPoint &) ), this, SLOT( sizeContextMenu( const QPoint &) ) ); + connect( _size, TQT_SIGNAL( showContextMenu( const TQPoint &) ), this, TQT_SLOT( sizeContextMenu( const TQPoint &) ) ); - _layout = new QBoxLayout( this, QBoxLayout::LeftToRight, 0, 2 ); + _layout = new TQBoxLayout( this, TQBoxLayout::LeftToRight, 0, 2 ); _layout->addStretch( 100 ); _layout->addWidget( _position ); _layout->addSpacing( 2 ); @@ -98,10 +98,10 @@ KRecTimeDisplay::~KRecTimeDisplay() { void KRecTimeDisplay::reset() { _position->setText( positionText( 0, 0 ) ); _size->setText( sizeText( 0, 0 ) ); - _position->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + _position->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); _position->setLineWidth( 1 ); _position->setMargin( 2 ); - _size->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + _size->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); _size->setLineWidth( 1 ); _size->setMargin( 2 ); } @@ -119,7 +119,7 @@ void KRecTimeDisplay::newSize( int n ) { _sizevalue = n; _size->setText( sizeText( KRecGlobal::the()->timeFormatMode(), n ) ); } -void KRecTimeDisplay::newFilename( const QString &n ) { +void KRecTimeDisplay::newFilename( const TQString &n ) { _filename = n; if ( _filename.isNull() ) { newPos( 0 ); @@ -127,8 +127,8 @@ void KRecTimeDisplay::newFilename( const QString &n ) { } } -QString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { - QString text; +TQString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { + TQString text; bool verbose = mode / 100; switch ( mode % 100 ) { case 3: @@ -137,13 +137,13 @@ QString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { int kbyte = bytes % 1024; bytes /= 1024; int mbyte = bytes % 1024; - text += QString::number( mbyte ); + text += TQString::number( mbyte ); if ( verbose ) text += i18n( "MB" ); text += "."; if ( kbyte < 1000 ) text += "0"; if ( kbyte < 100 ) text += "0"; if ( kbyte < 10 ) text += "0"; - text += QString::number( kbyte ); + text += TQString::number( kbyte ); if ( verbose ) text += i18n( "kB" ); } break; @@ -157,20 +157,20 @@ QString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { int mins = value % 60; value = value / 60; if ( value ) { - text += QString::number( value ); + text += TQString::number( value ); if ( verbose ) text += i18n( "hours" ); text += ":"; } if ( mins<10 ) text += "0"; - text += QString::number( mins ); + text += TQString::number( mins ); if ( verbose ) text += i18n( "mins" ); text += ":"; if ( secs<10 ) text += "0"; - text += QString::number( secs ); + text += TQString::number( secs ); if ( verbose ) text += i18n( "secs" ); text += "."; if ( frames < 10 ) text += "0"; - text += QString::number( frames ); + text += TQString::number( frames ); if ( verbose ) text += i18n( "frames" ); } break; @@ -184,36 +184,36 @@ QString KRecTimeDisplay::formatTime( const int mode, const int sample ) const { int mins = value % 60; value = value / 60; if ( value ) { - text += QString::number( value ); + text += TQString::number( value ); if ( verbose ) text += i18n( "hours" ); text += ":"; } if ( mins<10 ) text += "0"; - text += QString::number( mins ); + text += TQString::number( mins ); if ( verbose ) text += i18n( "mins" ); text += ":"; if ( secs<10 ) text += "0"; - text += QString::number( secs ); + text += TQString::number( secs ); if ( verbose ) text += i18n( "secs" ); text += "."; if ( samples < 10000 && ( _samplingRate / 60 > 10000 ) ) text += "0"; if ( samples < 1000 ) text += "0"; if ( samples < 100 ) text += "0"; if ( samples < 10 ) text += "0"; - text += QString::number( samples ); + text += TQString::number( samples ); if ( verbose ) text += i18n( "samples" ); } break; case 0: default: - text = QString::number( sample ); + text = TQString::number( sample ); if ( verbose ) text += i18n( "samples" ); break; }; return text; } -void KRecTimeDisplay::timeContextMenu( QPopupMenu* menu ) { +void KRecTimeDisplay::timeContextMenu( TQPopupMenu* menu ) { if ( !_filename.isNull() ) { menu->insertSeparator( 0 ); menu->insertItem( i18n( "kByte: %1" ).arg( formatTime( 3, _posvalue ) ), -1, 0 ); @@ -226,13 +226,13 @@ void KRecTimeDisplay::timeContextMenu( QPopupMenu* menu ) { } else menu->insertItem( i18n( "" ), -1, 0 ); } -void KRecTimeDisplay::timeContextMenu( const QPoint &point ) { +void KRecTimeDisplay::timeContextMenu( const TQPoint &point ) { if ( _posmenu ) delete _posmenu; _posmenu = new KPopupMenu( this ); timeContextMenu( _posmenu ); _posmenu->exec( point ); } -void KRecTimeDisplay::sizeContextMenu( QPopupMenu* menu ) { +void KRecTimeDisplay::sizeContextMenu( TQPopupMenu* menu ) { if ( !_filename.isNull() ) { menu->insertSeparator( 0 ); menu->insertItem( i18n( "kByte: %1" ).arg( formatTime( 3, _sizevalue ) ), -1, 0 ); @@ -245,7 +245,7 @@ void KRecTimeDisplay::sizeContextMenu( QPopupMenu* menu ) { } else menu->insertItem( i18n( "" ), -1, 0 ); } -void KRecTimeDisplay::sizeContextMenu( const QPoint &point ) { +void KRecTimeDisplay::sizeContextMenu( const TQPoint &point ) { if ( _sizemenu ) delete _sizemenu; _sizemenu = new KPopupMenu( this ); sizeContextMenu( _sizemenu ); @@ -254,14 +254,14 @@ void KRecTimeDisplay::sizeContextMenu( const QPoint &point ) { void KRecTimeDisplay::jumpToTime() { } -QString KRecTimeDisplay::positionText( int m, int n ) { +TQString KRecTimeDisplay::positionText( int m, int n ) { return i18n( "Position: %1" ).arg( formatTime( m,n ) ); } -QString KRecTimeDisplay::sizeText( int m, int n ) { +TQString KRecTimeDisplay::sizeText( int m, int n ) { return i18n( "Size: %1" ).arg( formatTime( m,n ) ); } -void AKLabel::mousePressEvent( QMouseEvent* qme ) { +void AKLabel::mousePressEvent( TQMouseEvent* qme ) { if ( qme->button() == Qt::RightButton ) emit showContextMenu( qme->globalPos() ); } diff --git a/krec/krecfileviewhelpers.h b/krec/krecfileviewhelpers.h index 71881f1e..db53d911 100644 --- a/krec/krecfileviewhelpers.h +++ b/krec/krecfileviewhelpers.h @@ -14,10 +14,10 @@ #ifndef KRECFILEVIEWHELPERS_H #define KRECFILEVIEWHELPERS_H -#include -#include -#include -#include +#include +#include +#include +#include #include class QBoxLayout; @@ -25,15 +25,15 @@ class AKLabel; class QPopupMenu; class KPopupMenu; -class KRecTimeBar : public QFrame { +class KRecTimeBar : public TQFrame { Q_OBJECT public: - KRecTimeBar( QWidget*, const char* =0 ); + KRecTimeBar( TQWidget*, const char* =0 ); ~KRecTimeBar(); - void drawContents( QPainter* ); + void drawContents( TQPainter* ); - void mouseReleaseEvent( QMouseEvent* ); + void mouseReleaseEvent( TQMouseEvent* ); public slots: void newPos( int ); @@ -54,10 +54,10 @@ private: * +100 - verbose ( [XXhours:]XXmins:XXsecs:... ) */ -class KRecTimeDisplay : public QFrame { +class KRecTimeDisplay : public TQFrame { Q_OBJECT public: - KRecTimeDisplay( QWidget*, const char* =0 ); + KRecTimeDisplay( TQWidget*, const char* =0 ); ~KRecTimeDisplay(); /// Resets the display to its defaultvalues @@ -65,24 +65,24 @@ public: public slots: void newPos( int ); void newSize( int ); - void newFilename( const QString & ); + void newFilename( const TQString & ); void newSamplingRate( int n ) { _samplingRate = n; } void newChannels( int n ) { _channels = n; } void newBits( int n ) { _bits = n; } signals: void sNewPos( int ); private slots: - void timeContextMenu( QPopupMenu* ); - void timeContextMenu( const QPoint &); - void sizeContextMenu( QPopupMenu* ); - void sizeContextMenu( const QPoint &); + void timeContextMenu( TQPopupMenu* ); + void timeContextMenu( const TQPoint &); + void sizeContextMenu( TQPopupMenu* ); + void sizeContextMenu( const TQPoint &); void jumpToTime(); private: - QString positionText( int, int ); - QString sizeText( int, int ); - QString formatTime( const int mode, const int samples ) const; - QString _filename; - QBoxLayout *_layout; + TQString positionText( int, int ); + TQString sizeText( int, int ); + TQString formatTime( const int mode, const int samples ) const; + TQString _filename; + TQBoxLayout *_layout; AKLabel *_position, *_size; KPopupMenu *_posmenu, *_sizemenu; int _sizevalue, _posvalue; @@ -90,16 +90,16 @@ private: }; -class AKLabel : public QLabel { +class AKLabel : public TQLabel { Q_OBJECT public: - AKLabel( QWidget* p, const char* n=0, WFlags f=0 ) : QLabel( p, n, f ) { init(); } - AKLabel( const QString& s, QWidget* p, const char* n=0, WFlags f=0 ) : QLabel( s, p, n, f ) { init(); } - AKLabel( QWidget* w, const QString& s, QWidget* p, const char* n=0, WFlags f=0 ) : QLabel( w,s,p,n,f ) { init(); } + AKLabel( TQWidget* p, const char* n=0, WFlags f=0 ) : TQLabel( p, n, f ) { init(); } + AKLabel( const TQString& s, TQWidget* p, const char* n=0, WFlags f=0 ) : TQLabel( s, p, n, f ) { init(); } + AKLabel( TQWidget* w, const TQString& s, TQWidget* p, const char* n=0, WFlags f=0 ) : TQLabel( w,s,p,n,f ) { init(); } - void mousePressEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); signals: - void showContextMenu( const QPoint & ); + void showContextMenu( const TQPoint & ); private: void init() { setFont( KGlobalSettings::fixedFont() ); diff --git a/krec/krecfilewidgets.cpp b/krec/krecfilewidgets.cpp index 44fd6a4e..16f2db93 100644 --- a/krec/krecfilewidgets.cpp +++ b/krec/krecfilewidgets.cpp @@ -19,26 +19,26 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -KRecFileWidget::KRecFileWidget( KRecFile* file, QWidget* p, const char* n ) - : QFrame( p,n ) +KRecFileWidget::KRecFileWidget( KRecFile* file, TQWidget* p, const char* n ) + : TQFrame( p,n ) , _file( 0 ) { kdDebug( 60005 ) << k_funcinfo << file << endl; - setFrameStyle( QFrame::Panel|QFrame::Sunken ); + setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); setLineWidth( 1 ); setMinimumHeight( 20 ); @@ -53,7 +53,7 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; if ( _file != file ) { _file = file; //kdDebug( 60005 ) << "Removing widgets" << endl; - QValueList::iterator it = bufferwidgets.begin(); + TQValueList::iterator it = bufferwidgets.begin(); while ( it != bufferwidgets.end() ) { delete ( *it ); ++it; @@ -61,22 +61,22 @@ kdDebug( 60005 ) << k_funcinfo << file << endl; bufferwidgets.clear(); resizeEvent(); if ( _file ) { - for ( QValueList::iterator it = _file->_buffers.begin(); it != _file->_buffers.end(); ++it ) { + for ( TQValueList::iterator it = _file->_buffers.begin(); it != _file->_buffers.end(); ++it ) { newBuffer( ( *it ) ); } - connect( _file, SIGNAL( sNewBuffer( KRecBuffer* ) ), this, SLOT( newBuffer( KRecBuffer* ) ) ); - connect( _file, SIGNAL( sDeleteBuffer( KRecBuffer* ) ), this, SLOT( deleteBuffer( KRecBuffer* ) ) ); + connect( _file, TQT_SIGNAL( sNewBuffer( KRecBuffer* ) ), this, TQT_SLOT( newBuffer( KRecBuffer* ) ) ); + connect( _file, TQT_SIGNAL( sDeleteBuffer( KRecBuffer* ) ), this, TQT_SLOT( deleteBuffer( KRecBuffer* ) ) ); //kdDebug( 60005 ) << _file->_currentBuffer << endl; } } } -void KRecFileWidget::resizeEvent( QResizeEvent* /*qre*/ ) { +void KRecFileWidget::resizeEvent( TQResizeEvent* /*qre*/ ) { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _file ) { int w = contentsRect().width(); int h = contentsRect().height(); - QValueList::iterator it; + TQValueList::iterator it; for ( it = bufferwidgets.begin(); it != bufferwidgets.end(); ++it ) { int width, x; if ( !_file->offsetSize()==0 && !( *it )->buffer()->size()==0 ) { @@ -91,21 +91,21 @@ void KRecFileWidget::resizeEvent( QResizeEvent* /*qre*/ ) { } } -void KRecFileWidget::mouseReleaseEvent( QMouseEvent* qme ) { +void KRecFileWidget::mouseReleaseEvent( TQMouseEvent* qme ) { kdDebug( 60005 ) << k_funcinfo << "(" << qme->x() << "|" << qme->y() << ")" << endl; } void KRecFileWidget::newBuffer( KRecBuffer* buffer ) { //kdDebug( 60005 ) << k_funcinfo << buffer << endl; KRecBufferWidget *tmp = new KRecBufferWidget( buffer, this ); - connect( tmp, SIGNAL( popupMenu( KRecBufferWidget*, QPoint ) ), this, SLOT( popupMenu( KRecBufferWidget*, QPoint ) ) ); + connect( tmp, TQT_SIGNAL( popupMenu( KRecBufferWidget*, TQPoint ) ), this, TQT_SLOT( popupMenu( KRecBufferWidget*, TQPoint ) ) ); bufferwidgets.append( tmp ); tmp->show(); resizeEvent(); } void KRecFileWidget::deleteBuffer( KRecBuffer* buffer ) { //kdDebug( 60005 ) << k_funcinfo << buffer << endl; - QValueList::iterator it = bufferwidgets.begin(); + TQValueList::iterator it = bufferwidgets.begin(); KRecBufferWidget* tmp = 0; while ( it != bufferwidgets.end() ) { if ( ( *it )->buffer() == buffer ) tmp = ( *it ); @@ -117,14 +117,14 @@ void KRecFileWidget::deleteBuffer( KRecBuffer* buffer ) { } } -void KRecFileWidget::popupMenu( KRecBufferWidget* bw, QPoint pos ) { +void KRecFileWidget::popupMenu( KRecBufferWidget* bw, TQPoint pos ) { KPopupMenu tmp( this ); KToggleAction* _activeaction = new KToggleAction( i18n( "Toggle Active/Disabled State" ), KShortcut(), this ); _activeaction->setChecked( bw->buffer()->active() ); - connect( _activeaction, SIGNAL( toggled( bool ) ), bw->buffer(), SLOT( setActive( bool ) ) ); - KAction* _removeaction = new KAction( i18n( "Remove This Part" ), "fileremove", KShortcut(), bw->buffer(), SLOT( deleteBuffer() ), this ); - KAction* _changetitle = new KAction( i18n( "Change Title of This Part" ), KShortcut(), bw, SLOT( changeTitle() ), this ); - KAction* _changecomment = new KAction( i18n( "Change Comment of This Part" ), KShortcut(), bw, SLOT( changeComment() ), this ); + connect( _activeaction, TQT_SIGNAL( toggled( bool ) ), bw->buffer(), TQT_SLOT( setActive( bool ) ) ); + KAction* _removeaction = new KAction( i18n( "Remove This Part" ), "fileremove", KShortcut(), bw->buffer(), TQT_SLOT( deleteBuffer() ), this ); + KAction* _changetitle = new KAction( i18n( "Change Title of This Part" ), KShortcut(), bw, TQT_SLOT( changeTitle() ), this ); + KAction* _changecomment = new KAction( i18n( "Change Comment of This Part" ), KShortcut(), bw, TQT_SLOT( changeComment() ), this ); _activeaction->plug( &tmp ); _changetitle->plug( &tmp ); _changecomment->plug( &tmp ); @@ -141,20 +141,20 @@ void KRecFileWidget::popupMenu( KRecBufferWidget* bw, QPoint pos ) { -KRecBufferWidget::KRecBufferWidget( KRecBuffer* buffer, QWidget* p, const char* n ) - : QFrame( p,n ) +KRecBufferWidget::KRecBufferWidget( KRecBuffer* buffer, TQWidget* p, const char* n ) + : TQFrame( p,n ) , _buffer( buffer ) , _main_region( 0 ), _title_region( 0 ), _fileend_region( 0 ) , alreadyreadsize( 0 ) { - connect( _buffer, SIGNAL( somethingChanged() ), this, SLOT( update() ) ); + connect( _buffer, TQT_SIGNAL( somethingChanged() ), this, TQT_SLOT( update() ) ); kdDebug( 60005 ) << k_funcinfo << endl; } KRecBufferWidget::~KRecBufferWidget() { kdDebug( 60005 ) << k_funcinfo << endl; } -void KRecBufferWidget::resizeEvent( QResizeEvent* ) { +void KRecBufferWidget::resizeEvent( TQResizeEvent* ) { //kdDebug( 60005 ) << k_funcinfo << endl; } @@ -164,17 +164,17 @@ void KRecBufferWidget::initLayout() { int _title_width = fontMetrics().boundingRect( _buffer->filename() ).width() + 10; if ( _title_width > width() ) _title_width = width(); if ( _main_region ) delete _main_region; - _main_region = new QRegion( QRect( 0, _title_height, width(), height()-_title_height ) ); + _main_region = new TQRegion( TQRect( 0, _title_height, width(), height()-_title_height ) ); if ( _title_region ) delete _title_region; if ( _buffer->active() ) - _title_region = new QRegion( QRect( 0, 0, _title_width, _title_height ) ); + _title_region = new TQRegion( TQRect( 0, 0, _title_width, _title_height ) ); else - _title_region = new QRegion( QRect( 0, _title_height/2, _title_width, _title_height/2 ) ); + _title_region = new TQRegion( TQRect( 0, _title_height/2, _title_width, _title_height/2 ) ); if ( _fileend_region ) { delete _fileend_region; _fileend_region=0; } if ( _buffer->active() ) - _fileend_region = new QRegion( QRect( width()-4, _title_height/2, 4, _title_height/2 ) ); + _fileend_region = new TQRegion( TQRect( width()-4, _title_height/2, 4, _title_height/2 ) ); else - _fileend_region = new QRegion( QRect( width()-4, _title_height/4*3, 4, _title_height/4 ) ); + _fileend_region = new TQRegion( TQRect( width()-4, _title_height/4*3, 4, _title_height/4 ) ); setMask( _main_region->unite( *_title_region ).unite( *_fileend_region ) ); @@ -183,60 +183,60 @@ void KRecBufferWidget::initLayout() { _bottomright = _main_region->boundingRect().bottomRight(); _topright = _main_region->boundingRect().topRight(); _bottommiddle = _title_region->boundingRect().bottomRight(); - _bottommiddle += QPoint( 0, 1 ); + _bottommiddle += TQPoint( 0, 1 ); _topmiddle = _title_region->boundingRect().topRight(); } -void KRecBufferWidget::drawFrame( QPainter* p ) { +void KRecBufferWidget::drawFrame( TQPainter* p ) { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _buffer->active() ) p->setBrush( colorGroup().highlight() ); else p->setBrush( colorGroup().highlight().dark() ); - p->setPen( QPen( colorGroup().dark(), 1 ) ); + p->setPen( TQPen( colorGroup().dark(), 1 ) ); p->drawRect( _title_region->boundingRect() ); p->drawRect( _fileend_region->boundingRect() ); - p->setBrush( QBrush() ); - p->setPen( QPen( colorGroup().dark(), 1 ) ); + p->setBrush( TQBrush() ); + p->setPen( TQPen( colorGroup().dark(), 1 ) ); p->drawRect( _main_region->boundingRect() ); - p->setPen( QPen( colorGroup().highlightedText() ) ); + p->setPen( TQPen( colorGroup().highlightedText() ) ); p->drawText( _title_region->boundingRect(), Qt::AlignCenter, _buffer->title() ); } -void KRecBufferWidget::drawContents( QPainter* p ) { +void KRecBufferWidget::drawContents( TQPainter* p ) { //kdDebug( 60005 ) << k_funcinfo << endl; initSamples(); int space = ( _main_region->boundingRect().height() - 2 ) / 2; int xoffset = _main_region->boundingRect().top() + space + 1; - p->setPen( QPen( QColor( 0,0,255 ) ) ); + p->setPen( TQPen( TQColor( 0,0,255 ) ) ); for ( uint i=0; idrawPoint( i, int( samples1[ i ]->getMax() * space + xoffset ) ); for ( uint i=0; idrawPoint( i, int( samples1[ i ]->getMin() * space + xoffset ) ); - p->setPen( QPen( QColor( 255,0,0 ) ) ); + p->setPen( TQPen( TQColor( 255,0,0 ) ) ); for ( uint i=0; idrawPoint( i, int( samples1[ i ]->getValue() * space + xoffset ) ); - p->setPen( QPen( QColor( 0,0,0 ) ) ); - QString comment = _buffer->comment(); + p->setPen( TQPen( TQColor( 0,0,0 ) ) ); + TQString comment = _buffer->comment(); if ( comment.isNull() ) comment = i18n( "Lots of Data" ); p->drawText( _main_region->boundingRect(), Qt::AlignCenter, comment ); } -void KRecBufferWidget::paintEvent( QPaintEvent* ) { +void KRecBufferWidget::paintEvent( TQPaintEvent* ) { initLayout(); - QPainter *p = new QPainter( this ); + TQPainter *p = new TQPainter( this ); drawFrame( p ); drawContents( p ); delete p; } -void KRecBufferWidget::mousePressEvent( QMouseEvent* qme ) { +void KRecBufferWidget::mousePressEvent( TQMouseEvent* qme ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( _main_region->contains( qme->pos() ) || _title_region->contains( qme->pos() ) ) if ( qme->button() == Qt::RightButton ) emit popupMenu( this, qme->globalPos() ); } -void KRecBufferWidget::mouseDoubleClickEvent( QMouseEvent* qme ) { +void KRecBufferWidget::mouseDoubleClickEvent( TQMouseEvent* qme ) { if ( _title_region->contains( qme->pos() ) ) _buffer->setActive( !_buffer->active() ); } @@ -301,12 +301,12 @@ void KRecBufferWidget::initSamples() { void KRecBufferWidget::changeTitle() { - QString tmp = KInputDialog::getText( i18n( "New Title" ), i18n( "Enter new part title:" ), _buffer->title() ); + TQString tmp = KInputDialog::getText( i18n( "New Title" ), i18n( "Enter new part title:" ), _buffer->title() ); if ( !tmp.isNull() ) _buffer->setTitle( tmp ); } void KRecBufferWidget::changeComment() { - QString tmp = KInputDialog::getText( i18n( "New Comment" ), i18n( "Enter new part comment:" ), _buffer->comment() ); + TQString tmp = KInputDialog::getText( i18n( "New Comment" ), i18n( "Enter new part comment:" ), _buffer->comment() ); if ( !tmp.isNull() ) _buffer->setComment( tmp ); } diff --git a/krec/krecfilewidgets.h b/krec/krecfilewidgets.h index cca78907..fe389b16 100644 --- a/krec/krecfilewidgets.h +++ b/krec/krecfilewidgets.h @@ -14,9 +14,9 @@ #ifndef KRECFILEWIDGETS_H #define KRECFILEWIDGETS_H -#include -#include -#include +#include +#include +#include class KRecFile; class KRecBuffer; @@ -35,27 +35,27 @@ class QPainter; class KAction; class KToggleAction; -class KRecFileWidget : public QFrame { +class KRecFileWidget : public TQFrame { Q_OBJECT public: - KRecFileWidget( KRecFile*, QWidget*, const char* =0 ); + KRecFileWidget( KRecFile*, TQWidget*, const char* =0 ); ~KRecFileWidget(); void setFile( KRecFile* ); - void resizeEvent( QResizeEvent* =0 ); - void mouseReleaseEvent( QMouseEvent* ); + void resizeEvent( TQResizeEvent* =0 ); + void mouseReleaseEvent( TQMouseEvent* ); public slots: void newBuffer( KRecBuffer* ); void deleteBuffer( KRecBuffer* ); private slots: - void popupMenu( KRecBufferWidget*, QPoint ); + void popupMenu( KRecBufferWidget*, TQPoint ); private: KRecFile *_file; - QValueList bufferwidgets; + TQValueList bufferwidgets; }; -class Sample : public QObject { +class Sample : public TQObject { Q_OBJECT public: Sample() : _values( 0 ), _min( 0 ), _max( 0 ) {} @@ -73,24 +73,24 @@ private: int _count; }; -class KRecBufferWidget : public QFrame { +class KRecBufferWidget : public TQFrame { Q_OBJECT public: - KRecBufferWidget( KRecBuffer*, QWidget*, const char* =0 ); + KRecBufferWidget( KRecBuffer*, TQWidget*, const char* =0 ); ~KRecBufferWidget(); const KRecBuffer* buffer() { return _buffer; } - void resizeEvent( QResizeEvent* ); + void resizeEvent( TQResizeEvent* ); - void drawFrame( QPainter* ); - void drawContents( QPainter* ); - void paintEvent( QPaintEvent* ); + void drawFrame( TQPainter* ); + void drawContents( TQPainter* ); + void paintEvent( TQPaintEvent* ); - void mousePressEvent( QMouseEvent* ); - void mouseDoubleClickEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); + void mouseDoubleClickEvent( TQMouseEvent* ); signals: - void popupMenu( KRecBufferWidget*, QPoint ); + void popupMenu( KRecBufferWidget*, TQPoint ); private slots: void initSamples(); void changeTitle(); @@ -98,10 +98,10 @@ private slots: private: void initLayout(); KRecBuffer *_buffer; - QRegion *_main_region, *_title_region, *_fileend_region; - QPoint _topleft, _bottomleft, _bottomright, _topright, _topmiddle, _bottommiddle; + TQRegion *_main_region, *_title_region, *_fileend_region; + TQPoint _topleft, _bottomleft, _bottomright, _topright, _topmiddle, _bottommiddle; int _title_height; - QValueList samples1, samples2; + TQValueList samples1, samples2; uint alreadyreadsize; }; diff --git a/krec/krecglobal.cpp b/krec/krecglobal.cpp index 94683995..58822f50 100644 --- a/krec/krecglobal.cpp +++ b/krec/krecglobal.cpp @@ -17,26 +17,26 @@ #include "krecexport_template.h" #include -#include +#include #include #include #include #include -#include +#include #include #include -KRecGlobal::KRecGlobal( QObject* p, const char* n ) - : QObject( p,n ) +KRecGlobal::KRecGlobal( TQObject* p, const char* n ) + : TQObject( p,n ) , _qwidget( 0 ) , _statusbar( 0 ) , _timeformatcache( -1 ) , _framebasecache( -1 ) { //kdDebug( 60005 ) << k_funcinfo << endl; - _exports = new QDict; + _exports = new TQDict; } KRecGlobal::~KRecGlobal() { //kdDebug( 60005 ) << k_funcinfo << endl; @@ -48,13 +48,13 @@ KRecGlobal* KRecGlobal::the() { return object; } -void KRecGlobal::setMainWidget( QWidget* n ) { _qwidget = n; } -QWidget* KRecGlobal::mainWidget() { return _qwidget; } +void KRecGlobal::setMainWidget( TQWidget* n ) { _qwidget = n; } +TQWidget* KRecGlobal::mainWidget() { return _qwidget; } KConfig* KRecGlobal::kconfig() { return kapp->config(); } void KRecGlobal::setStatusBar( KStatusBar *bar ) { _statusbar = bar; } -void KRecGlobal::message( const QString &text ) { if ( _statusbar ) _statusbar->message( text, 2000 ); } +void KRecGlobal::message( const TQString &text ) { if ( _statusbar ) _statusbar->message( text, 2000 ); } bool KRecGlobal::registerExport( KRecExportItem* item ) { //kdDebug( 60005 ) << k_funcinfo << "About to register ExportItem for \"" << item->exportFormat() << "\" extensions:\"" << item->extensions() << "\"" << endl; @@ -65,17 +65,17 @@ bool KRecGlobal::registerExport( KRecExportItem* item ) { return true; } -KRecExportItem* KRecGlobal::getExportItem( const QString &exportFormat ) { +KRecExportItem* KRecGlobal::getExportItem( const TQString &exportFormat ) { KRecExportItem *tmp = _exports->find( exportFormat ); return tmp->newItem(); } -QStringList KRecGlobal::exportFormats() const { +TQStringList KRecGlobal::exportFormats() const { return _exportformats; } -QString KRecGlobal::exportFormatEndings() const { - QString out; +TQString KRecGlobal::exportFormatEndings() const { + TQString out; KTrader::OfferList offers = KTrader::self()->query( "KRec/exportplugin" ); KTrader::OfferList::iterator it = offers.begin(); @@ -88,7 +88,7 @@ QString KRecGlobal::exportFormatEndings() const { return out; } -KRecExportItem* KRecGlobal::getExportItemForEnding( const QString &ending ) { +KRecExportItem* KRecGlobal::getExportItemForEnding( const TQString &ending ) { KTrader::OfferList offers = KTrader::self()->query( "KRec/exportplugin" ); KTrader::OfferList::iterator it = offers.begin(); while ( it!=offers.end() ) { diff --git a/krec/krecglobal.h b/krec/krecglobal.h index 6955eb14..f29a786d 100644 --- a/krec/krecglobal.h +++ b/krec/krecglobal.h @@ -14,10 +14,10 @@ #ifndef KREC_GLOBAL_H #define KREC_GLOBAL_H -#include -#include -#include -#include +#include +#include +#include +#include class KConfig; class QWidget; @@ -25,10 +25,10 @@ class KStatusBar; class KRecExportItem; -class KRecGlobal : public QObject { +class KRecGlobal : public TQObject { Q_OBJECT private: - KRecGlobal( QObject* =0, const char* =0 ); + KRecGlobal( TQObject* =0, const char* =0 ); ~KRecGlobal(); public: @@ -41,13 +41,13 @@ public: /** * Sets the MainWidget. */ - void setMainWidget( QWidget* ); + void setMainWidget( TQWidget* ); /** * Returns a pointer to the mainwidget. * Usefull to display Messageboxes, etc correctly without beeing a - * QWidget or knowing about a parent QWidget. + * TQWidget or knowing about a parent TQWidget. */ - QWidget* mainWidget(); + TQWidget* mainWidget(); /// @return kapp->config() static KConfig* kconfig(); @@ -58,7 +58,7 @@ public: * Puts a message into the statusbar. * Usefull for showing messages without knowing about the Statusbar. */ - void message( const QString & ); + void message( const TQString & ); /// Registers a KRecExportItem static bool registerExport( KRecExportItem* ); @@ -66,13 +66,13 @@ public: * Returns a new KRecExportItem for the specified exportFormat. * If now Item can be found the return value is 0. */ - KRecExportItem* getExportItem( const QString &exportFormat ); + KRecExportItem* getExportItem( const TQString &exportFormat ); /// - KRecExportItem* getExportItemForEnding( const QString & ); + KRecExportItem* getExportItemForEnding( const TQString & ); /// Returns a list of exportFormats. - QStringList exportFormats() const; + TQStringList exportFormats() const; /// Returns a list of fileendings. - QString exportFormatEndings() const; + TQString exportFormatEndings() const; /** * Gets/Sets the actual mode for formating time values. @@ -85,10 +85,10 @@ public: int frameBase(); void setFrameBase( int ); private: - QWidget *_qwidget; + TQWidget *_qwidget; KStatusBar *_statusbar; - QDict *_exports; - QStringList _exportformats; + TQDict *_exports; + TQStringList _exportformats; int _timeformatcache, _framebasecache; }; diff --git a/krec/krecnewproperties.cpp b/krec/krecnewproperties.cpp index b63cd032..12d386ed 100644 --- a/krec/krecnewproperties.cpp +++ b/krec/krecnewproperties.cpp @@ -18,24 +18,24 @@ #include "krecconfig_fileswidget.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -KRecNewProperties::KRecNewProperties( QWidget* p, const char* n ) - : QDialog( p,n, 0, Qt::WType_Dialog|Qt::WStyle_Customize|Qt::WStyle_DialogBorder ) - , _filename( QString::null ) +KRecNewProperties::KRecNewProperties( TQWidget* p, const char* n ) + : TQDialog( p,n, 0, Qt::WType_Dialog|Qt::WStyle_Customize|Qt::WStyle_DialogBorder ) + , _filename( TQString::null ) , _samplerate( 44100 ), _channels( 2 ), _bits( 16 ) { kdDebug( 60005 ) << k_funcinfo << endl; @@ -46,10 +46,10 @@ kdDebug( 60005 ) << k_funcinfo << endl; _bits = config->readNumEntry( "Bits", 16 ); _usedefaults = config->readBoolEntry( "UseDefaults", false ); - _layout = new QVBoxLayout( this, 5, 5 ); + _layout = new TQVBoxLayout( this, 5, 5 ); - QLabel *captionlabel = new QLabel( this ); - QFont labelfont( captionlabel->font() ); + TQLabel *captionlabel = new TQLabel( this ); + TQFont labelfont( captionlabel->font() ); labelfont.setPointSize( labelfont.pointSize()*3/2 ); captionlabel->setFont( labelfont ); captionlabel->setText( i18n( "Properties for the new File" ) ); @@ -57,16 +57,16 @@ kdDebug( 60005 ) << k_funcinfo << endl; _layout->addWidget( captionlabel ); _filewidget = new KRecConfigFilesWidget( this ); - connect( _filewidget, SIGNAL( sRateChanged( int ) ), this, SLOT( ratechanged( int ) ) ); - connect( _filewidget, SIGNAL( sChannelsChanged( int ) ), this, SLOT( channelschanged( int ) ) ); - connect( _filewidget, SIGNAL( sBitsChanged( int ) ), this, SLOT( bitschanged( int ) ) ); - connect( _filewidget, SIGNAL( sUseDefaultsChanged( bool ) ), this, SLOT( usedefaultschanged( bool ) ) ); + connect( _filewidget, TQT_SIGNAL( sRateChanged( int ) ), this, TQT_SLOT( ratechanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sChannelsChanged( int ) ), this, TQT_SLOT( channelschanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sBitsChanged( int ) ), this, TQT_SLOT( bitschanged( int ) ) ); + connect( _filewidget, TQT_SIGNAL( sUseDefaultsChanged( bool ) ), this, TQT_SLOT( usedefaultschanged( bool ) ) ); - QWidget *_btnWidget = new QWidget( this ); - _layoutbuttons = new QHBoxLayout( _btnWidget ); + TQWidget *_btnWidget = new TQWidget( this ); + _layoutbuttons = new TQHBoxLayout( _btnWidget ); _layoutbuttons->addStretch( 100 ); _btnok = new KPushButton( KStdGuiItem::ok(), _btnWidget ); - connect( _btnok, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( _btnok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) ); _layoutbuttons->addWidget( _btnok, 0 ); _layout->addWidget( new KSeparator( KSeparator::HLine, this ) ); @@ -74,13 +74,13 @@ kdDebug( 60005 ) << k_funcinfo << endl; _layout->addWidget( new KSeparator( KSeparator::HLine, this ) ); _layout->addWidget( _btnWidget ); - setSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ); + setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Maximum ); } KRecNewProperties::~KRecNewProperties() { kdDebug( 60005 ) << k_funcinfo << endl; } -QString KRecNewProperties::filename() { return _filename; } +TQString KRecNewProperties::filename() { return _filename; } int KRecNewProperties::samplerate() { return _samplerate; } int KRecNewProperties::channels() { return _channels; } int KRecNewProperties::bits() { return _bits; } @@ -97,6 +97,6 @@ void KRecNewProperties::usedefaultschanged( bool n ) { void KRecNewProperties::done( int r ) { kdDebug( 60005 ) << k_funcinfo << endl; - QDialog::done( r ); + TQDialog::done( r ); } diff --git a/krec/krecnewproperties.h b/krec/krecnewproperties.h index f398033b..53996f13 100644 --- a/krec/krecnewproperties.h +++ b/krec/krecnewproperties.h @@ -14,7 +14,7 @@ #ifndef KREC_NEW_PROPERTIES_H #define KREC_NEW_PROPERTIES_H -#include +#include class KConfig; class QBoxLayout; @@ -26,13 +26,13 @@ class QVBox; class KRecConfigFilesWidget; -class KRecNewProperties : public QDialog { +class KRecNewProperties : public TQDialog { Q_OBJECT public: - KRecNewProperties( QWidget*, const char* =0 ); + KRecNewProperties( TQWidget*, const char* =0 ); ~KRecNewProperties(); - QString filename(); + TQString filename(); int samplerate(); int channels(); int bits(); @@ -45,13 +45,13 @@ private slots: void bitschanged( int ); void usedefaultschanged( bool ); private: - QString _filename; + TQString _filename; KRecConfigFilesWidget *_filewidget; int _samplerate, _channels, _bits; bool _usedefaults; - QBoxLayout *_layout, *_layoutbuttons; + TQBoxLayout *_layout, *_layoutbuttons; KPushButton *_btnok; }; diff --git a/krec/krecord.cpp b/krec/krecord.cpp index 72fbde7c..3bd18c72 100644 --- a/krec/krecord.cpp +++ b/krec/krecord.cpp @@ -32,13 +32,13 @@ #include #include #include -#include -#include +#include +#include #include #include KRecPrivate::KRecPrivate( KRecord* p, const char* n ) - : QObject( p,n ) + : TQObject( p,n ) , _confdlg( 0 ) , server( new KArtsServer( 0 ) ) , dispatcher( new KArtsDispatcher( 0 ) ) @@ -99,7 +99,7 @@ void KRecPrivate::openFile() { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _currentFile ) closeFile(); if ( !_currentFile ) { - QString filename = KFileDialog::getOpenFileName( "", "*.krec", _impl ); + TQString filename = KFileDialog::getOpenFileName( "", "*.krec", _impl ); //kdDebug( 60005 ) << k_funcinfo << filename << endl; if ( !filename.isNull() ) pNewFile( new KRecFile( filename, this ) ); @@ -107,8 +107,8 @@ void KRecPrivate::openFile() { } void KRecPrivate::pNewFile( KRecFile* file ) { _currentFile = file; - connect( m_recStream, SIGNAL( data( QByteArray& ) ), _currentFile, SLOT( writeData( QByteArray& ) ) ); - connect( m_playStream, SIGNAL( requestData( QByteArray& ) ), _currentFile, SLOT( getData( QByteArray& ) ) ); + connect( m_recStream, TQT_SIGNAL( data( TQByteArray& ) ), _currentFile, TQT_SLOT( writeData( TQByteArray& ) ) ); + connect( m_playStream, TQT_SIGNAL( requestData( TQByteArray& ) ), _currentFile, TQT_SLOT( getData( TQByteArray& ) ) ); mainwidget->_fileview->setFile( _currentFile ); checkActions(); } @@ -119,16 +119,16 @@ void KRecPrivate::saveFile() { } void KRecPrivate::saveAsFile() { //kdDebug( 60005 ) << k_funcinfo << endl; - if ( _currentFile ) pSaveFile( QString::null ); + if ( _currentFile ) pSaveFile( TQString::null ); } -void KRecPrivate::pSaveFile( const QString &filename ) { +void KRecPrivate::pSaveFile( const TQString &filename ) { if ( !_currentFile ) return; if ( !filename.isNull() ) _currentFile->save( filename ); else { - QString userFilename = KFileDialog::getSaveFileName( "", "*.krec", _impl, i18n( "Save File As" ) ); + TQString userFilename = KFileDialog::getSaveFileName( "", "*.krec", _impl, i18n( "Save File As" ) ); if ( !userFilename.isNull() ) _currentFile->save( userFilename ); } @@ -138,7 +138,7 @@ bool KRecPrivate::closeFile() { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _currentFile ) { if ( !_currentFile->saved() ) { - int choice = KMessageBox::questionYesNoCancel( _impl, i18n( "The document \"%1\" has been modified.\nDo you want to save it?" ).arg( _currentFile->filename() ), QString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); + int choice = KMessageBox::questionYesNoCancel( _impl, i18n( "The document \"%1\" has been modified.\nDo you want to save it?" ).arg( _currentFile->filename() ), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); if ( choice == KMessageBox::Yes ) saveFile(); if ( choice == KMessageBox::Cancel ) return false; // go on if KMessageBox::No @@ -154,17 +154,17 @@ bool KRecPrivate::closeFile() { void KRecPrivate::exportFile() { kdDebug( 60005 ) << k_funcinfo << endl; if ( _currentFile ) { - QString filename = KFileDialog::getSaveFileName( "", KRecGlobal::the()->exportFormatEndings(), _impl, "Export File As" ); + TQString filename = KFileDialog::getSaveFileName( "", KRecGlobal::the()->exportFormatEndings(), _impl, "Export File As" ); if ( !filename.isNull() ) { int lastdot = filename.find( '.', -5 ); - QString ending = filename.right( filename.length()-lastdot-1 ); + TQString ending = filename.right( filename.length()-lastdot-1 ); _exportitem = KRecGlobal::the()->getExportItemForEnding( ending ); if ( _exportitem ) { _exportitem->initialize( _currentFile->samplerate(), _currentFile->bits(), _currentFile->channels() ); if ( _exportitem->initialize( filename ) ) { - connect( _exportitem, SIGNAL( getData( QByteArray& ) ), _currentFile, SLOT( getData( QByteArray& ) ) ); - connect( _currentFile, SIGNAL( endReached() ), _exportitem, SLOT( stop() ) ); - connect( _currentFile, SIGNAL( endReached() ), this, SLOT( endExportFile() ) ); + connect( _exportitem, TQT_SIGNAL( getData( TQByteArray& ) ), _currentFile, TQT_SLOT( getData( TQByteArray& ) ) ); + connect( _currentFile, TQT_SIGNAL( endReached() ), _exportitem, TQT_SLOT( stop() ) ); + connect( _currentFile, TQT_SIGNAL( endReached() ), this, TQT_SLOT( endExportFile() ) ); _exportitem->start(); } } else @@ -185,7 +185,7 @@ void KRecPrivate::exportFile() { } else KRecGlobal::the()->message( i18n( "There is nothing to export." ) ); checkActions(); } -void KRecPrivate::endExportFile() { QTimer::singleShot( 20, this, SLOT( endExportFile2() ) ); } +void KRecPrivate::endExportFile() { TQTimer::singleShot( 20, this, TQT_SLOT( endExportFile2() ) ); } void KRecPrivate::endExportFile2() { _exportitem->finalize(); disconnect( _currentFile, 0, _exportitem, 0 ); @@ -248,7 +248,7 @@ void KRecPrivate::toEnd() { } void KRecPrivate::forceTipOfDay() { - KTipDialog::showTip( _impl, QString::null, true ); + KTipDialog::showTip( _impl, TQString::null, true ); } void KRecPrivate::execaRtsControl() { @@ -264,12 +264,12 @@ void KRecPrivate::execKMix() { */ -KRecord::KRecord(QWidget *parent, const char *name ) +KRecord::KRecord(TQWidget *parent, const char *name ) : KMainWindow(parent,name) , d( new KRecPrivate( this ) ) { kdDebug( 60005 ) << k_funcinfo << endl; - //kdDebug( 60005 )<<"KRecord::KRecord( QWidget *"<setMainWidget( this ); KRecGlobal::the()->setStatusBar( statusBar() ); @@ -283,40 +283,40 @@ KRecord::KRecord(QWidget *parent, const char *name ) // * * * Actions * * * d->artsactions = new ArtsActions( d->server, actionCollection(), this ); - KStdAction::preferences( d, SLOT( showConfDialog() ), actionCollection() ); + KStdAction::preferences( d, TQT_SLOT( showConfDialog() ), actionCollection() ); - KStdAction::openNew( d, SLOT( newFile() ), actionCollection() ); - KStdAction::open( d, SLOT( openFile() ), actionCollection() ); - KStdAction::save( d, SLOT( saveFile() ), actionCollection() ); - KStdAction::saveAs( d, SLOT( saveAsFile() ), actionCollection() ); - KStdAction::close( d, SLOT( closeFile() ), actionCollection() ); - KStdAction::quit( this, SLOT( close() ), actionCollection() ); + KStdAction::openNew( d, TQT_SLOT( newFile() ), actionCollection() ); + KStdAction::open( d, TQT_SLOT( openFile() ), actionCollection() ); + KStdAction::save( d, TQT_SLOT( saveFile() ), actionCollection() ); + KStdAction::saveAs( d, TQT_SLOT( saveAsFile() ), actionCollection() ); + KStdAction::close( d, TQT_SLOT( closeFile() ), actionCollection() ); + KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() ); - KStdAction::tipOfDay( d, SLOT( forceTipOfDay() ), actionCollection() ); + KStdAction::tipOfDay( d, TQT_SLOT( forceTipOfDay() ), actionCollection() ); d->aExportFile = new KAction( i18n( "Export..." ), KShortcut(), - d, SLOT( exportFile() ), actionCollection(), "export_file" ); + d, TQT_SLOT( exportFile() ), actionCollection(), "export_file" ); d->aRecord = new KAction( i18n( "&Record" ), KShortcut( Key_R ), - this, SLOT( startRec() ), actionCollection(), "player_record" ); + this, TQT_SLOT( startRec() ), actionCollection(), "player_record" ); d->aPlay = new KAction( i18n( "&Play" ), KShortcut( Key_P ), - this, SLOT( startPlay() ), actionCollection(), "player_play" ); + this, TQT_SLOT( startPlay() ), actionCollection(), "player_play" ); d->aStop = new KAction( i18n( "&Stop" ), KShortcut( Key_S ), - this, SLOT( stopRec() ), actionCollection(), "player_stop" ); + this, TQT_SLOT( stopRec() ), actionCollection(), "player_stop" ); d->aThru = new KToggleAction( i18n( "Play Through" ), KShortcut( CTRL + Key_P), actionCollection(), "play_thru" ); - connect( d->aThru, SIGNAL( toggled( bool ) ), d, SLOT( playthru( bool ) ) ); + connect( d->aThru, TQT_SIGNAL( toggled( bool ) ), d, TQT_SLOT( playthru( bool ) ) ); d->aBegin = new KAction( i18n( "Go to &Beginning" ), KShortcut( SHIFT + Key_Left ), - d, SLOT( toBegin() ), actionCollection(), "player_gobegin" ); + d, TQT_SLOT( toBegin() ), actionCollection(), "player_gobegin" ); d->aEnd = new KAction( i18n( "Go to &End" ), KShortcut( SHIFT + Key_Right ), - d, SLOT( toEnd() ), actionCollection(), "player_goend" ); + d, TQT_SLOT( toEnd() ), actionCollection(), "player_goend" ); ( void* ) d->artsactions->actionAudioManager(); d->aExecaRtsControl = new KAction( i18n( "Start aRts Control Tool" ), KShortcut(), - d, SLOT( execaRtsControl() ), actionCollection(), "exec_artscontrol" ); + d, TQT_SLOT( execaRtsControl() ), actionCollection(), "exec_artscontrol" ); d->aExecKMix = new KAction( i18n( "Start KMix" ), KShortcut(), - d, SLOT( execKMix() ), actionCollection(), "exec_kmix" ); + d, TQT_SLOT( execKMix() ), actionCollection(), "exec_kmix" ); // * * * GUI * * * // TODO Fix toolbar config so this line can just be setupGUI() diff --git a/krec/krecord.h b/krec/krecord.h index 3e127cc4..034f0557 100644 --- a/krec/krecord.h +++ b/krec/krecord.h @@ -33,7 +33,7 @@ class KRecord : public KMainWindow { Q_OBJECT public: /// Constructor - KRecord( QWidget* /*parent*/=0, const char* /*name*/=0 ); + KRecord( TQWidget* /*parent*/=0, const char* /*name*/=0 ); /// Destructor ~KRecord(); public slots: diff --git a/krec/krecord_private.h b/krec/krecord_private.h index 8c157f41..407f3f0a 100644 --- a/krec/krecord_private.h +++ b/krec/krecord_private.h @@ -15,7 +15,7 @@ #ifndef KRECORD_PRIVATE_H #define KRECORD_PRIVATE_H -#include +#include #include #include @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "krecfileview.h" @@ -43,7 +43,7 @@ class KRecentFilesAction; namespace KSettings { class Dialog; } -class KRecPrivate : public QObject { +class KRecPrivate : public TQObject { Q_OBJECT public: /// Constructor @@ -97,7 +97,7 @@ public slots: void execKMix(); private: void pNewFile( KRecFile* ); - void pSaveFile( const QString &); + void pSaveFile( const TQString &); public: KAction *aRecord, *aPlay, *aStop, *aExportFile; KAction *aBegin, *aEnd; @@ -127,17 +127,17 @@ public: KRecExportItem *_exportitem; }; -class KRecMainWidget : public QWidget { +class KRecMainWidget : public TQWidget { Q_OBJECT public: - KRecMainWidget( QWidget* p, const char* n=0 ) : QWidget( p,n ) { - _layout = new QBoxLayout( this, QBoxLayout::LeftToRight, 2 ); + KRecMainWidget( TQWidget* p, const char* n=0 ) : TQWidget( p,n ) { + _layout = new TQBoxLayout( this, TQBoxLayout::LeftToRight, 2 ); _kaw_volumecontrol = new KArtsWidget( this ); _layout->addWidget( _kaw_volumecontrol, 0 ); _fileview = new KRecFileView( this ); _layout->addWidget( _fileview, 500 ); } - QBoxLayout *_layout; + TQBoxLayout *_layout; KArtsWidget *_kaw_volumecontrol; Arts::Widget _artswidget; KRecFileView *_fileview; diff --git a/krec/main.cpp b/krec/main.cpp index 6e752817..98ebddb6 100644 --- a/krec/main.cpp +++ b/krec/main.cpp @@ -22,7 +22,7 @@ #include "krecord.h" -#include +#include using namespace std; diff --git a/krec/mp3_export/krecexport_mp3.cpp b/krec/mp3_export/krecexport_mp3.cpp index 85418688..0c4e8dc8 100644 --- a/krec/mp3_export/krecexport_mp3.cpp +++ b/krec/mp3_export/krecexport_mp3.cpp @@ -18,12 +18,12 @@ #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ K_EXPORT_COMPONENT_FACTORY( libkrecexport_mp3, KGenericFactory ) KRecExport_MP3 krecExportMP3( 0 ); -KRecExport_MP3::KRecExport_MP3( QObject* p, const char* n, const QStringList& ) +KRecExport_MP3::KRecExport_MP3( TQObject* p, const char* n, const TQStringList& ) : KRecExportItem( p,n ) , _file( 0 ) , error_occurred( false ) @@ -63,14 +63,14 @@ kdDebug( 60005 ) << k_funcinfo << endl; return new KRecExport_MP3( 0 ); } -QStringList KRecExport_MP3::extensions() { +TQStringList KRecExport_MP3::extensions() { //kdDebug( 60005 ) << k_funcinfo << endl; - QStringList tmp; + TQStringList tmp; tmp << "*.wav" << "*.WAV"; return tmp; } -bool KRecExport_MP3::initialize( const QString &filename ) { +bool KRecExport_MP3::initialize( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( !_file && !( bits()!=16 && channels()!=2 && @@ -85,7 +85,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; " configuration. Make use" \ " of the Control Center to configure these settings." ), i18n( "Quality Configuration" ), "qualityinfo_mp3" ); - _file = new QFile( filename ); + _file = new TQFile( filename ); if ( _file->open( IO_Raw|IO_WriteOnly ) ) { if ( ! init_done ) { gfp = lame_init(); @@ -115,7 +115,7 @@ bool KRecExport_MP3::process() { //kdDebug( 60005 ) << k_funcinfo << running << endl; if ( _file ) { if ( running() ) { - QByteArray bytearray( 4096 ); + TQByteArray bytearray( 4096 ); emit getData( bytearray ); int mp3bytes = lame_encode_buffer_interleaved( gfp, reinterpret_cast( bytearray.data() ), @@ -128,7 +128,7 @@ bool KRecExport_MP3::process() { i18n( lame_error[ code ] ) ); error_occurred = true; } - QTimer::singleShot( 10, this, SLOT( process() ) ); + TQTimer::singleShot( 10, this, TQT_SLOT( process() ) ); } return true; } else return false; diff --git a/krec/mp3_export/krecexport_mp3.h b/krec/mp3_export/krecexport_mp3.h index 8bf243b3..baa40914 100644 --- a/krec/mp3_export/krecexport_mp3.h +++ b/krec/mp3_export/krecexport_mp3.h @@ -24,20 +24,20 @@ class QFile; class KRecExport_MP3 : public KRecExportItem { Q_OBJECT public: - KRecExport_MP3( QObject*, const char* =0, const QStringList& =0 ); + KRecExport_MP3( TQObject*, const char* =0, const TQStringList& =0 ); ~KRecExport_MP3(); KRecExport_MP3* newItem(); - QStringList extensions(); - QString exportFormat() { return QString( "Wave" ); } + TQStringList extensions(); + TQString exportFormat() { return TQString( "Wave" ); } public slots: - bool initialize( const QString & ); + bool initialize( const TQString & ); bool process(); bool finalize(); private: - QFile* _file; + TQFile* _file; // Lame MP3 encoder void setLameParameters(); lame_global_flags *gfp; diff --git a/krec/ogg_export/krecexport_ogg.cpp b/krec/ogg_export/krecexport_ogg.cpp index 6a5d5735..e2b495dd 100644 --- a/krec/ogg_export/krecexport_ogg.cpp +++ b/krec/ogg_export/krecexport_ogg.cpp @@ -22,12 +22,12 @@ #include #include -#include -#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -36,7 +36,7 @@ K_EXPORT_COMPONENT_FACTORY( libkrecexport_ogg, KGenericFactory ) KRecExport_OGG krecExportOGG( 0 ); -KRecExport_OGG::KRecExport_OGG( QObject* p, const char* n, const QStringList& ) +KRecExport_OGG::KRecExport_OGG( TQObject* p, const char* n, const TQStringList& ) : KRecExportItem( p,n ) , _file( 0 ) , init_done( false ) @@ -54,14 +54,14 @@ kdDebug( 60005 ) << k_funcinfo << endl; return new KRecExport_OGG( 0 ); } -QStringList KRecExport_OGG::extensions() { +TQStringList KRecExport_OGG::extensions() { //kdDebug( 60005 ) << k_funcinfo << endl; - QStringList tmp; + TQStringList tmp; tmp << "*.ogg" << "*.OGG"; return tmp; } -bool KRecExport_OGG::initialize( const QString &filename ) { +bool KRecExport_OGG::initialize( const TQString &filename ) { kdDebug( 60005 ) << k_funcinfo << endl; if ( !_file && !( samplingRate()!=44100 && bits()!=16 && channels()!=2 && @@ -76,7 +76,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; " the corresponding section of the audiocd:/ configuration. Make use" \ " of the Control Center to configure these settings." ), i18n( "Quality Configuration" ), "qualityinfo_ogg" ); - _file = new QFile( filename ); + _file = new TQFile( filename ); if ( _file->open( IO_Raw|IO_WriteOnly ) ) { if ( ! init_done ) { setOggParameters(); @@ -95,7 +95,7 @@ kdDebug( 60005 ) << k_funcinfo << endl; vorbis_comment_add_tag ( &vc, const_cast( "kde-encoder" ), const_cast( "KRec" ) ); if ( write_vorbis_comments ) { - QDateTime dt = QDateTime::currentDateTime(); + TQDateTime dt = TQDateTime::currentDateTime(); vorbis_comment_add_tag ( &vc, const_cast( "title" ), const_cast( "" ) ); vorbis_comment_add_tag ( &vc, const_cast( "artist" ), @@ -132,7 +132,7 @@ bool KRecExport_OGG::process() { //kdDebug( 60005 ) << k_funcinfo << endl; if ( _file ) { if ( running() ) { - QByteArray bytearray( 4096 ); + TQByteArray bytearray( 4096 ); emit getData( bytearray ); float **buffer = vorbis_analysis_buffer( &vd, bytearray.size() >> 2 ); @@ -169,7 +169,7 @@ bool KRecExport_OGG::process() { } } } - QTimer::singleShot( 10, this, SLOT( process() ) ); + TQTimer::singleShot( 10, this, TQT_SLOT( process() ) ); } return true; } else return false; diff --git a/krec/ogg_export/krecexport_ogg.h b/krec/ogg_export/krecexport_ogg.h index 43b79d54..15c0337d 100644 --- a/krec/ogg_export/krecexport_ogg.h +++ b/krec/ogg_export/krecexport_ogg.h @@ -28,20 +28,20 @@ class QFile; class KRecExport_OGG : public KRecExportItem { Q_OBJECT public: - KRecExport_OGG( QObject*, const char* =0, const QStringList& =0 ); + KRecExport_OGG( TQObject*, const char* =0, const TQStringList& =0 ); ~KRecExport_OGG(); KRecExport_OGG* newItem(); - QStringList extensions(); - QString exportFormat() { return QString( "OGG-Vorbis" ); } + TQStringList extensions(); + TQString exportFormat() { return TQString( "OGG-Vorbis" ); } public slots: - bool initialize( const QString & ); + bool initialize( const TQString & ); bool process(); bool finalize(); private: - QFile* _file; + TQFile* _file; bool init_done; -- cgit v1.2.1