Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/9/head
Michele Calgaro 7 months ago
parent ce7d700f90
commit 10b66f448d
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1141,7 +1141,7 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
(void)QStyleFactory::create(TQString::null); (void)QStyleFactory::create(TQString::null);
QCursor c(Qt::WhatsThisCursor); QCursor c(TQt::WhatsThisCursor);
EOF EOF
fi fi
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF

@ -25,31 +25,31 @@ rescue LoadError
exit exit
end end
class MainWidget < Qt::Dialog class MainWidget < TQt::Dialog
slots 'accept()' slots 'accept()'
def initialize(parent = nil, name = nil) def initialize(parent = nil, name = nil)
super super
box = Qt::VBoxLayout.new( self, 11, 6 ); box = TQt::VBoxLayout.new( self, 11, 6 );
lTitle = Qt::Label.new('soundKonverter plugin settings', self) lTitle = TQt::Label.new('soundKonverter plugin settings', self)
box.addWidget( lTitle ) box.addWidget( lTitle )
lTitle.setAlignment(Qt::AlignCenter) lTitle.setAlignment(TQt::AlignCenter)
font = Qt::Font.new() font = TQt::Font.new()
font.setPixelSize(18) font.setPixelSize(18)
font.setBold(true) font.setBold(true)
lTitle.setFont(font) lTitle.setFont(font)
box.addSpacing( 5 ) box.addSpacing( 5 )
mediaDeviceBox = Qt::GroupBox.new( 1, Qt::Vertical, "Options for transfering to media devices", self ) mediaDeviceBox = TQt::GroupBox.new( 1, TQt::Vertical, "Options for transfering to media devices", self )
box.addWidget( mediaDeviceBox ) box.addWidget( mediaDeviceBox )
mediaDeviceBox.layout().setSpacing( 6 ) mediaDeviceBox.layout().setSpacing( 6 )
mediaDeviceBox.layout().setMargin( 6 ) mediaDeviceBox.layout().setMargin( 6 )
Qt::Label.new('Profile for lossy conversion:', mediaDeviceBox) TQt::Label.new('Profile for lossy conversion:', mediaDeviceBox)
@cTranscodeProfile = Qt::ComboBox.new(mediaDeviceBox) @cTranscodeProfile = TQt::ComboBox.new(mediaDeviceBox)
@cTranscodeProfile.insertItem("Very low") @cTranscodeProfile.insertItem("Very low")
@cTranscodeProfile.insertItem("Low") @cTranscodeProfile.insertItem("Low")
@cTranscodeProfile.insertItem("Medium") @cTranscodeProfile.insertItem("Medium")
@ -59,17 +59,17 @@ def initialize(parent = nil, name = nil)
# box.addSpacing( 5 ) # box.addSpacing( 5 )
# #
# rippingBox = Qt::GroupBox.new( 2, Qt::Horizontal, "Use pre-defined options for CD ripping", self ) # rippingBox = TQt::GroupBox.new( 2, TQt::Horizontal, "Use pre-defined options for CD ripping", self )
# box.addWidget( rippingBox ) # box.addWidget( rippingBox )
# rippingBox.layout().setSpacing( 6 ) # rippingBox.layout().setSpacing( 6 )
# rippingBox.layout().setMargin( 6 ) # rippingBox.layout().setMargin( 6 )
# rippingBox.setCheckable( true ) # rippingBox.setCheckable( true )
# rippingBox.setEnabled( false ) # rippingBox.setEnabled( false )
# #
# profileBox = Qt::HBoxLayout.new( rippingBox, 6 ); # profileBox = TQt::HBoxLayout.new( rippingBox, 6 );
# lRippingProfile = Qt::Label.new('Profile:', rippingBox) # lRippingProfile = TQt::Label.new('Profile:', rippingBox)
# profileBox.addWidget( lRippingProfile ) # profileBox.addWidget( lRippingProfile )
# @cRippingProfile = Qt::ComboBox.new(rippingBox) # @cRippingProfile = TQt::ComboBox.new(rippingBox)
# profileBox.addWidget( @cRippingProfile ) # profileBox.addWidget( @cRippingProfile )
# @cRippingProfile.insertItem("Very low") # @cRippingProfile.insertItem("Very low")
# @cRippingProfile.insertItem("Low") # @cRippingProfile.insertItem("Low")
@ -79,17 +79,17 @@ def initialize(parent = nil, name = nil)
# @cRippingProfile.insertItem("Lossless") # @cRippingProfile.insertItem("Lossless")
# @cRippingProfile.insertItem("Last used") # @cRippingProfile.insertItem("Last used")
# @cRippingProfile.setCurrentItem(3) # @cRippingProfile.setCurrentItem(3)
# lRippingFormat = Qt::Label.new('Format:', rippingBox) # lRippingFormat = TQt::Label.new('Format:', rippingBox)
# profileBox.addWidget( lRippingFormat ) # profileBox.addWidget( lRippingFormat )
# @cRippingFormat = Qt::ComboBox.new(rippingBox) # @cRippingFormat = TQt::ComboBox.new(rippingBox)
# profileBox.addWidget( @cRippingFormat ) # profileBox.addWidget( @cRippingFormat )
# @cRippingFormat.insertItem("ogg") # @cRippingFormat.insertItem("ogg")
# @cRippingFormat.insertItem("mp3") # @cRippingFormat.insertItem("mp3")
# @cRippingFormat.insertItem("flac") # @cRippingFormat.insertItem("flac")
# directoryBox = Qt::HBoxLayout.new( rippingBox, 6 ); # directoryBox = TQt::HBoxLayout.new( rippingBox, 6 );
# lRippingDirectory = Qt::Label.new('Directory:', rippingBox) # lRippingDirectory = TQt::Label.new('Directory:', rippingBox)
# directoryBox.addWidget( lRippingDirectory ) # directoryBox.addWidget( lRippingDirectory )
# @cRippingDirectory = Qt::ComboBox.new(rippingBox) # @cRippingDirectory = TQt::ComboBox.new(rippingBox)
# directoryBox.addWidget( @cRippingDirectory ) # directoryBox.addWidget( @cRippingDirectory )
# @cRippingDirectory.setEditable(true) # @cRippingDirectory.setEditable(true)
# @cRippingDirectory.insertItem("/home/daniel/soundKonverter/%b/%d - %n - %t") # @cRippingDirectory.insertItem("/home/daniel/soundKonverter/%b/%d - %n - %t")
@ -97,10 +97,10 @@ def initialize(parent = nil, name = nil)
box.addSpacing( 5 ) box.addSpacing( 5 )
buttonsBox = Qt::HBoxLayout.new(box) buttonsBox = TQt::HBoxLayout.new(box)
buttonsBox.setSpacing(6) buttonsBox.setSpacing(6)
buttonsBox.addStretch() buttonsBox.addStretch()
okPushButton = Qt::PushButton.new( self, "ok" ) okPushButton = TQt::PushButton.new( self, "ok" )
buttonsBox.addWidget( okPushButton ) buttonsBox.addWidget( okPushButton )
okPushButton.setText( "OK" ) okPushButton.setText( "OK" )
okPushButton.setDefault( true ) okPushButton.setDefault( true )
@ -109,18 +109,18 @@ def initialize(parent = nil, name = nil)
self, SLOT( 'accept()' ) self, SLOT( 'accept()' )
) )
cancelPushButton = Qt::PushButton.new( self, "cancel" ) cancelPushButton = TQt::PushButton.new( self, "cancel" )
buttonsBox.addWidget( cancelPushButton ) buttonsBox.addWidget( cancelPushButton )
cancelPushButton.setText( "Cancel" ) cancelPushButton.setText( "Cancel" )
cancelPushButton.setAccel( Qt::KeySequence.new(Key_Escape) ) cancelPushButton.setAccel( TQt::KeySequence.new(Key_Escape) )
connect( cancelPushButton, SIGNAL( 'clicked()' ), connect( cancelPushButton, SIGNAL( 'clicked()' ),
self, SLOT( 'reject()' ) self, SLOT( 'reject()' )
) )
file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( Qt::IO_ReadOnly ) if file.open( TQt::IO_ReadOnly )
ts = Qt::TextStream.new( file ) ts = TQt::TextStream.new( file )
content = '' content = ''
ts >> content ts >> content
if content == 'Very_low' if content == 'Very_low'
@ -137,9 +137,9 @@ def initialize(parent = nil, name = nil)
file.close() file.close()
end end
# file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/profiles" ) # file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/profiles" )
# if file.open( Qt::IO_ReadOnly ) # if file.open( TQt::IO_ReadOnly )
# ts = Qt::TextStream.new( file ) # ts = TQt::TextStream.new( file )
# while !ts.eof() # while !ts.eof()
# content = '' # content = ''
# ts >> content # ts >> content
@ -153,9 +153,9 @@ end
def accept() def accept()
file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( Qt::IO_WriteOnly ) if file.open( TQt::IO_WriteOnly )
ts = Qt::TextStream.new( file ) ts = TQt::TextStream.new( file )
if @cTranscodeProfile.currentText() == 'Very low' if @cTranscodeProfile.currentText() == 'Very low'
content = 'Very_low' content = 'Very_low'
elsif @cTranscodeProfile.currentText() == 'Low' elsif @cTranscodeProfile.currentText() == 'Low'
@ -201,7 +201,7 @@ loop do
case command case command
when "configure" when "configure"
app = Qt::Application.new(ARGV) app = TQt::Application.new(ARGV)
widget = MainWidget.new widget = MainWidget.new
app.setMainWidget(widget) app.setMainWidget(widget)
widget.show() widget.show()
@ -215,9 +215,9 @@ loop do
filetype = args[2] filetype = args[2]
profile = '' profile = ''
file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/formats" ) file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/formats" )
if file.open( Qt::IO_ReadOnly ) if file.open( TQt::IO_ReadOnly )
ts = Qt::TextStream.new( file ) ts = TQt::TextStream.new( file )
while !ts.eof() while !ts.eof()
mode = '' mode = ''
formats = '' formats = ''
@ -231,9 +231,9 @@ loop do
end end
if profile == '' if profile == ''
file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" ) file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( Qt::IO_ReadOnly ) if file.open( TQt::IO_ReadOnly )
ts = Qt::TextStream.new( file ) ts = TQt::TextStream.new( file )
content = '' content = ''
ts >> content ts >> content
if content == 'Very_low' if content == 'Very_low'

@ -130,7 +130,7 @@ CDOpener::CDOpener( Config* _config, CDManager* _cdManager, TagEngine* _tagEngin
// create the box at the bottom for editing the tags // create the box at the bottom for editing the tags
tagGroupBox = new TQGroupBox( i18n("No track selected"), this, "tagGroupBox" ); tagGroupBox = new TQGroupBox( i18n("No track selected"), this, "tagGroupBox" );
gridLayout->addWidget( tagGroupBox, 2, 0 ); gridLayout->addWidget( tagGroupBox, 2, 0 );
tagGroupBox->setColumnLayout( 0, Qt::Vertical ); tagGroupBox->setColumnLayout( 0, TQt::Vertical );
tagGroupBox->layout()->setSpacing( 6 ); tagGroupBox->layout()->setSpacing( 6 );
tagGroupBox->layout()->setMargin( 6 ); tagGroupBox->layout()->setMargin( 6 );
TQGridLayout* tagGridLayout = new TQGridLayout( tagGroupBox->layout(), 1, 1, -1, "tagGridLayout" ); TQGridLayout* tagGridLayout = new TQGridLayout( tagGroupBox->layout(), 1, 1, -1, "tagGridLayout" );

@ -51,7 +51,7 @@ ConfigBackendsPage::ConfigBackendsPage( Config* _config, TQMap<TQString, TQStrin
TQLabel* lLegendBasic = new TQLabel( i18n("Basic support"), legendBox, "lLegendBasic" ); TQLabel* lLegendBasic = new TQLabel( i18n("Basic support"), legendBox, "lLegendBasic" );
legendBox->setStretchFactor( lLegendLabel, 1 ); legendBox->setStretchFactor( lLegendLabel, 1 );
TQGroupBox* ripperGroup = new TQGroupBox( 1, Qt::Vertical, box, "ripperGroup" ); TQGroupBox* ripperGroup = new TQGroupBox( 1, TQt::Vertical, box, "ripperGroup" );
ripperGroup->layout()->setSpacing( 6 ); ripperGroup->layout()->setSpacing( 6 );
ripperGroup->layout()->setMargin( 6 ); ripperGroup->layout()->setMargin( 6 );
TQLabel* lRipper = new TQLabel( i18n("CD Ripper")+":", ripperGroup, "lRipper" ); TQLabel* lRipper = new TQLabel( i18n("CD Ripper")+":", ripperGroup, "lRipper" );
@ -251,7 +251,7 @@ void ConfigBackendsPage::rebuild()
} }
options.group = new TQGroupBox( title, box, options.format ); options.group = new TQGroupBox( title, box, options.format );
options.group->setColumnLayout( 0, Qt::Vertical ); options.group->setColumnLayout( 0, TQt::Vertical );
options.group->layout()->setSpacing( 6 ); options.group->layout()->setSpacing( 6 );
options.group->layout()->setMargin( 6 ); options.group->layout()->setMargin( 6 );
options.group->show(); options.group->show();
@ -274,7 +274,7 @@ void ConfigBackendsPage::rebuild()
options.lStrength->setAlignment( TQt::AlignRight | TQt::AlignVCenter ); options.lStrength->setAlignment( TQt::AlignRight | TQt::AlignVCenter );
options.lStrength->show(); options.lStrength->show();
options.grid->addWidget( options.lStrength, 0, 2 ); options.grid->addWidget( options.lStrength, 0, 2 );
options.sStrength = new TQSlider( Qt::Horizontal, options.group, options.format ); options.sStrength = new TQSlider( TQt::Horizontal, options.group, options.format );
options.sStrength->setTickmarks( TQSlider::Below ); options.sStrength->setTickmarks( TQSlider::Below );
options.sStrength->show(); options.sStrength->show();
TQToolTip::add( options.sStrength, i18n("Set the compression strength:\n\nLeft = fast conversion\nRight = good resultant file") ); TQToolTip::add( options.sStrength, i18n("Set the compression strength:\n\nLeft = fast conversion\nRight = good resultant file") );

Loading…
Cancel
Save