util
environmentselectionwidget.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "environmentselectionwidget.h"
00020 #include "environmentgrouplist.h"
00021 #include <ksettings/dispatcher.h>
00022 #include <kglobal.h>
00023 #include <kcomponentdata.h>
00024
00025 namespace KDevelop
00026 {
00027
00028 class EnvironmentSelectionWidgetPrivate
00029 {
00030 };
00031
00032 EnvironmentSelectionWidget::EnvironmentSelectionWidget( QWidget *parent )
00033 : KComboBox( parent ), d( new EnvironmentSelectionWidgetPrivate )
00034 {
00035 KComponentData data( "kdevplatform", "kdevplatform",
00036 KComponentData::SkipMainComponentRegistration );
00037 KSettings::Dispatcher::registerComponent( data, this, "updateEnvGroup" );
00038 KSettings::Dispatcher::registerComponent( KGlobal::mainComponent(), this, "updateEnvGroup" );
00039
00040 }
00041
00042 EnvironmentSelectionWidget::~EnvironmentSelectionWidget()
00043 {
00044 delete d;
00045 }
00046
00047 QString EnvironmentSelectionWidget::currentProfile() const
00048 {
00049 return currentText();
00050 }
00051
00052 void EnvironmentSelectionWidget::setCurrentProfile( const QString& profile )
00053 {
00054 setCurrentItem( profile );
00055 }
00056
00057
00058 }
00059
00060 #include "environmentselectionwidget.moc"