From 4d7617cbf20985b7cf2231675d8aadd01f77c3d2 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 2 Jul 2008 07:49:31 +0000 Subject: Added disable/enable methods on widgets and exposed them to lua. --- client/macrowindow.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'client/macrowindow.cc') 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"); +} -- cgit v1.2.3