/*************************************************************************** * Copyright (C) 2008 by Andreas Pakulat #include #include "core.h" #include "plugincontroller.h" namespace KDevelop { ProjectInfoPage::ProjectInfoPage( QWidget* parent ) : QWidget( parent ) { page_ui = new Ui::ProjectInfoPage; page_ui->setupUi( this ); connect( page_ui->nameEdit, SIGNAL(textEdited(QString)), this, SIGNAL(projectNameChanged(QString)) ); connect( page_ui->managerCombo, SIGNAL(activated(int)), this, SLOT(changeProjectManager(int)) ); foreach( const KPluginInfo& info, Core::self()->pluginControllerInternal()->queryExtensionPlugins( "org.kdevelop.IProjectFileManager" ) ) { page_ui->managerCombo->addItem( KIcon(info.icon()), info.name(), info.pluginName() ); } } ProjectInfoPage::~ProjectInfoPage() { delete page_ui; } void ProjectInfoPage::changeProjectManager( int idx ) { emit projectManagerChanged( page_ui->managerCombo->itemData( idx ).toString() ); } void ProjectInfoPage::setProjectName( const QString& name ) { page_ui->nameEdit->setText( name ); emit projectNameChanged( page_ui->nameEdit->text() ); } void ProjectInfoPage::setProjectManager( const QString& name ) { int idx = page_ui->managerCombo->findText( name ); if( idx != -1 ) { page_ui->managerCombo->setCurrentIndex( idx ); changeProjectManager( idx ); } } } #include "moc_projectinfopage.cpp"