From 9651fae9ef800029739f19b360dd7bf59edfbde3 Mon Sep 17 00:00:00 2001 From: Noldor Date: Tue, 16 Jan 2007 22:01:45 +0000 Subject: fixed compilation error on win, update project, fixed themedialog , listbox.... git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@177 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/objects/class_listbox.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/modules/objects/class_listbox.cpp') diff --git a/src/modules/objects/class_listbox.cpp b/src/modules/objects/class_listbox.cpp index 8d9f3381a..93e25aecc 100644 --- a/src/modules/objects/class_listbox.cpp +++ b/src/modules/objects/class_listbox.cpp @@ -98,10 +98,16 @@ This function is called by KVIrc when the selection in the listbox changes. !fn: $currentItemChangeEvent() This function is called by KVIrc when the current item changes. + !fn: $onItemEvent() + This function is called by KVIrc when the current item pointed by the mouse changes and gives in $0 the item index. + @signals: !sg: $currentItemChange() This signal is emitted by the default implementation of [classfnc]$currentItemChangeEvent[/classfnc]().[br] -*/ + !sg: $onItem() + This signal is emitted by the default implementation of [classfnc]$onItemEvent[/classfnc]().[br] + + */ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_listbox,"listbox","widget") @@ -123,7 +129,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_listbox,"listbox","widget") KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"setSelected",functionsetSelected); KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"isSelected",functionisSelected); KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"currentItemChangeEvent",functioncurrentItemChangeEvent); - KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"currentnItemEvent",functiononItemEvent); + KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"onItemEvent",functiononItemEvent); KVSO_REGISTER_STANDARD_NOTHINGRETURN_HANDLER(KviKvsObject_listbox,"selectionChangeEvent") @@ -352,7 +358,8 @@ bool KviKvsObject_listbox::functiononItemEvent(KviKvsObjectFunctionCall *c) void KviKvsObject_listbox::onItem(QListBoxItem *item) { - KviKvsVariantList params(new KviKvsVariant(item->text())); + QListBox *lbx(item->listBox()); + KviKvsVariantList params(new KviKvsVariant((kvs_int_t)lbx->index(item))); callFunction(this,"onItemEvent",0,¶ms); } -- cgit v1.3.1-10-gc9f91