diff options
Diffstat (limited to 'ldmicro/lib/linuxUI')
-rw-r--r-- | ldmicro/lib/linuxUI/linuxUI.cpp | 13 | ||||
-rw-r--r-- | ldmicro/lib/linuxUI/linuxUI.h | 3 |
2 files changed, 6 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); diff --git a/ldmicro/lib/linuxUI/linuxUI.h b/ldmicro/lib/linuxUI/linuxUI.h index ed2a961..0ba229b 100644 --- a/ldmicro/lib/linuxUI/linuxUI.h +++ b/ldmicro/lib/linuxUI/linuxUI.h @@ -19,6 +19,9 @@ #include <QFileDialog> #include <QStandardPaths> #include <QPlainTextEdit> +#include <QRadioButton> +#include <QButtonGroup> +#include <QLineEdit> // #include <QtGui> // #include <QSize> // #include "freezeLD.h" |