From 3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3 Mon Sep 17 00:00:00 2001 From: akshay-c Date: Fri, 12 Apr 2019 16:52:28 +0530 Subject: Simulation Code Uncommented; simpledialog addition in progress --- ldmicro/lib/linuxUI/linuxUI.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'ldmicro/lib/linuxUI/linuxUI.cpp') diff --git a/ldmicro/lib/linuxUI/linuxUI.cpp b/ldmicro/lib/linuxUI/linuxUI.cpp index a8c4eb3..015cbb8 100644 --- a/ldmicro/lib/linuxUI/linuxUI.cpp +++ b/ldmicro/lib/linuxUI/linuxUI.cpp @@ -152,16 +152,13 @@ void EnableMenuItem(HMENU MenuName, QAction* MenuItem, UINT CheckEnabledItem) } } +// Special function designed for qt, since disabling top-level menu +// Does not disable its child menus. They can still be accessed via +// keyboard shortcuts void EnableMenuItem(HMENU MenuName, HMENU MenuItem, UINT CheckEnabledItem) { - /*Blocks only the top menu signals. Does not block submenu signals. - Signals still executed through keyboard shortcuts - Reqd: - QList actions() - action->blockSignals(bool)*/ QList MenuList = MenuItem->actions(); QList::iterator item = MenuList.begin(); - // printf("MenuListCount%d\n", MenuList.count()); switch (CheckEnabledItem){ case MF_ENABLED : while((item != MenuList.end()))/* || !(MenuList->isEmpty))*/ @@ -169,7 +166,6 @@ void EnableMenuItem(HMENU MenuName, HMENU MenuItem, UINT CheckEnabledItem) (*item)->setEnabled(true); (*item)->blockSignals(false); item++; - // printf("Indexof%d\n", MenuList.indexOf(*item, 0)); } MenuItem->setEnabled(true); MenuItem->blockSignals(false); @@ -179,10 +175,7 @@ void EnableMenuItem(HMENU MenuName, HMENU MenuItem, UINT CheckEnabledItem) { (*item)->setEnabled(false); (*item)->blockSignals(true); - /*if(*item == InsertContactsMenu) - printf("InsertContactsMenu\n");*/ item++; - // printf("Indexof%d\n", MenuList.indexOf(*item, 0)); } MenuItem->setEnabled(false); MenuItem->blockSignals(true); -- cgit