diff options
author | akshay-c | 2019-04-12 16:52:28 +0530 |
---|---|---|
committer | akshay-c | 2019-04-12 16:52:28 +0530 |
commit | 3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3 (patch) | |
tree | 2d082c364682d8ff0e3457de6d2d0e1cdf968113 /ldmicro/lib/linuxUI/linuxUI.cpp | |
parent | b0c1405589824fc9f9f464683286cdac7ad139d0 (diff) | |
download | LDmicroQt-3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3.tar.gz LDmicroQt-3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3.tar.bz2 LDmicroQt-3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3.zip |
Simulation Code Uncommented; simpledialog addition in progress
Diffstat (limited to 'ldmicro/lib/linuxUI/linuxUI.cpp')
-rw-r--r-- | ldmicro/lib/linuxUI/linuxUI.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
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<QAction *> actions() - action->blockSignals(bool)*/ QList<QAction *> MenuList = MenuItem->actions(); QList<QAction *>::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); |