summaryrefslogtreecommitdiffstats
path: root/amarok/src/mediumpluginmanager.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-18 03:28:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-18 03:28:57 +0000
commit1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6 (patch)
tree728d80ad748a95d7aa27ee020706dbe985e0e8cb /amarok/src/mediumpluginmanager.cpp
parente9db3e45ed0189bbe18125b120da394a5bc8a832 (diff)
downloadamarok-1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6.tar.gz
amarok-1d9d9f5ce46f0220f7b1b350f5ad4e6dc5079ac6.zip
Finish TQt4 porting of Amarok
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1228394 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'amarok/src/mediumpluginmanager.cpp')
-rw-r--r--amarok/src/mediumpluginmanager.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/amarok/src/mediumpluginmanager.cpp b/amarok/src/mediumpluginmanager.cpp
index 5d167acf..d4ddb5d8 100644
--- a/amarok/src/mediumpluginmanager.cpp
+++ b/amarok/src/mediumpluginmanager.cpp
@@ -45,29 +45,29 @@ using Amarok::escapeHTMLAttr;
typedef TQMap<TQString, Medium*> MediumMap;
MediumPluginManagerDialog::MediumPluginManagerDialog()
- : KDialogBase( Amarok::mainWindow(), "mediumpluginmanagerdialog", false, TQString::null, Ok|Cancel, Ok )
+ : KDialogBase( Amarok::mainWindow(), "mediumpluginmanagerdialog", false, TQString(), Ok|Cancel, Ok )
{
kapp->setTopWidget( this );
setCaption( kapp->makeStdCaption( i18n( "Manage Devices and Plugins" ) ) );
TQVBox* vbox = makeVBoxMainWidget();
vbox->setSpacing( KDialog::spacingHint() );
- vbox->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
+ vbox->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
m_location = new TQGroupBox( 1, Qt::Vertical, i18n( "Devices" ), vbox );
- m_location->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
+ m_location->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
m_devicesBox = new TQVBox( m_location );
- m_devicesBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
+ m_devicesBox->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
m_manager = new MediumPluginManager( m_devicesBox );
TQHBox *hbox = new TQHBox( vbox );
KPushButton *detectDevices = new KPushButton( i18n( "Autodetect Devices" ), hbox);
- detectDevices->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
+ detectDevices->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( detectDevices, TQT_SIGNAL( clicked() ), m_manager, TQT_SLOT( redetectDevices() ) );
KPushButton *addButton = new KPushButton( i18n( "Add Device..." ), hbox );
- addButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
+ addButton->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( addButton, TQT_SIGNAL( clicked() ), m_manager, TQT_SLOT( newDevice() ) );
}
@@ -140,7 +140,7 @@ MediumPluginManager::detectDevices( const bool redetect, const bool nographics )
}
}
- if( m_deletedMap.contains( (*it)->id() ) && !(*it)->isAutodetected() )
+ if( m_deletedMap.tqcontains( (*it)->id() ) && !(*it)->isAutodetected() )
{
skipflag = true;
debug() << "skipping: deleted & not autodetect" << endl;
@@ -149,7 +149,7 @@ MediumPluginManager::detectDevices( const bool redetect, const bool nographics )
if( skipflag )
continue;
- if( m_deletedMap.contains( (*it)->id() ) )
+ if( m_deletedMap.tqcontains( (*it)->id() ) )
m_deletedMap.remove( (*it)->id() );
MediaDeviceConfig *dev = new MediaDeviceConfig( *it, this, nographics, m_widget );
@@ -253,7 +253,7 @@ MediumPluginManager::newDevice()
/////////////////////////////////////////////////////////////////////
ManualDeviceAdder::ManualDeviceAdder( MediumPluginManager* mpm )
-: KDialogBase( Amarok::mainWindow(), "manualdeviceadder", true, TQString::null, Ok|Cancel, Ok )
+: KDialogBase( Amarok::mainWindow(), "manualdeviceadder", true, TQString(), Ok|Cancel, Ok )
{
m_mpm = mpm;
m_successful = false;
@@ -278,7 +278,7 @@ ManualDeviceAdder::ManualDeviceAdder( MediumPluginManager* mpm )
new TQLabel( "", vbox1 );
TQLabel* nameLabel = new TQLabel( vbox1 );
nameLabel->setText( i18n( "Enter a &name for this device (required):" ) );
- m_mdaName = new HintLineEdit( TQString::null, vbox1);
+ m_mdaName = new HintLineEdit( TQString(), vbox1);
nameLabel->setBuddy( m_mdaName );
m_mdaName->setHint( i18n( "Example: My_Ipod" ) );
TQToolTip::add( m_mdaName, i18n( "Enter a name for the device. The name must be unique across all devices, including autodetected devices. It must not contain the pipe ( | ) character." ) );
@@ -286,7 +286,7 @@ ManualDeviceAdder::ManualDeviceAdder( MediumPluginManager* mpm )
new TQLabel( "", vbox1 );
TQLabel* mpLabel = new TQLabel( vbox1 );
mpLabel->setText( i18n( "Enter the &mount point of the device, if applicable:" ) );
- m_mdaMountPoint = new HintLineEdit( TQString::null, vbox1);
+ m_mdaMountPoint = new HintLineEdit( TQString(), vbox1);
mpLabel->setBuddy( m_mdaMountPoint );
m_mdaMountPoint->setHint( i18n( "Example: /mnt/ipod" ) );
TQToolTip::add( m_mdaMountPoint, i18n( "Enter the device's mount point. Some devices (such as iRiver iFP devices) may not have a mount point and this can be ignored. All other devices (iPods, UMS/VFAT devices) should enter the mount point here." ) );
@@ -337,7 +337,7 @@ ManualDeviceAdder::comboChanged( const TQString &string )
MediaBrowser::instance()->getInternalPluginName( string ) == "njb-mediadevice" )
{
m_comboOldText = m_mdaMountPoint->text();
- m_mdaMountPoint->setText( TQString::null );
+ m_mdaMountPoint->setText( TQString() );
m_mdaMountPoint->setEnabled(false);
}
else if( m_mdaMountPoint->isEnabled() == false )
@@ -376,8 +376,8 @@ ManualDeviceAdder::getMedium( bool recreate )
return m_newMed;
}
-MediaDeviceConfig::MediaDeviceConfig( Medium *medium, MediumPluginManager *mgr, const bool nographics, TQWidget *parent, const char *name )
-: TQHBox( parent, name )
+MediaDeviceConfig::MediaDeviceConfig( Medium *medium, MediumPluginManager *mgr, const bool nographics, TQWidget *tqparent, const char *name )
+: TQHBox( tqparent, name )
, m_manager( mgr )
, m_medium( medium )
, m_configButton( 0 )
@@ -392,36 +392,36 @@ MediaDeviceConfig::MediaDeviceConfig( Medium *medium, MediumPluginManager *mgr,
if( !m_oldPlugin.isEmpty() )
m_new = false;
- setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
setSpacing( 5 );
const TQString labelTextNone = i18n( "(none)" );
TQString row = "<tr><td>%1</td><td>%2</td></tr>";
TQString table;
- table += row.arg( escapeHTML( i18n( "Autodetected:" ) ),
+ table += row.tqarg( escapeHTML( i18n( "Autodetected:" ) ),
escapeHTML( medium->isAutodetected() ? i18n("Yes") : i18n("No") ) );
- table += row.arg( escapeHTML( i18n( "ID:" ) ),
+ table += row.tqarg( escapeHTML( i18n( "ID:" ) ),
escapeHTML( medium->id() ) );
- table += row.arg( escapeHTML( i18n( "Name:" ) ),
+ table += row.tqarg( escapeHTML( i18n( "Name:" ) ),
escapeHTML( medium->name() ) );
- table += row.arg( escapeHTML( i18n( "Label:" ) ),
+ table += row.tqarg( escapeHTML( i18n( "Label:" ) ),
escapeHTML( medium->label().isEmpty() ? labelTextNone : medium->label() ) );
- table += row.arg( escapeHTML( i18n( "User Label:" ) ),
+ table += row.tqarg( escapeHTML( i18n( "User Label:" ) ),
escapeHTML( medium->userLabel().isEmpty() ? labelTextNone : medium->userLabel() ) );
- table += row.arg( escapeHTML( i18n( "Device Node:" ) ),
+ table += row.tqarg( escapeHTML( i18n( "Device Node:" ) ),
escapeHTML( medium->deviceNode().isEmpty() ? labelTextNone : medium->deviceNode() ) );
- table += row.arg( escapeHTML( i18n( "Mount Point:" ) ),
+ table += row.tqarg( escapeHTML( i18n( "Mount Point:" ) ),
escapeHTML( medium->mountPoint().isEmpty() ? labelTextNone : medium->mountPoint() ) );
- table += row.arg( escapeHTML( i18n( "Mime Type:" ) ),
+ table += row.tqarg( escapeHTML( i18n( "Mime Type:" ) ),
escapeHTML( medium->mimeType().isEmpty() ? labelTextNone : medium->mimeType() ) );
- TQString title = escapeHTML( i18n( "Device information for %1").arg(medium->name() ) );
- TQString details = TQString( "<em>%1</em><br />" "<table>%2</table>" ).arg( title, table );
+ TQString title = escapeHTML( i18n( "Device information for %1").tqarg(medium->name() ) );
+ TQString details = TQString( "<em>%1</em><br />" "<table>%2</table>" ).tqarg( title, table );
(void)new TQLabel( i18n("Name: "), this );
(void)new TQLabel( medium->name(), this );
(void)new KActiveLabel( i18n( "(<a href='whatsthis:%1'>Details</a>)" )
- .arg( Amarok::escapeHTMLAttr( details ) ), this );
+ .tqarg( Amarok::escapeHTMLAttr( details ) ), this );
(void)new TQLabel( i18n("Plugin:"), this );
m_pluginCombo = new KComboBox( false, this );
@@ -435,7 +435,7 @@ MediaDeviceConfig::MediaDeviceConfig( Medium *medium, MediumPluginManager *mgr,
m_pluginCombo->setCurrentItem( (*it)->name() );
}
- m_configButton = new KPushButton( SmallIconSet( Amarok::icon( "configure" ) ), TQString::null, this );
+ m_configButton = new KPushButton( SmallIconSet( Amarok::icon( "configure" ) ), TQString(), this );
connect( m_configButton, TQT_SIGNAL(clicked()), TQT_SLOT(configureDevice()) );
m_configButton->setEnabled( !m_new && m_pluginCombo->currentText() != i18n( "Do not handle" ) );
TQToolTip::add( m_configButton, i18n( "Configure device settings" ) );
@@ -467,13 +467,13 @@ MediaDeviceConfig::medium()
return m_medium;
}
-QString
+TQString
MediaDeviceConfig::plugin()
{
return MediaBrowser::instance()->getInternalPluginName( m_pluginCombo->currentText() );
}
-QString
+TQString
MediaDeviceConfig::oldPlugin()
{
return m_oldPlugin;