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

libkdepim

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

#include <kcheckcombobox.h>

Inheritance diagram for KPIM::KCheckComboBox:
Inheritance graph
[legend]

Public Slots

void setCheckedItems (const QStringList &items, int role=Qt::DisplayRole)
 

Signals

void checkedItemsChanged (const QStringList &items)
 

Public Member Functions

 KCheckComboBox (QWidget *parent=0)
 
virtual ~KCheckComboBox ()
 
bool alwaysShowDefaultText () const
 
QStringList checkedItems (int role=Qt::DisplayRole) const
 
QString defaultText () const
 
virtual void hidePopup ()
 
Qt::CheckState itemCheckState (int index) const
 
bool itemEnabled (int index)
 
QString separator () const
 
void setAlwaysShowDefaultText (bool always)
 
void setDefaultText (const QString &text)
 
void setItemCheckState (int index, Qt::CheckState state)
 
void setItemEnabled (int index, bool enabled=true)
 
void setSeparator (const QString &separator)
 
void setSqueezeText (bool squeeze)
 
bool squeezeText () const
 

Protected Member Functions

virtual bool eventFilter (QObject *receiver, QEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 
virtual void wheelEvent (QWheelEvent *event)
 

Properties

QStringList checkedItems
 
QString defaultText
 
QString separator
 
bool squeezeText
 

Detailed Description

A combobox that shows its items in such a way that they can be checked in the drop menu.

It provides methods to set the default text when no items are selected and the separator that is used to show the items that are selected in the line edit.

Definition at line 42 of file kcheckcombobox.h.

Constructor & Destructor Documentation

KCheckComboBox::KCheckComboBox ( QWidget *  parent = 0)
explicit

Creates a new checkable combobox.

Class KCheckComboBox.

Parameters
parentThe parent widget.

Definition at line 141 of file kcheckcombobox.cpp.

KCheckComboBox::~KCheckComboBox ( )
virtual

Destroys the time zone combobox.

Definition at line 167 of file kcheckcombobox.cpp.

Member Function Documentation

bool KCheckComboBox::alwaysShowDefaultText ( ) const

Returns whether the default text is always shown, even if there are no checked items.

Definition at line 352 of file kcheckcombobox.cpp.

QStringList KCheckComboBox::checkedItems ( int  role = Qt::DisplayRole) const

Returns The currently selected items.

Parameters
roleThe role the returned values belong to.

Definition at line 190 of file kcheckcombobox.cpp.

void KPIM::KCheckComboBox::checkedItemsChanged ( const QStringList &  items)
signal

Signal to notify listeners that the current selections has changed.

Parameters
itemsThe new selection.
QString KPIM::KCheckComboBox::defaultText ( ) const

Returns the default text that is shown when no items are selected.

bool KCheckComboBox::eventFilter ( QObject *  receiver,
QEvent *  event 
)
protectedvirtual

Definition at line 312 of file kcheckcombobox.cpp.

void KCheckComboBox::hidePopup ( )
virtual

Hides the popup list if it is currently shown.

Definition at line 172 of file kcheckcombobox.cpp.

Qt::CheckState KCheckComboBox::itemCheckState ( int  index) const

Returns the check state of item at given index.

Parameters
indexThe index for which to return the check state.

Definition at line 180 of file kcheckcombobox.cpp.

bool KCheckComboBox::itemEnabled ( int  index)

Return whether or not the item at.

Parameters
indexis enabled, i.e. if the user can (un)check the item.

Definition at line 242 of file kcheckcombobox.cpp.

void KCheckComboBox::keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Definition at line 277 of file kcheckcombobox.cpp.

void KCheckComboBox::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Definition at line 305 of file kcheckcombobox.cpp.

QString KPIM::KCheckComboBox::separator ( ) const

Returns the current separator used to separate the selected items in the line edit of the combo box.

void KCheckComboBox::setAlwaysShowDefaultText ( bool  always)

Sets if the default text should always be shown even if there are no checked items.

Default is false.

Definition at line 357 of file kcheckcombobox.cpp.

void KCheckComboBox::setCheckedItems ( const QStringList &  items,
int  role = Qt::DisplayRole 
)
slot

Sets the currently selected items.

Items that are not found in the model are silently ignored.

Parameters
itemsThe items that will be set to checked.
roleThe role items belong to.

Definition at line 204 of file kcheckcombobox.cpp.

void KCheckComboBox::setDefaultText ( const QString &  text)

Sets the default text that is shown when no items are selected.

Parameters
textThe new default text

Definition at line 221 of file kcheckcombobox.cpp.

void KCheckComboBox::setItemCheckState ( int  index,
Qt::CheckState  state 
)

Changes the check state of the given index to the given state.

Parameters
indexThe index of which the state needs to be changed
stateThe new state

Definition at line 185 of file kcheckcombobox.cpp.

void KCheckComboBox::setItemEnabled ( int  index,
bool  enabled = true 
)

Set the item at.

Parameters
indexto
enabled,i.e.if the user can (un)check the item.

Definition at line 253 of file kcheckcombobox.cpp.

void KCheckComboBox::setSeparator ( const QString &  separator)

Sets the separator used to separate items in the line edit.

Parameters
separatorThe new separator

Definition at line 269 of file kcheckcombobox.cpp.

void KCheckComboBox::setSqueezeText ( bool  squeeze)

Sets whether or not the text must be squeezed.

Parameters
squeezeThe new squeeze status

Definition at line 234 of file kcheckcombobox.cpp.

bool KPIM::KCheckComboBox::squeezeText ( ) const

Returns whether or not the text will be squeezed to fit in the combo's line edit.

This property is false by default.

See also
KSqueezedTextLabel
void KCheckComboBox::wheelEvent ( QWheelEvent *  event)
protectedvirtual

Definition at line 298 of file kcheckcombobox.cpp.

Property Documentation

QStringList KPIM::KCheckComboBox::checkedItems
readwrite

Definition at line 49 of file kcheckcombobox.h.

QString KCheckComboBox::defaultText
readwrite

Definition at line 47 of file kcheckcombobox.h.

QString KCheckComboBox::separator
readwrite

Definition at line 46 of file kcheckcombobox.h.

bool KCheckComboBox::squeezeText
readwrite

Definition at line 48 of file kcheckcombobox.h.


The documentation for this class was generated from the following files:
  • kcheckcombobox.h
  • kcheckcombobox.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libkdepim

Skip menu "libkdepim"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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