MCPcopy Create free account
hub / github.com/KDE/kdevelop / LaunchConfigPagesContainer

Method LaunchConfigPagesContainer

kdevplatform/shell/launchconfigurationdialog.cpp:895–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

893}
894
895LaunchConfigPagesContainer::LaunchConfigPagesContainer( const QList<LaunchConfigurationPageFactory*>& factories, QWidget* parent )
896 : QWidget(parent)
897{
898 setLayout( new QVBoxLayout( this ) );
899 layout()->setContentsMargins( 0, 0, 0, 0 );
900 QWidget* parentwidget = this;
901 QTabWidget* tab = nullptr;
902 if( factories.count() > 1 )
903 {
904 tab = new QTabWidget( this );
905 parentwidget = tab;
906 layout()->addWidget( tab );
907 }
908 for (LaunchConfigurationPageFactory* fac : factories) {
909 LaunchConfigurationPage* page = fac->createWidget( parentwidget );
910 if ( page->layout() ) {
911 // remove margins for single page, reset margins for tabbed display
912 const int pageMargin = tab ? -1 : 0;
913 page->layout()->setContentsMargins(pageMargin, pageMargin, pageMargin, pageMargin);
914 }
915 pages.append( page );
916 connect( page, &LaunchConfigurationPage::changed, this, &LaunchConfigPagesContainer::changed );
917 if( tab ) {
918 tab->addTab( page, page->icon(), page->title() );
919 } else
920 {
921 layout()->addWidget( page );
922 }
923 }
924}
925
926void LaunchConfigPagesContainer::setLaunchConfiguration( KDevelop::LaunchConfiguration* l )
927{

Callers

nothing calls this directly

Calls 6

countMethod · 0.45
addWidgetMethod · 0.45
createWidgetMethod · 0.45
appendMethod · 0.45
iconMethod · 0.45
titleMethod · 0.45

Tested by

no test coverage detected