diff options
| author | 2007-01-16 22:01:45 +0000 | |
|---|---|---|
| committer | 2007-01-16 22:01:45 +0000 | |
| commit | 9651fae9ef800029739f19b360dd7bf59edfbde3 (patch) | |
| tree | 6017149f9c2fd17253ed54fdcc3855292005590f /src/modules/objects | |
| parent | A discussion about the numbering scheme in hackers.guide.txt (diff) | |
| download | KVIrc-9651fae9ef800029739f19b360dd7bf59edfbde3.tar.gz KVIrc-9651fae9ef800029739f19b360dd7bf59edfbde3.tar.bz2 KVIrc-9651fae9ef800029739f19b360dd7bf59edfbde3.zip | |
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
Diffstat (limited to 'src/modules/objects')
| -rw-r--r-- | src/modules/objects/class_listbox.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
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: <index:integer> $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: <string> $currentItemChange() This signal is emitted by the default implementation of [classfnc]$currentItemChangeEvent[/classfnc]().[br] -*/ + !sg: <string> $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); } |
