summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/UserSearch/QtUserSearchFieldsPage.cpp')
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchFieldsPage.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchFieldsPage.cpp b/Swift/QtUI/UserSearch/QtUserSearchFieldsPage.cpp
index 3ef048b..13858a7 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchFieldsPage.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchFieldsPage.cpp
@@ -8,12 +8,31 @@
namespace Swift {
-QtUserSearchFieldsPage::QtUserSearchFieldsPage() {
+QtUserSearchFieldsPage::QtUserSearchFieldsPage() : formWidget_(0) {
setupUi(this);
}
bool QtUserSearchFieldsPage::isComplete() const {
- return nickInput_->isEnabled() || firstInput_->isEnabled() || lastInput_->isEnabled() || emailInput_->isEnabled();
+ if (formWidget_) {
+ return formWidget_->isEnabled();
+ } else {
+ return nickInput_->isEnabled() || firstInput_->isEnabled() || lastInput_->isEnabled() || emailInput_->isEnabled();
+ }
+}
+
+QtFormWidget* QtUserSearchFieldsPage::getFormWidget() {
+ return formWidget_;
+}
+
+void QtUserSearchFieldsPage::setFormWidget(QtFormWidget *widget) {
+ if (formWidget_) {
+ delete formWidget_;
+ formWidget_ = NULL;
+ }
+ if (widget) {
+ formContainer_->layout()->addWidget(widget);
+ }
+ formWidget_ = widget;
}
void QtUserSearchFieldsPage::emitCompletenessCheck() {