26 #ifndef YQMultiSelectionBox_h
27 #define YQMultiSelectionBox_h
30 #include <QTreeWidget>
32 #include <yui/YMultiSelectionBox.h>
59 virtual void setLabel(
const std::string & label );
66 virtual void addItem( YItem * item );
73 virtual void selectItem( YItem * item,
bool selected =
true );
131 virtual void setSize(
int newWidth,
int newHeight );
157 void slotItemChanged( QTreeWidgetItem*,
int );
167 QTreeWidget * _qt_listView;
179 QTreeWidget * listView,
190 YItem *
yItem()
const {
return _yItem; }
static int _item_count
The next serial number to use.
virtual ~YQMultiSelectionBoxItem()
Destructor.
YQMultiSelectionBoxItem(YQMultiSelectionBox *parent, QTreeWidget *listView, YItem *yItem)
Constructor.
YItem * yItem() const
Return the corresponding YItem.
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
void slotSelected()
Send SelectionChanged event if opt(notify) is set.
virtual void deleteAllItems()
Delete all items.
virtual void setCurrentItem(YItem *item)
Set the keyboard focus to the specified item.
virtual void deselectAllItems()
Deselect all items.
~YQMultiSelectionBox()
Destructor.
virtual YItem * currentItem()
Return the the item that currently has the keyboard focus or 0 if no item currently has the keyboard ...
virtual int preferredHeight()
Preferred height of the widget.
virtual void setLabel(const std::string &label)
Change the label text.
virtual void addItem(YItem *item)
Add an item.
YQMultiSelectionBoxItem * findItem(YItem *item)
Find the counterpart of 'item'.
YQMultiSelectionBox(YWidget *parent, const std::string &label)
Constructor.
void valueChanged()
Emitted upon when an item changes its state.
virtual bool setKeyboardFocus()
Accept the keyboard focus.
virtual int preferredWidth()
Preferred width of the widget.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an item.
void slotValueChanged()
Send ValueChanged event if opt(notify) is set.