本文整理汇总了C++中k3b::Msf::lba方法的典型用法代码示例。如果您正苦于以下问题:C++ Msf::lba方法的具体用法?C++ Msf::lba怎么用?C++ Msf::lba使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类k3b::Msf
的用法示例。
在下文中一共展示了Msf::lba方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
bool K3b::operator>=( const K3b::Msf& m1, const K3b::Msf& m2 )
{
return ( m1.lba() >= m2.lba() );
}
示例2: if
void K3b::DataPropertiesDialog::loadListProperties( const QList<K3b::DataItem*>& items )
{
m_labelIcon->setPixmap( DesktopIcon( "document-multiple", KIconLoader::SizeLarge ) );
int files = 0;
int folders = 0;
KIO::filesize_t size = 0;
K3b::Msf blocks = 0;
for ( QList<K3b::DataItem*>::iterator it = m_dataItems.begin();
it != m_dataItems.end(); ++it ) {
K3b::DataItem* item = *it;
if ( item->isFile() )
++files;
else if ( item->isDir() )
++folders;
blocks += item->blocks();
size += item->size();
}
QString s = i18np( "One Item", "%1 Items", items.count() );
s += " - ";
if ( files > 0 )
s += i18np( "One File", "%1 Files", files );
else
s += i18n( "No Files" );
s += " - ";
if ( folders > 0 )
s += i18np( "One Folder", "%1 Folders", folders );
else
s += i18n( "No Folders" );
m_multiSelectionLabel->setText( s );
m_labelSize->setText( KIO::convertSize(size) );
m_labelBlocks->setText( QString::number(blocks.lba()) );
// the location of all items are the same since it is not possible to
// select items from different folders
// FIXME: maybe better use QString::section?
QString location = '/' + items.first()->k3bPath();
if( location[location.length()-1] == '/' )
location.truncate( location.length()-1 );
location.truncate( location.lastIndexOf('/') );
if( location.isEmpty() )
location = '/';
m_labelLocation->setText( location );
m_checkHideOnJoliet->setChecked( items.first()->hideOnJoliet() );
for ( QList<K3b::DataItem*>::iterator it = m_dataItems.begin();
it != m_dataItems.end(); ++it ) {
K3b::DataItem* item = *it;
if ( m_checkHideOnJoliet->isChecked() != item->hideOnJoliet() ) {
m_checkHideOnJoliet->setCheckState( Qt::PartiallyChecked );
break;
}
}
m_checkHideOnRockRidge->setChecked( items.first()->hideOnRockRidge() );
for ( QList<K3b::DataItem*>::iterator it = m_dataItems.begin();
it != m_dataItems.end(); ++it ) {
K3b::DataItem* item = *it;
if ( m_checkHideOnRockRidge->isChecked() != item->hideOnRockRidge() ) {
m_checkHideOnRockRidge->setCheckState( Qt::PartiallyChecked );
break;
}
}
int weight = items.first()->sortWeight();
for ( QList<K3b::DataItem*>::iterator it = m_dataItems.begin();
it != m_dataItems.end(); ++it ) {
K3b::DataItem* item = *it;
if ( weight != item->sortWeight() ) {
weight = 0;
break;
}
}
m_editSortWeight->setText( QString::number( weight ) );
}