summaryrefslogtreecommitdiff
path: root/ldmicro/lib/linuxUI
diff options
context:
space:
mode:
authorakshay-c2019-04-12 16:52:28 +0530
committerakshay-c2019-04-12 16:52:28 +0530
commit3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3 (patch)
tree2d082c364682d8ff0e3457de6d2d0e1cdf968113 /ldmicro/lib/linuxUI
parentb0c1405589824fc9f9f464683286cdac7ad139d0 (diff)
downloadLDmicroQt-3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3.tar.gz
LDmicroQt-3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3.tar.bz2
LDmicroQt-3b94e473db82f28fb022c1f5f9aa74a2e48fdaf3.zip
Simulation Code Uncommented; simpledialog addition in progress
Diffstat (limited to 'ldmicro/lib/linuxUI')
-rw-r--r--ldmicro/lib/linuxUI/linuxUI.cpp13
-rw-r--r--ldmicro/lib/linuxUI/linuxUI.h3
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"