summaryrefslogtreecommitdiffstats
path: root/plugins/encoder/ogg
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 19:21:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 19:21:21 +0000
commitd8cc8bdfa7fa624a526d5aa1626974e1444cb799 (patch)
treef295f1c545b319963d5357af79fe08991d8141d9 /plugins/encoder/ogg
parent2a39a080579fb52a2599c02b2939795385b89093 (diff)
downloadk3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.tar.gz
k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.zip
TQt4 port k3b
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'plugins/encoder/ogg')
-rw-r--r--plugins/encoder/ogg/base_k3boggvorbisencodersettingswidget.ui58
-rw-r--r--plugins/encoder/ogg/k3boggvorbisencoder.cpp72
-rw-r--r--plugins/encoder/ogg/k3boggvorbisencoder.h20
3 files changed, 76 insertions, 74 deletions
diff --git a/plugins/encoder/ogg/base_k3boggvorbisencodersettingswidget.ui b/plugins/encoder/ogg/base_k3boggvorbisencodersettingswidget.ui
index 3e31265..d669f1e 100644
--- a/plugins/encoder/ogg/base_k3boggvorbisencodersettingswidget.ui
+++ b/plugins/encoder/ogg/base_k3boggvorbisencodersettingswidget.ui
@@ -1,11 +1,11 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>base_K3bOggVorbisEncoderSettingsWidget</class>
<author>Sebastian Trueg</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>Form1</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -20,7 +20,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -31,15 +31,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_radioQualityLevel</cstring>
</property>
@@ -56,7 +56,7 @@
<string>&lt;p&gt;Vorbis' audio quality is not best measured in kilobits per second, but on a scale from -1 to 10 called "quality". &lt;p&gt;For now, quality -1 is roughly equivalent to 45kbps average, 5 is roughly 160kbps, and 10 gives about 400kbps. Most people seeking very-near-CD-quality audio encode at a quality of 5 or, for lossless stereo coupling, 6. The default setting is quality 3, which at approximately 110kbps gives a smaller filesize and significantly better fidelity than .mp3 compression at 128kbps. &lt;p&gt;&lt;em&gt;This explanation was copied from the www.vorbis.com FAQ.&lt;/em&gt;</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_labelQualityLevel</cstring>
</property>
@@ -68,13 +68,13 @@
<property name="text">
<string>textLabel1</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>frame6</cstring>
</property>
@@ -101,22 +101,22 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSlider" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQSlider" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_slideQualityLevel</cstring>
</property>
@@ -136,7 +136,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -148,11 +148,11 @@
<property name="text">
<string>high quality</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@@ -179,14 +179,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>m_radioManual</cstring>
</property>
@@ -194,9 +194,9 @@
<string>M&amp;anual settings:</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
@@ -212,14 +212,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>frame3</cstring>
</property>
@@ -239,7 +239,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>m_checkBitrateUpper</cstring>
</property>
@@ -247,7 +247,7 @@
<string>&amp;Upper bitrate:</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>m_checkBitrateLower</cstring>
</property>
@@ -295,7 +295,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -303,7 +303,7 @@
<string>kbps</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="2">
+ <widget class="TQLabel" row="2" column="2">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -311,7 +311,7 @@
<string>kbps</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -319,7 +319,7 @@
<string>kbps</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>m_checkBitrateNominal</cstring>
</property>
@@ -383,7 +383,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/plugins/encoder/ogg/k3boggvorbisencoder.cpp b/plugins/encoder/ogg/k3boggvorbisencoder.cpp
index 54e6ecb..22f49a6 100644
--- a/plugins/encoder/ogg/k3boggvorbisencoder.cpp
+++ b/plugins/encoder/ogg/k3boggvorbisencoder.cpp
@@ -26,15 +26,15 @@
#include <kdebug.h>
#include <knuminput.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qlcdnumber.h>
-#include <qcheckbox.h>
-#include <qcstring.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqlcdnumber.h>
+#include <tqcheckbox.h>
+#include <tqcstring.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
#include <vorbis/vorbisenc.h>
@@ -124,8 +124,8 @@ public:
};
-K3bOggVorbisEncoder::K3bOggVorbisEncoder( QObject* parent, const char* name )
- : K3bAudioEncoder( parent, name )
+K3bOggVorbisEncoder::K3bOggVorbisEncoder( TQObject* tqparent, const char* name )
+ : K3bAudioEncoder( tqparent, name )
{
d = new Private();
}
@@ -138,7 +138,7 @@ K3bOggVorbisEncoder::~K3bOggVorbisEncoder()
}
-bool K3bOggVorbisEncoder::initEncoderInternal( const QString&, const K3b::Msf& )
+bool K3bOggVorbisEncoder::initEncoderInternal( const TQString&, const K3b::Msf& )
{
cleanup();
@@ -194,7 +194,7 @@ bool K3bOggVorbisEncoder::initEncoderInternal( const QString&, const K3b::Msf& )
vorbis_comment_init( d->vorbisComment );
// add the encoder tag (so everybody knows we did it! ;)
- vorbis_comment_add_tag( d->vorbisComment, QCString("ENCODER").data(), QCString("K3bOggVorbisEncoderPlugin").data() );
+ vorbis_comment_add_tag( d->vorbisComment, TQCString("ENCODER").data(), TQCString("K3bOggVorbisEncoderPlugin").data() );
// set up the analysis state and auxiliary encoding storage
d->vorbisDspState = new vorbis_dsp_state;
@@ -251,7 +251,7 @@ bool K3bOggVorbisEncoder::writeOggHeaders()
// This ensures the actual
// audio data will start on a new page, as per spec
//
- QByteArray data;
+ TQByteArray data;
while( ogg_stream_flush( d->oggStream, d->oggPage ) ) {
writeData( (char*)d->oggPage->header, d->oggPage->header_len );
writeData( (char*)d->oggPage->body, d->oggPage->body_len );
@@ -263,7 +263,7 @@ bool K3bOggVorbisEncoder::writeOggHeaders()
}
-long K3bOggVorbisEncoder::encodeInternal( const char* data, Q_ULONG len )
+long K3bOggVorbisEncoder::encodeInternal( const char* data, TQ_ULONG len )
{
if( !d->headersWritten )
if( !writeOggHeaders() )
@@ -328,10 +328,10 @@ void K3bOggVorbisEncoder::finishEncoderInternal()
}
-void K3bOggVorbisEncoder::setMetaDataInternal( K3bAudioEncoder::MetaDataField f, const QString& value )
+void K3bOggVorbisEncoder::setMetaDataInternal( K3bAudioEncoder::MetaDataField f, const TQString& value )
{
if( d->vorbisComment ) {
- QCString key;
+ TQCString key;
switch( f ) {
case META_TRACK_TITLE:
@@ -426,13 +426,13 @@ void K3bOggVorbisEncoder::loadConfig()
-K3bOggVorbisEncoderSettingsWidget::K3bOggVorbisEncoderSettingsWidget( QWidget* parent, const char* name )
- : K3bPluginConfigWidget( parent, name )
+K3bOggVorbisEncoderSettingsWidget::K3bOggVorbisEncoderSettingsWidget( TQWidget* tqparent, const char* name )
+ : K3bPluginConfigWidget( tqparent, name )
{
w = new base_K3bOggVorbisEncoderSettingsWidget( this );
- QString ttQuality = i18n("Controls the quality of the encoded files.");
- QString wsQuality = i18n("<p>Vorbis' audio quality is not best measured in kilobits per second, "
+ TQString ttQuality = i18n("Controls the quality of the encoded files.");
+ TQString wsQuality = i18n("<p>Vorbis' audio quality is not best measured in kilobits per second, "
"but on a scale from -1 to 10 called <em>quality</em>."
"<p>For now, quality -1 is roughly equivalent to 45kbps average, "
"5 is roughly 160kbps, and 10 gives about 400kbps. "
@@ -442,21 +442,21 @@ K3bOggVorbisEncoderSettingsWidget::K3bOggVorbisEncoderSettingsWidget( QWidget* p
"than .mp3 compression at 128kbps."
"<p><em>This explanation is based on the one from the www.vorbis.com FAQ.</em>");
- QToolTip::add( w->m_radioQualityLevel, ttQuality );
- QToolTip::add( w->m_labelQualityLevel, ttQuality );
- QToolTip::add( w->m_slideQualityLevel, ttQuality );
- QWhatsThis::add( w->m_radioQualityLevel, wsQuality );
- QWhatsThis::add( w->m_labelQualityLevel, wsQuality );
- QWhatsThis::add( w->m_slideQualityLevel, wsQuality );
+ TQToolTip::add( w->m_radioQualityLevel, ttQuality );
+ TQToolTip::add( w->m_labelQualityLevel, ttQuality );
+ TQToolTip::add( w->m_slideQualityLevel, ttQuality );
+ TQWhatsThis::add( w->m_radioQualityLevel, wsQuality );
+ TQWhatsThis::add( w->m_labelQualityLevel, wsQuality );
+ TQWhatsThis::add( w->m_slideQualityLevel, wsQuality );
- QHBoxLayout* lay = new QHBoxLayout( this );
+ TQHBoxLayout* lay = new TQHBoxLayout( this );
lay->setMargin( 0 );
lay->addWidget( w );
- connect( w->m_slideQualityLevel, SIGNAL(valueChanged(int)),
- this, SLOT(slotQualityLevelChanged(int)) );
+ connect( w->m_slideQualityLevel, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotQualityLevelChanged(int)) );
slotQualityLevelChanged( 4 );
}
@@ -469,8 +469,8 @@ K3bOggVorbisEncoderSettingsWidget::~K3bOggVorbisEncoderSettingsWidget()
void K3bOggVorbisEncoderSettingsWidget::slotQualityLevelChanged( int val )
{
- w->m_labelQualityLevel->setText( QString::number(val) + " "
- + i18n("(targetted VBR of %1)").arg(s_rough_average_quality_level_bitrates[val+1]) );
+ w->m_labelQualityLevel->setText( TQString::number(val) + " "
+ + i18n("(targetted VBR of %1)").tqarg(s_rough_average_quality_level_bitrates[val+1]) );
}
@@ -510,13 +510,13 @@ void K3bOggVorbisEncoderSettingsWidget::saveConfig()
}
-QString K3bOggVorbisEncoder::fileTypeComment( const QString& ) const
+TQString K3bOggVorbisEncoder::fileTypeComment( const TQString& ) const
{
return i18n("Ogg-Vorbis");
}
-long long K3bOggVorbisEncoder::fileSize( const QString&, const K3b::Msf& msf ) const
+long long K3bOggVorbisEncoder::fileSize( const TQString&, const K3b::Msf& msf ) const
{
KConfig* c = k3bcore->config();
c->setGroup( "K3bOggVorbisEncoderPlugin" );
@@ -545,10 +545,10 @@ long long K3bOggVorbisEncoder::fileSize( const QString&, const K3b::Msf& msf ) c
}
-K3bPluginConfigWidget* K3bOggVorbisEncoder::createConfigWidget( QWidget* parent,
+K3bPluginConfigWidget* K3bOggVorbisEncoder::createConfigWidget( TQWidget* tqparent,
const char* name ) const
{
- return new K3bOggVorbisEncoderSettingsWidget( parent, name );
+ return new K3bOggVorbisEncoderSettingsWidget( tqparent, name );
}
diff --git a/plugins/encoder/ogg/k3boggvorbisencoder.h b/plugins/encoder/ogg/k3boggvorbisencoder.h
index 0148713..801021f 100644
--- a/plugins/encoder/ogg/k3boggvorbisencoder.h
+++ b/plugins/encoder/ogg/k3boggvorbisencoder.h
@@ -27,28 +27,29 @@ class base_K3bOggVorbisEncoderSettingsWidget;
class K3bOggVorbisEncoder : public K3bAudioEncoder
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bOggVorbisEncoder( QObject* parent = 0, const char* name = 0 );
+ K3bOggVorbisEncoder( TQObject* tqparent = 0, const char* name = 0 );
~K3bOggVorbisEncoder();
- QStringList extensions() const { return QStringList("ogg"); }
+ TQStringList extensions() const { return TQStringList("ogg"); }
- QString fileTypeComment( const QString& ) const;
+ TQString fileTypeComment( const TQString& ) const;
- long long fileSize( const QString&, const K3b::Msf& msf ) const;
+ long long fileSize( const TQString&, const K3b::Msf& msf ) const;
int pluginSystemVersion() const { return 3; }
- K3bPluginConfigWidget* createConfigWidget( QWidget* parent = 0,
+ K3bPluginConfigWidget* createConfigWidget( TQWidget* tqparent = 0,
const char* name = 0 ) const;
private:
void loadConfig();
void finishEncoderInternal();
- bool initEncoderInternal( const QString& extension, const K3b::Msf& length );
- long encodeInternal( const char* data, Q_ULONG len );
- void setMetaDataInternal( MetaDataField, const QString& );
+ bool initEncoderInternal( const TQString& extension, const K3b::Msf& length );
+ long encodeInternal( const char* data, TQ_ULONG len );
+ void setMetaDataInternal( MetaDataField, const TQString& );
bool writeOggHeaders();
void cleanup();
@@ -62,9 +63,10 @@ class K3bOggVorbisEncoder : public K3bAudioEncoder
class K3bOggVorbisEncoderSettingsWidget : public K3bPluginConfigWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- K3bOggVorbisEncoderSettingsWidget( QWidget* parent = 0, const char* name = 0 );
+ K3bOggVorbisEncoderSettingsWidget( TQWidget* tqparent = 0, const char* name = 0 );
~K3bOggVorbisEncoderSettingsWidget();
public slots: