util
KDevelop::EnvironmentSelectionWidget Class Reference
Simple compobox which allows each plugin to decide which environment variable group to use. More...
#include <environmentselectionwidget.h>
Inherits KComboBox.
Public Member Functions | |
| EnvironmentSelectionWidget (QWidget *parent=0) | |
| QString | currentProfile () const |
| void | setCurrentProfile (const QString &text) |
Properties | |
| QString | currentProfile |
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>
It is important to list "default" as the default value, because that is currently the only way to avoid an empty entry in the combo box.
Definition at line 52 of file environmentselectionwidget.h.
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 48 of file environmentselectionwidget.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference