util
KDevelop::EnvironmentSelectionWidget Class Reference
#include <environmentselectionwidget.h>
Inherits KComboBox.
Detailed Description
Simple compobox which allows each plugin to decide which environment variable group to use.Can be used just like a KComboBox in Configuration dialogs including usage with KConfigXT.
Example code to populate the list:
EnvironmentGroupList envlist( PluginSettings::self()->config() ); ui->kcfg_environmentGroup->addItems( envlist.groups()) );
The .kcfg file for that would include an entry like this:
<entry name="environmentGroup" key="Make Environment Group" type="string"> <default>default</default> </entry>
Its important to list "default" as the default value, because thats currently the only way to avoid an empty entry in the combo box.
Definition at line 52 of file environmentselectionwidget.h.
Public Member Functions | |
| QString | currentProfile () const |
| EnvironmentSelectionWidget (QWidget *parent=0) | |
| void | setCurrentProfile (const QString &text) |
Properties | |
| QString | currentProfile |
Member Function Documentation
| QString KDevelop::EnvironmentSelectionWidget::currentProfile | ( | ) | const |
Return the currently selected text as special property so this widget works with KConfigXT.
- Returns:
- the currently selected items text
| void KDevelop::EnvironmentSelectionWidget::setCurrentProfile | ( | const QString & | text | ) |
Setter for the KConfigXT property.
- Parameters:
-
text the item text which should be set as current.
Definition at line 52 of file environmentselectionwidget.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference