summaryrefslogtreecommitdiff
path: root/client/macrowindow.cc
diff options
context:
space:
mode:
authordeva <deva>2008-07-02 07:49:31 +0000
committerdeva <deva>2008-07-02 07:49:31 +0000
commit4d7617cbf20985b7cf2231675d8aadd01f77c3d2 (patch)
tree673a098723c6f6cef90719e0ffa65b2cb31c37b6 /client/macrowindow.cc
parentef408f5639958ce51170978433a0e483240a3ff2 (diff)
Added disable/enable methods on widgets and exposed them to lua.
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r--client/macrowindow.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc
index 6f52916..ad85c6f 100644
--- a/client/macrowindow.cc
+++ b/client/macrowindow.cc
@@ -243,3 +243,33 @@ void MacroWindow::setValue(QString name, QString value)
i++;
}
}
+
+void MacroWindow::enable(QString name)
+{
+ // Iterate the different entries, and append their results to the commit string
+ QVector< Widget* >::iterator i=widgets.begin();
+ while (i != widgets.end()) {
+ Widget* w = *i;
+ if(name == w->getName()) {
+ w->enable();
+ return;
+ }
+ i++;
+ }
+ printf("widget not found!\n");
+}
+
+void MacroWindow::disable(QString name)
+{
+ // Iterate the different entries, and append their results to the commit string
+ QVector< Widget* >::iterator i=widgets.begin();
+ while (i != widgets.end()) {
+ Widget* w = *i;
+ if(name == w->getName()) {
+ w->disable();
+ return;
+ }
+ i++;
+ }
+ printf("widget not found!\n");
+}