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; }
void slotValueChanged()
Send ValueChanged event if opt(notify) is set.
virtual int preferredWidth()
Preferred width of the widget.
static int _item_count
The next serial number to use.
virtual int preferredHeight()
Preferred height of the widget.
virtual ~YQMultiSelectionBoxItem()
Destructor.
YQMultiSelectionBox(YWidget *parent, const std::string &label)
Constructor.
virtual void deleteAllItems()
Delete all items.
YQMultiSelectionBoxItem(YQMultiSelectionBox *parent, QTreeWidget *listView, YItem *yItem)
Constructor.
virtual YItem * currentItem()
Return the the item that currently has the keyboard focus or 0 if no item currently has the keyboard ...
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
void valueChanged()
Emitted upon when an item changes its state.
YItem * yItem() const
Return the corresponding YItem.
virtual void setLabel(const std::string &label)
Change the label text.
virtual void deselectAllItems()
Deselect all items.
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
YQMultiSelectionBoxItem * findItem(YItem *item)
Find the counterpart of 'item'.
virtual void setCurrentItem(YItem *item)
Set the keyboard focus to the specified item.
virtual bool setKeyboardFocus()
Accept the keyboard focus.
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an item.
void slotSelected()
Send SelectionChanged event if opt(notify) is set.
~YQMultiSelectionBox()
Destructor.
virtual void addItem(YItem *item)
Add an item.