summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-04-27 16:02:10 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-27 16:02:10 (GMT)
commit74df18dda93f154339af1137e8676337233b4a61 (patch)
treec10364de0d828a2b397bcb46408ff3d7bf66b331 /Swift/QtUI/QtFormWidget.h
parent9e57b31133edad6a543da05aca54ee94d589b090 (diff)
downloadswift-contrib-74df18dda93f154339af1137e8676337233b4a61.zip
swift-contrib-74df18dda93f154339af1137e8676337233b4a61.tar.bz2
Don't allow editing of AdHoc result forms.
Resolves: #1090
Diffstat (limited to 'Swift/QtUI/QtFormWidget.h')
-rw-r--r--Swift/QtUI/QtFormWidget.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Swift/QtUI/QtFormWidget.h b/Swift/QtUI/QtFormWidget.h
index 2fb7b98..c7aae73 100644
--- a/Swift/QtUI/QtFormWidget.h
+++ b/Swift/QtUI/QtFormWidget.h
@@ -21,9 +21,12 @@ class QtFormWidget : public QWidget {
QtFormWidget(Form::ref form, QWidget* parent = NULL);
virtual ~QtFormWidget();
Form::ref getCompletedForm();
+ void setEditable(bool editable);
private:
QWidget* createWidget(FormField::ref field);
QListWidget* createList(FormField::ref field);
+ template<class T> void setEnabled(QWidget* rawWidget, bool editable);
+ template<class T> void setEditable(QWidget* rawWidget, bool editable);
std::map<std::string, QWidget*> fields_;
Form::ref form_;
};