libyui-qt
Loading...
Searching...
No Matches
YQSelectionBox Class Reference
Inheritance diagram for YQSelectionBox:
Collaboration diagram for YQSelectionBox:

Public Member Functions

 YQSelectionBox (YWidget *parent, const std::string &label)
 
virtual ~YQSelectionBox ()
 
virtual void setLabel (const std::string &label)
 
virtual void addItem (YItem *item)
 
virtual void addItems (const YItemCollection &itemCollection)
 
virtual void selectItem (YItem *item, bool selected=true)
 
virtual void deselectAllItems ()
 
virtual void deleteAllItems ()
 
virtual void setEnabled (bool enabled)
 
virtual int preferredWidth ()
 
virtual int preferredHeight ()
 
virtual void setSize (int newWidth, int newHeight)
 
virtual bool setKeyboardFocus ()
 
virtual bool eventFilter (QObject *obj, QEvent *ev)
 

Protected Slots

void slotSelectionChanged ()
 
void slotActivated (QListWidgetItem *item)
 
void returnDelayed ()
 
void returnImmediately ()
 

Protected Member Functions

void selectItem (int index)
 
void addItem (YItem *item, bool batchMode)
 

Protected Attributes

YQWidgetCaption_caption
 
QListWidget * _qt_listWidget
 
QTimer _timer
 

Constructor & Destructor Documentation

◆ YQSelectionBox()

YQSelectionBox::YQSelectionBox ( YWidget *  parent,
const std::string &  label 
)

Constructor.

◆ ~YQSelectionBox()

YQSelectionBox::~YQSelectionBox ( )
virtual

Destructor.

Member Function Documentation

◆ addItem() [1/2]

void YQSelectionBox::addItem ( YItem *  item)
virtual

Add an item.

Reimplemented from YSelectionWidget.

◆ addItem() [2/2]

void YQSelectionBox::addItem ( YItem *  item,
bool  batchMode 
)
protected

Internal addItem() method that will not do expensive operations in batch mode.

◆ addItems()

void YQSelectionBox::addItems ( const YItemCollection &  itemCollection)
virtual

Add multiple items.

Reimplemented for efficiency from YSelectionWidget.

◆ deleteAllItems()

void YQSelectionBox::deleteAllItems ( )
virtual

Delete all items.

Reimplemented from YSelectionWidget.

◆ deselectAllItems()

void YQSelectionBox::deselectAllItems ( )
virtual

Deselect all items.

Reimplemented from YSelectionWidget.

◆ eventFilter()

bool YQSelectionBox::eventFilter ( QObject *  obj,
QEvent *  ev 
)
virtual

Event filter.

Reimplemented from QWidget.

◆ preferredHeight()

int YQSelectionBox::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

◆ preferredWidth()

int YQSelectionBox::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

◆ returnDelayed

void YQSelectionBox::returnDelayed ( )
protectedslot

Return after some millseconds delay - collect multiple events. This is only relevant if Opt( :notify ) is set.

◆ returnImmediately

void YQSelectionBox::returnImmediately ( )
protectedslot

Return immediately. This is only relevant if Opt( :notify ) is set.

◆ selectItem() [1/2]

void YQSelectionBox::selectItem ( int  index)
protected

Select an item by index.

◆ selectItem() [2/2]

void YQSelectionBox::selectItem ( YItem *  item,
bool  selected = true 
)
virtual

Select or deselect an item.

Reimplemented from YSelectionWidget.

◆ setEnabled()

void YQSelectionBox::setEnabled ( bool  enabled)
virtual

Set enabled/disabled state.

Reimplemented from YWidget.

◆ setKeyboardFocus()

bool YQSelectionBox::setKeyboardFocus ( )
virtual

Accept the keyboard focus.

Reimplemented from YWidget.

◆ setLabel()

void YQSelectionBox::setLabel ( const std::string &  label)
virtual

Change the label text.

Reimplemented from YSelectionWidget.

◆ setSize()

void YQSelectionBox::setSize ( int  newWidth,
int  newHeight 
)
virtual

Set the new size of the widget.

Reimplemented from YWidget.

◆ slotActivated

void YQSelectionBox::slotActivated ( QListWidgetItem *  item)
protectedslot

Notification that an item has been activated (double clicked).

◆ slotSelectionChanged

void YQSelectionBox::slotSelectionChanged ( )
protectedslot

Notification that an item has been selected. This is only relevant if Opt( :notify ) is set.


The documentation for this class was generated from the following files: