Plasma
Plasma::ComboBox Class Reference
Provides a Plasma-themed combo box. More...
#include <Plasma/Widgets/ComboBox>

Public Slots | |
| void | clear () |
Signals | |
| void | activated (const QString &text) |
| void | currentIndexChanged (int index) |
| void | textChanged (const QString &text) |
Public Member Functions | |
| ComboBox (QGraphicsWidget *parent=0) | |
| ~ComboBox () | |
| Q_INVOKABLE void | addItem (const QString &text) |
| int | count () const |
| int | currentIndex () const |
| KComboBox * | nativeWidget () const |
| void | setCurrentIndex (int index) |
| void | setNativeWidget (KComboBox *nativeWidget) |
| void | setStyleSheet (const QString &stylesheet) |
| QString | styleSheet () |
| QString | text () const |
Protected Member Functions | |
| void | changeEvent (QEvent *event) |
| void | focusInEvent (QFocusEvent *event) |
| void | focusOutEvent (QFocusEvent *event) |
| void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
| void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
| void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
| void | resizeEvent (QGraphicsSceneResizeEvent *event) |
Properties | |
| int | count |
| int | currentIndex |
| KComboBox | nativeWidget |
| QGraphicsWidget | parentWidget |
| QString | styleSheet |
| QString | text |
Detailed Description
Provides a Plasma-themed combo box.
Definition at line 39 of file combobox.h.
Constructor & Destructor Documentation
| Plasma::ComboBox::ComboBox | ( | QGraphicsWidget * | parent = 0 | ) | [explicit] |
Definition at line 105 of file combobox.cpp.
| Plasma::ComboBox::~ComboBox | ( | ) |
Definition at line 128 of file combobox.cpp.
Member Function Documentation
| void Plasma::ComboBox::activated | ( | const QString & | text | ) | [signal] |
This signal is sent when the user chooses an item in the combobox.
The item's text is passed.
| void Plasma::ComboBox::addItem | ( | const QString & | text | ) |
Adds an item to the combo box with the given text.
The item is appended to the list of existing items.
Definition at line 175 of file combobox.cpp.
| void Plasma::ComboBox::changeEvent | ( | QEvent * | event | ) | [protected] |
Definition at line 295 of file combobox.cpp.
| void Plasma::ComboBox::clear | ( | ) | [slot] |
Definition at line 180 of file combobox.cpp.
| int Plasma::ComboBox::count | ( | ) | const |
Returns the number of items in the combo box.
- Since:
- 4.6
| int Plasma::ComboBox::currentIndex | ( | ) | const |
Returns the current index of the combobox.
- Since:
- 4.6
| void Plasma::ComboBox::currentIndexChanged | ( | int | index | ) | [signal] |
This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically.
| void Plasma::ComboBox::focusInEvent | ( | QFocusEvent * | event | ) | [protected] |
Definition at line 262 of file combobox.cpp.
| void Plasma::ComboBox::focusOutEvent | ( | QFocusEvent * | event | ) | [protected] |
Definition at line 267 of file combobox.cpp.
| void Plasma::ComboBox::hoverEnterEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Definition at line 283 of file combobox.cpp.
| void Plasma::ComboBox::hoverLeaveEvent | ( | QGraphicsSceneHoverEvent * | event | ) | [protected] |
Definition at line 289 of file combobox.cpp.
| void Plasma::ComboBox::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) | [protected] |
Definition at line 301 of file combobox.cpp.
| KComboBox* Plasma::ComboBox::nativeWidget | ( | ) | const |
- Returns:
- the native widget wrapped by this ComboBox
| void Plasma::ComboBox::paint | ( | QPainter * | painter, |
| const QStyleOptionGraphicsItem * | option, | ||
| QWidget * | widget | ||
| ) | [protected] |
Definition at line 204 of file combobox.cpp.
| void Plasma::ComboBox::resizeEvent | ( | QGraphicsSceneResizeEvent * | event | ) | [protected] |
Definition at line 185 of file combobox.cpp.
| void Plasma::ComboBox::setCurrentIndex | ( | int | index | ) |
| void Plasma::ComboBox::setNativeWidget | ( | KComboBox * | nativeWidget | ) |
Sets the combo box wrapped by this ComboBox (widget must inherit KComboBox), ownership is transferred to the ComboBox.
- combo box that will be wrapped by this ComboBox
- Since:
- KDE4.4
Definition at line 149 of file combobox.cpp.
| void Plasma::ComboBox::setStyleSheet | ( | const QString & | stylesheet | ) |
Sets the stylesheet used to control the visual display of this ComboBox.
- stylesheet a CSS string
Definition at line 139 of file combobox.cpp.
| QString Plasma::ComboBox::styleSheet | ( | ) |
- Returns:
- the stylesheet currently used with this widget
| QString Plasma::ComboBox::text | ( | ) | const |
- Returns:
- the display text
| void Plasma::ComboBox::textChanged | ( | const QString & | text | ) | [signal] |
This signal is sent whenever the currentIndex in the combobox changes either through user interaction or programmatically.
The item's text is passed.
Property Documentation
int Plasma::ComboBox::count [read] |
Definition at line 47 of file combobox.h.
int Plasma::ComboBox::currentIndex [read, write] |
Definition at line 48 of file combobox.h.
KComboBox * Plasma::ComboBox::nativeWidget [read, write] |
Definition at line 46 of file combobox.h.
QGraphicsWidget Plasma::ComboBox::parentWidget [read] |
Definition at line 43 of file combobox.h.
QString Plasma::ComboBox::styleSheet [read, write] |
Definition at line 45 of file combobox.h.
QString Plasma::ComboBox::text [read] |
Definition at line 44 of file combobox.h.
The documentation for this class was generated from the following files:
KDE 4.6 API Reference