aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/objects/KvsObject_popupMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/objects/KvsObject_popupMenu.cpp')
-rw-r--r--src/modules/objects/KvsObject_popupMenu.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/objects/KvsObject_popupMenu.cpp b/src/modules/objects/KvsObject_popupMenu.cpp
index 891404f3e..fa1930c87 100644
--- a/src/modules/objects/KvsObject_popupMenu.cpp
+++ b/src/modules/objects/KvsObject_popupMenu.cpp
@@ -52,9 +52,9 @@
[class]widget[/class]
@description:
This widget can be used to display a popup menu.Technically, a popup menu consists of a list of menu items.[br]
- You add items with addAction(). An item is either a string. In addition, items can have an optional icon drawn on the very left side.[br]
+ You add items with insertItem(). An item is either a string. In addition, items can have an optional icon drawn on the very left side.[br]
@functions:
- !fn: $addAction(<text:string>,[icon_id:string])
+ !fn: $insertItem(<text:string>,[icon_id:string])
Inserts menu items into a popup menu with optional icon and return the popup identifier.
!fn: $addMenu(<popupmenu:hobject,[idx:uinteger])
Add a popupmenu.
@@ -68,7 +68,7 @@
Removes the menu item that has the identifier id.
!fn: $removeItemAt(<index:uinteger>)
Removes the menu item at position index.
- !fn: $addSeparator(<index:uinteger>)
+ !fn: $insertSeparator(<index:uinteger>)
Inserts a separator at position index.[br]
If the index is negative the separator becomes the last menu item.
!fn: $activatedEvent(<popup_id:uinteger>)
@@ -91,11 +91,11 @@
constructor()
{
// we store the item's id for checkit in activatedEvent
- @%tile_id=@$addAction("Tile",118)
- @%cascade_id=@$addAction("Cascade",115)
- @$addSeparator(3)
- @%closeactw_id=@$addAction("Close Active Window",08)
- @%closeallw_id=@$addAction("Close All Window",58)
+ @%tile_id=@$insertItem("Tile",118)
+ @%cascade_id=@$insertItem("Cascade",115)
+ @$insertSeparator(3)
+ @%closeactw_id=@$insertItem("Close Active Window",08)
+ @%closeallw_id=@$insertItem("Close All Window",58)
}
activatedEvent()
{
@@ -197,10 +197,10 @@ static void removeAction(int idx)
KVSO_BEGIN_REGISTERCLASS(KvsObject_popupMenu,"popupmenu","widget")
- KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_popupMenu,addAction)
+ KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_popupMenu,insertItem)
KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_popupMenu,setTitle)
KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_popupMenu,exec)
- KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_popupMenu,addSeparator)
+ KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_popupMenu,insertSeparator)
KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_popupMenu,removeItem)
KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_popupMenu,addMenu)
@@ -228,7 +228,7 @@ bool KvsObject_popupMenu::init(KviKvsRunTimeContext *,KviKvsVariantList *)
return true;
}
-KVSO_CLASS_FUNCTION(popupMenu,addAction)
+KVSO_CLASS_FUNCTION(popupMenu,insertItem)
{
CHECK_INTERNAL_POINTER(widget())
QString szItem,szIcon;
@@ -348,7 +348,7 @@ KVSO_CLASS_FUNCTION(popupMenu,removeItem)
return true;
}
-KVSO_CLASS_FUNCTION(popupMenu,addSeparator)
+KVSO_CLASS_FUNCTION(popupMenu,insertSeparator)
{
CHECK_INTERNAL_POINTER(widget())
kvs_uint_t iIndex;