本文整理汇总了C++中ProjectInfo::childOutputURLs方法的典型用法代码示例。如果您正苦于以下问题:C++ ProjectInfo::childOutputURLs方法的具体用法?C++ ProjectInfo::childOutputURLs怎么用?C++ ProjectInfo::childOutputURLs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProjectInfo
的用法示例。
在下文中一共展示了ProjectInfo::childOutputURLs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KDialogBase
//BEGIN class LinkerOptionsDlg
LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *parent )
: KDialogBase( parent, "Linker Options Dialog", true, "Linker Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
m_pLinkerOptions = linkingOptions;
m_pWidget = new LinkerOptionsWidget(this);
ProjectInfo * pi = ProjectManager::self()->currentProject();
assert(pi);
//BEGIN Update gplink options
m_pWidget->m_pHexFormat->setCurrentItem( m_pLinkerOptions->hexFormat() );
m_pWidget->m_pOutputMap->setChecked( m_pLinkerOptions->outputMapFile() );
m_pWidget->m_pLibraryDir->setText( m_pLinkerOptions->libraryDir() );
m_pWidget->m_pLinkerScript->setText( m_pLinkerOptions->linkerScript() );
m_pWidget->m_pOther->setText( m_pLinkerOptions->linkerOther() );
//END Update gplink options
//BEGIN Update library widgets
const KURL::List availableInternal = pi->childOutputURLs( ProjectItem::LibraryType );
const QStringList linkedInternal = m_pLinkerOptions->linkedInternal();
KURL::List::const_iterator end = availableInternal.end();
for ( KURL::List::const_iterator it = availableInternal.begin(); it != end; ++it )
{
QString relativeURL = KURL::relativeURL( pi->url(), *it );
QCheckListItem * item = new QCheckListItem( m_pWidget->m_pInternalLibraries, relativeURL, QCheckListItem::CheckBox );
item->setOn( linkedInternal.contains(relativeURL) );
}
m_pExternalLibraryRequester = new KURLRequester( 0l );
m_pExternalLibraryRequester->fileDialog()->setURL( "/usr/share/sdcc/lib" );
delete m_pWidget->m_pExternalLibraries;
m_pWidget->m_pExternalLibraries = new KEditListBox( i18n("Link libraries outside project"), m_pExternalLibraryRequester->customEditor(), m_pWidget );
m_pWidget->m_pExternalLibraries->layout()->setMargin(11);
(dynamic_cast<QGridLayout*>(m_pWidget->layout()))->addMultiCellWidget( m_pWidget->m_pExternalLibraries, 7, 7, 0, 1 );
#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
m_pWidget->m_pExternalLibraries->setButtons( KEditListBox::Add | KEditListBox::Remove );
# endif
#endif
m_pWidget->m_pExternalLibraries->insertStringList( m_pLinkerOptions->linkedExternal() );
//END Update library widgets
setMainWidget( m_pWidget );
setInitialSize( m_pWidget->rect().size() );
}
示例2: KDialog
//BEGIN class LinkerOptionsDlg
LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *parent )
: // KDialog( parent, "Linker Options Dialog", true, "Linker Options", KDialog::Ok|KDialog::Cancel, KDialog::Ok, true )
KDialog( parent) //, "Linker Options Dialog", true, "Linker Options", KDialog::Ok|KDialog::Cancel, KDialog::Ok, true )
{
setObjectName("Linker Options Dialog");
setModal(true);
setCaption(i18n("Linker Options"));
setButtons(KDialog::Ok|KDialog::Cancel);
setDefaultButton(KDialog::Ok);
showButtonSeparator(true);
m_pLinkerOptions = linkingOptions;
m_pWidget = new LinkerOptionsWidget(this);
ProjectInfo * pi = ProjectManager::self()->currentProject();
assert(pi);
//BEGIN Update gplink options
m_pWidget->m_pHexFormat->setCurrentIndex( m_pLinkerOptions->hexFormat() );
m_pWidget->m_pOutputMap->setChecked( m_pLinkerOptions->outputMapFile() );
m_pWidget->m_pLibraryDir->setText( m_pLinkerOptions->libraryDir() );
m_pWidget->m_pLinkerScript->setText( m_pLinkerOptions->linkerScript() );
m_pWidget->m_pOther->setText( m_pLinkerOptions->linkerOther() );
//END Update gplink options
//BEGIN Update library widgets
const KUrl::List availableInternal = pi->childOutputURLs( ProjectItem::LibraryType );
const QStringList linkedInternal = m_pLinkerOptions->linkedInternal();
KUrl::List::const_iterator end = availableInternal.end();
for ( KUrl::List::const_iterator it = availableInternal.begin(); it != end; ++it )
{
QString relativeURL = KUrl::relativeUrl( pi->url(), *it );
// 2017.12.1 - convert to QListWidgetItem
//Q3CheckListItem * item = new Q3CheckListItem( m_pWidget->m_pInternalLibraries, relativeURL, Q3CheckListItem::CheckBox );
QListWidgetItem * item = new QListWidgetItem( relativeURL, m_pWidget->m_pInternalLibraries );
item->setCheckState( (linkedInternal.contains(relativeURL)) ? Qt::Checked : Qt::Unchecked );
//item->setOn( linkedInternal.contains(relativeURL) ); // 2017.12.1 - convert to QListWidgetItem
}
m_pExternalLibraryRequester = new KUrlRequester( 0l );
m_pExternalLibraryRequester->fileDialog()->setUrl( KUrl( "/usr/share/sdcc/lib" ) );
delete m_pWidget->m_pExternalLibraries;
m_pWidget->m_pExternalLibraries = new KEditListBox( i18n("Link libraries outside project"), m_pExternalLibraryRequester->customEditor(), m_pWidget );
m_pWidget->m_pExternalLibraries->layout()->setMargin(11);
{
QGridLayout* grLayout = (dynamic_cast<QGridLayout*>(m_pWidget->layout()));
//grLayout->addMultiCellWidget( m_pWidget->m_pExternalLibraries, 7, 7, 0, 1 ); // 2018.12.02
grLayout->addWidget( m_pWidget->m_pExternalLibraries, 7, 0, 1, 2);
}
m_pWidget->m_pExternalLibraries->setButtons( KEditListBox::Add | KEditListBox::Remove );
m_pWidget->m_pExternalLibraries->insertStringList( m_pLinkerOptions->linkedExternal() );
//END Update library widgets
setMainWidget( m_pWidget );
setInitialSize( m_pWidget->rect().size() );
}