Replace Qt with TQt

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

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

@ -25,31 +25,31 @@ rescue LoadError
exit
end
class MainWidget < Qt::Dialog
class MainWidget < TQt::Dialog
slots 'accept()'
def initialize(parent = nil, name = nil)
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 )
lTitle.setAlignment(Qt::AlignCenter)
font = Qt::Font.new()
lTitle.setAlignment(TQt::AlignCenter)
font = TQt::Font.new()
font.setPixelSize(18)
font.setBold(true)
lTitle.setFont(font)
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 )
mediaDeviceBox.layout().setSpacing( 6 )
mediaDeviceBox.layout().setMargin( 6 )
Qt::Label.new('Profile for lossy conversion:', mediaDeviceBox)
@cTranscodeProfile = Qt::ComboBox.new(mediaDeviceBox)
TQt::Label.new('Profile for lossy conversion:', mediaDeviceBox)
@cTranscodeProfile = TQt::ComboBox.new(mediaDeviceBox)
@cTranscodeProfile.insertItem("Very low")
@cTranscodeProfile.insertItem("Low")
@cTranscodeProfile.insertItem("Medium")
@ -59,17 +59,17 @@ def initialize(parent = nil, name = nil)
# 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 )
# rippingBox.layout().setSpacing( 6 )
# rippingBox.layout().setMargin( 6 )
# rippingBox.setCheckable( true )
# rippingBox.setEnabled( false )
#
# profileBox = Qt::HBoxLayout.new( rippingBox, 6 );
# lRippingProfile = Qt::Label.new('Profile:', rippingBox)
# profileBox = TQt::HBoxLayout.new( rippingBox, 6 );
# lRippingProfile = TQt::Label.new('Profile:', rippingBox)
# profileBox.addWidget( lRippingProfile )
# @cRippingProfile = Qt::ComboBox.new(rippingBox)
# @cRippingProfile = TQt::ComboBox.new(rippingBox)
# profileBox.addWidget( @cRippingProfile )
# @cRippingProfile.insertItem("Very low")
# @cRippingProfile.insertItem("Low")
@ -79,17 +79,17 @@ def initialize(parent = nil, name = nil)
# @cRippingProfile.insertItem("Lossless")
# @cRippingProfile.insertItem("Last used")
# @cRippingProfile.setCurrentItem(3)
# lRippingFormat = Qt::Label.new('Format:', rippingBox)
# lRippingFormat = TQt::Label.new('Format:', rippingBox)
# profileBox.addWidget( lRippingFormat )
# @cRippingFormat = Qt::ComboBox.new(rippingBox)
# @cRippingFormat = TQt::ComboBox.new(rippingBox)
# profileBox.addWidget( @cRippingFormat )
# @cRippingFormat.insertItem("ogg")
# @cRippingFormat.insertItem("mp3")
# @cRippingFormat.insertItem("flac")
# directoryBox = Qt::HBoxLayout.new( rippingBox, 6 );
# lRippingDirectory = Qt::Label.new('Directory:', rippingBox)
# directoryBox = TQt::HBoxLayout.new( rippingBox, 6 );
# lRippingDirectory = TQt::Label.new('Directory:', rippingBox)
# directoryBox.addWidget( lRippingDirectory )
# @cRippingDirectory = Qt::ComboBox.new(rippingBox)
# @cRippingDirectory = TQt::ComboBox.new(rippingBox)
# directoryBox.addWidget( @cRippingDirectory )
# @cRippingDirectory.setEditable(true)
# @cRippingDirectory.insertItem("/home/daniel/soundKonverter/%b/%d - %n - %t")
@ -97,10 +97,10 @@ def initialize(parent = nil, name = nil)
box.addSpacing( 5 )
buttonsBox = Qt::HBoxLayout.new(box)
buttonsBox = TQt::HBoxLayout.new(box)
buttonsBox.setSpacing(6)
buttonsBox.addStretch()
okPushButton = Qt::PushButton.new( self, "ok" )
okPushButton = TQt::PushButton.new( self, "ok" )
buttonsBox.addWidget( okPushButton )
okPushButton.setText( "OK" )
okPushButton.setDefault( true )
@ -109,18 +109,18 @@ def initialize(parent = nil, name = nil)
self, SLOT( 'accept()' )
)
cancelPushButton = Qt::PushButton.new( self, "cancel" )
cancelPushButton = TQt::PushButton.new( self, "cancel" )
buttonsBox.addWidget( cancelPushButton )
cancelPushButton.setText( "Cancel" )
cancelPushButton.setAccel( Qt::KeySequence.new(Key_Escape) )
cancelPushButton.setAccel( TQt::KeySequence.new(Key_Escape) )
connect( cancelPushButton, SIGNAL( 'clicked()' ),
self, SLOT( 'reject()' )
)
file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( Qt::IO_ReadOnly )
ts = Qt::TextStream.new( file )
file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( TQt::IO_ReadOnly )
ts = TQt::TextStream.new( file )
content = ''
ts >> content
if content == 'Very_low'
@ -137,9 +137,9 @@ def initialize(parent = nil, name = nil)
file.close()
end
# file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/profiles" )
# if file.open( Qt::IO_ReadOnly )
# ts = Qt::TextStream.new( file )
# file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/profiles" )
# if file.open( TQt::IO_ReadOnly )
# ts = TQt::TextStream.new( file )
# while !ts.eof()
# content = ''
# ts >> content
@ -153,9 +153,9 @@ end
def accept()
file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( Qt::IO_WriteOnly )
ts = Qt::TextStream.new( file )
file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( TQt::IO_WriteOnly )
ts = TQt::TextStream.new( file )
if @cTranscodeProfile.currentText() == 'Very low'
content = 'Very_low'
elsif @cTranscodeProfile.currentText() == 'Low'
@ -201,7 +201,7 @@ loop do
case command
when "configure"
app = Qt::Application.new(ARGV)
app = TQt::Application.new(ARGV)
widget = MainWidget.new
app.setMainWidget(widget)
widget.show()
@ -215,9 +215,9 @@ loop do
filetype = args[2]
profile = ''
file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/formats" )
if file.open( Qt::IO_ReadOnly )
ts = Qt::TextStream.new( file )
file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/formats" )
if file.open( TQt::IO_ReadOnly )
ts = TQt::TextStream.new( file )
while !ts.eof()
mode = ''
formats = ''
@ -231,9 +231,9 @@ loop do
end
if profile == ''
file = Qt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( Qt::IO_ReadOnly )
ts = Qt::TextStream.new( file )
file = TQt::File.new( File.dirname( File.expand_path( __FILE__ ) ) + "/config" )
if file.open( TQt::IO_ReadOnly )
ts = TQt::TextStream.new( file )
content = ''
ts >> content
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
tagGroupBox = new TQGroupBox( i18n("No track selected"), this, "tagGroupBox" );
gridLayout->addWidget( tagGroupBox, 2, 0 );
tagGroupBox->setColumnLayout( 0, Qt::Vertical );
tagGroupBox->setColumnLayout( 0, TQt::Vertical );
tagGroupBox->layout()->setSpacing( 6 );
tagGroupBox->layout()->setMargin( 6 );
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" );
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()->setMargin( 6 );
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->setColumnLayout( 0, Qt::Vertical );
options.group->setColumnLayout( 0, TQt::Vertical );
options.group->layout()->setSpacing( 6 );
options.group->layout()->setMargin( 6 );
options.group->show();
@ -274,7 +274,7 @@ void ConfigBackendsPage::rebuild()
options.lStrength->setAlignment( TQt::AlignRight | TQt::AlignVCenter );
options.lStrength->show();
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->show();
TQToolTip::add( options.sStrength, i18n("Set the compression strength:\n\nLeft = fast conversion\nRight = good resultant file") );

Loading…
Cancel
Save