• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • ComboBox
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
Plasma::ComboBox Class Reference

#include <Plasma/Widgets/ComboBox>

Inheritance diagram for Plasma::ComboBox:
Inheritance graph
[legend]

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 113 of file combobox.cpp.

Plasma::ComboBox::~ComboBox ( )

Definition at line 136 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 183 of file combobox.cpp.

void Plasma::ComboBox::changeEvent ( QEvent *  event)
protected

Definition at line 315 of file combobox.cpp.

void Plasma::ComboBox::clear ( )
slot

Definition at line 188 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 270 of file combobox.cpp.

void Plasma::ComboBox::focusOutEvent ( QFocusEvent *  event)
protected

Definition at line 275 of file combobox.cpp.

void Plasma::ComboBox::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 303 of file combobox.cpp.

void Plasma::ComboBox::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 309 of file combobox.cpp.

void Plasma::ComboBox::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 321 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 212 of file combobox.cpp.

void Plasma::ComboBox::resizeEvent ( QGraphicsSceneResizeEvent *  event)
protected

Definition at line 193 of file combobox.cpp.

void Plasma::ComboBox::setCurrentIndex ( int  index)

Sets the current index of the combobox.

Since
4.6

Definition at line 347 of file combobox.cpp.

void Plasma::ComboBox::setNativeWidget ( KComboBox *  nativeWidget)

Sets the combo box wrapped by this ComboBox (widget must inherit KComboBox), ownership is transferred to the ComboBox.

Parameters
nativeWidgetcombo box that will be wrapped by this ComboBox
Since
KDE4.4

Definition at line 157 of file combobox.cpp.

void Plasma::ComboBox::setStyleSheet ( const QString &  stylesheet)

Sets the stylesheet used to control the visual display of this ComboBox.

Parameters
stylesheeta CSS string

Definition at line 147 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
readwrite

Definition at line 48 of file combobox.h.

KComboBox * Plasma::ComboBox::nativeWidget
readwrite

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
readwrite

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:
  • combobox.h
  • combobox.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal